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

com.pulumi.azure.containerapp.kotlin.EnvironmentCertificateArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.containerapp.kotlin

import com.pulumi.azure.containerapp.EnvironmentCertificateArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Manages a Container App Environment Certificate.
 * ## Example Usage
 * 
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: example-resources
 *       location: West Europe
 *   exampleAnalyticsWorkspace:
 *     type: azure:operationalinsights:AnalyticsWorkspace
 *     name: example
 *     properties:
 *       name: acctest-01
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *       sku: PerGB2018
 *       retentionInDays: 30
 *   exampleEnvironment:
 *     type: azure:containerapp:Environment
 *     name: example
 *     properties:
 *       name: myEnvironment
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *       logAnalyticsWorkspaceId: ${exampleAnalyticsWorkspace.id}
 *   exampleEnvironmentCertificate:
 *     type: azure:containerapp:EnvironmentCertificate
 *     name: example
 *     properties:
 *       name: myfriendlyname
 *       containerAppEnvironmentId: ${exampleEnvironment.id}
 *       certificateBlob:
 *         fn::invoke:
 *           Function: std:filebase64
 *           Arguments:
 *             input: path/to/certificate_file.pfx
 *           Return: result
 *       certificatePassword: $3cretSqu1rreL
 * ```
 * 
 * ## Import
 * A Container App Environment Certificate can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:containerapp/environmentCertificate:EnvironmentCertificate example "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.App/managedEnvironments/myenv/certificates/mycertificate"
 * ```
 * @property certificateBlobBase64 The Certificate Private Key as a base64 encoded PFX or PEM. Changing this forces a new resource to be created.
 * @property certificatePassword The password for the Certificate. Changing this forces a new resource to be created.
 * @property containerAppEnvironmentId The Container App Managed Environment ID to configure this Certificate on. Changing this forces a new resource to be created.
 * @property name The name of the Container Apps Environment Certificate. Changing this forces a new resource to be created.
 * @property tags A mapping of tags to assign to the resource.
 */
public data class EnvironmentCertificateArgs(
    public val certificateBlobBase64: Output? = null,
    public val certificatePassword: Output? = null,
    public val containerAppEnvironmentId: Output? = null,
    public val name: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.containerapp.EnvironmentCertificateArgs =
        com.pulumi.azure.containerapp.EnvironmentCertificateArgs.builder()
            .certificateBlobBase64(certificateBlobBase64?.applyValue({ args0 -> args0 }))
            .certificatePassword(certificatePassword?.applyValue({ args0 -> args0 }))
            .containerAppEnvironmentId(containerAppEnvironmentId?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [EnvironmentCertificateArgs].
 */
@PulumiTagMarker
public class EnvironmentCertificateArgsBuilder internal constructor() {
    private var certificateBlobBase64: Output? = null

    private var certificatePassword: Output? = null

    private var containerAppEnvironmentId: Output? = null

    private var name: Output? = null

    private var tags: Output>? = null

    /**
     * @param value The Certificate Private Key as a base64 encoded PFX or PEM. Changing this forces a new resource to be created.
     */
    @JvmName("qhtjtfsiountxjrs")
    public suspend fun certificateBlobBase64(`value`: Output) {
        this.certificateBlobBase64 = value
    }

    /**
     * @param value The password for the Certificate. Changing this forces a new resource to be created.
     */
    @JvmName("jerqoumucyhkoopt")
    public suspend fun certificatePassword(`value`: Output) {
        this.certificatePassword = value
    }

    /**
     * @param value The Container App Managed Environment ID to configure this Certificate on. Changing this forces a new resource to be created.
     */
    @JvmName("armvpjqlwhijufop")
    public suspend fun containerAppEnvironmentId(`value`: Output) {
        this.containerAppEnvironmentId = value
    }

    /**
     * @param value The name of the Container Apps Environment Certificate. Changing this forces a new resource to be created.
     */
    @JvmName("ywampuyknlqjhmsr")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value A mapping of tags to assign to the resource.
     */
    @JvmName("wfdrknnxmbkdagrj")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value The Certificate Private Key as a base64 encoded PFX or PEM. Changing this forces a new resource to be created.
     */
    @JvmName("alpnujuwhtsqnqde")
    public suspend fun certificateBlobBase64(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.certificateBlobBase64 = mapped
    }

    /**
     * @param value The password for the Certificate. Changing this forces a new resource to be created.
     */
    @JvmName("vhrnhrkivesexnss")
    public suspend fun certificatePassword(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.certificatePassword = mapped
    }

    /**
     * @param value The Container App Managed Environment ID to configure this Certificate on. Changing this forces a new resource to be created.
     */
    @JvmName("qeihwwycabqbdeua")
    public suspend fun containerAppEnvironmentId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.containerAppEnvironmentId = mapped
    }

    /**
     * @param value The name of the Container Apps Environment Certificate. Changing this forces a new resource to be created.
     */
    @JvmName("sjuyvgfyxcplfxpt")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value A mapping of tags to assign to the resource.
     */
    @JvmName("sbthosnpcvvqhhms")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values A mapping of tags to assign to the resource.
     */
    @JvmName("vvlerkwaakhbxvyj")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): EnvironmentCertificateArgs = EnvironmentCertificateArgs(
        certificateBlobBase64 = certificateBlobBase64,
        certificatePassword = certificatePassword,
        containerAppEnvironmentId = containerAppEnvironmentId,
        name = name,
        tags = tags,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy