com.pulumi.awsnative.acmpca.kotlin.Certificate.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-native-kotlin Show documentation
Show all versions of pulumi-aws-native-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.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.acmpca.kotlin
import com.pulumi.awsnative.acmpca.kotlin.outputs.CertificateApiPassthrough
import com.pulumi.awsnative.acmpca.kotlin.outputs.CertificateValidity
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.String
import kotlin.Suppress
import kotlin.Unit
import com.pulumi.awsnative.acmpca.kotlin.outputs.CertificateApiPassthrough.Companion.toKotlin as certificateApiPassthroughToKotlin
import com.pulumi.awsnative.acmpca.kotlin.outputs.CertificateValidity.Companion.toKotlin as certificateValidityToKotlin
/**
* Builder for [Certificate].
*/
@PulumiTagMarker
public class CertificateResourceBuilder internal constructor() {
public var name: String? = null
public var args: CertificateArgs = CertificateArgs()
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 CertificateArgsBuilder.() -> Unit) {
val builder = CertificateArgsBuilder()
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(): Certificate {
val builtJavaResource = com.pulumi.awsnative.acmpca.Certificate(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Certificate(builtJavaResource)
}
}
/**
* The ``AWS::ACMPCA::Certificate`` resource is used to issue a certificate using your private certificate authority. For more information, see the [IssueCertificate](https://docs.aws.amazon.com/privateca/latest/APIReference/API_IssueCertificate.html) action.
*/
public class Certificate internal constructor(
override val javaResource: com.pulumi.awsnative.acmpca.Certificate,
) : KotlinCustomResource(javaResource, CertificateMapper) {
/**
* Specifies X.509 certificate information to be included in the issued certificate. An ``APIPassthrough`` or ``APICSRPassthrough`` template variant must be selected, or else this parameter is ignored.
*/
public val apiPassthrough: Output?
get() = javaResource.apiPassthrough().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> certificateApiPassthroughToKotlin(args0) })
}).orElse(null)
})
/**
* The Amazon Resource Name (ARN) of the issued certificate.
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* The issued Base64 PEM-encoded certificate.
*/
public val certificate: Output
get() = javaResource.certificate().applyValue({ args0 -> args0 })
/**
* The Amazon Resource Name (ARN) for the private CA issues the certificate.
*/
public val certificateAuthorityArn: Output
get() = javaResource.certificateAuthorityArn().applyValue({ args0 -> args0 })
/**
* The certificate signing request (CSR) for the certificate.
*/
public val certificateSigningRequest: Output
get() = javaResource.certificateSigningRequest().applyValue({ args0 -> args0 })
/**
* The name of the algorithm that will be used to sign the certificate to be issued.
* This parameter should not be confused with the ``SigningAlgorithm`` parameter used to sign a CSR in the ``CreateCertificateAuthority`` action.
* The specified signing algorithm family (RSA or ECDSA) must match the algorithm family of the CA's secret key.
*/
public val signingAlgorithm: Output
get() = javaResource.signingAlgorithm().applyValue({ args0 -> args0 })
/**
* Specifies a custom configuration template to use when issuing a certificate. If this parameter is not provided, PCAshort defaults to the ``EndEntityCertificate/V1`` template. For more information about PCAshort templates, see [Using Templates](https://docs.aws.amazon.com/privateca/latest/userguide/UsingTemplates.html).
*/
public val templateArn: Output?
get() = javaResource.templateArn().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The period of time during which the certificate will be valid.
*/
public val validity: Output
get() = javaResource.validity().applyValue({ args0 ->
args0.let({ args0 ->
certificateValidityToKotlin(args0)
})
})
/**
* Information describing the start of the validity period of the certificate. This parameter sets the "Not Before" date for the certificate.
* By default, when issuing a certificate, PCAshort sets the "Not Before" date to the issuance time minus 60 minutes. This compensates for clock inconsistencies across computer systems. The ``ValidityNotBefore`` parameter can be used to customize the "Not Before" value.
* Unlike the ``Validity`` parameter, the ``ValidityNotBefore`` parameter is optional.
* The ``ValidityNotBefore`` value is expressed as an explicit date and time, using the ``Validity`` type value ``ABSOLUTE``.
*/
public val validityNotBefore: Output?
get() = javaResource.validityNotBefore().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> certificateValidityToKotlin(args0) })
}).orElse(null)
})
}
public object CertificateMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.acmpca.Certificate::class == javaResource::class
override fun map(javaResource: Resource): Certificate = Certificate(
javaResource as
com.pulumi.awsnative.acmpca.Certificate,
)
}
/**
* @see [Certificate].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [Certificate].
*/
public suspend fun certificate(name: String, block: suspend CertificateResourceBuilder.() -> Unit): Certificate {
val builder = CertificateResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [Certificate].
* @param name The _unique_ name of the resulting resource.
*/
public fun certificate(name: String): Certificate {
val builder = CertificateResourceBuilder()
builder.name(name)
return builder.build()
}