Class ComputeRegionCommitmentConfig.Builder
- java.lang.Object
-
- com.hashicorp.cdktf.providers.google.compute_region_commitment.ComputeRegionCommitmentConfig.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<ComputeRegionCommitmentConfig>
- Enclosing interface:
- ComputeRegionCommitmentConfig
@Stability(Stable) public static final class ComputeRegionCommitmentConfig.Builder extends Object implements software.amazon.jsii.Builder<ComputeRegionCommitmentConfig>
A builder forComputeRegionCommitmentConfig
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
-
-
-
Method Detail
-
name
@Stability(Stable) public ComputeRegionCommitmentConfig.Builder name(String name)
Sets the value ofComputeRegionCommitmentConfig.getName()- Parameters:
name- Name of the resource. This parameter is required. 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_region_commitment#name ComputeRegionCommitment#name}- Returns:
this
-
plan
@Stability(Stable) public ComputeRegionCommitmentConfig.Builder plan(String plan)
Sets the value ofComputeRegionCommitmentConfig.getPlan()- Parameters:
plan- The plan for this commitment, which determines duration and discount rate. This parameter is required. The currently supported plans are TWELVE_MONTH (1 year), and THIRTY_SIX_MONTH (3 years). Possible values: ["TWELVE_MONTH", "THIRTY_SIX_MONTH"] Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_region_commitment#plan ComputeRegionCommitment#plan}- Returns:
this
-
autoRenew
@Stability(Stable) public ComputeRegionCommitmentConfig.Builder autoRenew(Boolean autoRenew)
Sets the value ofComputeRegionCommitmentConfig.getAutoRenew()- Parameters:
autoRenew- Specifies whether to enable automatic renewal for the commitment. The default value is false if not specified. If the field is set to true, the commitment will be automatically renewed for either one or three years according to the terms of the existing commitment. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_region_commitment#auto_renew ComputeRegionCommitment#auto_renew}- Returns:
this
-
autoRenew
@Stability(Stable) public ComputeRegionCommitmentConfig.Builder autoRenew(com.hashicorp.cdktf.IResolvable autoRenew)
Sets the value ofComputeRegionCommitmentConfig.getAutoRenew()- Parameters:
autoRenew- Specifies whether to enable automatic renewal for the commitment. The default value is false if not specified. If the field is set to true, the commitment will be automatically renewed for either one or three years according to the terms of the existing commitment. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_region_commitment#auto_renew ComputeRegionCommitment#auto_renew}- Returns:
this
-
category
@Stability(Stable) public ComputeRegionCommitmentConfig.Builder category(String category)
Sets the value ofComputeRegionCommitmentConfig.getCategory()- Parameters:
category- The category of the commitment. Category MACHINE specifies commitments composed of machine resources such as VCPU or MEMORY, listed in resources. Category LICENSE specifies commitments composed of software licenses, listed in licenseResources. Note that only MACHINE commitments should have a Type specified. Possible values: ["LICENSE", "MACHINE"] Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_region_commitment#category ComputeRegionCommitment#category}- Returns:
this
-
description
@Stability(Stable) public ComputeRegionCommitmentConfig.Builder description(String description)
Sets the value ofComputeRegionCommitmentConfig.getDescription()- Parameters:
description- An optional description of this resource. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_region_commitment#description ComputeRegionCommitment#description}- Returns:
this
-
id
@Stability(Stable) public ComputeRegionCommitmentConfig.Builder id(String id)
Sets the value ofComputeRegionCommitmentConfig.getId()- Parameters:
id- Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_region_commitment#id ComputeRegionCommitment#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
-
licenseResource
@Stability(Stable) public ComputeRegionCommitmentConfig.Builder licenseResource(ComputeRegionCommitmentLicenseResource licenseResource)
Sets the value ofComputeRegionCommitmentConfig.getLicenseResource()- Parameters:
licenseResource- license_resource block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_region_commitment#license_resource ComputeRegionCommitment#license_resource}- Returns:
this
-
project
@Stability(Stable) public ComputeRegionCommitmentConfig.Builder project(String project)
Sets the value ofComputeRegionCommitmentConfig.getProject()- Parameters:
project- Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_region_commitment#project ComputeRegionCommitment#project}.- Returns:
this
-
region
@Stability(Stable) public ComputeRegionCommitmentConfig.Builder region(String region)
Sets the value ofComputeRegionCommitmentConfig.getRegion()- Parameters:
region- URL of the region where this commitment may be used. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_region_commitment#region ComputeRegionCommitment#region}- Returns:
this
-
resources
@Stability(Stable) public ComputeRegionCommitmentConfig.Builder resources(com.hashicorp.cdktf.IResolvable resources)
Sets the value ofComputeRegionCommitmentConfig.getResources()- Parameters:
resources- resources block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_region_commitment#resources ComputeRegionCommitment#resources}- Returns:
this
-
resources
@Stability(Stable) public ComputeRegionCommitmentConfig.Builder resources(List<? extends ComputeRegionCommitmentResources> resources)
Sets the value ofComputeRegionCommitmentConfig.getResources()- Parameters:
resources- resources block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_region_commitment#resources ComputeRegionCommitment#resources}- Returns:
this
-
timeouts
@Stability(Stable) public ComputeRegionCommitmentConfig.Builder timeouts(ComputeRegionCommitmentTimeouts timeouts)
Sets the value ofComputeRegionCommitmentConfig.getTimeouts()- Parameters:
timeouts- timeouts block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_region_commitment#timeouts ComputeRegionCommitment#timeouts}- Returns:
this
-
type
@Stability(Stable) public ComputeRegionCommitmentConfig.Builder type(String type)
Sets the value ofComputeRegionCommitmentConfig.getType()- Parameters:
type- The type of commitment, which affects the discount rate and the eligible resources. The type could be one of the following value: 'MEMORY_OPTIMIZED', 'ACCELERATOR_OPTIMIZED', 'GENERAL_PURPOSE_N1', 'GENERAL_PURPOSE_N2', 'GENERAL_PURPOSE_N2D', 'GENERAL_PURPOSE_E2', 'GENERAL_PURPOSE_T2D', 'GENERAL_PURPOSE_C3', 'COMPUTE_OPTIMIZED_C2', 'COMPUTE_OPTIMIZED_C2D' and 'GRAPHICS_OPTIMIZED_G2' Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_region_commitment#type ComputeRegionCommitment#type}- Returns:
this
-
connection
@Stability(Experimental) public ComputeRegionCommitmentConfig.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 ComputeRegionCommitmentConfig.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 ComputeRegionCommitmentConfig.Builder count(Number count)
Sets the value ofTerraformMetaArguments.getCount()- Parameters:
count- the value to be set.- Returns:
this
-
count
@Stability(Experimental) public ComputeRegionCommitmentConfig.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 ComputeRegionCommitmentConfig.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 ComputeRegionCommitmentConfig.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 ComputeRegionCommitmentConfig.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 ComputeRegionCommitmentConfig.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 ComputeRegionCommitmentConfig.Builder provisioners(List<? extends Object> provisioners)
Sets the value ofTerraformMetaArguments.getProvisioners()- Parameters:
provisioners- the value to be set.- Returns:
this
-
build
@Stability(Stable) public ComputeRegionCommitmentConfig build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<ComputeRegionCommitmentConfig>- Returns:
- a new instance of
ComputeRegionCommitmentConfig - Throws:
NullPointerException- if any required attribute was not provided
-
-