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

com.pulumi.awsnative.kms.kotlin.ReplicaKeyArgs.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: 1.11.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.kms.kotlin

import com.pulumi.awsnative.kms.ReplicaKeyArgs.builder
import com.pulumi.awsnative.kotlin.inputs.TagArgs
import com.pulumi.awsnative.kotlin.inputs.TagArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Any
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * The AWS::KMS::ReplicaKey resource specifies a multi-region replica AWS KMS key in AWS Key Management Service (AWS KMS).
 * @property description A description of the AWS KMS key. Use a description that helps you to distinguish this AWS KMS key from others in the account, such as its intended use.
 * @property enabled Specifies whether the AWS KMS key is enabled. Disabled AWS KMS keys cannot be used in cryptographic operations.
 * @property keyPolicy The key policy that authorizes use of the AWS KMS key. The key policy must observe the following rules.
 * Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::KMS::ReplicaKey` for more information about the expected schema for this property.
 * @property pendingWindowInDays Specifies the number of days in the waiting period before AWS KMS deletes an AWS KMS key that has been removed from a CloudFormation stack. Enter a value between 7 and 30 days. The default value is 30 days.
 * @property primaryKeyArn Identifies the primary AWS KMS key to create a replica of. Specify the Amazon Resource Name (ARN) of the AWS KMS key. You cannot specify an alias or key ID. For help finding the ARN, see Finding the Key ID and ARN in the AWS Key Management Service Developer Guide.
 * @property tags An array of key-value pairs to apply to this resource.
 */
public data class ReplicaKeyArgs(
    public val description: Output? = null,
    public val enabled: Output? = null,
    public val keyPolicy: Output? = null,
    public val pendingWindowInDays: Output? = null,
    public val primaryKeyArn: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.kms.ReplicaKeyArgs =
        com.pulumi.awsnative.kms.ReplicaKeyArgs.builder()
            .description(description?.applyValue({ args0 -> args0 }))
            .enabled(enabled?.applyValue({ args0 -> args0 }))
            .keyPolicy(keyPolicy?.applyValue({ args0 -> args0 }))
            .pendingWindowInDays(pendingWindowInDays?.applyValue({ args0 -> args0 }))
            .primaryKeyArn(primaryKeyArn?.applyValue({ args0 -> args0 }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [ReplicaKeyArgs].
 */
@PulumiTagMarker
public class ReplicaKeyArgsBuilder internal constructor() {
    private var description: Output? = null

    private var enabled: Output? = null

    private var keyPolicy: Output? = null

    private var pendingWindowInDays: Output? = null

    private var primaryKeyArn: Output? = null

    private var tags: Output>? = null

    /**
     * @param value A description of the AWS KMS key. Use a description that helps you to distinguish this AWS KMS key from others in the account, such as its intended use.
     */
    @JvmName("xdutoctejwbxkdwk")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value Specifies whether the AWS KMS key is enabled. Disabled AWS KMS keys cannot be used in cryptographic operations.
     */
    @JvmName("fnlrfvpnfvuyumqm")
    public suspend fun enabled(`value`: Output) {
        this.enabled = value
    }

    /**
     * @param value The key policy that authorizes use of the AWS KMS key. The key policy must observe the following rules.
     * Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::KMS::ReplicaKey` for more information about the expected schema for this property.
     */
    @JvmName("ixggwurssjkbrqyv")
    public suspend fun keyPolicy(`value`: Output) {
        this.keyPolicy = value
    }

    /**
     * @param value Specifies the number of days in the waiting period before AWS KMS deletes an AWS KMS key that has been removed from a CloudFormation stack. Enter a value between 7 and 30 days. The default value is 30 days.
     */
    @JvmName("slabdkupsusvoimt")
    public suspend fun pendingWindowInDays(`value`: Output) {
        this.pendingWindowInDays = value
    }

    /**
     * @param value Identifies the primary AWS KMS key to create a replica of. Specify the Amazon Resource Name (ARN) of the AWS KMS key. You cannot specify an alias or key ID. For help finding the ARN, see Finding the Key ID and ARN in the AWS Key Management Service Developer Guide.
     */
    @JvmName("xcipggxeesicspij")
    public suspend fun primaryKeyArn(`value`: Output) {
        this.primaryKeyArn = value
    }

    /**
     * @param value An array of key-value pairs to apply to this resource.
     */
    @JvmName("qafeakelixpaenno")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

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

    /**
     * @param values An array of key-value pairs to apply to this resource.
     */
    @JvmName("ykwvaaemflvcnjqi")
    public suspend fun tags(values: List>) {
        this.tags = Output.all(values)
    }

    /**
     * @param value A description of the AWS KMS key. Use a description that helps you to distinguish this AWS KMS key from others in the account, such as its intended use.
     */
    @JvmName("lavexcxvyxpxmjlb")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value Specifies whether the AWS KMS key is enabled. Disabled AWS KMS keys cannot be used in cryptographic operations.
     */
    @JvmName("fhikuvwywtfwwpge")
    public suspend fun enabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enabled = mapped
    }

    /**
     * @param value The key policy that authorizes use of the AWS KMS key. The key policy must observe the following rules.
     * Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::KMS::ReplicaKey` for more information about the expected schema for this property.
     */
    @JvmName("hsgssqigcfwighth")
    public suspend fun keyPolicy(`value`: Any?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.keyPolicy = mapped
    }

    /**
     * @param value Specifies the number of days in the waiting period before AWS KMS deletes an AWS KMS key that has been removed from a CloudFormation stack. Enter a value between 7 and 30 days. The default value is 30 days.
     */
    @JvmName("ersgdjdospfqmjqc")
    public suspend fun pendingWindowInDays(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.pendingWindowInDays = mapped
    }

    /**
     * @param value Identifies the primary AWS KMS key to create a replica of. Specify the Amazon Resource Name (ARN) of the AWS KMS key. You cannot specify an alias or key ID. For help finding the ARN, see Finding the Key ID and ARN in the AWS Key Management Service Developer Guide.
     */
    @JvmName("mdhvwtfcyqtkxlac")
    public suspend fun primaryKeyArn(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.primaryKeyArn = mapped
    }

    /**
     * @param value An array of key-value pairs to apply to this resource.
     */
    @JvmName("pswwghapocuexsxt")
    public suspend fun tags(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param argument An array of key-value pairs to apply to this resource.
     */
    @JvmName("txcctaibenbhdyws")
    public suspend fun tags(argument: List Unit>) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument An array of key-value pairs to apply to this resource.
     */
    @JvmName("qgqkmfjuxolnppst")
    public suspend fun tags(vararg argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument An array of key-value pairs to apply to this resource.
     */
    @JvmName("qophgeidprtraoch")
    public suspend fun tags(argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(TagArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param values An array of key-value pairs to apply to this resource.
     */
    @JvmName("aitfknxwfcofsskd")
    public suspend fun tags(vararg values: TagArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): ReplicaKeyArgs = ReplicaKeyArgs(
        description = description,
        enabled = enabled,
        keyPolicy = keyPolicy,
        pendingWindowInDays = pendingWindowInDays,
        primaryKeyArn = primaryKeyArn,
        tags = tags,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy