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

com.pulumi.azure.keyvault.kotlin.inputs.CertifiateCertificateArgs.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.

There is a newer version: 6.15.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.keyvault.kotlin.inputs

import com.pulumi.azure.keyvault.inputs.CertifiateCertificateArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 *
 * @property contents The base64-encoded certificate contents.
 * @property password The password associated with the certificate.
 * > **NOTE:** A PEM certificate is already base64 encoded. To successfully import, the `contents` property should include a PEM encoded X509 certificate and a private_key in pkcs8 format. There should only be linux style `\n` line endings and the whole block should have the PEM begin/end blocks around the certificate data and the private key data.
 * To convert a private key to pkcs8 format with openssl use:
 * ```shell
 * openssl pkcs8 -topk8 -nocrypt -in private_key.pem > private_key_pk8.pem
 * ```
 * The PEM content should look something like:
 * ```text
 * -----BEGIN CERTIFICATE-----
 * aGVsbG8KaGVsbG8KaGVsbG8KaGVsbG8KaGVsbG8KaGVsbG8KaGVsbG8KaGVsbG8K
 * :
 * aGVsbG8KaGVsbG8KaGVsbG8KaGVsbG8KaGVsbG8KaGVsbG8KaGVsbG8KaGVsbG8K
 * -----END CERTIFICATE-----
 * -----BEGIN PRIVATE KEY-----
 * d29ybGQKd29ybGQKd29ybGQKd29ybGQKd29ybGQKd29ybGQKd29ybGQKd29ybGQK
 * :
 * d29ybGQKd29ybGQKd29ybGQKd29ybGQKd29ybGQKd29ybGQKd29ybGQKd29ybGQK
 * -----END PRIVATE KEY-----
 * ```
 */
public data class CertifiateCertificateArgs(
    public val contents: Output,
    public val password: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.keyvault.inputs.CertifiateCertificateArgs =
        com.pulumi.azure.keyvault.inputs.CertifiateCertificateArgs.builder()
            .contents(contents.applyValue({ args0 -> args0 }))
            .password(password?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [CertifiateCertificateArgs].
 */
@PulumiTagMarker
public class CertifiateCertificateArgsBuilder internal constructor() {
    private var contents: Output? = null

    private var password: Output? = null

    /**
     * @param value The base64-encoded certificate contents.
     */
    @JvmName("ykrfpkvpohwoydtd")
    public suspend fun contents(`value`: Output) {
        this.contents = value
    }

    /**
     * @param value The password associated with the certificate.
     * > **NOTE:** A PEM certificate is already base64 encoded. To successfully import, the `contents` property should include a PEM encoded X509 certificate and a private_key in pkcs8 format. There should only be linux style `\n` line endings and the whole block should have the PEM begin/end blocks around the certificate data and the private key data.
     * To convert a private key to pkcs8 format with openssl use:
     * ```shell
     * openssl pkcs8 -topk8 -nocrypt -in private_key.pem > private_key_pk8.pem
     * ```
     * The PEM content should look something like:
     * ```text
     * -----BEGIN CERTIFICATE-----
     * aGVsbG8KaGVsbG8KaGVsbG8KaGVsbG8KaGVsbG8KaGVsbG8KaGVsbG8KaGVsbG8K
     * :
     * aGVsbG8KaGVsbG8KaGVsbG8KaGVsbG8KaGVsbG8KaGVsbG8KaGVsbG8KaGVsbG8K
     * -----END CERTIFICATE-----
     * -----BEGIN PRIVATE KEY-----
     * d29ybGQKd29ybGQKd29ybGQKd29ybGQKd29ybGQKd29ybGQKd29ybGQKd29ybGQK
     * :
     * d29ybGQKd29ybGQKd29ybGQKd29ybGQKd29ybGQKd29ybGQKd29ybGQKd29ybGQK
     * -----END PRIVATE KEY-----
     * ```
     */
    @JvmName("offxfynrplcspjxs")
    public suspend fun password(`value`: Output) {
        this.password = value
    }

    /**
     * @param value The base64-encoded certificate contents.
     */
    @JvmName("wjvbkythniqbyjde")
    public suspend fun contents(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.contents = mapped
    }

    /**
     * @param value The password associated with the certificate.
     * > **NOTE:** A PEM certificate is already base64 encoded. To successfully import, the `contents` property should include a PEM encoded X509 certificate and a private_key in pkcs8 format. There should only be linux style `\n` line endings and the whole block should have the PEM begin/end blocks around the certificate data and the private key data.
     * To convert a private key to pkcs8 format with openssl use:
     * ```shell
     * openssl pkcs8 -topk8 -nocrypt -in private_key.pem > private_key_pk8.pem
     * ```
     * The PEM content should look something like:
     * ```text
     * -----BEGIN CERTIFICATE-----
     * aGVsbG8KaGVsbG8KaGVsbG8KaGVsbG8KaGVsbG8KaGVsbG8KaGVsbG8KaGVsbG8K
     * :
     * aGVsbG8KaGVsbG8KaGVsbG8KaGVsbG8KaGVsbG8KaGVsbG8KaGVsbG8KaGVsbG8K
     * -----END CERTIFICATE-----
     * -----BEGIN PRIVATE KEY-----
     * d29ybGQKd29ybGQKd29ybGQKd29ybGQKd29ybGQKd29ybGQKd29ybGQKd29ybGQK
     * :
     * d29ybGQKd29ybGQKd29ybGQKd29ybGQKd29ybGQKd29ybGQKd29ybGQKd29ybGQK
     * -----END PRIVATE KEY-----
     * ```
     */
    @JvmName("lwggtvtrnglcbifs")
    public suspend fun password(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.password = mapped
    }

    internal fun build(): CertifiateCertificateArgs = CertifiateCertificateArgs(
        contents = contents ?: throw PulumiNullFieldException("contents"),
        password = password,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy