com.pulumi.awsnative.acmpca.kotlin.CertificateAuthority.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.CertificateAuthorityCsrExtensions
import com.pulumi.awsnative.acmpca.kotlin.outputs.CertificateAuthorityRevocationConfiguration
import com.pulumi.awsnative.acmpca.kotlin.outputs.CertificateAuthoritySubject
import com.pulumi.awsnative.kotlin.outputs.Tag
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 kotlin.collections.List
import com.pulumi.awsnative.acmpca.kotlin.outputs.CertificateAuthorityCsrExtensions.Companion.toKotlin as certificateAuthorityCsrExtensionsToKotlin
import com.pulumi.awsnative.acmpca.kotlin.outputs.CertificateAuthorityRevocationConfiguration.Companion.toKotlin as certificateAuthorityRevocationConfigurationToKotlin
import com.pulumi.awsnative.acmpca.kotlin.outputs.CertificateAuthoritySubject.Companion.toKotlin as certificateAuthoritySubjectToKotlin
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin
/**
* Builder for [CertificateAuthority].
*/
@PulumiTagMarker
public class CertificateAuthorityResourceBuilder internal constructor() {
public var name: String? = null
public var args: CertificateAuthorityArgs = CertificateAuthorityArgs()
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 CertificateAuthorityArgsBuilder.() -> Unit) {
val builder = CertificateAuthorityArgsBuilder()
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(): CertificateAuthority {
val builtJavaResource =
com.pulumi.awsnative.acmpca.CertificateAuthority(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return CertificateAuthority(builtJavaResource)
}
}
/**
* Private certificate authority.
* ## Example Usage
* ### Example
* No Java example available.
*/
public class CertificateAuthority internal constructor(
override val javaResource: com.pulumi.awsnative.acmpca.CertificateAuthority,
) : KotlinCustomResource(javaResource, CertificateAuthorityMapper) {
/**
* The Amazon Resource Name (ARN) of the certificate authority.
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* The base64 PEM-encoded certificate signing request (CSR) for your certificate authority certificate.
*/
public val certificateSigningRequest: Output
get() = javaResource.certificateSigningRequest().applyValue({ args0 -> args0 })
/**
* Structure that contains CSR pass through extension information used by the CreateCertificateAuthority action.
*/
public val csrExtensions: Output?
get() = javaResource.csrExtensions().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> certificateAuthorityCsrExtensionsToKotlin(args0) })
}).orElse(null)
})
/**
* Public key algorithm and size, in bits, of the key pair that your CA creates when it issues a certificate.
*/
public val keyAlgorithm: Output
get() = javaResource.keyAlgorithm().applyValue({ args0 -> args0 })
/**
* KeyStorageSecurityStadard defines a cryptographic key management compliance standard used for handling CA keys.
*/
public val keyStorageSecurityStandard: Output?
get() = javaResource.keyStorageSecurityStandard().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Certificate revocation information used by the CreateCertificateAuthority and UpdateCertificateAuthority actions.
*/
public val revocationConfiguration: Output?
get() = javaResource.revocationConfiguration().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
certificateAuthorityRevocationConfigurationToKotlin(args0)
})
}).orElse(null)
})
/**
* Algorithm your CA uses to sign certificate requests.
*/
public val signingAlgorithm: Output
get() = javaResource.signingAlgorithm().applyValue({ args0 -> args0 })
/**
* Structure that contains X.500 distinguished name information for your CA.
*/
public val subject: Output
get() = javaResource.subject().applyValue({ args0 ->
args0.let({ args0 ->
certificateAuthoritySubjectToKotlin(args0)
})
})
/**
* Key-value pairs that will be attached to the new private CA. You can associate up to 50 tags with a private CA. For information using tags with IAM to manage permissions, see [Controlling Access Using IAM Tags](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_iam-tags.html) .
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> tagToKotlin(args0) })
})
}).orElse(null)
})
/**
* The type of the certificate authority.
*/
public val type: Output
get() = javaResource.type().applyValue({ args0 -> args0 })
/**
* Usage mode of the ceritificate authority.
*/
public val usageMode: Output?
get() = javaResource.usageMode().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
}
public object CertificateAuthorityMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.acmpca.CertificateAuthority::class == javaResource::class
override fun map(javaResource: Resource): CertificateAuthority = CertificateAuthority(
javaResource
as com.pulumi.awsnative.acmpca.CertificateAuthority,
)
}
/**
* @see [CertificateAuthority].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [CertificateAuthority].
*/
public suspend fun certificateAuthority(
name: String,
block: suspend CertificateAuthorityResourceBuilder.() -> Unit,
): CertificateAuthority {
val builder = CertificateAuthorityResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [CertificateAuthority].
* @param name The _unique_ name of the resulting resource.
*/
public fun certificateAuthority(name: String): CertificateAuthority {
val builder = CertificateAuthorityResourceBuilder()
builder.name(name)
return builder.build()
}