Class ComputeDiskConfig.Builder
- java.lang.Object
-
- com.hashicorp.cdktf.providers.google.compute_disk.ComputeDiskConfig.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<ComputeDiskConfig>
- Enclosing interface:
- ComputeDiskConfig
@Stability(Stable) public static final class ComputeDiskConfig.Builder extends Object implements software.amazon.jsii.Builder<ComputeDiskConfig>
A builder forComputeDiskConfig
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
-
-
-
Method Detail
-
name
@Stability(Stable) public ComputeDiskConfig.Builder name(String name)
Sets the value ofComputeDiskConfig.getName()- Parameters:
name- Name of the resource. This parameter is required. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression '[a-z](%5B-a-z0-9%5D*%5Ba-z0-9%5D)?' which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_disk#name ComputeDisk#name}- Returns:
this
-
accessMode
@Stability(Stable) public ComputeDiskConfig.Builder accessMode(String accessMode)
Sets the value ofComputeDiskConfig.getAccessMode()- Parameters:
accessMode- The accessMode of the disk. For example: * READ_WRITE_SINGLE * READ_WRITE_MANY * READ_ONLY_SINGLE. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_disk#access_mode ComputeDisk#access_mode}- Returns:
this
-
asyncPrimaryDisk
@Stability(Stable) public ComputeDiskConfig.Builder asyncPrimaryDisk(ComputeDiskAsyncPrimaryDisk asyncPrimaryDisk)
Sets the value ofComputeDiskConfig.getAsyncPrimaryDisk()- Parameters:
asyncPrimaryDisk- async_primary_disk block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_disk#async_primary_disk ComputeDisk#async_primary_disk}- Returns:
this
-
description
@Stability(Stable) public ComputeDiskConfig.Builder description(String description)
Sets the value ofComputeDiskConfig.getDescription()- Parameters:
description- An optional description of this resource. Provide this property when you create the resource. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_disk#description ComputeDisk#description}- Returns:
this
-
diskEncryptionKey
@Stability(Stable) public ComputeDiskConfig.Builder diskEncryptionKey(ComputeDiskDiskEncryptionKey diskEncryptionKey)
Sets the value ofComputeDiskConfig.getDiskEncryptionKey()- Parameters:
diskEncryptionKey- disk_encryption_key block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_disk#disk_encryption_key ComputeDisk#disk_encryption_key}- Returns:
this
-
enableConfidentialCompute
@Stability(Stable) public ComputeDiskConfig.Builder enableConfidentialCompute(Boolean enableConfidentialCompute)
Sets the value ofComputeDiskConfig.getEnableConfidentialCompute()- Parameters:
enableConfidentialCompute- Whether this disk is using confidential compute mode. Note: Only supported on hyperdisk skus, disk_encryption_key is required when setting to true Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_disk#enable_confidential_compute ComputeDisk#enable_confidential_compute}- Returns:
this
-
enableConfidentialCompute
@Stability(Stable) public ComputeDiskConfig.Builder enableConfidentialCompute(com.hashicorp.cdktf.IResolvable enableConfidentialCompute)
Sets the value ofComputeDiskConfig.getEnableConfidentialCompute()- Parameters:
enableConfidentialCompute- Whether this disk is using confidential compute mode. Note: Only supported on hyperdisk skus, disk_encryption_key is required when setting to true Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_disk#enable_confidential_compute ComputeDisk#enable_confidential_compute}- Returns:
this
-
guestOsFeatures
@Stability(Stable) public ComputeDiskConfig.Builder guestOsFeatures(com.hashicorp.cdktf.IResolvable guestOsFeatures)
Sets the value ofComputeDiskConfig.getGuestOsFeatures()- Parameters:
guestOsFeatures- guest_os_features block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_disk#guest_os_features ComputeDisk#guest_os_features}- Returns:
this
-
guestOsFeatures
@Stability(Stable) public ComputeDiskConfig.Builder guestOsFeatures(List<? extends ComputeDiskGuestOsFeatures> guestOsFeatures)
Sets the value ofComputeDiskConfig.getGuestOsFeatures()- Parameters:
guestOsFeatures- guest_os_features block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_disk#guest_os_features ComputeDisk#guest_os_features}- Returns:
this
-
id
@Stability(Stable) public ComputeDiskConfig.Builder id(String id)
Sets the value ofComputeDiskConfig.getId()- Parameters:
id- Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_disk#id ComputeDisk#id}. Please be aware that the id field is automatically added to all resources in Terraform providers using a Terraform provider SDK version below 2. If you experience problems setting this value it might not be settable. Please take a look at the provider documentation to ensure it should be settable.- Returns:
this
-
image
@Stability(Stable) public ComputeDiskConfig.Builder image(String image)
Sets the value ofComputeDiskConfig.getImage()- Parameters:
image- The image from which to initialize this disk. This can be one of: the image's 'self_link', 'projects/{project}/global/images/{image}', 'projects/{project}/global/images/family/{family}', 'global/images/{image}', 'global/images/family/{family}', 'family/{family}', '{project}/{family}', '{project}/{image}', '{family}', or '{image}'. If referred by family, the images names must include the family name. If they don't, use the [google_compute_image data source](/docs/providers/google/d/compute_image.html). For instance, the image 'centos-6-v20180104' includes its family name 'centos-6'. These images can be referred by family name here. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_disk#image ComputeDisk#image}- Returns:
this
-
labels
@Stability(Stable) public ComputeDiskConfig.Builder labels(Map<String,String> labels)
Sets the value ofComputeDiskConfig.getLabels()- Parameters:
labels- Labels to apply to this disk. A list of key->value pairs. **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_disk#labels ComputeDisk#labels}- Returns:
this
-
licenses
@Stability(Stable) public ComputeDiskConfig.Builder licenses(List<String> licenses)
Sets the value ofComputeDiskConfig.getLicenses()- Parameters:
licenses- Any applicable license URI. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_disk#licenses ComputeDisk#licenses}- Returns:
this
-
physicalBlockSizeBytes
@Stability(Stable) public ComputeDiskConfig.Builder physicalBlockSizeBytes(Number physicalBlockSizeBytes)
Sets the value ofComputeDiskConfig.getPhysicalBlockSizeBytes()- Parameters:
physicalBlockSizeBytes- Physical block size of the persistent disk, in bytes. If not present in a request, a default value is used. Currently supported sizes are 4096 and 16384, other sizes may be added in the future. If an unsupported value is requested, the error message will list the supported values for the caller's project. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_disk#physical_block_size_bytes ComputeDisk#physical_block_size_bytes}- Returns:
this
-
project
@Stability(Stable) public ComputeDiskConfig.Builder project(String project)
Sets the value ofComputeDiskConfig.getProject()- Parameters:
project- Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_disk#project ComputeDisk#project}.- Returns:
this
-
provisionedIops
@Stability(Stable) public ComputeDiskConfig.Builder provisionedIops(Number provisionedIops)
Sets the value ofComputeDiskConfig.getProvisionedIops()- Parameters:
provisionedIops- Indicates how many IOPS must be provisioned for the disk. Note: Updating currently is only supported by hyperdisk skus without the need to delete and recreate the disk, hyperdisk allows for an update of IOPS every 4 hours. To update your hyperdisk more frequently, you'll need to manually delete and recreate it Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_disk#provisioned_iops ComputeDisk#provisioned_iops}- Returns:
this
-
provisionedThroughput
@Stability(Stable) public ComputeDiskConfig.Builder provisionedThroughput(Number provisionedThroughput)
Sets the value ofComputeDiskConfig.getProvisionedThroughput()- Parameters:
provisionedThroughput- Indicates how much Throughput must be provisioned for the disk. Note: Updating currently is only supported by hyperdisk skus without the need to delete and recreate the disk, hyperdisk allows for an update of Throughput every 4 hours. To update your hyperdisk more frequently, you'll need to manually delete and recreate it Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_disk#provisioned_throughput ComputeDisk#provisioned_throughput}- Returns:
this
-
size
@Stability(Stable) public ComputeDiskConfig.Builder size(Number size)
Sets the value ofComputeDiskConfig.getSize()- Parameters:
size- Size of the persistent disk, specified in GB. You can specify this field when creating a persistent disk using the 'image' or 'snapshot' parameter, or specify it alone to create an empty persistent disk. If you specify this field along with 'image' or 'snapshot', the value must not be less than the size of the image or the size of the snapshot. ~>**NOTE** If you change the size, Terraform updates the disk size if upsizing is detected but recreates the disk if downsizing is requested. You can add 'lifecycle.prevent_destroy' in the config to prevent destroying and recreating. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_disk#size ComputeDisk#size}- Returns:
this
-
snapshot
@Stability(Stable) public ComputeDiskConfig.Builder snapshot(String snapshot)
Sets the value ofComputeDiskConfig.getSnapshot()- Parameters:
snapshot- The source snapshot used to create this disk. You can provide this as a partial or full URL to the resource. If the snapshot is in another project than this disk, you must supply a full URL. For example, the following are valid values: * 'https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot' * 'projects/project/global/snapshots/snapshot' * 'global/snapshots/snapshot' * 'snapshot' Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_disk#snapshot ComputeDisk#snapshot}- Returns:
this
-
sourceDisk
@Stability(Stable) public ComputeDiskConfig.Builder sourceDisk(String sourceDisk)
Sets the value ofComputeDiskConfig.getSourceDisk()- Parameters:
sourceDisk- The source disk used to create this disk. You can provide this as a partial or full URL to the resource. For example, the following are valid values: * https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/disks/{disk} * https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/disks/{disk} * projects/{project}/zones/{zone}/disks/{disk} * projects/{project}/regions/{region}/disks/{disk} * zones/{zone}/disks/{disk} * regions/{region}/disks/{disk} Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_disk#source_disk ComputeDisk#source_disk}- Returns:
this
-
sourceImageEncryptionKey
@Stability(Stable) public ComputeDiskConfig.Builder sourceImageEncryptionKey(ComputeDiskSourceImageEncryptionKey sourceImageEncryptionKey)
Sets the value ofComputeDiskConfig.getSourceImageEncryptionKey()- Parameters:
sourceImageEncryptionKey- source_image_encryption_key block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_disk#source_image_encryption_key ComputeDisk#source_image_encryption_key}- Returns:
this
-
sourceSnapshotEncryptionKey
@Stability(Stable) public ComputeDiskConfig.Builder sourceSnapshotEncryptionKey(ComputeDiskSourceSnapshotEncryptionKey sourceSnapshotEncryptionKey)
Sets the value ofComputeDiskConfig.getSourceSnapshotEncryptionKey()- Parameters:
sourceSnapshotEncryptionKey- source_snapshot_encryption_key block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_disk#source_snapshot_encryption_key ComputeDisk#source_snapshot_encryption_key}- Returns:
this
-
storagePool
@Stability(Stable) public ComputeDiskConfig.Builder storagePool(String storagePool)
Sets the value ofComputeDiskConfig.getStoragePool()- Parameters:
storagePool- The URL of the storage pool in which the new disk is created. For example: * https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/storagePools/{storagePool} * /projects/{project}/zones/{zone}/storagePools/{storagePool}. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_disk#storage_pool ComputeDisk#storage_pool}- Returns:
this
-
timeouts
@Stability(Stable) public ComputeDiskConfig.Builder timeouts(ComputeDiskTimeouts timeouts)
Sets the value ofComputeDiskConfig.getTimeouts()- Parameters:
timeouts- timeouts block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_disk#timeouts ComputeDisk#timeouts}- Returns:
this
-
type
@Stability(Stable) public ComputeDiskConfig.Builder type(String type)
Sets the value ofComputeDiskConfig.getType()- Parameters:
type- URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_disk#type ComputeDisk#type}- Returns:
this
-
zone
@Stability(Stable) public ComputeDiskConfig.Builder zone(String zone)
Sets the value ofComputeDiskConfig.getZone()- Parameters:
zone- A reference to the zone where the disk resides. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_disk#zone ComputeDisk#zone}- Returns:
this
-
connection
@Stability(Experimental) public ComputeDiskConfig.Builder connection(com.hashicorp.cdktf.SSHProvisionerConnection connection)
Sets the value ofTerraformMetaArguments.getConnection()- Parameters:
connection- the value to be set.- Returns:
this
-
connection
@Stability(Experimental) public ComputeDiskConfig.Builder connection(com.hashicorp.cdktf.WinrmProvisionerConnection connection)
Sets the value ofTerraformMetaArguments.getConnection()- Parameters:
connection- the value to be set.- Returns:
this
-
count
@Stability(Experimental) public ComputeDiskConfig.Builder count(Number count)
Sets the value ofTerraformMetaArguments.getCount()- Parameters:
count- the value to be set.- Returns:
this
-
count
@Stability(Experimental) public ComputeDiskConfig.Builder count(com.hashicorp.cdktf.TerraformCount count)
Sets the value ofTerraformMetaArguments.getCount()- Parameters:
count- the value to be set.- Returns:
this
-
dependsOn
@Stability(Experimental) public ComputeDiskConfig.Builder dependsOn(List<? extends com.hashicorp.cdktf.ITerraformDependable> dependsOn)
Sets the value ofTerraformMetaArguments.getDependsOn()- Parameters:
dependsOn- the value to be set.- Returns:
this
-
forEach
@Stability(Experimental) public ComputeDiskConfig.Builder forEach(com.hashicorp.cdktf.ITerraformIterator forEach)
Sets the value ofTerraformMetaArguments.getForEach()- Parameters:
forEach- the value to be set.- Returns:
this
-
lifecycle
@Stability(Experimental) public ComputeDiskConfig.Builder lifecycle(com.hashicorp.cdktf.TerraformResourceLifecycle lifecycle)
Sets the value ofTerraformMetaArguments.getLifecycle()- Parameters:
lifecycle- the value to be set.- Returns:
this
-
provider
@Stability(Experimental) public ComputeDiskConfig.Builder provider(com.hashicorp.cdktf.TerraformProvider provider)
Sets the value ofTerraformMetaArguments.getProvider()- Parameters:
provider- the value to be set.- Returns:
this
-
provisioners
@Stability(Experimental) public ComputeDiskConfig.Builder provisioners(List<? extends Object> provisioners)
Sets the value ofTerraformMetaArguments.getProvisioners()- Parameters:
provisioners- the value to be set.- Returns:
this
-
build
@Stability(Stable) public ComputeDiskConfig build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<ComputeDiskConfig>- Returns:
- a new instance of
ComputeDiskConfig - Throws:
NullPointerException- if any required attribute was not provided
-
-