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

com.pulumi.gcp.kms.kotlin.outputs.GetCryptoKeysKey.kt Maven / Gradle / Ivy

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

package com.pulumi.gcp.kms.kotlin.outputs

import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.collections.Map

/**
 *
 * @property cryptoKeyBackend The resource name of the backend environment associated with all CryptoKeyVersions within this CryptoKey.
 * The resource name is in the format "projects/*/locations/*/ekmConnections/*" and only applies to "EXTERNAL_VPC" keys.
 * @property destroyScheduledDuration The period of time that versions of this key spend in the DESTROY_SCHEDULED state before transitioning to DESTROYED.
 * If not specified at creation time, the default duration is 30 days.
 * @property effectiveLabels
 * @property id
 * @property importOnly Whether this key may contain imported versions only.
 * @property keyAccessJustificationsPolicies The policy used for Key Access Justifications Policy Enforcement. If this
 * field is present and this key is enrolled in Key Access Justifications
 * Policy Enforcement, the policy will be evaluated in encrypt, decrypt, and
 * sign operations, and the operation will fail if rejected by the policy. The
 * policy is defined by specifying zero or more allowed justification codes.
 * https://cloud.google.com/assured-workloads/key-access-justifications/docs/justification-codes
 * By default, this field is absent, and all justification codes are allowed.
 * This field is currently in beta and is subject to change.
 * @property keyRing The key ring that the keys belongs to. Format: 'projects/{{project}}/locations/{{location}}/keyRings/{{keyRing}}'.,
 * @property labels Labels with user-defined metadata to apply to this resource.
 * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
 * Please refer to the field 'effective_labels' for all of the labels present on the resource.
 * @property name The resource name for the CryptoKey.
 * @property primaries A copy of the primary CryptoKeyVersion that will be used by cryptoKeys.encrypt when this CryptoKey is given in EncryptRequest.name.
 * Keys with purpose ENCRYPT_DECRYPT may have a primary. For other keys, this field will be unset.
 * @property pulumiLabels The combination of labels configured directly on the resource
 *  and default labels configured on the provider.
 * @property purpose The immutable purpose of this CryptoKey. See the
 * [purpose reference](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys#CryptoKeyPurpose)
 * for possible inputs.
 * Default value is "ENCRYPT_DECRYPT".
 * @property rotationPeriod Every time this period passes, generate a new CryptoKeyVersion and set it as the primary.
 * The first rotation will take place after the specified period. The rotation period has
 * the format of a decimal number with up to 9 fractional digits, followed by the
 * letter 's' (seconds). It must be greater than a day (ie, 86400).
 * @property skipInitialVersionCreation If set to true, the request will create a CryptoKey without any CryptoKeyVersions.
 * You must use the 'google_kms_crypto_key_version' resource to create a new CryptoKeyVersion
 * or 'google_kms_key_ring_import_job' resource to import the CryptoKeyVersion.
 * @property versionTemplates A template describing settings for new crypto key versions.
 * */*/*/
 */
public data class GetCryptoKeysKey(
    public val cryptoKeyBackend: String,
    public val destroyScheduledDuration: String,
    public val effectiveLabels: Map,
    public val id: String,
    public val importOnly: Boolean,
    public val keyAccessJustificationsPolicies: List,
    public val keyRing: String? = null,
    public val labels: Map,
    public val name: String? = null,
    public val primaries: List,
    public val pulumiLabels: Map,
    public val purpose: String,
    public val rotationPeriod: String,
    public val skipInitialVersionCreation: Boolean,
    public val versionTemplates: List,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.gcp.kms.outputs.GetCryptoKeysKey): GetCryptoKeysKey =
            GetCryptoKeysKey(
                cryptoKeyBackend = javaType.cryptoKeyBackend(),
                destroyScheduledDuration = javaType.destroyScheduledDuration(),
                effectiveLabels = javaType.effectiveLabels().map({ args0 -> args0.key.to(args0.value) }).toMap(),
                id = javaType.id(),
                importOnly = javaType.importOnly(),
                keyAccessJustificationsPolicies = javaType.keyAccessJustificationsPolicies().map({ args0 ->
                    args0.let({ args0 ->
                        com.pulumi.gcp.kms.kotlin.outputs.GetCryptoKeysKeyKeyAccessJustificationsPolicy.Companion.toKotlin(args0)
                    })
                }),
                keyRing = javaType.keyRing().map({ args0 -> args0 }).orElse(null),
                labels = javaType.labels().map({ args0 -> args0.key.to(args0.value) }).toMap(),
                name = javaType.name().map({ args0 -> args0 }).orElse(null),
                primaries = javaType.primaries().map({ args0 ->
                    args0.let({ args0 ->
                        com.pulumi.gcp.kms.kotlin.outputs.GetCryptoKeysKeyPrimary.Companion.toKotlin(args0)
                    })
                }),
                pulumiLabels = javaType.pulumiLabels().map({ args0 -> args0.key.to(args0.value) }).toMap(),
                purpose = javaType.purpose(),
                rotationPeriod = javaType.rotationPeriod(),
                skipInitialVersionCreation = javaType.skipInitialVersionCreation(),
                versionTemplates = javaType.versionTemplates().map({ args0 ->
                    args0.let({ args0 ->
                        com.pulumi.gcp.kms.kotlin.outputs.GetCryptoKeysKeyVersionTemplate.Companion.toKotlin(args0)
                    })
                }),
            )
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy