Class ComputeAttachedDiskConfig.Builder
- java.lang.Object
-
- com.hashicorp.cdktf.providers.google.compute_attached_disk.ComputeAttachedDiskConfig.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<ComputeAttachedDiskConfig>
- Enclosing interface:
- ComputeAttachedDiskConfig
@Stability(Stable) public static final class ComputeAttachedDiskConfig.Builder extends Object implements software.amazon.jsii.Builder<ComputeAttachedDiskConfig>
A builder forComputeAttachedDiskConfig
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ComputeAttachedDiskConfigbuild()Builds the configured instance.ComputeAttachedDiskConfig.Builderconnection(com.hashicorp.cdktf.SSHProvisionerConnection connection)Sets the value ofTerraformMetaArguments.getConnection()ComputeAttachedDiskConfig.Builderconnection(com.hashicorp.cdktf.WinrmProvisionerConnection connection)Sets the value ofTerraformMetaArguments.getConnection()ComputeAttachedDiskConfig.Buildercount(com.hashicorp.cdktf.TerraformCount count)Sets the value ofTerraformMetaArguments.getCount()ComputeAttachedDiskConfig.Buildercount(Number count)Sets the value ofTerraformMetaArguments.getCount()ComputeAttachedDiskConfig.BuilderdependsOn(List<? extends com.hashicorp.cdktf.ITerraformDependable> dependsOn)Sets the value ofTerraformMetaArguments.getDependsOn()ComputeAttachedDiskConfig.BuilderdeviceName(String deviceName)Sets the value ofComputeAttachedDiskConfig.getDeviceName()ComputeAttachedDiskConfig.Builderdisk(String disk)Sets the value ofComputeAttachedDiskConfig.getDisk()ComputeAttachedDiskConfig.BuilderforEach(com.hashicorp.cdktf.ITerraformIterator forEach)Sets the value ofTerraformMetaArguments.getForEach()ComputeAttachedDiskConfig.Builderid(String id)Sets the value ofComputeAttachedDiskConfig.getId()ComputeAttachedDiskConfig.Builderinstance(String instance)Sets the value ofComputeAttachedDiskConfig.getInstance()ComputeAttachedDiskConfig.Builderlifecycle(com.hashicorp.cdktf.TerraformResourceLifecycle lifecycle)Sets the value ofTerraformMetaArguments.getLifecycle()ComputeAttachedDiskConfig.Buildermode(String mode)Sets the value ofComputeAttachedDiskConfig.getMode()ComputeAttachedDiskConfig.Builderproject(String project)Sets the value ofComputeAttachedDiskConfig.getProject()ComputeAttachedDiskConfig.Builderprovider(com.hashicorp.cdktf.TerraformProvider provider)Sets the value ofTerraformMetaArguments.getProvider()ComputeAttachedDiskConfig.Builderprovisioners(List<? extends Object> provisioners)Sets the value ofTerraformMetaArguments.getProvisioners()ComputeAttachedDiskConfig.Buildertimeouts(ComputeAttachedDiskTimeouts timeouts)Sets the value ofComputeAttachedDiskConfig.getTimeouts()ComputeAttachedDiskConfig.Builderzone(String zone)Sets the value ofComputeAttachedDiskConfig.getZone()
-
-
-
Method Detail
-
disk
@Stability(Stable) public ComputeAttachedDiskConfig.Builder disk(String disk)
Sets the value ofComputeAttachedDiskConfig.getDisk()- Parameters:
disk- name or self_link of the disk that will be attached. This parameter is required. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_attached_disk#disk ComputeAttachedDisk#disk}- Returns:
this
-
instance
@Stability(Stable) public ComputeAttachedDiskConfig.Builder instance(String instance)
Sets the value ofComputeAttachedDiskConfig.getInstance()- Parameters:
instance- name or self_link of the compute instance that the disk will be attached to. This parameter is required. If the self_link is provided then zone and project are extracted from the self link. If only the name is used then zone and project must be defined as properties on the resource or provider. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_attached_disk#instance ComputeAttachedDisk#instance}- Returns:
this
-
deviceName
@Stability(Stable) public ComputeAttachedDiskConfig.Builder deviceName(String deviceName)
Sets the value ofComputeAttachedDiskConfig.getDeviceName()- Parameters:
deviceName- Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance. If not specified, the server chooses a default device name to apply to this disk, in the form persistent-disks-x, where x is a number assigned by Google Compute Engine. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_attached_disk#device_name ComputeAttachedDisk#device_name}- Returns:
this
-
id
@Stability(Stable) public ComputeAttachedDiskConfig.Builder id(String id)
Sets the value ofComputeAttachedDiskConfig.getId()- Parameters:
id- Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_attached_disk#id ComputeAttachedDisk#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
-
mode
@Stability(Stable) public ComputeAttachedDiskConfig.Builder mode(String mode)
Sets the value ofComputeAttachedDiskConfig.getMode()- Parameters:
mode- The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_attached_disk#mode ComputeAttachedDisk#mode}- Returns:
this
-
project
@Stability(Stable) public ComputeAttachedDiskConfig.Builder project(String project)
Sets the value ofComputeAttachedDiskConfig.getProject()- Parameters:
project- The project that the referenced compute instance is a part of. If instance is referenced by its self_link the project defined in the link will take precedence. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_attached_disk#project ComputeAttachedDisk#project}- Returns:
this
-
timeouts
@Stability(Stable) public ComputeAttachedDiskConfig.Builder timeouts(ComputeAttachedDiskTimeouts timeouts)
Sets the value ofComputeAttachedDiskConfig.getTimeouts()- Parameters:
timeouts- timeouts block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_attached_disk#timeouts ComputeAttachedDisk#timeouts}- Returns:
this
-
zone
@Stability(Stable) public ComputeAttachedDiskConfig.Builder zone(String zone)
Sets the value ofComputeAttachedDiskConfig.getZone()- Parameters:
zone- The zone that the referenced compute instance is located within. If instance is referenced by its self_link the zone defined in the link will take precedence. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_attached_disk#zone ComputeAttachedDisk#zone}- Returns:
this
-
connection
@Stability(Experimental) public ComputeAttachedDiskConfig.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 ComputeAttachedDiskConfig.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 ComputeAttachedDiskConfig.Builder count(Number count)
Sets the value ofTerraformMetaArguments.getCount()- Parameters:
count- the value to be set.- Returns:
this
-
count
@Stability(Experimental) public ComputeAttachedDiskConfig.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 ComputeAttachedDiskConfig.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 ComputeAttachedDiskConfig.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 ComputeAttachedDiskConfig.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 ComputeAttachedDiskConfig.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 ComputeAttachedDiskConfig.Builder provisioners(List<? extends Object> provisioners)
Sets the value ofTerraformMetaArguments.getProvisioners()- Parameters:
provisioners- the value to be set.- Returns:
this
-
build
@Stability(Stable) public ComputeAttachedDiskConfig build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<ComputeAttachedDiskConfig>- Returns:
- a new instance of
ComputeAttachedDiskConfig - Throws:
NullPointerException- if any required attribute was not provided
-
-