com.pulumi.cloudflare.kotlin.CertificatePack.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-cloudflare-kotlin Show documentation
Show all versions of pulumi-cloudflare-kotlin Show documentation
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.kotlin.outputs.CertificatePackValidationError
import com.pulumi.cloudflare.kotlin.outputs.CertificatePackValidationRecord
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
import kotlin.collections.List
import com.pulumi.cloudflare.kotlin.outputs.CertificatePackValidationError.Companion.toKotlin as certificatePackValidationErrorToKotlin
import com.pulumi.cloudflare.kotlin.outputs.CertificatePackValidationRecord.Companion.toKotlin as certificatePackValidationRecordToKotlin
/**
* Builder for [CertificatePack].
*/
@PulumiTagMarker
public class CertificatePackResourceBuilder internal constructor() {
public var name: String? = null
public var args: CertificatePackArgs = CertificatePackArgs()
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 CertificatePackArgsBuilder.() -> Unit) {
val builder = CertificatePackArgsBuilder()
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(): CertificatePack {
val builtJavaResource = com.pulumi.cloudflare.CertificatePack(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return CertificatePack(builtJavaResource)
}
}
/**
* ## 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.
*/
public class CertificatePack internal constructor(
override val javaResource: com.pulumi.cloudflare.CertificatePack,
) : KotlinCustomResource(javaResource, CertificatePackMapper) {
/**
* Which certificate authority to issue the certificate pack. Available values: `digicert`, `lets_encrypt`, `google`. **Modifying this attribute will force creation of a new resource.**
*/
public val certificateAuthority: Output
get() = javaResource.certificateAuthority().applyValue({ args0 -> args0 })
/**
* 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.**
*/
public val cloudflareBranding: Output?
get() = javaResource.cloudflareBranding().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* 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.**
*/
public val hosts: Output>
get() = javaResource.hosts().applyValue({ args0 -> args0.map({ args0 -> args0 }) })
/**
* Certificate pack configuration type. Available values: `advanced`. **Modifying this attribute will force creation of a new resource.**
*/
public val type: Output
get() = javaResource.type().applyValue({ args0 -> args0 })
public val validationErrors: Output>
get() = javaResource.validationErrors().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> certificatePackValidationErrorToKotlin(args0) })
})
})
/**
* 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.**
*/
public val validationMethod: Output
get() = javaResource.validationMethod().applyValue({ args0 -> args0 })
public val validationRecords: Output>
get() = javaResource.validationRecords().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> certificatePackValidationRecordToKotlin(args0) })
})
})
/**
* 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.**
*/
public val validityDays: Output
get() = javaResource.validityDays().applyValue({ args0 -> args0 })
/**
* 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.**
*/
public val waitForActiveStatus: Output?
get() = javaResource.waitForActiveStatus().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The zone identifier to target for the resource. **Modifying this attribute will force creation of a new resource.**
*/
public val zoneId: Output
get() = javaResource.zoneId().applyValue({ args0 -> args0 })
}
public object CertificatePackMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.cloudflare.CertificatePack::class == javaResource::class
override fun map(javaResource: Resource): CertificatePack = CertificatePack(
javaResource as
com.pulumi.cloudflare.CertificatePack,
)
}
/**
* @see [CertificatePack].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [CertificatePack].
*/
public suspend fun certificatePack(
name: String,
block: suspend CertificatePackResourceBuilder.() -> Unit,
): CertificatePack {
val builder = CertificatePackResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [CertificatePack].
* @param name The _unique_ name of the resulting resource.
*/
public fun certificatePack(name: String): CertificatePack {
val builder = CertificatePackResourceBuilder()
builder.name(name)
return builder.build()
}