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

com.pulumi.cloudflare.kotlin.ZeroTrustGatewayCertificate.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.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit

/**
 * Builder for [ZeroTrustGatewayCertificate].
 */
@PulumiTagMarker
public class ZeroTrustGatewayCertificateResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: ZeroTrustGatewayCertificateArgs = ZeroTrustGatewayCertificateArgs()

    public var opts: CustomResourceOptions = CustomResourceOptions()

    /**
     * @param name The _unique_ name of the resulting resource.
     */
    public fun name(`value`: String) {
        this.name = value
    }

    /**
     * @param block The arguments to use to populate this resource's properties.
     */
    public suspend fun args(block: suspend ZeroTrustGatewayCertificateArgsBuilder.() -> Unit) {
        val builder = ZeroTrustGatewayCertificateArgsBuilder()
        block(builder)
        this.args = builder.build()
    }

    /**
     * @param block A bag of options that control this resource's behavior.
     */
    public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
        this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
    }

    internal fun build(): ZeroTrustGatewayCertificate {
        val builtJavaResource =
            com.pulumi.cloudflare.ZeroTrustGatewayCertificate(
                this.name,
                this.args.toJava(),
                this.opts.toJava(),
            )
        return ZeroTrustGatewayCertificate(builtJavaResource)
    }
}

/**
 * Provides a Cloudflare Teams Gateway Certificate resource. A Teams Certificate can
 * be specified for Gateway TLS interception and block pages.
 */
public class ZeroTrustGatewayCertificate internal constructor(
    override val javaResource: com.pulumi.cloudflare.ZeroTrustGatewayCertificate,
) : KotlinCustomResource(javaResource, ZeroTrustGatewayCertificateMapper) {
    /**
     * The account identifier to target for the resource.
     */
    public val accountId: Output
        get() = javaResource.accountId().applyValue({ args0 -> args0 })

    /**
     * Whether or not to activate a certificate. A certificate must be activated to use in Gateway certificate settings. Defaults to `false`.
     */
    public val activate: Output?
        get() = javaResource.activate().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * The deployment status of the certificate on the edge Available values: `IP`, `SERIAL`, `URL`, `DOMAIN`, `EMAIL`.
     */
    public val bindingStatus: Output
        get() = javaResource.bindingStatus().applyValue({ args0 -> args0 })

    public val createdAt: Output
        get() = javaResource.createdAt().applyValue({ args0 -> args0 })

    /**
     * The type of certificate (custom or Gateway-managed). Must provide only one of `custom`, `gateway_managed`.
     */
    public val custom: Output?
        get() = javaResource.custom().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    public val expiresOn: Output
        get() = javaResource.expiresOn().applyValue({ args0 -> args0 })

    /**
     * The type of certificate (custom or Gateway-managed). Must provide only one of `custom`, `gateway_managed`.
     */
    public val gatewayManaged: Output?
        get() = javaResource.gatewayManaged().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * Whether the certificate is in use by Gateway for TLS interception and the block page.
     */
    public val inUse: Output
        get() = javaResource.inUse().applyValue({ args0 -> args0 })

    public val qsPackId: Output
        get() = javaResource.qsPackId().applyValue({ args0 -> args0 })

    public val uploadedOn: Output
        get() = javaResource.uploadedOn().applyValue({ args0 -> args0 })

    /**
     * Number of days the generated certificate will be valid, minimum 1 day and maximum 30 years. Defaults to 5 years. Defaults to `1826`. Required when using `gateway_managed`. Conflicts with `custom`. **Modifying this attribute will force creation of a new resource.**
     */
    public val validityPeriodDays: Output?
        get() = javaResource.validityPeriodDays().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })
}

public object ZeroTrustGatewayCertificateMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.cloudflare.ZeroTrustGatewayCertificate::class == javaResource::class

    override fun map(javaResource: Resource): ZeroTrustGatewayCertificate =
        ZeroTrustGatewayCertificate(javaResource as com.pulumi.cloudflare.ZeroTrustGatewayCertificate)
}

/**
 * @see [ZeroTrustGatewayCertificate].
 * @param name The _unique_ name of the resulting resource.
 * @param block Builder for [ZeroTrustGatewayCertificate].
 */
public suspend fun zeroTrustGatewayCertificate(
    name: String,
    block: suspend ZeroTrustGatewayCertificateResourceBuilder.() -> Unit,
): ZeroTrustGatewayCertificate {
    val builder = ZeroTrustGatewayCertificateResourceBuilder()
    builder.name(name)
    block(builder)
    return builder.build()
}

/**
 * @see [ZeroTrustGatewayCertificate].
 * @param name The _unique_ name of the resulting resource.
 */
public fun zeroTrustGatewayCertificate(name: String): ZeroTrustGatewayCertificate {
    val builder = ZeroTrustGatewayCertificateResourceBuilder()
    builder.name(name)
    return builder.build()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy