Class ComputeTargetInstanceConfig.Builder
- java.lang.Object
-
- com.hashicorp.cdktf.providers.google.compute_target_instance.ComputeTargetInstanceConfig.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<ComputeTargetInstanceConfig>
- Enclosing interface:
- ComputeTargetInstanceConfig
@Stability(Stable) public static final class ComputeTargetInstanceConfig.Builder extends Object implements software.amazon.jsii.Builder<ComputeTargetInstanceConfig>
A builder forComputeTargetInstanceConfig
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ComputeTargetInstanceConfigbuild()Builds the configured instance.ComputeTargetInstanceConfig.Builderconnection(com.hashicorp.cdktf.SSHProvisionerConnection connection)Sets the value ofTerraformMetaArguments.getConnection()ComputeTargetInstanceConfig.Builderconnection(com.hashicorp.cdktf.WinrmProvisionerConnection connection)Sets the value ofTerraformMetaArguments.getConnection()ComputeTargetInstanceConfig.Buildercount(com.hashicorp.cdktf.TerraformCount count)Sets the value ofTerraformMetaArguments.getCount()ComputeTargetInstanceConfig.Buildercount(Number count)Sets the value ofTerraformMetaArguments.getCount()ComputeTargetInstanceConfig.BuilderdependsOn(List<? extends com.hashicorp.cdktf.ITerraformDependable> dependsOn)Sets the value ofTerraformMetaArguments.getDependsOn()ComputeTargetInstanceConfig.Builderdescription(String description)Sets the value ofComputeTargetInstanceConfig.getDescription()ComputeTargetInstanceConfig.BuilderforEach(com.hashicorp.cdktf.ITerraformIterator forEach)Sets the value ofTerraformMetaArguments.getForEach()ComputeTargetInstanceConfig.Builderid(String id)Sets the value ofComputeTargetInstanceConfig.getId()ComputeTargetInstanceConfig.Builderinstance(String instance)Sets the value ofComputeTargetInstanceConfig.getInstance()ComputeTargetInstanceConfig.Builderlifecycle(com.hashicorp.cdktf.TerraformResourceLifecycle lifecycle)Sets the value ofTerraformMetaArguments.getLifecycle()ComputeTargetInstanceConfig.Buildername(String name)Sets the value ofComputeTargetInstanceConfig.getName()ComputeTargetInstanceConfig.BuildernatPolicy(String natPolicy)Sets the value ofComputeTargetInstanceConfig.getNatPolicy()ComputeTargetInstanceConfig.Builderproject(String project)Sets the value ofComputeTargetInstanceConfig.getProject()ComputeTargetInstanceConfig.Builderprovider(com.hashicorp.cdktf.TerraformProvider provider)Sets the value ofTerraformMetaArguments.getProvider()ComputeTargetInstanceConfig.Builderprovisioners(List<? extends Object> provisioners)Sets the value ofTerraformMetaArguments.getProvisioners()ComputeTargetInstanceConfig.Buildertimeouts(ComputeTargetInstanceTimeouts timeouts)Sets the value ofComputeTargetInstanceConfig.getTimeouts()ComputeTargetInstanceConfig.Builderzone(String zone)Sets the value ofComputeTargetInstanceConfig.getZone()
-
-
-
Method Detail
-
instance
@Stability(Stable) public ComputeTargetInstanceConfig.Builder instance(String instance)
Sets the value ofComputeTargetInstanceConfig.getInstance()- Parameters:
instance- The Compute instance VM handling traffic for this target instance. This parameter is required. Accepts the instance self-link, relative path (e.g. 'projects/project/zones/zone/instances/instance') or name. If name is given, the zone will default to the given zone or the provider-default zone and the project will default to the provider-level project. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_target_instance#instance ComputeTargetInstance#instance}- Returns:
this
-
name
@Stability(Stable) public ComputeTargetInstanceConfig.Builder name(String name)
Sets the value ofComputeTargetInstanceConfig.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_target_instance#name ComputeTargetInstance#name}- Returns:
this
-
description
@Stability(Stable) public ComputeTargetInstanceConfig.Builder description(String description)
Sets the value ofComputeTargetInstanceConfig.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_target_instance#description ComputeTargetInstance#description}- Returns:
this
-
id
@Stability(Stable) public ComputeTargetInstanceConfig.Builder id(String id)
Sets the value ofComputeTargetInstanceConfig.getId()- Parameters:
id- Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_target_instance#id ComputeTargetInstance#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
-
natPolicy
@Stability(Stable) public ComputeTargetInstanceConfig.Builder natPolicy(String natPolicy)
Sets the value ofComputeTargetInstanceConfig.getNatPolicy()- Parameters:
natPolicy- NAT option controlling how IPs are NAT'ed to the instance. Currently only NO_NAT (default value) is supported. Default value: "NO_NAT" Possible values: ["NO_NAT"] Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_target_instance#nat_policy ComputeTargetInstance#nat_policy}- Returns:
this
-
project
@Stability(Stable) public ComputeTargetInstanceConfig.Builder project(String project)
Sets the value ofComputeTargetInstanceConfig.getProject()- Parameters:
project- Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_target_instance#project ComputeTargetInstance#project}.- Returns:
this
-
timeouts
@Stability(Stable) public ComputeTargetInstanceConfig.Builder timeouts(ComputeTargetInstanceTimeouts timeouts)
Sets the value ofComputeTargetInstanceConfig.getTimeouts()- Parameters:
timeouts- timeouts block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_target_instance#timeouts ComputeTargetInstance#timeouts}- Returns:
this
-
zone
@Stability(Stable) public ComputeTargetInstanceConfig.Builder zone(String zone)
Sets the value ofComputeTargetInstanceConfig.getZone()- Parameters:
zone- URL of the zone where the target instance resides. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_target_instance#zone ComputeTargetInstance#zone}- Returns:
this
-
connection
@Stability(Experimental) public ComputeTargetInstanceConfig.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 ComputeTargetInstanceConfig.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 ComputeTargetInstanceConfig.Builder count(Number count)
Sets the value ofTerraformMetaArguments.getCount()- Parameters:
count- the value to be set.- Returns:
this
-
count
@Stability(Experimental) public ComputeTargetInstanceConfig.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 ComputeTargetInstanceConfig.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 ComputeTargetInstanceConfig.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 ComputeTargetInstanceConfig.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 ComputeTargetInstanceConfig.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 ComputeTargetInstanceConfig.Builder provisioners(List<? extends Object> provisioners)
Sets the value ofTerraformMetaArguments.getProvisioners()- Parameters:
provisioners- the value to be set.- Returns:
this
-
build
@Stability(Stable) public ComputeTargetInstanceConfig build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<ComputeTargetInstanceConfig>- Returns:
- a new instance of
ComputeTargetInstanceConfig - Throws:
NullPointerException- if any required attribute was not provided
-
-