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

com.pulumi.gcp.logging.kotlin.inputs.OrganizationBucketConfigCmekSettingsArgs.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.logging.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.logging.inputs.OrganizationBucketConfigCmekSettingsArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 *
 * @property kmsKeyName The resource name for the configured Cloud KMS key.
 * KMS key name format:
 * "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]"
 * To enable CMEK for the bucket, set this field to a valid kmsKeyName for which the associated service account has the required cloudkms.cryptoKeyEncrypterDecrypter roles assigned for the key.
 * The Cloud KMS key used by the bucket can be updated by changing the kmsKeyName to a new valid key name. Encryption operations that are in progress will be completed with the key that was in use when they started. Decryption operations will be completed using the key that was used at the time of encryption unless access to that key has been revoked.
 * See [Enabling CMEK for Logging Buckets](https://cloud.google.com/logging/docs/routing/managed-encryption-storage) for more information.
 * @property kmsKeyVersionName The CryptoKeyVersion resource name for the configured Cloud KMS key.
 * KMS key name format:
 * "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]/cryptoKeyVersions/[VERSION]"
 * For example:
 * "projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key/cryptoKeyVersions/1"
 * This is a read-only field used to convey the specific configured CryptoKeyVersion of kms_key that has been configured. It will be populated in cases where the CMEK settings are bound to a single key version.
 * @property name The resource name of the bucket. For example: "organizations/my-organization-id/locations/my-location/buckets/my-bucket-id"
 * @property serviceAccountId The service account associated with a project for which CMEK will apply.
 * Before enabling CMEK for a logging bucket, you must first assign the cloudkms.cryptoKeyEncrypterDecrypter role to the service account associated with the project for which CMEK will apply. Use [v2.getCmekSettings](https://cloud.google.com/logging/docs/reference/v2/rest/v2/TopLevel/getCmekSettings#google.logging.v2.ConfigServiceV2.GetCmekSettings) to obtain the service account ID.
 * See [Enabling CMEK for Logging Buckets](https://cloud.google.com/logging/docs/routing/managed-encryption-storage) for more information.
 */
public data class OrganizationBucketConfigCmekSettingsArgs(
    public val kmsKeyName: Output,
    public val kmsKeyVersionName: Output? = null,
    public val name: Output? = null,
    public val serviceAccountId: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.logging.inputs.OrganizationBucketConfigCmekSettingsArgs =
        com.pulumi.gcp.logging.inputs.OrganizationBucketConfigCmekSettingsArgs.builder()
            .kmsKeyName(kmsKeyName.applyValue({ args0 -> args0 }))
            .kmsKeyVersionName(kmsKeyVersionName?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .serviceAccountId(serviceAccountId?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [OrganizationBucketConfigCmekSettingsArgs].
 */
@PulumiTagMarker
public class OrganizationBucketConfigCmekSettingsArgsBuilder internal constructor() {
    private var kmsKeyName: Output? = null

    private var kmsKeyVersionName: Output? = null

    private var name: Output? = null

    private var serviceAccountId: Output? = null

    /**
     * @param value The resource name for the configured Cloud KMS key.
     * KMS key name format:
     * "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]"
     * To enable CMEK for the bucket, set this field to a valid kmsKeyName for which the associated service account has the required cloudkms.cryptoKeyEncrypterDecrypter roles assigned for the key.
     * The Cloud KMS key used by the bucket can be updated by changing the kmsKeyName to a new valid key name. Encryption operations that are in progress will be completed with the key that was in use when they started. Decryption operations will be completed using the key that was used at the time of encryption unless access to that key has been revoked.
     * See [Enabling CMEK for Logging Buckets](https://cloud.google.com/logging/docs/routing/managed-encryption-storage) for more information.
     */
    @JvmName("wuevkgrkyjiaurvr")
    public suspend fun kmsKeyName(`value`: Output) {
        this.kmsKeyName = value
    }

    /**
     * @param value The CryptoKeyVersion resource name for the configured Cloud KMS key.
     * KMS key name format:
     * "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]/cryptoKeyVersions/[VERSION]"
     * For example:
     * "projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key/cryptoKeyVersions/1"
     * This is a read-only field used to convey the specific configured CryptoKeyVersion of kms_key that has been configured. It will be populated in cases where the CMEK settings are bound to a single key version.
     */
    @JvmName("hutnjkogdbchmbsg")
    public suspend fun kmsKeyVersionName(`value`: Output) {
        this.kmsKeyVersionName = value
    }

    /**
     * @param value The resource name of the bucket. For example: "organizations/my-organization-id/locations/my-location/buckets/my-bucket-id"
     */
    @JvmName("quiggejhjnptikgt")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The service account associated with a project for which CMEK will apply.
     * Before enabling CMEK for a logging bucket, you must first assign the cloudkms.cryptoKeyEncrypterDecrypter role to the service account associated with the project for which CMEK will apply. Use [v2.getCmekSettings](https://cloud.google.com/logging/docs/reference/v2/rest/v2/TopLevel/getCmekSettings#google.logging.v2.ConfigServiceV2.GetCmekSettings) to obtain the service account ID.
     * See [Enabling CMEK for Logging Buckets](https://cloud.google.com/logging/docs/routing/managed-encryption-storage) for more information.
     */
    @JvmName("ighbqqotvfyhhpfe")
    public suspend fun serviceAccountId(`value`: Output) {
        this.serviceAccountId = value
    }

    /**
     * @param value The resource name for the configured Cloud KMS key.
     * KMS key name format:
     * "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]"
     * To enable CMEK for the bucket, set this field to a valid kmsKeyName for which the associated service account has the required cloudkms.cryptoKeyEncrypterDecrypter roles assigned for the key.
     * The Cloud KMS key used by the bucket can be updated by changing the kmsKeyName to a new valid key name. Encryption operations that are in progress will be completed with the key that was in use when they started. Decryption operations will be completed using the key that was used at the time of encryption unless access to that key has been revoked.
     * See [Enabling CMEK for Logging Buckets](https://cloud.google.com/logging/docs/routing/managed-encryption-storage) for more information.
     */
    @JvmName("nalhoinvdhgsgrnd")
    public suspend fun kmsKeyName(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.kmsKeyName = mapped
    }

    /**
     * @param value The CryptoKeyVersion resource name for the configured Cloud KMS key.
     * KMS key name format:
     * "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]/cryptoKeyVersions/[VERSION]"
     * For example:
     * "projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key/cryptoKeyVersions/1"
     * This is a read-only field used to convey the specific configured CryptoKeyVersion of kms_key that has been configured. It will be populated in cases where the CMEK settings are bound to a single key version.
     */
    @JvmName("cktsbdwllbxpdijj")
    public suspend fun kmsKeyVersionName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.kmsKeyVersionName = mapped
    }

    /**
     * @param value The resource name of the bucket. For example: "organizations/my-organization-id/locations/my-location/buckets/my-bucket-id"
     */
    @JvmName("kpxcjkcidfkqkpym")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The service account associated with a project for which CMEK will apply.
     * Before enabling CMEK for a logging bucket, you must first assign the cloudkms.cryptoKeyEncrypterDecrypter role to the service account associated with the project for which CMEK will apply. Use [v2.getCmekSettings](https://cloud.google.com/logging/docs/reference/v2/rest/v2/TopLevel/getCmekSettings#google.logging.v2.ConfigServiceV2.GetCmekSettings) to obtain the service account ID.
     * See [Enabling CMEK for Logging Buckets](https://cloud.google.com/logging/docs/routing/managed-encryption-storage) for more information.
     */
    @JvmName("efudvhgunfaxsune")
    public suspend fun serviceAccountId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.serviceAccountId = mapped
    }

    internal fun build(): OrganizationBucketConfigCmekSettingsArgs =
        OrganizationBucketConfigCmekSettingsArgs(
            kmsKeyName = kmsKeyName ?: throw PulumiNullFieldException("kmsKeyName"),
            kmsKeyVersionName = kmsKeyVersionName,
            name = name,
            serviceAccountId = serviceAccountId,
        )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy