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

com.pulumi.vault.pkiSecret.kotlin.SecretBackendCertArgs.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: 6.4.0.0
Show newest version
@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.SecretBackendCertArgs.builder
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as vault from "@pulumi/vault";
 * const app = new vault.pkisecret.SecretBackendCert("app", {
 *     backend: intermediate.path,
 *     name: test.name,
 *     commonName: "app.my.domain",
 * }, {
 *     dependsOn: [admin],
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_vault as vault
 * app = vault.pki_secret.SecretBackendCert("app",
 *     backend=intermediate["path"],
 *     name=test["name"],
 *     common_name="app.my.domain",
 *     opts = pulumi.ResourceOptions(depends_on=[admin]))
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Vault = Pulumi.Vault;
 * return await Deployment.RunAsync(() =>
 * {
 *     var app = new Vault.PkiSecret.SecretBackendCert("app", new()
 *     {
 *         Backend = intermediate.Path,
 *         Name = test.Name,
 *         CommonName = "app.my.domain",
 *     }, new CustomResourceOptions
 *     {
 *         DependsOn =
 *         {
 *             admin,
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-vault/sdk/v6/go/vault/pkiSecret"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := pkiSecret.NewSecretBackendCert(ctx, "app", &pkiSecret.SecretBackendCertArgs{
 * 			Backend:    pulumi.Any(intermediate.Path),
 * 			Name:       pulumi.Any(test.Name),
 * 			CommonName: pulumi.String("app.my.domain"),
 * 		}, pulumi.DependsOn([]pulumi.Resource{
 * 			admin,
 * 		}))
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.vault.pkiSecret.SecretBackendCert;
 * import com.pulumi.vault.pkiSecret.SecretBackendCertArgs;
 * import com.pulumi.resources.CustomResourceOptions;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var app = new SecretBackendCert("app", SecretBackendCertArgs.builder()
 *             .backend(intermediate.path())
 *             .name(test.name())
 *             .commonName("app.my.domain")
 *             .build(), CustomResourceOptions.builder()
 *                 .dependsOn(admin)
 *                 .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   app:
 *     type: vault:pkiSecret:SecretBackendCert
 *     properties:
 *       backend: ${intermediate.path}
 *       name: ${test.name}
 *       commonName: app.my.domain
 *     options:
 *       dependson:
 *         - ${admin}
 * ```
 * 
 * @property altNames List of alternative names
 * @property autoRenew If set to `true`, certs will be renewed if the expiration is within `min_seconds_remaining`. Default `false`
 * @property backend The PKI secret backend the resource belongs to.
 * @property commonName CN of certificate to create
 * @property excludeCnFromSans Flag to exclude CN from SANs
 * @property format The format of data
 * @property ipSans List of alternative IPs
 * @property issuerRef Specifies the default issuer of this request.
 * @property minSecondsRemaining Generate a new certificate when the expiration is within this number of seconds, default is 604800 (7 days)
 * @property name Name of the role to create the certificate against
 * @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 otherSans List of other SANs
 * @property privateKeyFormat The private key format
 * @property revoke If set to `true`, the certificate will be revoked on resource destruction.
 * @property ttl Time to live
 * @property uriSans List of alternative URIs
 * @property userIds List of Subject User IDs
 */
public data class SecretBackendCertArgs(
    public val altNames: Output>? = null,
    public val autoRenew: Output? = null,
    public val backend: Output? = null,
    public val commonName: Output? = null,
    public val excludeCnFromSans: Output? = null,
    public val format: Output? = null,
    public val ipSans: Output>? = null,
    public val issuerRef: Output? = null,
    public val minSecondsRemaining: Output? = null,
    public val name: Output? = null,
    public val namespace: Output? = null,
    public val otherSans: Output>? = null,
    public val privateKeyFormat: Output? = null,
    public val revoke: Output? = null,
    public val ttl: Output? = null,
    public val uriSans: Output>? = null,
    public val userIds: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.vault.pkiSecret.SecretBackendCertArgs =
        com.pulumi.vault.pkiSecret.SecretBackendCertArgs.builder()
            .altNames(altNames?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .autoRenew(autoRenew?.applyValue({ args0 -> args0 }))
            .backend(backend?.applyValue({ args0 -> args0 }))
            .commonName(commonName?.applyValue({ args0 -> args0 }))
            .excludeCnFromSans(excludeCnFromSans?.applyValue({ args0 -> args0 }))
            .format(format?.applyValue({ args0 -> args0 }))
            .ipSans(ipSans?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .issuerRef(issuerRef?.applyValue({ args0 -> args0 }))
            .minSecondsRemaining(minSecondsRemaining?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .namespace(namespace?.applyValue({ args0 -> args0 }))
            .otherSans(otherSans?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .privateKeyFormat(privateKeyFormat?.applyValue({ args0 -> args0 }))
            .revoke(revoke?.applyValue({ args0 -> args0 }))
            .ttl(ttl?.applyValue({ args0 -> args0 }))
            .uriSans(uriSans?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .userIds(userIds?.applyValue({ args0 -> args0.map({ args0 -> args0 }) })).build()
}

/**
 * Builder for [SecretBackendCertArgs].
 */
@PulumiTagMarker
public class SecretBackendCertArgsBuilder internal constructor() {
    private var altNames: Output>? = null

    private var autoRenew: Output? = null

    private var backend: Output? = null

    private var commonName: Output? = null

    private var excludeCnFromSans: Output? = null

    private var format: Output? = null

    private var ipSans: Output>? = null

    private var issuerRef: Output? = null

    private var minSecondsRemaining: Output? = null

    private var name: Output? = null

    private var namespace: Output? = null

    private var otherSans: Output>? = null

    private var privateKeyFormat: Output? = null

    private var revoke: Output? = null

    private var ttl: Output? = null

    private var uriSans: Output>? = null

    private var userIds: Output>? = null

    /**
     * @param value List of alternative names
     */
    @JvmName("sqaksnwqyfrqnqxj")
    public suspend fun altNames(`value`: Output>) {
        this.altNames = value
    }

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

    /**
     * @param values List of alternative names
     */
    @JvmName("srikphdfyxxpvhxg")
    public suspend fun altNames(values: List>) {
        this.altNames = Output.all(values)
    }

    /**
     * @param value If set to `true`, certs will be renewed if the expiration is within `min_seconds_remaining`. Default `false`
     */
    @JvmName("ndjfkxuywmkcjjro")
    public suspend fun autoRenew(`value`: Output) {
        this.autoRenew = value
    }

    /**
     * @param value The PKI secret backend the resource belongs to.
     */
    @JvmName("nbgooxfenjqcbnll")
    public suspend fun backend(`value`: Output) {
        this.backend = value
    }

    /**
     * @param value CN of certificate to create
     */
    @JvmName("qkwrtrwsilxfkpiu")
    public suspend fun commonName(`value`: Output) {
        this.commonName = value
    }

    /**
     * @param value Flag to exclude CN from SANs
     */
    @JvmName("pilxnejucgxmrdhp")
    public suspend fun excludeCnFromSans(`value`: Output) {
        this.excludeCnFromSans = value
    }

    /**
     * @param value The format of data
     */
    @JvmName("jqqqpywmosqfpspu")
    public suspend fun format(`value`: Output) {
        this.format = value
    }

    /**
     * @param value List of alternative IPs
     */
    @JvmName("ixlqfnnerigiroxc")
    public suspend fun ipSans(`value`: Output>) {
        this.ipSans = value
    }

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

    /**
     * @param values List of alternative IPs
     */
    @JvmName("kstduoxrsaotamai")
    public suspend fun ipSans(values: List>) {
        this.ipSans = Output.all(values)
    }

    /**
     * @param value Specifies the default issuer of this request.
     */
    @JvmName("qbxskwmvcqhbnhai")
    public suspend fun issuerRef(`value`: Output) {
        this.issuerRef = value
    }

    /**
     * @param value Generate a new certificate when the expiration is within this number of seconds, default is 604800 (7 days)
     */
    @JvmName("radbilbcuhkhvysn")
    public suspend fun minSecondsRemaining(`value`: Output) {
        this.minSecondsRemaining = value
    }

    /**
     * @param value Name of the role to create the certificate against
     */
    @JvmName("gcycdeppvdkwwdje")
    public suspend fun name(`value`: Output) {
        this.name = 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("tiptbmbyehbdsmcb")
    public suspend fun namespace(`value`: Output) {
        this.namespace = value
    }

    /**
     * @param value List of other SANs
     */
    @JvmName("sdxeescoqfxcifss")
    public suspend fun otherSans(`value`: Output>) {
        this.otherSans = value
    }

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

    /**
     * @param values List of other SANs
     */
    @JvmName("javgvgrrapgcjqiq")
    public suspend fun otherSans(values: List>) {
        this.otherSans = Output.all(values)
    }

    /**
     * @param value The private key format
     */
    @JvmName("fjrbxvorqddlwhcv")
    public suspend fun privateKeyFormat(`value`: Output) {
        this.privateKeyFormat = value
    }

    /**
     * @param value If set to `true`, the certificate will be revoked on resource destruction.
     */
    @JvmName("gkrsvgfkpnwknmgs")
    public suspend fun revoke(`value`: Output) {
        this.revoke = value
    }

    /**
     * @param value Time to live
     */
    @JvmName("nujiigmpbpnrhxmg")
    public suspend fun ttl(`value`: Output) {
        this.ttl = value
    }

    /**
     * @param value List of alternative URIs
     */
    @JvmName("xqytlvwwrxmakwnt")
    public suspend fun uriSans(`value`: Output>) {
        this.uriSans = value
    }

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

    /**
     * @param values List of alternative URIs
     */
    @JvmName("ebvxjhkqkndkcuqs")
    public suspend fun uriSans(values: List>) {
        this.uriSans = Output.all(values)
    }

    /**
     * @param value List of Subject User IDs
     */
    @JvmName("dlmjmqqssobhoqpg")
    public suspend fun userIds(`value`: Output>) {
        this.userIds = value
    }

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

    /**
     * @param values List of Subject User IDs
     */
    @JvmName("usluygcreddltqto")
    public suspend fun userIds(values: List>) {
        this.userIds = Output.all(values)
    }

    /**
     * @param value List of alternative names
     */
    @JvmName("vmmosrotngxjflhx")
    public suspend fun altNames(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.altNames = mapped
    }

    /**
     * @param values List of alternative names
     */
    @JvmName("imhjvnqflxorbnxu")
    public suspend fun altNames(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.altNames = mapped
    }

    /**
     * @param value If set to `true`, certs will be renewed if the expiration is within `min_seconds_remaining`. Default `false`
     */
    @JvmName("mcsyuneuwrhwnfod")
    public suspend fun autoRenew(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.autoRenew = mapped
    }

    /**
     * @param value The PKI secret backend the resource belongs to.
     */
    @JvmName("anwujqxaaudxucex")
    public suspend fun backend(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.backend = mapped
    }

    /**
     * @param value CN of certificate to create
     */
    @JvmName("vilgsjolsxkrohym")
    public suspend fun commonName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.commonName = mapped
    }

    /**
     * @param value Flag to exclude CN from SANs
     */
    @JvmName("bnvuesuyipvnqkiq")
    public suspend fun excludeCnFromSans(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.excludeCnFromSans = mapped
    }

    /**
     * @param value The format of data
     */
    @JvmName("xdtetreisbivwkxq")
    public suspend fun format(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.format = mapped
    }

    /**
     * @param value List of alternative IPs
     */
    @JvmName("ptjkxrsjngrwbtnl")
    public suspend fun ipSans(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ipSans = mapped
    }

    /**
     * @param values List of alternative IPs
     */
    @JvmName("ekpqmguyhgxhuoak")
    public suspend fun ipSans(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.ipSans = mapped
    }

    /**
     * @param value Specifies the default issuer of this request.
     */
    @JvmName("fecjmrxbxqvpcyvs")
    public suspend fun issuerRef(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.issuerRef = mapped
    }

    /**
     * @param value Generate a new certificate when the expiration is within this number of seconds, default is 604800 (7 days)
     */
    @JvmName("eqooaqnrqadgwnwj")
    public suspend fun minSecondsRemaining(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.minSecondsRemaining = mapped
    }

    /**
     * @param value Name of the role to create the certificate against
     */
    @JvmName("asyxjflkvqphngug")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = 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("ygyqsqfoodsprqet")
    public suspend fun namespace(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.namespace = mapped
    }

    /**
     * @param value List of other SANs
     */
    @JvmName("trdgjrmlcylbwvbg")
    public suspend fun otherSans(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.otherSans = mapped
    }

    /**
     * @param values List of other SANs
     */
    @JvmName("lbunpaujmrxlfpoh")
    public suspend fun otherSans(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.otherSans = mapped
    }

    /**
     * @param value The private key format
     */
    @JvmName("dqxvovpuqeomilrq")
    public suspend fun privateKeyFormat(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.privateKeyFormat = mapped
    }

    /**
     * @param value If set to `true`, the certificate will be revoked on resource destruction.
     */
    @JvmName("jhlthndjkkugtfwx")
    public suspend fun revoke(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.revoke = mapped
    }

    /**
     * @param value Time to live
     */
    @JvmName("edmyrsjggtjjoowv")
    public suspend fun ttl(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ttl = mapped
    }

    /**
     * @param value List of alternative URIs
     */
    @JvmName("pimiarvudqompnig")
    public suspend fun uriSans(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.uriSans = mapped
    }

    /**
     * @param values List of alternative URIs
     */
    @JvmName("gykhxsgreeblmqgi")
    public suspend fun uriSans(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.uriSans = mapped
    }

    /**
     * @param value List of Subject User IDs
     */
    @JvmName("ajsfavhtaphvsfmv")
    public suspend fun userIds(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.userIds = mapped
    }

    /**
     * @param values List of Subject User IDs
     */
    @JvmName("hstklfjameeaipxa")
    public suspend fun userIds(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.userIds = mapped
    }

    internal fun build(): SecretBackendCertArgs = SecretBackendCertArgs(
        altNames = altNames,
        autoRenew = autoRenew,
        backend = backend,
        commonName = commonName,
        excludeCnFromSans = excludeCnFromSans,
        format = format,
        ipSans = ipSans,
        issuerRef = issuerRef,
        minSecondsRemaining = minSecondsRemaining,
        name = name,
        namespace = namespace,
        otherSans = otherSans,
        privateKeyFormat = privateKeyFormat,
        revoke = revoke,
        ttl = ttl,
        uriSans = uriSans,
        userIds = userIds,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy