
com.pulumi.vault.pkiSecret.kotlin.SecretBackendKeyArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.vault.pkiSecret.kotlin
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.vault.pkiSecret.SecretBackendKeyArgs.builder
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* Creates a key on a PKI Secret Backend for Vault.
* ## Example Usage
*
* ```yaml
* resources:
* pki:
* type: vault:Mount
* properties:
* path: pki
* type: pki
* defaultLeaseTtlSeconds: 3600
* maxLeaseTtlSeconds: 86400
* key:
* type: vault:pkiSecret:SecretBackendKey
* properties:
* mount: ${pki.path}
* type: exported
* keyName: example-key
* keyType: rsa
* keyBits: '2048'
* ```
*
* ## Import
* PKI secret backend key can be imported using the `id`, e.g.
* ```sh
* $ pulumi import vault:pkiSecret/secretBackendKey:SecretBackendKey key pki/key/bf9b0d48-d0dd-652c-30be-77d04fc7e94d
* ```
* @property backend The path the PKI secret backend is mounted at, with no leading or trailing `/`s.
* @property keyBits Specifies the number of bits to use for the generated keys.
* Allowed values are 0 (universal default); with `key_type=rsa`, allowed values are:
* 2048 (default), 3072, or 4096; with `key_type=ec`, allowed values are: 224, 256 (default),
* 384, or 521; ignored with `key_type=ed25519`.
* @property keyName When a new key is created with this request, optionally specifies the name for this.
* The global ref `default` may not be used as a name.
* @property keyType Specifies the desired key type; must be `rsa`, `ed25519` or `ec`.
* @property managedKeyId The managed key's UUID.
* @property managedKeyName The managed key's configured name.
* @property namespace The namespace to provision the resource in.
* The value should not contain leading or trailing forward slashes.
* The `namespace` is always relative to the provider's configured [namespace](https://www.terraform.io/docs/providers/vault/index.html#namespace).
* *Available only for Vault Enterprise*.
* @property type Specifies the type of the key to create. Can be `exported`,`internal` or `kms`.
*/
public data class SecretBackendKeyArgs(
public val backend: Output? = null,
public val keyBits: Output? = null,
public val keyName: Output? = null,
public val keyType: Output? = null,
public val managedKeyId: Output? = null,
public val managedKeyName: Output? = null,
public val namespace: Output? = null,
public val type: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.vault.pkiSecret.SecretBackendKeyArgs =
com.pulumi.vault.pkiSecret.SecretBackendKeyArgs.builder()
.backend(backend?.applyValue({ args0 -> args0 }))
.keyBits(keyBits?.applyValue({ args0 -> args0 }))
.keyName(keyName?.applyValue({ args0 -> args0 }))
.keyType(keyType?.applyValue({ args0 -> args0 }))
.managedKeyId(managedKeyId?.applyValue({ args0 -> args0 }))
.managedKeyName(managedKeyName?.applyValue({ args0 -> args0 }))
.namespace(namespace?.applyValue({ args0 -> args0 }))
.type(type?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [SecretBackendKeyArgs].
*/
@PulumiTagMarker
public class SecretBackendKeyArgsBuilder internal constructor() {
private var backend: Output? = null
private var keyBits: Output? = null
private var keyName: Output? = null
private var keyType: Output? = null
private var managedKeyId: Output? = null
private var managedKeyName: Output? = null
private var namespace: Output? = null
private var type: Output? = null
/**
* @param value The path the PKI secret backend is mounted at, with no leading or trailing `/`s.
*/
@JvmName("fjxpkeeybikyhyjj")
public suspend fun backend(`value`: Output) {
this.backend = value
}
/**
* @param value Specifies the number of bits to use for the generated keys.
* Allowed values are 0 (universal default); with `key_type=rsa`, allowed values are:
* 2048 (default), 3072, or 4096; with `key_type=ec`, allowed values are: 224, 256 (default),
* 384, or 521; ignored with `key_type=ed25519`.
*/
@JvmName("veyjexaltjqdgvbs")
public suspend fun keyBits(`value`: Output) {
this.keyBits = value
}
/**
* @param value When a new key is created with this request, optionally specifies the name for this.
* The global ref `default` may not be used as a name.
*/
@JvmName("olswymxjhsmcjpwe")
public suspend fun keyName(`value`: Output) {
this.keyName = value
}
/**
* @param value Specifies the desired key type; must be `rsa`, `ed25519` or `ec`.
*/
@JvmName("vmujegdgvyslgdvd")
public suspend fun keyType(`value`: Output) {
this.keyType = value
}
/**
* @param value The managed key's UUID.
*/
@JvmName("rhuuogkhjryvuxli")
public suspend fun managedKeyId(`value`: Output) {
this.managedKeyId = value
}
/**
* @param value The managed key's configured name.
*/
@JvmName("hoklyuhabsrnvqxx")
public suspend fun managedKeyName(`value`: Output) {
this.managedKeyName = value
}
/**
* @param value The namespace to provision the resource in.
* The value should not contain leading or trailing forward slashes.
* The `namespace` is always relative to the provider's configured [namespace](https://www.terraform.io/docs/providers/vault/index.html#namespace).
* *Available only for Vault Enterprise*.
*/
@JvmName("tohvoiodarcjrlvj")
public suspend fun namespace(`value`: Output) {
this.namespace = value
}
/**
* @param value Specifies the type of the key to create. Can be `exported`,`internal` or `kms`.
*/
@JvmName("lxtajohalqytgtcd")
public suspend fun type(`value`: Output) {
this.type = value
}
/**
* @param value The path the PKI secret backend is mounted at, with no leading or trailing `/`s.
*/
@JvmName("lrpfnvhxvbmovrya")
public suspend fun backend(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.backend = mapped
}
/**
* @param value Specifies the number of bits to use for the generated keys.
* Allowed values are 0 (universal default); with `key_type=rsa`, allowed values are:
* 2048 (default), 3072, or 4096; with `key_type=ec`, allowed values are: 224, 256 (default),
* 384, or 521; ignored with `key_type=ed25519`.
*/
@JvmName("oeluuvhpmgprxmdu")
public suspend fun keyBits(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.keyBits = mapped
}
/**
* @param value When a new key is created with this request, optionally specifies the name for this.
* The global ref `default` may not be used as a name.
*/
@JvmName("bkvdrxwjnughkfpf")
public suspend fun keyName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.keyName = mapped
}
/**
* @param value Specifies the desired key type; must be `rsa`, `ed25519` or `ec`.
*/
@JvmName("lppumlcdxgyhgpxq")
public suspend fun keyType(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.keyType = mapped
}
/**
* @param value The managed key's UUID.
*/
@JvmName("koyvyynmtrpfdrrb")
public suspend fun managedKeyId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.managedKeyId = mapped
}
/**
* @param value The managed key's configured name.
*/
@JvmName("nsevyqiiatqtnamc")
public suspend fun managedKeyName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.managedKeyName = mapped
}
/**
* @param value The namespace to provision the resource in.
* The value should not contain leading or trailing forward slashes.
* The `namespace` is always relative to the provider's configured [namespace](https://www.terraform.io/docs/providers/vault/index.html#namespace).
* *Available only for Vault Enterprise*.
*/
@JvmName("jmtesbnwyaaseqbj")
public suspend fun namespace(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.namespace = mapped
}
/**
* @param value Specifies the type of the key to create. Can be `exported`,`internal` or `kms`.
*/
@JvmName("jlhrjkkvsfrwrwsk")
public suspend fun type(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.type = mapped
}
internal fun build(): SecretBackendKeyArgs = SecretBackendKeyArgs(
backend = backend,
keyBits = keyBits,
keyName = keyName,
keyType = keyType,
managedKeyId = managedKeyId,
managedKeyName = managedKeyName,
namespace = namespace,
type = type,
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy