Class ComputeRegionInstanceTemplateDisk.Builder
- java.lang.Object
-
- com.hashicorp.cdktf.providers.google.compute_region_instance_template.ComputeRegionInstanceTemplateDisk.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<ComputeRegionInstanceTemplateDisk>
- Enclosing interface:
- ComputeRegionInstanceTemplateDisk
@Stability(Stable) public static final class ComputeRegionInstanceTemplateDisk.Builder extends Object implements software.amazon.jsii.Builder<ComputeRegionInstanceTemplateDisk>
A builder forComputeRegionInstanceTemplateDisk
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
-
-
-
Method Detail
-
autoDelete
@Stability(Stable) public ComputeRegionInstanceTemplateDisk.Builder autoDelete(Boolean autoDelete)
Sets the value ofComputeRegionInstanceTemplateDisk.getAutoDelete()- Parameters:
autoDelete- Whether or not the disk should be auto-deleted. This defaults to true. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_region_instance_template#auto_delete ComputeRegionInstanceTemplate#auto_delete}- Returns:
this
-
autoDelete
@Stability(Stable) public ComputeRegionInstanceTemplateDisk.Builder autoDelete(com.hashicorp.cdktf.IResolvable autoDelete)
Sets the value ofComputeRegionInstanceTemplateDisk.getAutoDelete()- Parameters:
autoDelete- Whether or not the disk should be auto-deleted. This defaults to true. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_region_instance_template#auto_delete ComputeRegionInstanceTemplate#auto_delete}- Returns:
this
-
boot
@Stability(Stable) public ComputeRegionInstanceTemplateDisk.Builder boot(Boolean boot)
Sets the value ofComputeRegionInstanceTemplateDisk.getBoot()- Parameters:
boot- Indicates that this is a boot disk. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_region_instance_template#boot ComputeRegionInstanceTemplate#boot}- Returns:
this
-
boot
@Stability(Stable) public ComputeRegionInstanceTemplateDisk.Builder boot(com.hashicorp.cdktf.IResolvable boot)
Sets the value ofComputeRegionInstanceTemplateDisk.getBoot()- Parameters:
boot- Indicates that this is a boot disk. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_region_instance_template#boot ComputeRegionInstanceTemplate#boot}- Returns:
this
-
deviceName
@Stability(Stable) public ComputeRegionInstanceTemplateDisk.Builder deviceName(String deviceName)
Sets the value ofComputeRegionInstanceTemplateDisk.getDeviceName()- Parameters:
deviceName- A unique device name that is reflected into the /dev/ tree of a Linux operating system running within the instance. If not specified, the server chooses a default device name to apply to this disk. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_region_instance_template#device_name ComputeRegionInstanceTemplate#device_name}- Returns:
this
-
diskEncryptionKey
@Stability(Stable) public ComputeRegionInstanceTemplateDisk.Builder diskEncryptionKey(ComputeRegionInstanceTemplateDiskDiskEncryptionKey diskEncryptionKey)
Sets the value ofComputeRegionInstanceTemplateDisk.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_region_instance_template#disk_encryption_key ComputeRegionInstanceTemplate#disk_encryption_key}- Returns:
this
-
diskName
@Stability(Stable) public ComputeRegionInstanceTemplateDisk.Builder diskName(String diskName)
Sets the value ofComputeRegionInstanceTemplateDisk.getDiskName()- Parameters:
diskName- Name of the disk. When not provided, this defaults to the name of the instance. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_region_instance_template#disk_name ComputeRegionInstanceTemplate#disk_name}- Returns:
this
-
diskSizeGb
@Stability(Stable) public ComputeRegionInstanceTemplateDisk.Builder diskSizeGb(Number diskSizeGb)
Sets the value ofComputeRegionInstanceTemplateDisk.getDiskSizeGb()- Parameters:
diskSizeGb- The size of the image in gigabytes. If not specified, it will inherit the size of its base image. For SCRATCH disks, the size must be one of 375 or 3000 GB, with a default of 375 GB. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_region_instance_template#disk_size_gb ComputeRegionInstanceTemplate#disk_size_gb}- Returns:
this
-
diskType
@Stability(Stable) public ComputeRegionInstanceTemplateDisk.Builder diskType(String diskType)
Sets the value ofComputeRegionInstanceTemplateDisk.getDiskType()- Parameters:
diskType- The Google Compute Engine disk type. Such as "pd-ssd", "local-ssd", "pd-balanced" or "pd-standard". Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_region_instance_template#disk_type ComputeRegionInstanceTemplate#disk_type}- Returns:
this
-
interfaceValue
@Stability(Stable) public ComputeRegionInstanceTemplateDisk.Builder interfaceValue(String interfaceValue)
Sets the value ofComputeRegionInstanceTemplateDisk.getInterfaceValue()- Parameters:
interfaceValue- Specifies the disk interface to use for attaching this disk. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_region_instance_template#interface ComputeRegionInstanceTemplate#interface}- Returns:
this
-
labels
@Stability(Stable) public ComputeRegionInstanceTemplateDisk.Builder labels(Map<String,String> labels)
Sets the value ofComputeRegionInstanceTemplateDisk.getLabels()- Parameters:
labels- A set of key/value label pairs to assign to disks,. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_region_instance_template#labels ComputeRegionInstanceTemplate#labels}- Returns:
this
-
mode
@Stability(Stable) public ComputeRegionInstanceTemplateDisk.Builder mode(String mode)
Sets the value ofComputeRegionInstanceTemplateDisk.getMode()- Parameters:
mode- The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If you are attaching or creating a boot disk, this must read-write mode. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_region_instance_template#mode ComputeRegionInstanceTemplate#mode}- Returns:
this
-
provisionedIops
@Stability(Stable) public ComputeRegionInstanceTemplateDisk.Builder provisionedIops(Number provisionedIops)
Sets the value ofComputeRegionInstanceTemplateDisk.getProvisionedIops()- Parameters:
provisionedIops- Indicates how many IOPS to provision for the disk. This sets the number of I/O operations per second that the disk can handle. Values must be between 10,000 and 120,000. For more details, see the [Extreme persistent disk documentation](https://cloud.google.com/compute/docs/disks/extreme-persistent-disk). Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_region_instance_template#provisioned_iops ComputeRegionInstanceTemplate#provisioned_iops}- Returns:
this
-
resourceManagerTags
@Stability(Stable) public ComputeRegionInstanceTemplateDisk.Builder resourceManagerTags(Map<String,String> resourceManagerTags)
Sets the value ofComputeRegionInstanceTemplateDisk.getResourceManagerTags()- Parameters:
resourceManagerTags- A map of resource manager tags. Resource manager tag keys and values have the same definition as resource manager tags. Keys must be in the format tagKeys/{tag_key_id}, and values are in the format tagValues/456. The field is ignored (both PUT & PATCH) when empty. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_region_instance_template#resource_manager_tags ComputeRegionInstanceTemplate#resource_manager_tags}- Returns:
this
-
resourcePolicies
@Stability(Stable) public ComputeRegionInstanceTemplateDisk.Builder resourcePolicies(List<String> resourcePolicies)
Sets the value ofComputeRegionInstanceTemplateDisk.getResourcePolicies()- Parameters:
resourcePolicies- A list (short name or id) of resource policies to attach to this disk. Currently a max of 1 resource policy is supported. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_region_instance_template#resource_policies ComputeRegionInstanceTemplate#resource_policies}- Returns:
this
-
source
@Stability(Stable) public ComputeRegionInstanceTemplateDisk.Builder source(String source)
Sets the value ofComputeRegionInstanceTemplateDisk.getSource()- Parameters:
source- The name (not self_link) of the disk (such as those managed by google_compute_disk) to attach. ~> Note: Either source or source_image is required when creating a new instance except for when creating a local SSD. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_region_instance_template#source ComputeRegionInstanceTemplate#source}- Returns:
this
-
sourceImage
@Stability(Stable) public ComputeRegionInstanceTemplateDisk.Builder sourceImage(String sourceImage)
Sets the value ofComputeRegionInstanceTemplateDisk.getSourceImage()- Parameters:
sourceImage- 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}. ~> Note: Either source or source_image is required when creating a new instance except for when creating a local SSD. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_region_instance_template#source_image ComputeRegionInstanceTemplate#source_image}- Returns:
this
-
sourceImageEncryptionKey
@Stability(Stable) public ComputeRegionInstanceTemplateDisk.Builder sourceImageEncryptionKey(ComputeRegionInstanceTemplateDiskSourceImageEncryptionKey sourceImageEncryptionKey)
Sets the value ofComputeRegionInstanceTemplateDisk.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_region_instance_template#source_image_encryption_key ComputeRegionInstanceTemplate#source_image_encryption_key}- Returns:
this
-
sourceSnapshot
@Stability(Stable) public ComputeRegionInstanceTemplateDisk.Builder sourceSnapshot(String sourceSnapshot)
Sets the value ofComputeRegionInstanceTemplateDisk.getSourceSnapshot()- Parameters:
sourceSnapshot- The source snapshot to create this disk. When creating a new instance, one of initializeParams.sourceSnapshot, initializeParams.sourceImage, or disks.source is required except for local SSD. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_region_instance_template#source_snapshot ComputeRegionInstanceTemplate#source_snapshot}- Returns:
this
-
sourceSnapshotEncryptionKey
@Stability(Stable) public ComputeRegionInstanceTemplateDisk.Builder sourceSnapshotEncryptionKey(ComputeRegionInstanceTemplateDiskSourceSnapshotEncryptionKey sourceSnapshotEncryptionKey)
Sets the value ofComputeRegionInstanceTemplateDisk.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_region_instance_template#source_snapshot_encryption_key ComputeRegionInstanceTemplate#source_snapshot_encryption_key}- Returns:
this
-
type
@Stability(Stable) public ComputeRegionInstanceTemplateDisk.Builder type(String type)
Sets the value ofComputeRegionInstanceTemplateDisk.getType()- Parameters:
type- The type of Google Compute Engine disk, can be either "SCRATCH" or "PERSISTENT". Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_region_instance_template#type ComputeRegionInstanceTemplate#type}- Returns:
this
-
build
@Stability(Stable) public ComputeRegionInstanceTemplateDisk build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<ComputeRegionInstanceTemplateDisk>- Returns:
- a new instance of
ComputeRegionInstanceTemplateDisk - Throws:
NullPointerException- if any required attribute was not provided
-
-