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

com.pulumi.gcp.certificateauthority.kotlin.inputs.CaPoolIssuancePolicyArgs.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: 8.10.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.certificateauthority.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.certificateauthority.inputs.CaPoolIssuancePolicyArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property allowedIssuanceModes IssuanceModes specifies the allowed ways in which Certificates may be requested from this CaPool.
 * Structure is documented below.
 * @property allowedKeyTypes If any AllowedKeyType is specified, then the certificate request's public key must match one of the key types listed here.
 * Otherwise, any key may be used.
 * Structure is documented below.
 * @property baselineValues A set of X.509 values that will be applied to all certificates issued through this CaPool. If a certificate request
 * includes conflicting values for the same properties, they will be overwritten by the values defined here. If a certificate
 * request uses a CertificateTemplate that defines conflicting predefinedValues for the same properties, the certificate
 * issuance request will fail.
 * Structure is documented below.
 * @property identityConstraints Describes constraints on identities that may appear in Certificates issued through this CaPool.
 * If this is omitted, then this CaPool will not add restrictions on a certificate's identity.
 * Structure is documented below.
 * @property maximumLifetime The maximum lifetime allowed for issued Certificates. Note that if the issuing CertificateAuthority
 * expires before a Certificate's requested maximumLifetime, the effective lifetime will be explicitly truncated to match it.
 */
