com.pulumi.azure.compute.ManagedDiskSasTokenArgs Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure Show documentation
Show all versions of azure Show documentation
A Pulumi package for creating and managing Microsoft Azure cloud resources, based on the Terraform azurerm provider. We recommend using the [Azure Native provider](https://github.com/pulumi/pulumi-azure-native) to provision Azure infrastructure. Azure Native provides complete coverage of Azure resources and same-day access to new resources and resource updates.
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.azure.compute;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
public final class ManagedDiskSasTokenArgs extends com.pulumi.resources.ResourceArgs {
public static final ManagedDiskSasTokenArgs Empty = new ManagedDiskSasTokenArgs();
/**
* The level of access required on the disk. Supported are Read, Write. Changing this forces a new resource to be created.
*
* Refer to the [SAS creation reference from Azure](https://docs.microsoft.com/rest/api/compute/disks/grant-access)
* for additional details on the fields above.
*
*/
@Import(name="accessLevel", required=true)
private Output accessLevel;
/**
* @return The level of access required on the disk. Supported are Read, Write. Changing this forces a new resource to be created.
*
* Refer to the [SAS creation reference from Azure](https://docs.microsoft.com/rest/api/compute/disks/grant-access)
* for additional details on the fields above.
*
*/
public Output accessLevel() {
return this.accessLevel;
}
/**
* The duration for which the export should be allowed. Should be between 30 & 4294967295 seconds. Changing this forces a new resource to be created.
*
*/
@Import(name="durationInSeconds", required=true)
private Output durationInSeconds;
/**
* @return The duration for which the export should be allowed. Should be between 30 & 4294967295 seconds. Changing this forces a new resource to be created.
*
*/
public Output durationInSeconds() {
return this.durationInSeconds;
}
/**
* The ID of an existing Managed Disk which should be exported. Changing this forces a new resource to be created.
*
*/
@Import(name="managedDiskId", required=true)
private Output managedDiskId;
/**
* @return The ID of an existing Managed Disk which should be exported. Changing this forces a new resource to be created.
*
*/
public Output managedDiskId() {
return this.managedDiskId;
}
private ManagedDiskSasTokenArgs() {}
private ManagedDiskSasTokenArgs(ManagedDiskSasTokenArgs $) {
this.accessLevel = $.accessLevel;
this.durationInSeconds = $.durationInSeconds;
this.managedDiskId = $.managedDiskId;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(ManagedDiskSasTokenArgs defaults) {
return new Builder(defaults);
}
public static final class Builder {
private ManagedDiskSasTokenArgs $;
public Builder() {
$ = new ManagedDiskSasTokenArgs();
}
public Builder(ManagedDiskSasTokenArgs defaults) {
$ = new ManagedDiskSasTokenArgs(Objects.requireNonNull(defaults));
}
/**
* @param accessLevel The level of access required on the disk. Supported are Read, Write. Changing this forces a new resource to be created.
*
* Refer to the [SAS creation reference from Azure](https://docs.microsoft.com/rest/api/compute/disks/grant-access)
* for additional details on the fields above.
*
* @return builder
*
*/
public Builder accessLevel(Output accessLevel) {
$.accessLevel = accessLevel;
return this;
}
/**
* @param accessLevel The level of access required on the disk. Supported are Read, Write. Changing this forces a new resource to be created.
*
* Refer to the [SAS creation reference from Azure](https://docs.microsoft.com/rest/api/compute/disks/grant-access)
* for additional details on the fields above.
*
* @return builder
*
*/
public Builder accessLevel(String accessLevel) {
return accessLevel(Output.of(accessLevel));
}
/**
* @param durationInSeconds The duration for which the export should be allowed. Should be between 30 & 4294967295 seconds. Changing this forces a new resource to be created.
*
* @return builder
*
*/
public Builder durationInSeconds(Output durationInSeconds) {
$.durationInSeconds = durationInSeconds;
return this;
}
/**
* @param durationInSeconds The duration for which the export should be allowed. Should be between 30 & 4294967295 seconds. Changing this forces a new resource to be created.
*
* @return builder
*
*/
public Builder durationInSeconds(Integer durationInSeconds) {
return durationInSeconds(Output.of(durationInSeconds));
}
/**
* @param managedDiskId The ID of an existing Managed Disk which should be exported. Changing this forces a new resource to be created.
*
* @return builder
*
*/
public Builder managedDiskId(Output managedDiskId) {
$.managedDiskId = managedDiskId;
return this;
}
/**
* @param managedDiskId The ID of an existing Managed Disk which should be exported. Changing this forces a new resource to be created.
*
* @return builder
*
*/
public Builder managedDiskId(String managedDiskId) {
return managedDiskId(Output.of(managedDiskId));
}
public ManagedDiskSasTokenArgs build() {
if ($.accessLevel == null) {
throw new MissingRequiredPropertyException("ManagedDiskSasTokenArgs", "accessLevel");
}
if ($.durationInSeconds == null) {
throw new MissingRequiredPropertyException("ManagedDiskSasTokenArgs", "durationInSeconds");
}
if ($.managedDiskId == null) {
throw new MissingRequiredPropertyException("ManagedDiskSasTokenArgs", "managedDiskId");
}
return $;
}
}
}