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

com.pulumi.vault.managed.kotlin.inputs.KeysPkcArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.vault.managed.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.vault.managed.inputs.KeysPkcArgs.builder
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 *
 * @property allowGenerateKey If no existing key can be found in the referenced backend, instructs Vault to generate a key within the backend
 * @property allowReplaceKey Controls the ability for Vault to replace through generation or importing a key into the configured backend even if a key is present, if set to false those operations are forbidden if a key exists.
 * @property allowStoreKey Controls the ability for Vault to import a key to the configured backend, if 'false', those operations will be forbidden
 * @property anyMount Allow usage from any mount point within the namespace if 'true'
 * @property curve Supplies the curve value when using the 'CKM_ECDSA' mechanism. Required if 'allow_generate_key' is true
 * @property forceRwSession Force all operations to open up a read-write session to the HSM
 * @property keyBits Supplies the size in bits of the key when using 'CKM_RSA_PKCS_PSS', 'CKM_RSA_PKCS_OAEP' or 'CKM_RSA_PKCS' as a value for 'mechanism'. Required if 'allow_generate_key' is true
 * @property keyId The id of a PKCS#11 key to use
 * @property keyLabel The label of the key to use
 * @property library The name of the kms_library stanza to use from Vault's config to lookup the local library path
 * @property mechanism The encryption/decryption mechanism to use, specified as a hexadecimal (prefixed by 0x) string.
 * @property name A unique lowercase name that serves as identifying the key
 * @property pin The PIN for login
 * @property slot The slot number to use, specified as a string in a decimal format (e.g. '2305843009213693953')
 * @property tokenLabel The slot token label to use
 * @property uuid ID of the managed key read from Vault
 */
