Class ComputeImageConfig.Builder
- java.lang.Object
-
- com.hashicorp.cdktf.providers.google.compute_image.ComputeImageConfig.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<ComputeImageConfig>
- Enclosing interface:
- ComputeImageConfig
@Stability(Stable) public static final class ComputeImageConfig.Builder extends Object implements software.amazon.jsii.Builder<ComputeImageConfig>
A builder forComputeImageConfig
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
-
-
-
Method Detail
-
name
@Stability(Stable) public ComputeImageConfig.Builder name(String name)
Sets the value ofComputeImageConfig.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_image#name ComputeImage#name}- Returns:
this
-
description
@Stability(Stable) public ComputeImageConfig.Builder description(String description)
Sets the value ofComputeImageConfig.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_image#description ComputeImage#description}- Returns:
this
-
diskSizeGb
@Stability(Stable) public ComputeImageConfig.Builder diskSizeGb(Number diskSizeGb)
Sets the value ofComputeImageConfig.getDiskSizeGb()- Parameters:
diskSizeGb- Size of the image when restored onto a persistent disk (in GB). Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_image#disk_size_gb ComputeImage#disk_size_gb}- Returns:
this
-
family
@Stability(Stable) public ComputeImageConfig.Builder family(String family)
Sets the value ofComputeImageConfig.getFamily()- Parameters:
family- The name of the image family to which this image belongs. You can create disks by specifying an image family instead of a specific image name. The image family always returns its latest image that is not deprecated. The name of the image family must comply with RFC1035. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_image#family ComputeImage#family}- Returns:
this
-
guestOsFeatures
@Stability(Stable) public ComputeImageConfig.Builder guestOsFeatures(com.hashicorp.cdktf.IResolvable guestOsFeatures)
Sets the value ofComputeImageConfig.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_image#guest_os_features ComputeImage#guest_os_features}- Returns:
this
-
guestOsFeatures
@Stability(Stable) public ComputeImageConfig.Builder guestOsFeatures(List<? extends ComputeImageGuestOsFeatures> guestOsFeatures)
Sets the value ofComputeImageConfig.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_image#guest_os_features ComputeImage#guest_os_features}- Returns:
this
-
id
@Stability(Stable) public ComputeImageConfig.Builder id(String id)
Sets the value ofComputeImageConfig.getId()- Parameters:
id- Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_image#id ComputeImage#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
-
imageEncryptionKey
@Stability(Stable) public ComputeImageConfig.Builder imageEncryptionKey(ComputeImageImageEncryptionKey imageEncryptionKey)
Sets the value ofComputeImageConfig.getImageEncryptionKey()- Parameters:
imageEncryptionKey- image_encryption_key block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_image#image_encryption_key ComputeImage#image_encryption_key}- Returns:
this
-
labels
@Stability(Stable) public ComputeImageConfig.Builder labels(Map<String,String> labels)
Sets the value ofComputeImageConfig.getLabels()- Parameters:
labels- Labels to apply to this Image. **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_image#labels ComputeImage#labels}- Returns:
this
-
licenses
@Stability(Stable) public ComputeImageConfig.Builder licenses(List<String> licenses)
Sets the value ofComputeImageConfig.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_image#licenses ComputeImage#licenses}- Returns:
this
-
project
@Stability(Stable) public ComputeImageConfig.Builder project(String project)
Sets the value ofComputeImageConfig.getProject()- Parameters:
project- Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_image#project ComputeImage#project}.- Returns:
this
-
rawDisk
@Stability(Stable) public ComputeImageConfig.Builder rawDisk(ComputeImageRawDisk rawDisk)
Sets the value ofComputeImageConfig.getRawDisk()- Parameters:
rawDisk- raw_disk block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_image#raw_disk ComputeImage#raw_disk}- Returns:
this
-
sourceDisk
@Stability(Stable) public ComputeImageConfig.Builder sourceDisk(String sourceDisk)
Sets the value ofComputeImageConfig.getSourceDisk()- Parameters:
sourceDisk- The source disk to create this image based on. You must provide either this property or the rawDisk.source property but not both to create an image. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_image#source_disk ComputeImage#source_disk}- Returns:
this
-
sourceImage
@Stability(Stable) public ComputeImageConfig.Builder sourceImage(String sourceImage)
Sets the value ofComputeImageConfig.getSourceImage()- Parameters:
sourceImage- URL of the source image used to create this image. In order to create an image, you must provide the full or partial URL of one of the following: * The selfLink URL * This property * The rawDisk.source URL * The sourceDisk URL Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_image#source_image ComputeImage#source_image}- Returns:
this
-
sourceSnapshot
@Stability(Stable) public ComputeImageConfig.Builder sourceSnapshot(String sourceSnapshot)
Sets the value ofComputeImageConfig.getSourceSnapshot()- Parameters:
sourceSnapshot- URL of the source snapshot used to create this image. In order to create an image, you must provide the full or partial URL of one of the following: * The selfLink URL * This property * The sourceImage URL * The rawDisk.source URL * The sourceDisk URL Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_image#source_snapshot ComputeImage#source_snapshot}- Returns:
this
-
storageLocations
@Stability(Stable) public ComputeImageConfig.Builder storageLocations(List<String> storageLocations)
Sets the value ofComputeImageConfig.getStorageLocations()- Parameters:
storageLocations- Cloud Storage bucket storage location of the image (regional or multi-regional). Reference link: https://cloud.google.com/compute/docs/reference/rest/v1/images. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_image#storage_locations ComputeImage#storage_locations}- Returns:
this
-
timeouts
@Stability(Stable) public ComputeImageConfig.Builder timeouts(ComputeImageTimeouts timeouts)
Sets the value ofComputeImageConfig.getTimeouts()- Parameters:
timeouts- timeouts block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_image#timeouts ComputeImage#timeouts}- Returns:
this
-
connection
@Stability(Experimental) public ComputeImageConfig.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 ComputeImageConfig.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 ComputeImageConfig.Builder count(Number count)
Sets the value ofTerraformMetaArguments.getCount()- Parameters:
count- the value to be set.- Returns:
this
-
count
@Stability(Experimental) public ComputeImageConfig.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 ComputeImageConfig.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 ComputeImageConfig.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 ComputeImageConfig.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 ComputeImageConfig.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 ComputeImageConfig.Builder provisioners(List<? extends Object> provisioners)
Sets the value ofTerraformMetaArguments.getProvisioners()- Parameters:
provisioners- the value to be set.- Returns:
this
-
build
@Stability(Stable) public ComputeImageConfig build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<ComputeImageConfig>- Returns:
- a new instance of
ComputeImageConfig - Throws:
NullPointerException- if any required attribute was not provided
-
-