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

com.pulumi.awsnative.kms.kotlin.enums.KeyUsage.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.kms.kotlin.enums

import com.pulumi.kotlin.ConvertibleToJava
import kotlin.Suppress

/**
 * Determines the [cryptographic operations](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations) for which you can use the KMS key. The default value is ``ENCRYPT_DECRYPT``. This property is required for asymmetric KMS keys and HMAC KMS keys. You can't change the ``KeyUsage`` value after the KMS key is created.
 *   If you change the value of the ``KeyUsage`` property on an existing KMS key, the update request fails, regardless of the value of the [UpdateReplacePolicy attribute](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatereplacepolicy.html). This prevents you from accidentally deleting a KMS key by changing an immutable property value.
 *   Select only one valid value.
 *   +  For symmetric encryption KMS keys, omit the parameter or specify ``ENCRYPT_DECRYPT``.
 *   +  For HMAC KMS keys (symmetric), specify ``GENERATE_VERIFY_MAC``.
 *   +  For asymmetric KMS keys with RSA key pairs, specify ``ENCRYPT_DECRYPT`` or ``SIGN_VERIFY``.
 *   +  For asymmetric KMS keys with NIST-recommended elliptic curve key pairs, specify ``SIGN_VERIFY`` or ``KEY_AGREEMENT``.
 *   +  For asymmetric KMS keys with ``ECC_SECG_P256K1`` key pairs specify ``SIGN_VERIFY``.
 *   +  For asymmetric KMS keys with SM2 key pairs (China Regions only), specify ``ENCRYPT_DECRYPT``, ``SIGN_VERIFY``, or ``KEY_AGREEMENT``.
 */
public enum class KeyUsage(
    public val javaValue: com.pulumi.awsnative.kms.enums.KeyUsage,
) : ConvertibleToJava {
    EncryptDecrypt(com.pulumi.awsnative.kms.enums.KeyUsage.EncryptDecrypt),
    SignVerify(com.pulumi.awsnative.kms.enums.KeyUsage.SignVerify),
    GenerateVerifyMac(com.pulumi.awsnative.kms.enums.KeyUsage.GenerateVerifyMac),
    KeyAgreement(com.pulumi.awsnative.kms.enums.KeyUsage.KeyAgreement),
    ;

    override fun toJava(): com.pulumi.awsnative.kms.enums.KeyUsage = javaValue

    public companion object {
        public fun toKotlin(javaType: com.pulumi.awsnative.kms.enums.KeyUsage): KeyUsage =
            KeyUsage.values().first { it.javaValue == javaType }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy