Class SpannerInstance.Builder

    • Method Detail

      • create

        @Stability(Stable)
        public static SpannerInstance.Builder create​(software.constructs.Construct scope,
                                                     String id)
        Parameters:
        scope - The scope in which to define this construct. This parameter is required.
        id - The scoped construct ID. This parameter is required.
        Returns:
        a new instance of SpannerInstance.Builder.
      • connection

        @Stability(Experimental)
        public SpannerInstance.Builder connection​(com.hashicorp.cdktf.SSHProvisionerConnection connection)
        Parameters:
        connection - This parameter is required.
        Returns:
        this
      • connection

        @Stability(Experimental)
        public SpannerInstance.Builder connection​(com.hashicorp.cdktf.WinrmProvisionerConnection connection)
        Parameters:
        connection - This parameter is required.
        Returns:
        this
      • count

        @Stability(Experimental)
        public SpannerInstance.Builder count​(Number count)
        Parameters:
        count - This parameter is required.
        Returns:
        this
      • count

        @Stability(Experimental)
        public SpannerInstance.Builder count​(com.hashicorp.cdktf.TerraformCount count)
        Parameters:
        count - This parameter is required.
        Returns:
        this
      • dependsOn

        @Stability(Experimental)
        public SpannerInstance.Builder dependsOn​(List<? extends com.hashicorp.cdktf.ITerraformDependable> dependsOn)
        Parameters:
        dependsOn - This parameter is required.
        Returns:
        this
      • forEach

        @Stability(Experimental)
        public SpannerInstance.Builder forEach​(com.hashicorp.cdktf.ITerraformIterator forEach)
        Parameters:
        forEach - This parameter is required.
        Returns:
        this
      • lifecycle

        @Stability(Experimental)
        public SpannerInstance.Builder lifecycle​(com.hashicorp.cdktf.TerraformResourceLifecycle lifecycle)
        Parameters:
        lifecycle - This parameter is required.
        Returns:
        this
      • provider

        @Stability(Experimental)
        public SpannerInstance.Builder provider​(com.hashicorp.cdktf.TerraformProvider provider)
        Parameters:
        provider - This parameter is required.
        Returns:
        this
      • provisioners

        @Stability(Experimental)
        public SpannerInstance.Builder provisioners​(List<? extends Object> provisioners)
        Parameters:
        provisioners - This parameter is required.
        Returns:
        this
      • config

        @Stability(Stable)
        public SpannerInstance.Builder config​(String 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.

        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}

        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.
        Returns:
        this
      • displayName

        @Stability(Stable)
        public SpannerInstance.Builder displayName​(String displayName)
        The descriptive name for this instance as it appears in UIs.

        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}

        Parameters:
        displayName - The descriptive name for this instance as it appears in UIs. This parameter is required.
        Returns:
        this
      • autoscalingConfig

        @Stability(Stable)
        public SpannerInstance.Builder autoscalingConfig​(SpannerInstanceAutoscalingConfig 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}

        Parameters:
        autoscalingConfig - autoscaling_config block. This parameter is required.
        Returns:
        this
      • forceDestroy

        @Stability(Stable)
        public SpannerInstance.Builder forceDestroy​(Boolean 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}

        Parameters:
        forceDestroy - When deleting a spanner instance, this boolean option will delete all backups of this instance. This parameter is required.
        Returns:
        this
      • forceDestroy

        @Stability(Stable)
        public SpannerInstance.Builder forceDestroy​(com.hashicorp.cdktf.IResolvable 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}

        Parameters:
        forceDestroy - When deleting a spanner instance, this boolean option will delete all backups of this instance. This parameter is required.
        Returns:
        this
      • id

        @Stability(Stable)
        public SpannerInstance.Builder id​(String 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.

        Parameters:
        id - Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/spanner_instance#id SpannerInstance#id}. This parameter is required.
        Returns:
        this
      • labels

        @Stability(Stable)
        public SpannerInstance.Builder labels​(Map<String,​String> 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}

        Parameters:
        labels - An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. This parameter is required.
        Returns:
        this
      • name

        @Stability(Stable)
        public SpannerInstance.Builder name​(String 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}

        Parameters:
        name - A unique identifier for the instance, which cannot be changed after the instance is created. This parameter is required.
        Returns:
        this
      • numNodes

        @Stability(Stable)
        public SpannerInstance.Builder numNodes​(Number 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}

        Parameters:
        numNodes - The number of nodes allocated to this instance. Exactly one of either node_count or processing_units must be present in terraform. This parameter is required.
        Returns:
        this
      • processingUnits

        @Stability(Stable)
        public SpannerInstance.Builder processingUnits​(Number 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}

        Parameters:
        processingUnits - The number of processing units allocated to this instance. Exactly one of processing_units or node_count must be present in terraform. This parameter is required.
        Returns:
        this
      • project

        @Stability(Stable)
        public SpannerInstance.Builder project​(String project)
        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/spanner_instance#project SpannerInstance#project}.

        Parameters:
        project - Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/spanner_instance#project SpannerInstance#project}. This parameter is required.
        Returns:
        this
      • timeouts

        @Stability(Stable)
        public SpannerInstance.Builder timeouts​(SpannerInstanceTimeouts 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}

        Parameters:
        timeouts - timeouts block. This parameter is required.
        Returns:
        this