public data class CaPoolIssuancePolicyArgs(
    public val allowedIssuanceModes: Output? = null,
    public val allowedKeyTypes: Output>? = null,
    public val baselineValues: Output? = null,
    public val identityConstraints: Output? = null,
    public val maximumLifetime: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.certificateauthority.inputs.CaPoolIssuancePolicyArgs =
        com.pulumi.gcp.certificateauthority.inputs.CaPoolIssuancePolicyArgs.builder()
            .allowedIssuanceModes(
                allowedIssuanceModes?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .allowedKeyTypes(
                allowedKeyTypes?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .baselineValues(baselineValues?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .identityConstraints(
                identityConstraints?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .maximumLifetime(maximumLifetime?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [CaPoolIssuancePolicyArgs].
 */
@PulumiTagMarker
public class CaPoolIssuancePolicyArgsBuilder internal constructor() {
    private var allowedIssuanceModes: Output? = null

    private var allowedKeyTypes: Output>? = null

    private var baselineValues: Output? = null

    private var identityConstraints: Output? = null

    private var maximumLifetime: Output? = null

    /**
     * @param value IssuanceModes specifies the allowed ways in which Certificates may be requested from this CaPool.
     * Structure is documented below.
     */
    @JvmName("qkgxijrtvbrusiaq")
    public suspend fun allowedIssuanceModes(`value`: Output) {
        this.allowedIssuanceModes = value
    }

    /**
     * @param value If any AllowedKeyType is specified, then the certificate request's public key must match one of the key types listed here.
     * Otherwise, any key may be used.
     * Structure is documented below.
     */
    @JvmName("bsdivrqrubwcnvqw")
    public suspend fun allowedKeyTypes(`value`: Output>) {
        this.allowedKeyTypes = value
    }

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

    /**
     * @param values If any AllowedKeyType is specified, then the certificate request's public key must match one of the key types listed here.
     * Otherwise, any key may be used.
     * Structure is documented below.
     */
    @JvmName("vuyeunfpysduswwr")
    public suspend fun allowedKeyTypes(values: List>) {
        this.allowedKeyTypes = Output.all(values)
    }

    /**
     * @param value A set of X.509 values that will be applied to all certificates issued through this CaPool. If a certificate request
     * includes conflicting values for the same properties, they will be overwritten by the values defined here. If a certificate
     * request uses a CertificateTemplate that defines conflicting predefinedValues for the same properties, the certificate
     * issuance request will fail.
     * Structure is documented below.
     */
    @JvmName("xwabnqrchmqookxm")
    public suspend fun baselineValues(`value`: Output) {
        this.baselineValues = value
    }

    /**
     * @param value Describes constraints on identities that may appear in Certificates issued through this CaPool.
     * If this is omitted, then this CaPool will not add restrictions on a certificate's identity.
     * Structure is documented below.
     */
    @JvmName("ddentqtqdgtnjowv")
    public suspend fun identityConstraints(`value`: Output) {
        this.identityConstraints = value
    }

    /**
     * @param value The maximum lifetime allowed for issued Certificates. Note that if the issuing CertificateAuthority
     * expires before a Certificate's requested maximumLifetime, the effective lifetime will be explicitly truncated to match it.
     */
    @JvmName("enhpcnrordpfsnqi")
    public suspend fun maximumLifetime(`value`: Output) {
        this.maximumLifetime = value
    }

    /**
     * @param value IssuanceModes specifies the allowed ways in which Certificates may be requested from this CaPool.
     * Structure is documented below.
     */
    @JvmName("hvkkqmbwfgckmduv")
    public suspend fun allowedIssuanceModes(`value`: CaPoolIssuancePolicyAllowedIssuanceModesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.allowedIssuanceModes = mapped
    }

    /**
     * @param argument IssuanceModes specifies the allowed ways in which Certificates may be requested from this CaPool.
     * Structure is documented below.
     */
    @JvmName("ghkdeksttnnvcobo")
    public suspend fun allowedIssuanceModes(argument: suspend CaPoolIssuancePolicyAllowedIssuanceModesArgsBuilder.() -> Unit) {
        val toBeMapped = CaPoolIssuancePolicyAllowedIssuanceModesArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.allowedIssuanceModes = mapped
    }

    /**
     * @param value If any AllowedKeyType is specified, then the certificate request's public key must match one of the key types listed here.
     * Otherwise, any key may be used.
     * Structure is documented below.
     */
    @JvmName("fvrsgdaoovxsjeka")
    public suspend fun allowedKeyTypes(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.allowedKeyTypes = mapped
    }

    /**
     * @param argument If any AllowedKeyType is specified, then the certificate request's public key must match one of the key types listed here.
     * Otherwise, any key may be used.
     * Structure is documented below.
     */
    @JvmName("iywahldccuwuscdj")
    public suspend fun allowedKeyTypes(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            CaPoolIssuancePolicyAllowedKeyTypeArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.allowedKeyTypes = mapped
    }

    /**
     * @param argument If any AllowedKeyType is specified, then the certificate request's public key must match one of the key types listed here.
     * Otherwise, any key may be used.
     * Structure is documented below.
     */
    @JvmName("ikwahlxgtapivxhc")
    public suspend fun allowedKeyTypes(vararg argument: suspend CaPoolIssuancePolicyAllowedKeyTypeArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            CaPoolIssuancePolicyAllowedKeyTypeArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.allowedKeyTypes = mapped
    }

    /**
     * @param argument If any AllowedKeyType is specified, then the certificate request's public key must match one of the key types listed here.
     * Otherwise, any key may be used.
     * Structure is documented below.
     */
    @JvmName("bbagbhdmskjmbrgl")
    public suspend fun allowedKeyTypes(argument: suspend CaPoolIssuancePolicyAllowedKeyTypeArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            CaPoolIssuancePolicyAllowedKeyTypeArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.allowedKeyTypes = mapped
    }

    /**
     * @param values If any AllowedKeyType is specified, then the certificate request's public key must match one of the key types listed here.
     * Otherwise, any key may be used.
     * Structure is documented below.
     */
    @JvmName("yasweutigfpcvtkq")
    public suspend fun allowedKeyTypes(vararg values: CaPoolIssuancePolicyAllowedKeyTypeArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.allowedKeyTypes = mapped
    }

    /**
     * @param value A set of X.509 values that will be applied to all certificates issued through this CaPool. If a certificate request
     * includes conflicting values for the same properties, they will be overwritten by the values defined here. If a certificate
     * request uses a CertificateTemplate that defines conflicting predefinedValues for the same properties, the certificate
     * issuance request will fail.
     * Structure is documented below.
     */
    @JvmName("cekhaefkjshqfqdw")
    public suspend fun baselineValues(`value`: CaPoolIssuancePolicyBaselineValuesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.baselineValues = mapped
    }

    /**
     * @param argument A set of X.509 values that will be applied to all certificates issued through this CaPool. If a certificate request
     * includes conflicting values for the same properties, they will be overwritten by the values defined here. If a certificate
     * request uses a CertificateTemplate that defines conflicting predefinedValues for the same properties, the certificate
     * issuance request will fail.
     * Structure is documented below.
     */
    @JvmName("soxgtwujcwqvyfto")
    public suspend fun baselineValues(argument: suspend CaPoolIssuancePolicyBaselineValuesArgsBuilder.() -> Unit) {
        val toBeMapped = CaPoolIssuancePolicyBaselineValuesArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.baselineValues = mapped
    }

    /**
     * @param value Describes constraints on identities that may appear in Certificates issued through this CaPool.
     * If this is omitted, then this CaPool will not add restrictions on a certificate's identity.
     * Structure is documented below.
     */
    @JvmName("dsnucoknegbufwfg")
    public suspend fun identityConstraints(`value`: CaPoolIssuancePolicyIdentityConstraintsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.identityConstraints = mapped
    }

    /**
     * @param argument Describes constraints on identities that may appear in Certificates issued through this CaPool.
     * If this is omitted, then this CaPool will not add restrictions on a certificate's identity.
     * Structure is documented below.
     */
    @JvmName("prbhlyekfwnulvbx")
    public suspend fun identityConstraints(argument: suspend CaPoolIssuancePolicyIdentityConstraintsArgsBuilder.() -> Unit) {
        val toBeMapped = CaPoolIssuancePolicyIdentityConstraintsArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.identityConstraints = mapped
    }

    /**
     * @param value The maximum lifetime allowed for issued Certificates. Note that if the issuing CertificateAuthority
     * expires before a Certificate's requested maximumLifetime, the effective lifetime will be explicitly truncated to match it.
     */
    @JvmName("ssehwnlbmbvpdwui")
    public suspend fun maximumLifetime(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maximumLifetime = mapped
    }

    internal fun build(): CaPoolIssuancePolicyArgs = CaPoolIssuancePolicyArgs(
        allowedIssuanceModes = allowedIssuanceModes,
        allowedKeyTypes = allowedKeyTypes,
        baselineValues = baselineValues,
        identityConstraints = identityConstraints,
        maximumLifetime = maximumLifetime,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy