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

com.pulumi.gcp.bigtable.kotlin.inputs.InstanceClusterArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 8.10.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.bigtable.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.bigtable.inputs.InstanceClusterArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 *
 * @property autoscalingConfig [Autoscaling](https://cloud.google.com/bigtable/docs/autoscaling#parameters) config for the cluster, contains the following arguments:
 * @property clusterId The ID of the Cloud Bigtable cluster. Must be 6-30 characters and must only contain hyphens, lowercase letters and numbers.
 * @property kmsKeyName Describes the Cloud KMS encryption key that will be used to protect the destination Bigtable cluster. The requirements for this key are: 1) The Cloud Bigtable service account associated with the project that contains this cluster must be granted the `cloudkms.cryptoKeyEncrypterDecrypter` role on the CMEK key. 2) Only regional keys can be used and the region of the CMEK key must match the region of the cluster.
 * > **Note**: Removing the field entirely from the config will cause the provider to default to the backend value.
 * !> **Warning**: Modifying this field will cause the provider to delete/recreate the entire resource.
 * !> **Warning:** Modifying the `storage_type`, `zone` or `kms_key_name` of an existing cluster (by
 * `cluster_id`) will cause the provider to delete/recreate the entire
 * `gcp.bigtable.Instance` resource. If these values are changing, use a new
 * `cluster_id`.
 * @property numNodes The number of nodes in the cluster.
 * If no value is set, Cloud Bigtable automatically allocates nodes based on your data footprint and optimized for 50% storage utilization.
 * @property state describes the current state of the cluster.
 * @property storageType The storage type to use. One of `"SSD"` or
 * `"HDD"`. Defaults to `"SSD"`.
 * @property zone The zone to create the Cloud Bigtable cluster in. If it not
 * specified, the provider zone is used. Each cluster must have a different zone in the same region. Zones that support
 * Bigtable instances are noted on the [Cloud Bigtable locations page](https://cloud.google.com/bigtable/docs/locations).
 */
public data class InstanceClusterArgs(
    public val autoscalingConfig: Output? = null,
    public val clusterId: Output,
    public val kmsKeyName: Output? = null,
    public val numNodes: Output? = null,
    public val state: Output? = null,
    public val storageType: Output? = null,
    public val zone: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.bigtable.inputs.InstanceClusterArgs =
        com.pulumi.gcp.bigtable.inputs.InstanceClusterArgs.builder()
            .autoscalingConfig(autoscalingConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .clusterId(clusterId.applyValue({ args0 -> args0 }))
            .kmsKeyName(kmsKeyName?.applyValue({ args0 -> args0 }))
            .numNodes(numNodes?.applyValue({ args0 -> args0 }))
            .state(state?.applyValue({ args0 -> args0 }))
            .storageType(storageType?.applyValue({ args0 -> args0 }))
            .zone(zone?.applyValue({ args0 -> args0 })).build()
}

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

    private var clusterId: Output? = null

    private var kmsKeyName: Output? = null

    private var numNodes: Output? = null

    private var state: Output? = null

    private var storageType: Output? = null

    private var zone: Output? = null

    /**
     * @param value [Autoscaling](https://cloud.google.com/bigtable/docs/autoscaling#parameters) config for the cluster, contains the following arguments:
     */
    @JvmName("rsahhhyjslsuhtpq")
    public suspend fun autoscalingConfig(`value`: Output) {
        this.autoscalingConfig = value
    }

    /**
     * @param value The ID of the Cloud Bigtable cluster. Must be 6-30 characters and must only contain hyphens, lowercase letters and numbers.
     */
    @JvmName("fpthrstcbfjbcjuk")
    public suspend fun clusterId(`value`: Output) {
        this.clusterId = value
    }

    /**
     * @param value Describes the Cloud KMS encryption key that will be used to protect the destination Bigtable cluster. The requirements for this key are: 1) The Cloud Bigtable service account associated with the project that contains this cluster must be granted the `cloudkms.cryptoKeyEncrypterDecrypter` role on the CMEK key. 2) Only regional keys can be used and the region of the CMEK key must match the region of the cluster.
     * > **Note**: Removing the field entirely from the config will cause the provider to default to the backend value.
     * !> **Warning**: Modifying this field will cause the provider to delete/recreate the entire resource.
     * !> **Warning:** Modifying the `storage_type`, `zone` or `kms_key_name` of an existing cluster (by
     * `cluster_id`) will cause the provider to delete/recreate the entire
     * `gcp.bigtable.Instance` resource. If these values are changing, use a new
     * `cluster_id`.
     */
    @JvmName("vaymgvogkcgyqhfo")
    public suspend fun kmsKeyName(`value`: Output) {
        this.kmsKeyName = value
    }

    /**
     * @param value The number of nodes in the cluster.
     * If no value is set, Cloud Bigtable automatically allocates nodes based on your data footprint and optimized for 50% storage utilization.
     */
    @JvmName("mhlfjwcsxnuhtonu")
    public suspend fun numNodes(`value`: Output) {
        this.numNodes = value
    }

    /**
     * @param value describes the current state of the cluster.
     */
    @JvmName("sbopndlospncidqg")
    public suspend fun state(`value`: Output) {
        this.state = value
    }

    /**
     * @param value The storage type to use. One of `"SSD"` or
     * `"HDD"`. Defaults to `"SSD"`.
     */
    @JvmName("ykskfmwcxgdxjglb")
    public suspend fun storageType(`value`: Output) {
        this.storageType = value
    }

    /**
     * @param value The zone to create the Cloud Bigtable cluster in. If it not
     * specified, the provider zone is used. Each cluster must have a different zone in the same region. Zones that support
     * Bigtable instances are noted on the [Cloud Bigtable locations page](https://cloud.google.com/bigtable/docs/locations).
     */
    @JvmName("pyaswksswvxlludp")
    public suspend fun zone(`value`: Output) {
        this.zone = value
    }

    /**
     * @param value [Autoscaling](https://cloud.google.com/bigtable/docs/autoscaling#parameters) config for the cluster, contains the following arguments:
     */
    @JvmName("vesmomqbtoyffvay")
    public suspend fun autoscalingConfig(`value`: InstanceClusterAutoscalingConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.autoscalingConfig = mapped
    }

    /**
     * @param argument [Autoscaling](https://cloud.google.com/bigtable/docs/autoscaling#parameters) config for the cluster, contains the following arguments:
     */
    @JvmName("nmpolbehsuqxsjjt")
    public suspend fun autoscalingConfig(argument: suspend InstanceClusterAutoscalingConfigArgsBuilder.() -> Unit) {
        val toBeMapped = InstanceClusterAutoscalingConfigArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.autoscalingConfig = mapped
    }

    /**
     * @param value The ID of the Cloud Bigtable cluster. Must be 6-30 characters and must only contain hyphens, lowercase letters and numbers.
     */
    @JvmName("eyoedwavysqrbhud")
    public suspend fun clusterId(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.clusterId = mapped
    }

    /**
     * @param value Describes the Cloud KMS encryption key that will be used to protect the destination Bigtable cluster. The requirements for this key are: 1) The Cloud Bigtable service account associated with the project that contains this cluster must be granted the `cloudkms.cryptoKeyEncrypterDecrypter` role on the CMEK key. 2) Only regional keys can be used and the region of the CMEK key must match the region of the cluster.
     * > **Note**: Removing the field entirely from the config will cause the provider to default to the backend value.
     * !> **Warning**: Modifying this field will cause the provider to delete/recreate the entire resource.
     * !> **Warning:** Modifying the `storage_type`, `zone` or `kms_key_name` of an existing cluster (by
     * `cluster_id`) will cause the provider to delete/recreate the entire
     * `gcp.bigtable.Instance` resource. If these values are changing, use a new
     * `cluster_id`.
     */
    @JvmName("yjigjorvqglfabod")
    public suspend fun kmsKeyName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.kmsKeyName = mapped
    }

    /**
     * @param value The number of nodes in the cluster.
     * If no value is set, Cloud Bigtable automatically allocates nodes based on your data footprint and optimized for 50% storage utilization.
     */
    @JvmName("aadwkdeegfgnymvo")
    public suspend fun numNodes(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.numNodes = mapped
    }

    /**
     * @param value describes the current state of the cluster.
     */
    @JvmName("jubpjhusmsvxlsyk")
    public suspend fun state(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.state = mapped
    }

    /**
     * @param value The storage type to use. One of `"SSD"` or
     * `"HDD"`. Defaults to `"SSD"`.
     */
    @JvmName("qbyeoikydiypklyq")
    public suspend fun storageType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.storageType = mapped
    }

    /**
     * @param value The zone to create the Cloud Bigtable cluster in. If it not
     * specified, the provider zone is used. Each cluster must have a different zone in the same region. Zones that support
     * Bigtable instances are noted on the [Cloud Bigtable locations page](https://cloud.google.com/bigtable/docs/locations).
     */
    @JvmName("mcvgtoffqajmfohl")
    public suspend fun zone(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.zone = mapped
    }

    internal fun build(): InstanceClusterArgs = InstanceClusterArgs(
        autoscalingConfig = autoscalingConfig,
        clusterId = clusterId ?: throw PulumiNullFieldException("clusterId"),
        kmsKeyName = kmsKeyName,
        numNodes = numNodes,
        state = state,
        storageType = storageType,
        zone = zone,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy