Class ComputeTargetPoolConfig.Builder
- java.lang.Object
-
- com.hashicorp.cdktf.providers.google.compute_target_pool.ComputeTargetPoolConfig.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<ComputeTargetPoolConfig>
- Enclosing interface:
- ComputeTargetPoolConfig
@Stability(Stable) public static final class ComputeTargetPoolConfig.Builder extends Object implements software.amazon.jsii.Builder<ComputeTargetPoolConfig>
A builder forComputeTargetPoolConfig
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ComputeTargetPoolConfig.BuilderbackupPool(String backupPool)Sets the value ofComputeTargetPoolConfig.getBackupPool()ComputeTargetPoolConfigbuild()Builds the configured instance.ComputeTargetPoolConfig.Builderconnection(com.hashicorp.cdktf.SSHProvisionerConnection connection)Sets the value ofTerraformMetaArguments.getConnection()ComputeTargetPoolConfig.Builderconnection(com.hashicorp.cdktf.WinrmProvisionerConnection connection)Sets the value ofTerraformMetaArguments.getConnection()ComputeTargetPoolConfig.Buildercount(com.hashicorp.cdktf.TerraformCount count)Sets the value ofTerraformMetaArguments.getCount()ComputeTargetPoolConfig.Buildercount(Number count)Sets the value ofTerraformMetaArguments.getCount()ComputeTargetPoolConfig.BuilderdependsOn(List<? extends com.hashicorp.cdktf.ITerraformDependable> dependsOn)Sets the value ofTerraformMetaArguments.getDependsOn()ComputeTargetPoolConfig.Builderdescription(String description)Sets the value ofComputeTargetPoolConfig.getDescription()ComputeTargetPoolConfig.BuilderfailoverRatio(Number failoverRatio)Sets the value ofComputeTargetPoolConfig.getFailoverRatio()ComputeTargetPoolConfig.BuilderforEach(com.hashicorp.cdktf.ITerraformIterator forEach)Sets the value ofTerraformMetaArguments.getForEach()ComputeTargetPoolConfig.BuilderhealthChecks(List<String> healthChecks)Sets the value ofComputeTargetPoolConfig.getHealthChecks()ComputeTargetPoolConfig.Builderid(String id)Sets the value ofComputeTargetPoolConfig.getId()ComputeTargetPoolConfig.Builderinstances(List<String> instances)Sets the value ofComputeTargetPoolConfig.getInstances()ComputeTargetPoolConfig.Builderlifecycle(com.hashicorp.cdktf.TerraformResourceLifecycle lifecycle)Sets the value ofTerraformMetaArguments.getLifecycle()ComputeTargetPoolConfig.Buildername(String name)Sets the value ofComputeTargetPoolConfig.getName()ComputeTargetPoolConfig.Builderproject(String project)Sets the value ofComputeTargetPoolConfig.getProject()ComputeTargetPoolConfig.Builderprovider(com.hashicorp.cdktf.TerraformProvider provider)Sets the value ofTerraformMetaArguments.getProvider()ComputeTargetPoolConfig.Builderprovisioners(List<? extends Object> provisioners)Sets the value ofTerraformMetaArguments.getProvisioners()ComputeTargetPoolConfig.Builderregion(String region)Sets the value ofComputeTargetPoolConfig.getRegion()ComputeTargetPoolConfig.BuildersessionAffinity(String sessionAffinity)Sets the value ofComputeTargetPoolConfig.getSessionAffinity()ComputeTargetPoolConfig.Buildertimeouts(ComputeTargetPoolTimeouts timeouts)Sets the value ofComputeTargetPoolConfig.getTimeouts()
-
-
-
Method Detail
-
name
@Stability(Stable) public ComputeTargetPoolConfig.Builder name(String name)
Sets the value ofComputeTargetPoolConfig.getName()- Parameters:
name- A unique name for the resource, required by GCE. Changing this forces a new resource to be created. This parameter is required. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_target_pool#name ComputeTargetPool#name}- Returns:
this
-
backupPool
@Stability(Stable) public ComputeTargetPoolConfig.Builder backupPool(String backupPool)
Sets the value ofComputeTargetPoolConfig.getBackupPool()- Parameters:
backupPool- URL to the backup target pool. Must also set failover_ratio. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_target_pool#backup_pool ComputeTargetPool#backup_pool}- Returns:
this
-
description
@Stability(Stable) public ComputeTargetPoolConfig.Builder description(String description)
Sets the value ofComputeTargetPoolConfig.getDescription()- Parameters:
description- Textual description field. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_target_pool#description ComputeTargetPool#description}- Returns:
this
-
failoverRatio
@Stability(Stable) public ComputeTargetPoolConfig.Builder failoverRatio(Number failoverRatio)
Sets the value ofComputeTargetPoolConfig.getFailoverRatio()- Parameters:
failoverRatio- Ratio (0 to 1) of failed nodes before using the backup pool (which must also be set). Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_target_pool#failover_ratio ComputeTargetPool#failover_ratio}- Returns:
this
-
healthChecks
@Stability(Stable) public ComputeTargetPoolConfig.Builder healthChecks(List<String> healthChecks)
Sets the value ofComputeTargetPoolConfig.getHealthChecks()- Parameters:
healthChecks- List of zero or one health check name or self_link. Only legacy google_compute_http_health_check is supported. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_target_pool#health_checks ComputeTargetPool#health_checks}- Returns:
this
-
id
@Stability(Stable) public ComputeTargetPoolConfig.Builder id(String id)
Sets the value ofComputeTargetPoolConfig.getId()- Parameters:
id- Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_target_pool#id ComputeTargetPool#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
-
instances
@Stability(Stable) public ComputeTargetPoolConfig.Builder instances(List<String> instances)
Sets the value ofComputeTargetPoolConfig.getInstances()- Parameters:
instances- List of instances in the pool. They can be given as URLs, or in the form of "zone/name". Note that the instances need not exist at the time of target pool creation, so there is no need to use the Terraform interpolators to create a dependency on the instances from the target pool. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_target_pool#instances ComputeTargetPool#instances}- Returns:
this
-
project
@Stability(Stable) public ComputeTargetPoolConfig.Builder project(String project)
Sets the value ofComputeTargetPoolConfig.getProject()- Parameters:
project- The ID of the project in which the resource belongs. If it is not provided, the provider project is used. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_target_pool#project ComputeTargetPool#project}- Returns:
this
-
region
@Stability(Stable) public ComputeTargetPoolConfig.Builder region(String region)
Sets the value ofComputeTargetPoolConfig.getRegion()- Parameters:
region- Where the target pool resides. Defaults to project region. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_target_pool#region ComputeTargetPool#region}- Returns:
this
-
sessionAffinity
@Stability(Stable) public ComputeTargetPoolConfig.Builder sessionAffinity(String sessionAffinity)
Sets the value ofComputeTargetPoolConfig.getSessionAffinity()- Parameters:
sessionAffinity- How to distribute load. Options are "NONE" (no affinity). "CLIENT_IP" (hash of the source/dest addresses / ports), and "CLIENT_IP_PROTO" also includes the protocol (default "NONE"). Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_target_pool#session_affinity ComputeTargetPool#session_affinity}- Returns:
this
-
timeouts
@Stability(Stable) public ComputeTargetPoolConfig.Builder timeouts(ComputeTargetPoolTimeouts timeouts)
Sets the value ofComputeTargetPoolConfig.getTimeouts()- Parameters:
timeouts- timeouts block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_target_pool#timeouts ComputeTargetPool#timeouts}- Returns:
this
-
connection
@Stability(Experimental) public ComputeTargetPoolConfig.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 ComputeTargetPoolConfig.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 ComputeTargetPoolConfig.Builder count(Number count)
Sets the value ofTerraformMetaArguments.getCount()- Parameters:
count- the value to be set.- Returns:
this
-
count
@Stability(Experimental) public ComputeTargetPoolConfig.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 ComputeTargetPoolConfig.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 ComputeTargetPoolConfig.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 ComputeTargetPoolConfig.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 ComputeTargetPoolConfig.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 ComputeTargetPoolConfig.Builder provisioners(List<? extends Object> provisioners)
Sets the value ofTerraformMetaArguments.getProvisioners()- Parameters:
provisioners- the value to be set.- Returns:
this
-
build
@Stability(Stable) public ComputeTargetPoolConfig build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<ComputeTargetPoolConfig>- Returns:
- a new instance of
ComputeTargetPoolConfig - Throws:
NullPointerException- if any required attribute was not provided
-
-