Class ComputePerInstanceConfigPreservedStateDisk.Builder
- java.lang.Object
-
- com.hashicorp.cdktf.providers.google.compute_per_instance_config.ComputePerInstanceConfigPreservedStateDisk.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<ComputePerInstanceConfigPreservedStateDisk>
- Enclosing interface:
- ComputePerInstanceConfigPreservedStateDisk
@Stability(Stable) public static final class ComputePerInstanceConfigPreservedStateDisk.Builder extends Object implements software.amazon.jsii.Builder<ComputePerInstanceConfigPreservedStateDisk>
A builder forComputePerInstanceConfigPreservedStateDisk
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ComputePerInstanceConfigPreservedStateDiskbuild()Builds the configured instance.ComputePerInstanceConfigPreservedStateDisk.BuilderdeleteRule(String deleteRule)Sets the value ofComputePerInstanceConfigPreservedStateDisk.getDeleteRule()ComputePerInstanceConfigPreservedStateDisk.BuilderdeviceName(String deviceName)Sets the value ofComputePerInstanceConfigPreservedStateDisk.getDeviceName()ComputePerInstanceConfigPreservedStateDisk.Buildermode(String mode)Sets the value ofComputePerInstanceConfigPreservedStateDisk.getMode()ComputePerInstanceConfigPreservedStateDisk.Buildersource(String source)Sets the value ofComputePerInstanceConfigPreservedStateDisk.getSource()
-
-
-
Method Detail
-
deviceName
@Stability(Stable) public ComputePerInstanceConfigPreservedStateDisk.Builder deviceName(String deviceName)
Sets the value ofComputePerInstanceConfigPreservedStateDisk.getDeviceName()- Parameters:
deviceName- A unique device name that is reflected into the /dev/ tree of a Linux operating system running within the instance. This parameter is required. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_per_instance_config#device_name ComputePerInstanceConfig#device_name}- Returns:
this
-
source
@Stability(Stable) public ComputePerInstanceConfigPreservedStateDisk.Builder source(String source)
Sets the value ofComputePerInstanceConfigPreservedStateDisk.getSource()- Parameters:
source- The URI of an existing persistent disk to attach under the specified device-name in the format 'projects/project-id/zones/zone/disks/disk-name'. This parameter is required. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_per_instance_config#source ComputePerInstanceConfig#source}- Returns:
this
-
deleteRule
@Stability(Stable) public ComputePerInstanceConfigPreservedStateDisk.Builder deleteRule(String deleteRule)
Sets the value ofComputePerInstanceConfigPreservedStateDisk.getDeleteRule()- Parameters:
deleteRule- A value that prescribes what should happen to the stateful disk when the VM instance is deleted. The available options are 'NEVER' and 'ON_PERMANENT_INSTANCE_DELETION'. 'NEVER' - detach the disk when the VM is deleted, but do not delete the disk. 'ON_PERMANENT_INSTANCE_DELETION' will delete the stateful disk when the VM is permanently deleted from the instance group. Default value: "NEVER" Possible values: ["NEVER", "ON_PERMANENT_INSTANCE_DELETION"] Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_per_instance_config#delete_rule ComputePerInstanceConfig#delete_rule}- Returns:
this
-
mode
@Stability(Stable) public ComputePerInstanceConfigPreservedStateDisk.Builder mode(String mode)
Sets the value ofComputePerInstanceConfigPreservedStateDisk.getMode()- Parameters:
mode- The mode of the disk. Default value: "READ_WRITE" Possible values: ["READ_ONLY", "READ_WRITE"]. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_per_instance_config#mode ComputePerInstanceConfig#mode}- Returns:
this
-
build
@Stability(Stable) public ComputePerInstanceConfigPreservedStateDisk build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<ComputePerInstanceConfigPreservedStateDisk>- Returns:
- a new instance of
ComputePerInstanceConfigPreservedStateDisk - Throws:
NullPointerException- if any required attribute was not provided
-
-