public data class KeysPkcArgs(
    public val allowGenerateKey: Output? = null,
    public val allowReplaceKey: Output? = null,
    public val allowStoreKey: Output? = null,
    public val anyMount: Output? = null,
    public val curve: Output? = null,
    public val forceRwSession: Output? = null,
    public val keyBits: Output? = null,
    public val keyId: Output,
    public val keyLabel: Output,
    public val library: Output,
    public val mechanism: Output,
    public val name: Output,
    public val pin: Output,
    public val slot: Output? = null,
    public val tokenLabel: Output? = null,
    public val uuid: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.vault.managed.inputs.KeysPkcArgs =
        com.pulumi.vault.managed.inputs.KeysPkcArgs.builder()
            .allowGenerateKey(allowGenerateKey?.applyValue({ args0 -> args0 }))
            .allowReplaceKey(allowReplaceKey?.applyValue({ args0 -> args0 }))
            .allowStoreKey(allowStoreKey?.applyValue({ args0 -> args0 }))
            .anyMount(anyMount?.applyValue({ args0 -> args0 }))
            .curve(curve?.applyValue({ args0 -> args0 }))
            .forceRwSession(forceRwSession?.applyValue({ args0 -> args0 }))
            .keyBits(keyBits?.applyValue({ args0 -> args0 }))
            .keyId(keyId.applyValue({ args0 -> args0 }))
            .keyLabel(keyLabel.applyValue({ args0 -> args0 }))
            .library(library.applyValue({ args0 -> args0 }))
            .mechanism(mechanism.applyValue({ args0 -> args0 }))
            .name(name.applyValue({ args0 -> args0 }))
            .pin(pin.applyValue({ args0 -> args0 }))
            .slot(slot?.applyValue({ args0 -> args0 }))
            .tokenLabel(tokenLabel?.applyValue({ args0 -> args0 }))
            .uuid(uuid?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [KeysPkcArgs].
 */
@PulumiTagMarker
public class KeysPkcArgsBuilder internal constructor() {
    private var allowGenerateKey: Output? = null

    private var allowReplaceKey: Output? = null

    private var allowStoreKey: Output? = null

    private var anyMount: Output? = null

    private var curve: Output? = null

    private var forceRwSession: Output? = null

    private var keyBits: Output? = null

    private var keyId: Output? = null

    private var keyLabel: Output? = null

    private var library: Output? = null

    private var mechanism: Output? = null

    private var name: Output? = null

    private var pin: Output? = null

    private var slot: Output? = null

    private var tokenLabel: Output? = null

    private var uuid: Output? = null

    /**
     * @param value If no existing key can be found in the referenced backend, instructs Vault to generate a key within the backend
     */
    @JvmName("ncnxtwnomvbnvojv")
    public suspend fun allowGenerateKey(`value`: Output) {
        this.allowGenerateKey = value
    }

    /**
     * @param value Controls the ability for Vault to replace through generation or importing a key into the configured backend even if a key is present, if set to false those operations are forbidden if a key exists.
     */
    @JvmName("veagktdraydoiyqd")
    public suspend fun allowReplaceKey(`value`: Output) {
        this.allowReplaceKey = value
    }

    /**
     * @param value Controls the ability for Vault to import a key to the configured backend, if 'false', those operations will be forbidden
     */
    @JvmName("xoiibaddynytuamy")
    public suspend fun allowStoreKey(`value`: Output) {
        this.allowStoreKey = value
    }

    /**
     * @param value Allow usage from any mount point within the namespace if 'true'
     */
    @JvmName("hlsifsuvaautgwak")
    public suspend fun anyMount(`value`: Output) {
        this.anyMount = value
    }

    /**
     * @param value Supplies the curve value when using the 'CKM_ECDSA' mechanism. Required if 'allow_generate_key' is true
     */
    @JvmName("cghomdyvclalwivn")
    public suspend fun curve(`value`: Output) {
        this.curve = value
    }

    /**
     * @param value Force all operations to open up a read-write session to the HSM
     */
    @JvmName("wpefhslhemjrrckp")
    public suspend fun forceRwSession(`value`: Output) {
        this.forceRwSession = value
    }

    /**
     * @param value Supplies the size in bits of the key when using 'CKM_RSA_PKCS_PSS', 'CKM_RSA_PKCS_OAEP' or 'CKM_RSA_PKCS' as a value for 'mechanism'. Required if 'allow_generate_key' is true
     */
    @JvmName("ihvygtgpigjcolol")
    public suspend fun keyBits(`value`: Output) {
        this.keyBits = value
    }

    /**
     * @param value The id of a PKCS#11 key to use
     */
    @JvmName("mcewlrmfkclfnfxb")
    public suspend fun keyId(`value`: Output) {
        this.keyId = value
    }

    /**
     * @param value The label of the key to use
     */
    @JvmName("ljjgabbubjxrujdp")
    public suspend fun keyLabel(`value`: Output) {
        this.keyLabel = value
    }

    /**
     * @param value The name of the kms_library stanza to use from Vault's config to lookup the local library path
     */
    @JvmName("hhyfgrfajwmhrnnr")
    public suspend fun library(`value`: Output) {
        this.library = value
    }

    /**
     * @param value The encryption/decryption mechanism to use, specified as a hexadecimal (prefixed by 0x) string.
     */
    @JvmName("kskqvglejjeovyrj")
    public suspend fun mechanism(`value`: Output) {
        this.mechanism = value
    }

    /**
     * @param value A unique lowercase name that serves as identifying the key
     */
    @JvmName("cocevrrbscgoslqf")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The PIN for login
     */
    @JvmName("qpvblsutryxblywx")
    public suspend fun pin(`value`: Output) {
        this.pin = value
    }

    /**
     * @param value The slot number to use, specified as a string in a decimal format (e.g. '2305843009213693953')
     */
    @JvmName("oevcsnhkluuvrdre")
    public suspend fun slot(`value`: Output) {
        this.slot = value
    }

    /**
     * @param value The slot token label to use
     */
    @JvmName("pjmniynveegalmvb")
    public suspend fun tokenLabel(`value`: Output) {
        this.tokenLabel = value
    }

    /**
     * @param value ID of the managed key read from Vault
     */
    @JvmName("trmciwgpdihvfikk")
    public suspend fun uuid(`value`: Output) {
        this.uuid = value
    }

    /**
     * @param value If no existing key can be found in the referenced backend, instructs Vault to generate a key within the backend
     */
    @JvmName("entsjcyjohtvapvr")
    public suspend fun allowGenerateKey(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.allowGenerateKey = mapped
    }

    /**
     * @param value Controls the ability for Vault to replace through generation or importing a key into the configured backend even if a key is present, if set to false those operations are forbidden if a key exists.
     */
    @JvmName("ifjhtccvinunuqcc")
    public suspend fun allowReplaceKey(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.allowReplaceKey = mapped
    }

    /**
     * @param value Controls the ability for Vault to import a key to the configured backend, if 'false', those operations will be forbidden
     */
    @JvmName("kgfiabnwlvfimtft")
    public suspend fun allowStoreKey(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.allowStoreKey = mapped
    }

    /**
     * @param value Allow usage from any mount point within the namespace if 'true'
     */
    @JvmName("ppqdynselsmajjsp")
    public suspend fun anyMount(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.anyMount = mapped
    }

    /**
     * @param value Supplies the curve value when using the 'CKM_ECDSA' mechanism. Required if 'allow_generate_key' is true
     */
    @JvmName("wpfepaeddaughtvi")
    public suspend fun curve(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.curve = mapped
    }

    /**
     * @param value Force all operations to open up a read-write session to the HSM
     */
    @JvmName("dmvqompnwdqhxwab")
    public suspend fun forceRwSession(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.forceRwSession = mapped
    }

    /**
     * @param value Supplies the size in bits of the key when using 'CKM_RSA_PKCS_PSS', 'CKM_RSA_PKCS_OAEP' or 'CKM_RSA_PKCS' as a value for 'mechanism'. Required if 'allow_generate_key' is true
     */
    @JvmName("rxrkvdssamxafrgy")
    public suspend fun keyBits(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.keyBits = mapped
    }

    /**
     * @param value The id of a PKCS#11 key to use
     */
    @JvmName("buosupnjwkoqbavf")
    public suspend fun keyId(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.keyId = mapped
    }

    /**
     * @param value The label of the key to use
     */
    @JvmName("fjcvrihsikltmumj")
    public suspend fun keyLabel(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.keyLabel = mapped
    }

    /**
     * @param value The name of the kms_library stanza to use from Vault's config to lookup the local library path
     */
    @JvmName("tsscgwsitqgadukd")
    public suspend fun library(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.library = mapped
    }

    /**
     * @param value The encryption/decryption mechanism to use, specified as a hexadecimal (prefixed by 0x) string.
     */
    @JvmName("hcauhhyuctdxjavs")
    public suspend fun mechanism(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.mechanism = mapped
    }

    /**
     * @param value A unique lowercase name that serves as identifying the key
     */
    @JvmName("nnolsjjvvuldahrr")
    public suspend fun name(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The PIN for login
     */
    @JvmName("rojlmwitpbouwjbk")
    public suspend fun pin(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.pin = mapped
    }

    /**
     * @param value The slot number to use, specified as a string in a decimal format (e.g. '2305843009213693953')
     */
    @JvmName("krubolitceivddri")
    public suspend fun slot(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.slot = mapped
    }

    /**
     * @param value The slot token label to use
     */
    @JvmName("tliwkwjrhsorisrl")
    public suspend fun tokenLabel(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tokenLabel = mapped
    }

    /**
     * @param value ID of the managed key read from Vault
     */
    @JvmName("xcjrnayodksalyel")
    public suspend fun uuid(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.uuid = mapped
    }

    internal fun build(): KeysPkcArgs = KeysPkcArgs(
        allowGenerateKey = allowGenerateKey,
        allowReplaceKey = allowReplaceKey,
        allowStoreKey = allowStoreKey,
        anyMount = anyMount,
        curve = curve,
        forceRwSession = forceRwSession,
        keyBits = keyBits,
        keyId = keyId ?: throw PulumiNullFieldException("keyId"),
        keyLabel = keyLabel ?: throw PulumiNullFieldException("keyLabel"),
        library = library ?: throw PulumiNullFieldException("library"),
        mechanism = mechanism ?: throw PulumiNullFieldException("mechanism"),
        name = name ?: throw PulumiNullFieldException("name"),
        pin = pin ?: throw PulumiNullFieldException("pin"),
        slot = slot,
        tokenLabel = tokenLabel,
        uuid = uuid,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy