All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.gcp.spanner.kotlin.InstanceArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.spanner.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.spanner.InstanceArgs.builder
import com.pulumi.gcp.spanner.kotlin.inputs.InstanceAutoscalingConfigArgs
import com.pulumi.gcp.spanner.kotlin.inputs.InstanceAutoscalingConfigArgsBuilder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * An isolated set of Cloud Spanner resources on which databases can be
 * hosted.
 * To get more information about Instance, see:
 * * [API documentation](https://cloud.google.com/spanner/docs/reference/rest/v1/projects.instances)
 * * How-to Guides
 *     * [Official Documentation](https://cloud.google.com/spanner/)
 * ## Example Usage
 * ### Spanner Instance Basic
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const example = new gcp.spanner.Instance("example", {
 *     config: "regional-us-central1",
 *     displayName: "Test Spanner Instance",
 *     numNodes: 2,
 *     labels: {
 *         foo: "bar",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * example = gcp.spanner.Instance("example",
 *     config="regional-us-central1",
 *     display_name="Test Spanner Instance",
 *     num_nodes=2,
 *     labels={
 *         "foo": "bar",
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Gcp.Spanner.Instance("example", new()
 *     {
 *         Config = "regional-us-central1",
 *         DisplayName = "Test Spanner Instance",
 *         NumNodes = 2,
 *         Labels =
 *         {
 *             { "foo", "bar" },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/spanner"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := spanner.NewInstance(ctx, "example", &spanner.InstanceArgs{
 * 			Config:      pulumi.String("regional-us-central1"),
 * 			DisplayName: pulumi.String("Test Spanner Instance"),
 * 			NumNodes:    pulumi.Int(2),
 * 			Labels: pulumi.StringMap{
 * 				"foo": pulumi.String("bar"),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gcp.spanner.Instance;
 * import com.pulumi.gcp.spanner.InstanceArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var example = new Instance("example", InstanceArgs.builder()
 *             .config("regional-us-central1")
 *             .displayName("Test Spanner Instance")
 *             .numNodes(2)
 *             .labels(Map.of("foo", "bar"))
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: gcp:spanner:Instance
 *     properties:
 *       config: regional-us-central1
 *       displayName: Test Spanner Instance
 *       numNodes: 2
 *       labels:
 *         foo: bar
 * ```
 * 
 * ### Spanner Instance Processing Units
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const example = new gcp.spanner.Instance("example", {
 *     config: "regional-us-central1",
 *     displayName: "Test Spanner Instance",
 *     processingUnits: 200,
 *     labels: {
 *         foo: "bar",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * example = gcp.spanner.Instance("example",
 *     config="regional-us-central1",
 *     display_name="Test Spanner Instance",
 *     processing_units=200,
 *     labels={
 *         "foo": "bar",
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Gcp.Spanner.Instance("example", new()
 *     {
 *         Config = "regional-us-central1",
 *         DisplayName = "Test Spanner Instance",
 *         ProcessingUnits = 200,
 *         Labels =
 *         {
 *             { "foo", "bar" },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/spanner"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := spanner.NewInstance(ctx, "example", &spanner.InstanceArgs{
 * 			Config:          pulumi.String("regional-us-central1"),
 * 			DisplayName:     pulumi.String("Test Spanner Instance"),
 * 			ProcessingUnits: pulumi.Int(200),
 * 			Labels: pulumi.StringMap{
 * 				"foo": pulumi.String("bar"),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gcp.spanner.Instance;
 * import com.pulumi.gcp.spanner.InstanceArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var example = new Instance("example", InstanceArgs.builder()
 *             .config("regional-us-central1")
 *             .displayName("Test Spanner Instance")
 *             .processingUnits(200)
 *             .labels(Map.of("foo", "bar"))
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: gcp:spanner:Instance
 *     properties:
 *       config: regional-us-central1
 *       displayName: Test Spanner Instance
 *       processingUnits: 200
 *       labels:
 *         foo: bar
 * ```
 * 
 * ### Spanner Instance With Autoscaling
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const example = new gcp.spanner.Instance("example", {
 *     config: "regional-us-central1",
 *     displayName: "Test Spanner Instance",
 *     autoscalingConfig: {
 *         autoscalingLimits: {
 *             maxProcessingUnits: 3000,
 *             minProcessingUnits: 2000,
 *         },
 *         autoscalingTargets: {
 *             highPriorityCpuUtilizationPercent: 75,
 *             storageUtilizationPercent: 90,
 *         },
 *     },
 *     labels: {
 *         foo: "bar",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * example = gcp.spanner.Instance("example",
 *     config="regional-us-central1",
 *     display_name="Test Spanner Instance",
 *     autoscaling_config={
 *         "autoscaling_limits": {
 *             "max_processing_units": 3000,
 *             "min_processing_units": 2000,
 *         },
 *         "autoscaling_targets": {
 *             "high_priority_cpu_utilization_percent": 75,
 *             "storage_utilization_percent": 90,
 *         },
 *     },
 *     labels={
 *         "foo": "bar",
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Gcp.Spanner.Instance("example", new()
 *     {
 *         Config = "regional-us-central1",
 *         DisplayName = "Test Spanner Instance",
 *         AutoscalingConfig = new Gcp.Spanner.Inputs.InstanceAutoscalingConfigArgs
 *         {
 *             AutoscalingLimits = new Gcp.Spanner.Inputs.InstanceAutoscalingConfigAutoscalingLimitsArgs
 *             {
 *                 MaxProcessingUnits = 3000,
 *                 MinProcessingUnits = 2000,
 *             },
 *             AutoscalingTargets = new Gcp.Spanner.Inputs.InstanceAutoscalingConfigAutoscalingTargetsArgs
 *             {
 *                 HighPriorityCpuUtilizationPercent = 75,
 *                 StorageUtilizationPercent = 90,
 *             },
 *         },
 *         Labels =
 *         {
 *             { "foo", "bar" },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/spanner"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := spanner.NewInstance(ctx, "example", &spanner.InstanceArgs{
 * 			Config:      pulumi.String("regional-us-central1"),
 * 			DisplayName: pulumi.String("Test Spanner Instance"),
 * 			AutoscalingConfig: &spanner.InstanceAutoscalingConfigArgs{
 * 				AutoscalingLimits: &spanner.InstanceAutoscalingConfigAutoscalingLimitsArgs{
 * 					MaxProcessingUnits: pulumi.Int(3000),
 * 					MinProcessingUnits: pulumi.Int(2000),
 * 				},
 * 				AutoscalingTargets: &spanner.InstanceAutoscalingConfigAutoscalingTargetsArgs{
 * 					HighPriorityCpuUtilizationPercent: pulumi.Int(75),
 * 					StorageUtilizationPercent:         pulumi.Int(90),
 * 				},
 * 			},
 * 			Labels: pulumi.StringMap{
 * 				"foo": pulumi.String("bar"),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gcp.spanner.Instance;
 * import com.pulumi.gcp.spanner.InstanceArgs;
 * import com.pulumi.gcp.spanner.inputs.InstanceAutoscalingConfigArgs;
 * import com.pulumi.gcp.spanner.inputs.InstanceAutoscalingConfigAutoscalingLimitsArgs;
 * import com.pulumi.gcp.spanner.inputs.InstanceAutoscalingConfigAutoscalingTargetsArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var example = new Instance("example", InstanceArgs.builder()
 *             .config("regional-us-central1")
 *             .displayName("Test Spanner Instance")
 *             .autoscalingConfig(InstanceAutoscalingConfigArgs.builder()
 *                 .autoscalingLimits(InstanceAutoscalingConfigAutoscalingLimitsArgs.builder()
 *                     .maxProcessingUnits(3000)
 *                     .minProcessingUnits(2000)
 *                     .build())
 *                 .autoscalingTargets(InstanceAutoscalingConfigAutoscalingTargetsArgs.builder()
 *                     .highPriorityCpuUtilizationPercent(75)
 *                     .storageUtilizationPercent(90)
 *                     .build())
 *                 .build())
 *             .labels(Map.of("foo", "bar"))
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: gcp:spanner:Instance
 *     properties:
 *       config: regional-us-central1
 *       displayName: Test Spanner Instance
 *       autoscalingConfig:
 *         autoscalingLimits:
 *           maxProcessingUnits: 3000
 *           minProcessingUnits: 2000
 *         autoscalingTargets:
 *           highPriorityCpuUtilizationPercent: 75
 *           storageUtilizationPercent: 90
 *       labels:
 *         foo: bar
 * ```
 * 
 * ### Spanner Instance Multi Regional
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const example = new gcp.spanner.Instance("example", {
 *     config: "nam-eur-asia1",
 *     displayName: "Multi Regional Instance",
 *     numNodes: 2,
 *     labels: {
 *         foo: "bar",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * example = gcp.spanner.Instance("example",
 *     config="nam-eur-asia1",
 *     display_name="Multi Regional Instance",
 *     num_nodes=2,
 *     labels={
 *         "foo": "bar",
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Gcp.Spanner.Instance("example", new()
 *     {
 *         Config = "nam-eur-asia1",
 *         DisplayName = "Multi Regional Instance",
 *         NumNodes = 2,
 *         Labels =
 *         {
 *             { "foo", "bar" },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/spanner"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := spanner.NewInstance(ctx, "example", &spanner.InstanceArgs{
 * 			Config:      pulumi.String("nam-eur-asia1"),
 * 			DisplayName: pulumi.String("Multi Regional Instance"),
 * 			NumNodes:    pulumi.Int(2),
 * 			Labels: pulumi.StringMap{
 * 				"foo": pulumi.String("bar"),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gcp.spanner.Instance;
 * import com.pulumi.gcp.spanner.InstanceArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var example = new Instance("example", InstanceArgs.builder()
 *             .config("nam-eur-asia1")
 *             .displayName("Multi Regional Instance")
 *             .numNodes(2)
 *             .labels(Map.of("foo", "bar"))
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: gcp:spanner:Instance
 *     properties:
 *       config: nam-eur-asia1
 *       displayName: Multi Regional Instance
 *       numNodes: 2
 *       labels:
 *         foo: bar
 * ```
 * 
 * ## Import
 * Instance can be imported using any of these accepted formats:
 * * `projects/{{project}}/instances/{{name}}`
 * * `{{project}}/{{name}}`
 * * `{{name}}`
 * When using the `pulumi import` command, Instance can be imported using one of the formats above. For example:
 * ```sh
 * $ pulumi import gcp:spanner/instance:Instance default projects/{{project}}/instances/{{name}}
 * ```
 * ```sh
 * $ pulumi import gcp:spanner/instance:Instance default {{project}}/{{name}}
 * ```
 * ```sh
 * $ pulumi import gcp:spanner/instance:Instance default {{name}}
 * ```
 * @property autoscalingConfig The autoscaling configuration. Autoscaling is enabled if this field is set.
 * When autoscaling is enabled, num_nodes and processing_units are treated as,
 * OUTPUT_ONLY fields and reflect the current compute capacity allocated to
 * the instance.
 * Structure is documented below.
 * @property 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).
 * @property 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.
 * - - -
 * @property 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.
 * @property 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.
 * @property 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.
 * @property numNodes
 * @property processingUnits
 * @property project The ID of the project in which the resource belongs.
 * If it is not provided, the provider project is used.
 */
public data class InstanceArgs(
    public val autoscalingConfig: Output? = null,
    public val config: Output? = null,
    public val displayName: Output? = null,
    public val forceDestroy: Output? = null,
    public val labels: Output>? = null,
    public val name: Output? = null,
    public val numNodes: Output? = null,
    public val processingUnits: Output? = null,
    public val project: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.spanner.InstanceArgs =
        com.pulumi.gcp.spanner.InstanceArgs.builder()
            .autoscalingConfig(autoscalingConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .config(config?.applyValue({ args0 -> args0 }))
            .displayName(displayName?.applyValue({ args0 -> args0 }))
            .forceDestroy(forceDestroy?.applyValue({ args0 -> args0 }))
            .labels(labels?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .name(name?.applyValue({ args0 -> args0 }))
            .numNodes(numNodes?.applyValue({ args0 -> args0 }))
            .processingUnits(processingUnits?.applyValue({ args0 -> args0 }))
            .project(project?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [InstanceArgs].
 */
@PulumiTagMarker
public class InstanceArgsBuilder internal constructor() {
    private var autoscalingConfig: Output? = null

    private var config: Output? = null

    private var displayName: Output? = null

    private var forceDestroy: Output? = null

    private var labels: Output>? = null

    private var name: Output? = null

    private var numNodes: Output? = null

    private var processingUnits: Output? = null

    private var project: Output? = null

    /**
     * @param value The autoscaling configuration. Autoscaling is enabled if this field is set.
     * When autoscaling is enabled, num_nodes and processing_units are treated as,
     * OUTPUT_ONLY fields and reflect the current compute capacity allocated to
     * the instance.
     * Structure is documented below.
     */
    @JvmName("qeujpumkkcgxseaq")
    public suspend fun autoscalingConfig(`value`: Output) {
        this.autoscalingConfig = value
    }

    /**
     * @param value 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).
     */
    @JvmName("rkylblnmhqbomhjp")
    public suspend fun config(`value`: Output) {
        this.config = value
    }

    /**
     * @param value The descriptive name for this instance as it appears in UIs. Must be
     * unique per project and between 4 and 30 characters in length.
     * - - -
     */
    @JvmName("yfkkgljdrskeiwnk")
    public suspend fun displayName(`value`: Output) {
        this.displayName = value
    }

    /**
     * @param value 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.
     */
    @JvmName("kcfjcnbiptuqaavc")
    public suspend fun forceDestroy(`value`: Output) {
        this.forceDestroy = value
    }

    /**
     * @param value 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.
     */
    @JvmName("soxavjynogqmaosd")
    public suspend fun labels(`value`: Output>) {
        this.labels = value
    }

    /**
     * @param value 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.
     */
    @JvmName("jfyphrdlgeihwrrw")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value
     */
    @JvmName("oyaqvsnumqmroswt")
    public suspend fun numNodes(`value`: Output) {
        this.numNodes = value
    }

    /**
     * @param value
     */
    @JvmName("xufvxisoalfehkiv")
    public suspend fun processingUnits(`value`: Output) {
        this.processingUnits = value
    }

    /**
     * @param value The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     */
    @JvmName("xldkwkvkuctpwhyl")
    public suspend fun project(`value`: Output) {
        this.project = value
    }

    /**
     * @param value The autoscaling configuration. Autoscaling is enabled if this field is set.
     * When autoscaling is enabled, num_nodes and processing_units are treated as,
     * OUTPUT_ONLY fields and reflect the current compute capacity allocated to
     * the instance.
     * Structure is documented below.
     */
    @JvmName("kkqpcowkbjmfvrih")
    public suspend fun autoscalingConfig(`value`: InstanceAutoscalingConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.autoscalingConfig = mapped
    }

    /**
     * @param argument The autoscaling configuration. Autoscaling is enabled if this field is set.
     * When autoscaling is enabled, num_nodes and processing_units are treated as,
     * OUTPUT_ONLY fields and reflect the current compute capacity allocated to
     * the instance.
     * Structure is documented below.
     */
    @JvmName("xynwdubrvedjysbr")
    public suspend fun autoscalingConfig(argument: suspend InstanceAutoscalingConfigArgsBuilder.() -> Unit) {
        val toBeMapped = InstanceAutoscalingConfigArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.autoscalingConfig = mapped
    }

    /**
     * @param value 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).
     */
    @JvmName("ahxexfbovjwihiby")
    public suspend fun config(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.config = mapped
    }

    /**
     * @param value The descriptive name for this instance as it appears in UIs. Must be
     * unique per project and between 4 and 30 characters in length.
     * - - -
     */
    @JvmName("kywqfsosmneoiqrc")
    public suspend fun displayName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.displayName = mapped
    }

    /**
     * @param value 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.
     */
    @JvmName("qcfunxwejwdfenoc")
    public suspend fun forceDestroy(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.forceDestroy = mapped
    }

    /**
     * @param value 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.
     */
    @JvmName("bfngngvvdkfitway")
    public suspend fun labels(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param values 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.
     */
    @JvmName("ybojxibosgotpbqj")
    public fun labels(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param value 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.
     */
    @JvmName("tswdrfxkwtxmgmfq")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value
     */
    @JvmName("qwjruaiyysoesueg")
    public suspend fun numNodes(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.numNodes = mapped
    }

    /**
     * @param value
     */
    @JvmName("ixubxqncyqnnglja")
    public suspend fun processingUnits(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.processingUnits = mapped
    }

    /**
     * @param value The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     */
    @JvmName("wnykjuikwaaqssjl")
    public suspend fun project(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.project = mapped
    }

    internal fun build(): InstanceArgs = InstanceArgs(
        autoscalingConfig = autoscalingConfig,
        config = config,
        displayName = displayName,
        forceDestroy = forceDestroy,
        labels = labels,
        name = name,
        numNodes = numNodes,
        processingUnits = processingUnits,
        project = project,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy