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

com.pulumi.cloudflare.kotlin.CertificatePackArgs.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.

The newest version!
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.cloudflare.kotlin

import com.pulumi.cloudflare.CertificatePackArgs.builder
import com.pulumi.cloudflare.kotlin.inputs.CertificatePackValidationErrorArgs
import com.pulumi.cloudflare.kotlin.inputs.CertificatePackValidationErrorArgsBuilder
import com.pulumi.cloudflare.kotlin.inputs.CertificatePackValidationRecordArgs
import com.pulumi.cloudflare.kotlin.inputs.CertificatePackValidationRecordArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * ## Example Usage
 * ## Import
 * ```sh
 * $ pulumi import cloudflare:index/certificatePack:CertificatePack example /
 * ```
 * While supported, importing isn't recommended and it is advised to replace the
 * certificate entirely instead.
 * @property certificateAuthority Which certificate authority to issue the certificate pack. Available values: `digicert`, `lets_encrypt`, `google`. **Modifying this attribute will force creation of a new resource.**
 * @property cloudflareBranding Whether or not to include Cloudflare branding. This will add `sni.cloudflaressl.com` as the Common Name if set to `true`. **Modifying this attribute will force creation of a new resource.**
 * @property hosts List of hostnames to provision the certificate pack for. The zone name must be included as a host. Note: If using Let's Encrypt, you cannot use individual subdomains and only a wildcard for subdomain is available. **Modifying this attribute will force creation of a new resource.**
 * @property type Certificate pack configuration type. Available values: `advanced`. **Modifying this attribute will force creation of a new resource.**
 * @property validationErrors
 * @property validationMethod Which validation method to use in order to prove domain ownership. Available values: `txt`, `http`, `email`. **Modifying this attribute will force creation of a new resource.**
 * @property validationRecords
 * @property validityDays How long the certificate is valid for. Note: If using Let's Encrypt, this value can only be 90 days. Available values: `14`, `30`, `90`, `365`. **Modifying this attribute will force creation of a new resource.**
 * @property waitForActiveStatus Whether or not to wait for a certificate pack to reach status `active` during creation. Defaults to `false`. **Modifying this attribute will force creation of a new resource.**
 * @property zoneId The zone identifier to target for the resource. **Modifying this attribute will force creation of a new resource.**
 */
public data class CertificatePackArgs(
    public val certificateAuthority: Output? = null,
    public val cloudflareBranding: Output? = null,
    public val hosts: Output>? = null,
    public val type: Output? = null,
    public val validationErrors: Output>? = null,
    public val validationMethod: Output? = null,
    public val validationRecords: Output>? = null,
    public val validityDays: Output? = null,
    public val waitForActiveStatus: Output? = null,
    public val zoneId: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.cloudflare.CertificatePackArgs =
        com.pulumi.cloudflare.CertificatePackArgs.builder()
            .certificateAuthority(certificateAuthority?.applyValue({ args0 -> args0 }))
            .cloudflareBranding(cloudflareBranding?.applyValue({ args0 -> args0 }))
            .hosts(hosts?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .type(type?.applyValue({ args0 -> args0 }))
            .validationErrors(
                validationErrors?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .validationMethod(validationMethod?.applyValue({ args0 -> args0 }))
            .validationRecords(
                validationRecords?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .validityDays(validityDays?.applyValue({ args0 -> args0 }))
            .waitForActiveStatus(waitForActiveStatus?.applyValue({ args0 -> args0 }))
            .zoneId(zoneId?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [CertificatePackArgs].
 */
@PulumiTagMarker
public class CertificatePackArgsBuilder internal constructor() {
    private var certificateAuthority: Output? = null

    private var cloudflareBranding: Output? = null

    private var hosts: Output>? = null

    private var type: Output? = null

    private var validationErrors: Output>? = null

    private var validationMethod: Output? = null

    private var validationRecords: Output>? = null

    private var validityDays: Output? = null

    private var waitForActiveStatus: Output? = null

    private var zoneId: Output? = null

    /**
     * @param value Which certificate authority to issue the certificate pack. Available values: `digicert`, `lets_encrypt`, `google`. **Modifying this attribute will force creation of a new resource.**
     */
    @JvmName("istopehtekdctukx")
    public suspend fun certificateAuthority(`value`: Output) {
        this.certificateAuthority = value
    }

    /**
     * @param value Whether or not to include Cloudflare branding. This will add `sni.cloudflaressl.com` as the Common Name if set to `true`. **Modifying this attribute will force creation of a new resource.**
     */
    @JvmName("pfeqkployxdtcwju")
    public suspend fun cloudflareBranding(`value`: Output) {
        this.cloudflareBranding = value
    }

    /**
     * @param value List of hostnames to provision the certificate pack for. The zone name must be included as a host. Note: If using Let's Encrypt, you cannot use individual subdomains and only a wildcard for subdomain is available. **Modifying this attribute will force creation of a new resource.**
     */
    @JvmName("dataxgumobtbgtvi")
    public suspend fun hosts(`value`: Output>) {
        this.hosts = value
    }

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

    /**
     * @param values List of hostnames to provision the certificate pack for. The zone name must be included as a host. Note: If using Let's Encrypt, you cannot use individual subdomains and only a wildcard for subdomain is available. **Modifying this attribute will force creation of a new resource.**
     */
    @JvmName("kgmatqtufceqpjnp")
    public suspend fun hosts(values: List>) {
        this.hosts = Output.all(values)
    }

    /**
     * @param value Certificate pack configuration type. Available values: `advanced`. **Modifying this attribute will force creation of a new resource.**
     */
    @JvmName("tkawxisigitdsjcl")
    public suspend fun type(`value`: Output) {
        this.type = value
    }

    /**
     * @param value
     */
    @JvmName("wapgumskhaiwmiic")
    public suspend fun validationErrors(`value`: Output>) {
        this.validationErrors = value
    }

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

    /**
     * @param values
     */
    @JvmName("ndciagpllaapvsqb")
    public suspend fun validationErrors(values: List>) {
        this.validationErrors = Output.all(values)
    }

    /**
     * @param value Which validation method to use in order to prove domain ownership. Available values: `txt`, `http`, `email`. **Modifying this attribute will force creation of a new resource.**
     */
    @JvmName("gybpfhststtvarld")
    public suspend fun validationMethod(`value`: Output) {
        this.validationMethod = value
    }

    /**
     * @param value
     */
    @JvmName("ibgrwsxfbuseqlku")
    public suspend fun validationRecords(`value`: Output>) {
        this.validationRecords = value
    }

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

    /**
     * @param values
     */
    @JvmName("qupslfaebnwvorbr")
    public suspend fun validationRecords(values: List>) {
        this.validationRecords = Output.all(values)
    }

    /**
     * @param value How long the certificate is valid for. Note: If using Let's Encrypt, this value can only be 90 days. Available values: `14`, `30`, `90`, `365`. **Modifying this attribute will force creation of a new resource.**
     */
    @JvmName("gfklejvhqdtbijxi")
    public suspend fun validityDays(`value`: Output) {
        this.validityDays = value
    }

    /**
     * @param value Whether or not to wait for a certificate pack to reach status `active` during creation. Defaults to `false`. **Modifying this attribute will force creation of a new resource.**
     */
    @JvmName("lcnkrfopbvpttyoe")
    public suspend fun waitForActiveStatus(`value`: Output) {
        this.waitForActiveStatus = value
    }

    /**
     * @param value The zone identifier to target for the resource. **Modifying this attribute will force creation of a new resource.**
     */
    @JvmName("vcuispialceongjm")
    public suspend fun zoneId(`value`: Output) {
        this.zoneId = value
    }

    /**
     * @param value Which certificate authority to issue the certificate pack. Available values: `digicert`, `lets_encrypt`, `google`. **Modifying this attribute will force creation of a new resource.**
     */
    @JvmName("piqcmcqoubjcbhnt")
    public suspend fun certificateAuthority(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.certificateAuthority = mapped
    }

    /**
     * @param value Whether or not to include Cloudflare branding. This will add `sni.cloudflaressl.com` as the Common Name if set to `true`. **Modifying this attribute will force creation of a new resource.**
     */
    @JvmName("rerbmaontwigqjuq")
    public suspend fun cloudflareBranding(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.cloudflareBranding = mapped
    }

    /**
     * @param value List of hostnames to provision the certificate pack for. The zone name must be included as a host. Note: If using Let's Encrypt, you cannot use individual subdomains and only a wildcard for subdomain is available. **Modifying this attribute will force creation of a new resource.**
     */
    @JvmName("hafgxlnhchhgyhpa")
    public suspend fun hosts(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.hosts = mapped
    }

    /**
     * @param values List of hostnames to provision the certificate pack for. The zone name must be included as a host. Note: If using Let's Encrypt, you cannot use individual subdomains and only a wildcard for subdomain is available. **Modifying this attribute will force creation of a new resource.**
     */
    @JvmName("dnjvlmejpmvfqfer")
    public suspend fun hosts(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.hosts = mapped
    }

    /**
     * @param value Certificate pack configuration type. Available values: `advanced`. **Modifying this attribute will force creation of a new resource.**
     */
    @JvmName("uewenjdilkhkxwsy")
    public suspend fun type(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.type = mapped
    }

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

    /**
     * @param argument
     */
    @JvmName("grecyjukxrgqlafi")
    public suspend fun validationErrors(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            CertificatePackValidationErrorArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.validationErrors = mapped
    }

    /**
     * @param argument
     */
    @JvmName("tyrgkstsehdkwica")
    public suspend fun validationErrors(vararg argument: suspend CertificatePackValidationErrorArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            CertificatePackValidationErrorArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.validationErrors = mapped
    }

    /**
     * @param argument
     */
    @JvmName("imehwpopwrxhiigp")
    public suspend fun validationErrors(argument: suspend CertificatePackValidationErrorArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            CertificatePackValidationErrorArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.validationErrors = mapped
    }

    /**
     * @param values
     */
    @JvmName("ofchiidvlftxrara")
    public suspend fun validationErrors(vararg values: CertificatePackValidationErrorArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.validationErrors = mapped
    }

    /**
     * @param value Which validation method to use in order to prove domain ownership. Available values: `txt`, `http`, `email`. **Modifying this attribute will force creation of a new resource.**
     */
    @JvmName("buvvodluqyybiylp")
    public suspend fun validationMethod(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.validationMethod = mapped
    }

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

    /**
     * @param argument
     */
    @JvmName("xyqglxevjbgygdqv")
    public suspend fun validationRecords(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            CertificatePackValidationRecordArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.validationRecords = mapped
    }

    /**
     * @param argument
     */
    @JvmName("rwvnixsejlsgpyce")
    public suspend fun validationRecords(vararg argument: suspend CertificatePackValidationRecordArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            CertificatePackValidationRecordArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.validationRecords = mapped
    }

    /**
     * @param argument
     */
    @JvmName("sndrysttcnopnkri")
    public suspend fun validationRecords(argument: suspend CertificatePackValidationRecordArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            CertificatePackValidationRecordArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.validationRecords = mapped
    }

    /**
     * @param values
     */
    @JvmName("niibijtjyosjhcoi")
    public suspend fun validationRecords(vararg values: CertificatePackValidationRecordArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.validationRecords = mapped
    }

    /**
     * @param value How long the certificate is valid for. Note: If using Let's Encrypt, this value can only be 90 days. Available values: `14`, `30`, `90`, `365`. **Modifying this attribute will force creation of a new resource.**
     */
    @JvmName("abkqeobwyifsgeuy")
    public suspend fun validityDays(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.validityDays = mapped
    }

    /**
     * @param value Whether or not to wait for a certificate pack to reach status `active` during creation. Defaults to `false`. **Modifying this attribute will force creation of a new resource.**
     */
    @JvmName("vdbgekipbyuntvtm")
    public suspend fun waitForActiveStatus(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.waitForActiveStatus = mapped
    }

    /**
     * @param value The zone identifier to target for the resource. **Modifying this attribute will force creation of a new resource.**
     */
    @JvmName("hfnknsfnmsrapbmc")
    public suspend fun zoneId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.zoneId = mapped
    }

    internal fun build(): CertificatePackArgs = CertificatePackArgs(
        certificateAuthority = certificateAuthority,
        cloudflareBranding = cloudflareBranding,
        hosts = hosts,
        type = type,
        validationErrors = validationErrors,
        validationMethod = validationMethod,
        validationRecords = validationRecords,
        validityDays = validityDays,
        waitForActiveStatus = waitForActiveStatus,
        zoneId = zoneId,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy