Class SpannerInstanceConfig.Builder
- java.lang.Object
-
- com.hashicorp.cdktf.providers.google.spanner_instance.SpannerInstanceConfig.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<SpannerInstanceConfig>
- Enclosing interface:
- SpannerInstanceConfig
@Stability(Stable) public static final class SpannerInstanceConfig.Builder extends Object implements software.amazon.jsii.Builder<SpannerInstanceConfig>
A builder forSpannerInstanceConfig
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SpannerInstanceConfig.BuilderautoscalingConfig(SpannerInstanceAutoscalingConfig autoscalingConfig)Sets the value ofSpannerInstanceConfig.getAutoscalingConfig()SpannerInstanceConfigbuild()Builds the configured instance.SpannerInstanceConfig.Builderconfig(String config)Sets the value ofSpannerInstanceConfig.getConfig()SpannerInstanceConfig.Builderconnection(com.hashicorp.cdktf.SSHProvisionerConnection connection)Sets the value ofTerraformMetaArguments.getConnection()SpannerInstanceConfig.Builderconnection(com.hashicorp.cdktf.WinrmProvisionerConnection connection)Sets the value ofTerraformMetaArguments.getConnection()SpannerInstanceConfig.Buildercount(com.hashicorp.cdktf.TerraformCount count)Sets the value ofTerraformMetaArguments.getCount()SpannerInstanceConfig.Buildercount(Number count)Sets the value ofTerraformMetaArguments.getCount()SpannerInstanceConfig.BuilderdependsOn(List<? extends com.hashicorp.cdktf.ITerraformDependable> dependsOn)Sets the value ofTerraformMetaArguments.getDependsOn()SpannerInstanceConfig.BuilderdisplayName(String displayName)Sets the value ofSpannerInstanceConfig.getDisplayName()SpannerInstanceConfig.BuilderforceDestroy(com.hashicorp.cdktf.IResolvable forceDestroy)Sets the value ofSpannerInstanceConfig.getForceDestroy()SpannerInstanceConfig.BuilderforceDestroy(Boolean forceDestroy)Sets the value ofSpannerInstanceConfig.getForceDestroy()SpannerInstanceConfig.BuilderforEach(com.hashicorp.cdktf.ITerraformIterator forEach)Sets the value ofTerraformMetaArguments.getForEach()SpannerInstanceConfig.Builderid(String id)Sets the value ofSpannerInstanceConfig.getId()SpannerInstanceConfig.Builderlabels(Map<String,String> labels)Sets the value ofSpannerInstanceConfig.getLabels()SpannerInstanceConfig.Builderlifecycle(com.hashicorp.cdktf.TerraformResourceLifecycle lifecycle)Sets the value ofTerraformMetaArguments.getLifecycle()SpannerInstanceConfig.Buildername(String name)Sets the value ofSpannerInstanceConfig.getName()SpannerInstanceConfig.BuildernumNodes(Number numNodes)Sets the value ofSpannerInstanceConfig.getNumNodes()SpannerInstanceConfig.BuilderprocessingUnits(Number processingUnits)Sets the value ofSpannerInstanceConfig.getProcessingUnits()SpannerInstanceConfig.Builderproject(String project)Sets the value ofSpannerInstanceConfig.getProject()SpannerInstanceConfig.Builderprovider(com.hashicorp.cdktf.TerraformProvider provider)Sets the value ofTerraformMetaArguments.getProvider()SpannerInstanceConfig.Builderprovisioners(List<? extends Object> provisioners)Sets the value ofTerraformMetaArguments.getProvisioners()SpannerInstanceConfig.Buildertimeouts(SpannerInstanceTimeouts timeouts)Sets the value ofSpannerInstanceConfig.getTimeouts()
-
-
-
Method Detail
-
config
@Stability(Stable) public SpannerInstanceConfig.Builder config(String config)
Sets the value ofSpannerInstanceConfig.getConfig()- Parameters:
config- The name of the instance's configuration (similar but not quite the same as a region) which defines the geographic placement and replication of your databases in this instance. This parameter is required. It determines where your data is stored. Values are typically of the form 'regional-europe-west1' , 'us-central' etc. In order to obtain a valid list please consult the [Configuration section of the docs](https://cloud.google.com/spanner/docs/instances). Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/spanner_instance#config SpannerInstance#config}- Returns:
this
-
displayName
@Stability(Stable) public SpannerInstanceConfig.Builder displayName(String displayName)
Sets the value ofSpannerInstanceConfig.getDisplayName()- Parameters:
displayName- The descriptive name for this instance as it appears in UIs. This parameter is required. Must be unique per project and between 4 and 30 characters in length. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/spanner_instance#display_name SpannerInstance#display_name}- Returns:
this
-
autoscalingConfig
@Stability(Stable) public SpannerInstanceConfig.Builder autoscalingConfig(SpannerInstanceAutoscalingConfig autoscalingConfig)
Sets the value ofSpannerInstanceConfig.getAutoscalingConfig()- Parameters:
autoscalingConfig- autoscaling_config block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/spanner_instance#autoscaling_config SpannerInstance#autoscaling_config}- Returns:
this
-
forceDestroy
@Stability(Stable) public SpannerInstanceConfig.Builder forceDestroy(Boolean forceDestroy)
Sets the value ofSpannerInstanceConfig.getForceDestroy()- Parameters:
forceDestroy- When deleting a spanner instance, this boolean option will delete all backups of this instance. This must be set to true if you created a backup manually in the console. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/spanner_instance#force_destroy SpannerInstance#force_destroy}- Returns:
this
-
forceDestroy
@Stability(Stable) public SpannerInstanceConfig.Builder forceDestroy(com.hashicorp.cdktf.IResolvable forceDestroy)
Sets the value ofSpannerInstanceConfig.getForceDestroy()- Parameters:
forceDestroy- When deleting a spanner instance, this boolean option will delete all backups of this instance. This must be set to true if you created a backup manually in the console. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/spanner_instance#force_destroy SpannerInstance#force_destroy}- Returns:
this
-
id
@Stability(Stable) public SpannerInstanceConfig.Builder id(String id)
Sets the value ofSpannerInstanceConfig.getId()- Parameters:
id- Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/spanner_instance#id SpannerInstance#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
-
labels
@Stability(Stable) public SpannerInstanceConfig.Builder labels(Map<String,String> labels)
Sets the value ofSpannerInstanceConfig.getLabels()- Parameters:
labels- An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. **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/spanner_instance#labels SpannerInstance#labels}- Returns:
this
-
name
@Stability(Stable) public SpannerInstanceConfig.Builder name(String name)
Sets the value ofSpannerInstanceConfig.getName()- Parameters:
name- A unique identifier for the instance, which cannot be changed after the instance is created. The name must be between 6 and 30 characters in length. If not provided, a random string starting with 'tf-' will be selected. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/spanner_instance#name SpannerInstance#name}- Returns:
this
-
numNodes
@Stability(Stable) public SpannerInstanceConfig.Builder numNodes(Number numNodes)
Sets the value ofSpannerInstanceConfig.getNumNodes()- Parameters:
numNodes- The number of nodes allocated to this instance. Exactly one of either node_count or processing_units must be present in terraform. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/spanner_instance#num_nodes SpannerInstance#num_nodes}- Returns:
this
-
processingUnits
@Stability(Stable) public SpannerInstanceConfig.Builder processingUnits(Number processingUnits)
Sets the value ofSpannerInstanceConfig.getProcessingUnits()- Parameters:
processingUnits- The number of processing units allocated to this instance. Exactly one of processing_units or node_count must be present in terraform. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/spanner_instance#processing_units SpannerInstance#processing_units}- Returns:
this
-
project
@Stability(Stable) public SpannerInstanceConfig.Builder project(String project)
Sets the value ofSpannerInstanceConfig.getProject()- Parameters:
project- Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/spanner_instance#project SpannerInstance#project}.- Returns:
this
-
timeouts
@Stability(Stable) public SpannerInstanceConfig.Builder timeouts(SpannerInstanceTimeouts timeouts)
Sets the value ofSpannerInstanceConfig.getTimeouts()- Parameters:
timeouts- timeouts block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/spanner_instance#timeouts SpannerInstance#timeouts}- Returns:
this
-
connection
@Stability(Experimental) public SpannerInstanceConfig.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 SpannerInstanceConfig.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 SpannerInstanceConfig.Builder count(Number count)
Sets the value ofTerraformMetaArguments.getCount()- Parameters:
count- the value to be set.- Returns:
this
-
count
@Stability(Experimental) public SpannerInstanceConfig.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 SpannerInstanceConfig.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 SpannerInstanceConfig.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 SpannerInstanceConfig.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 SpannerInstanceConfig.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 SpannerInstanceConfig.Builder provisioners(List<? extends Object> provisioners)
Sets the value ofTerraformMetaArguments.getProvisioners()- Parameters:
provisioners- the value to be set.- Returns:
this
-
build
@Stability(Stable) public SpannerInstanceConfig build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<SpannerInstanceConfig>- Returns:
- a new instance of
SpannerInstanceConfig - Throws:
NullPointerException- if any required attribute was not provided
-
-