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

com.pulumi.gcp.firestore.kotlin.inputs.DatabaseCmekConfigArgs.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.12.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.firestore.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.firestore.inputs.DatabaseCmekConfigArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property activeKeyVersions (Output)
 * Currently in-use KMS key versions (https://cloud.google.com/kms/docs/resource-hierarchy#key_versions).
 * During key rotation (https://cloud.google.com/kms/docs/key-rotation), there can be
 * multiple in-use key versions.
 * The expected format is
 * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}`.
 * @property kmsKeyName The resource ID of a Cloud KMS key. If set, the database created will
 * be a Customer-managed Encryption Key (CMEK) database encrypted with
 * this key. This feature is allowlist only in initial launch.
 * Only keys in the same location as this database are allowed to be used
 * for encryption. For Firestore's nam5 multi-region, this corresponds to Cloud KMS
 * multi-region us. For Firestore's eur3 multi-region, this corresponds to
 * Cloud KMS multi-region europe. See https://cloud.google.com/kms/docs/locations.
 * This value should be the KMS key resource ID in the format of
 * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
 * How to retrive this resource ID is listed at
 * https://cloud.google.com/kms/docs/getting-resource-ids#getting_the_id_for_a_key_and_version.
 */
public data class DatabaseCmekConfigArgs(
    public val activeKeyVersions: Output>? = null,
    public val kmsKeyName: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.firestore.inputs.DatabaseCmekConfigArgs =
        com.pulumi.gcp.firestore.inputs.DatabaseCmekConfigArgs.builder()
            .activeKeyVersions(activeKeyVersions?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .kmsKeyName(kmsKeyName.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [DatabaseCmekConfigArgs].
 */
@PulumiTagMarker
public class DatabaseCmekConfigArgsBuilder internal constructor() {
    private var activeKeyVersions: Output>? = null

    private var kmsKeyName: Output? = null

    /**
     * @param value (Output)
     * Currently in-use KMS key versions (https://cloud.google.com/kms/docs/resource-hierarchy#key_versions).
     * During key rotation (https://cloud.google.com/kms/docs/key-rotation), there can be
     * multiple in-use key versions.
     * The expected format is
     * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}`.
     */
    @JvmName("bceevyfahcwijlou")
    public suspend fun activeKeyVersions(`value`: Output>) {
        this.activeKeyVersions = value
    }

    @JvmName("whtkjqbvfufmlwjg")
    public suspend fun activeKeyVersions(vararg values: Output) {
        this.activeKeyVersions = Output.all(values.asList())
    }

    /**
     * @param values (Output)
     * Currently in-use KMS key versions (https://cloud.google.com/kms/docs/resource-hierarchy#key_versions).
     * During key rotation (https://cloud.google.com/kms/docs/key-rotation), there can be
     * multiple in-use key versions.
     * The expected format is
     * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}`.
     */
    @JvmName("tbjyglaxrqafjwrb")
    public suspend fun activeKeyVersions(values: List>) {
        this.activeKeyVersions = Output.all(values)
    }

    /**
     * @param value The resource ID of a Cloud KMS key. If set, the database created will
     * be a Customer-managed Encryption Key (CMEK) database encrypted with
     * this key. This feature is allowlist only in initial launch.
     * Only keys in the same location as this database are allowed to be used
     * for encryption. For Firestore's nam5 multi-region, this corresponds to Cloud KMS
     * multi-region us. For Firestore's eur3 multi-region, this corresponds to
     * Cloud KMS multi-region europe. See https://cloud.google.com/kms/docs/locations.
     * This value should be the KMS key resource ID in the format of
     * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
     * How to retrive this resource ID is listed at
     * https://cloud.google.com/kms/docs/getting-resource-ids#getting_the_id_for_a_key_and_version.
     */
    @JvmName("tbpenvfwdvtbepga")
    public suspend fun kmsKeyName(`value`: Output) {
        this.kmsKeyName = value
    }

    /**
     * @param value (Output)
     * Currently in-use KMS key versions (https://cloud.google.com/kms/docs/resource-hierarchy#key_versions).
     * During key rotation (https://cloud.google.com/kms/docs/key-rotation), there can be
     * multiple in-use key versions.
     * The expected format is
     * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}`.
     */
    @JvmName("hnebvahfhvdppsvk")
    public suspend fun activeKeyVersions(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.activeKeyVersions = mapped
    }

    /**
     * @param values (Output)
     * Currently in-use KMS key versions (https://cloud.google.com/kms/docs/resource-hierarchy#key_versions).
     * During key rotation (https://cloud.google.com/kms/docs/key-rotation), there can be
     * multiple in-use key versions.
     * The expected format is
     * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}`.
     */
    @JvmName("rliwytlcrxivoqkd")
    public suspend fun activeKeyVersions(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.activeKeyVersions = mapped
    }

    /**
     * @param value The resource ID of a Cloud KMS key. If set, the database created will
     * be a Customer-managed Encryption Key (CMEK) database encrypted with
     * this key. This feature is allowlist only in initial launch.
     * Only keys in the same location as this database are allowed to be used
     * for encryption. For Firestore's nam5 multi-region, this corresponds to Cloud KMS
     * multi-region us. For Firestore's eur3 multi-region, this corresponds to
     * Cloud KMS multi-region europe. See https://cloud.google.com/kms/docs/locations.
     * This value should be the KMS key resource ID in the format of
     * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
     * How to retrive this resource ID is listed at
     * https://cloud.google.com/kms/docs/getting-resource-ids#getting_the_id_for_a_key_and_version.
     */
    @JvmName("yfrcabllvueoehit")
    public suspend fun kmsKeyName(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.kmsKeyName = mapped
    }

    internal fun build(): DatabaseCmekConfigArgs = DatabaseCmekConfigArgs(
        activeKeyVersions = activeKeyVersions,
        kmsKeyName = kmsKeyName ?: throw PulumiNullFieldException("kmsKeyName"),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy