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

com.pulumi.azurenative.app.kotlin.ManagedCertificateArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azurenative.app.kotlin

import com.pulumi.azurenative.app.ManagedCertificateArgs.builder
import com.pulumi.azurenative.app.kotlin.inputs.ManagedCertificatePropertiesArgs
import com.pulumi.azurenative.app.kotlin.inputs.ManagedCertificatePropertiesArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment
 * Azure REST API version: 2023-04-01-preview.
 * Other available API versions: 2023-05-01, 2023-05-02-preview, 2023-08-01-preview, 2023-11-02-preview, 2024-02-02-preview, 2024-03-01.
 * ## Example Usage
 * ### Create or Update Certificate
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var managedCertificate = new AzureNative.App.ManagedCertificate("managedCertificate", new()
 *     {
 *         EnvironmentName = "testcontainerenv",
 *         Location = "East US",
 *         ManagedCertificateName = "certificate-firendly-name",
 *         Properties = new AzureNative.App.Inputs.ManagedCertificatePropertiesArgs
 *         {
 *             DomainControlValidation = AzureNative.App.ManagedCertificateDomainControlValidation.CNAME,
 *             SubjectName = "my-subject-name.company.country.net",
 *         },
 *         ResourceGroupName = "examplerg",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	app "github.com/pulumi/pulumi-azure-native-sdk/app/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := app.NewManagedCertificate(ctx, "managedCertificate", &app.ManagedCertificateArgs{
 * 			EnvironmentName:        pulumi.String("testcontainerenv"),
 * 			Location:               pulumi.String("East US"),
 * 			ManagedCertificateName: pulumi.String("certificate-firendly-name"),
 * 			Properties: &app.ManagedCertificatePropertiesArgs{
 * 				DomainControlValidation: pulumi.String(app.ManagedCertificateDomainControlValidationCNAME),
 * 				SubjectName:             pulumi.String("my-subject-name.company.country.net"),
 * 			},
 * 			ResourceGroupName: pulumi.String("examplerg"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.app.ManagedCertificate;
 * import com.pulumi.azurenative.app.ManagedCertificateArgs;
 * import com.pulumi.azurenative.app.inputs.ManagedCertificatePropertiesArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var managedCertificate = new ManagedCertificate("managedCertificate", ManagedCertificateArgs.builder()
 *             .environmentName("testcontainerenv")
 *             .location("East US")
 *             .managedCertificateName("certificate-firendly-name")
 *             .properties(ManagedCertificatePropertiesArgs.builder()
 *                 .domainControlValidation("CNAME")
 *                 .subjectName("my-subject-name.company.country.net")
 *                 .build())
 *             .resourceGroupName("examplerg")
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:app:ManagedCertificate myresource1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/managedCertificates/{managedCertificateName}
 * ```
 * @property environmentName Name of the Managed Environment.
 * @property location The geo-location where the resource lives
 * @property managedCertificateName Name of the Managed Certificate.
 * @property properties Certificate resource specific properties
 * @property resourceGroupName The name of the resource group. The name is case insensitive.
 * @property tags Resource tags.
 */
public data class ManagedCertificateArgs(
    public val environmentName: Output? = null,
    public val location: Output? = null,
    public val managedCertificateName: Output? = null,
    public val properties: Output? = null,
    public val resourceGroupName: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.app.ManagedCertificateArgs =
        com.pulumi.azurenative.app.ManagedCertificateArgs.builder()
            .environmentName(environmentName?.applyValue({ args0 -> args0 }))
            .location(location?.applyValue({ args0 -> args0 }))
            .managedCertificateName(managedCertificateName?.applyValue({ args0 -> args0 }))
            .properties(properties?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [ManagedCertificateArgs].
 */
@PulumiTagMarker
public class ManagedCertificateArgsBuilder internal constructor() {
    private var environmentName: Output? = null

    private var location: Output? = null

    private var managedCertificateName: Output? = null

    private var properties: Output? = null

    private var resourceGroupName: Output? = null

    private var tags: Output>? = null

    /**
     * @param value Name of the Managed Environment.
     */
    @JvmName("innspilseodjhkut")
    public suspend fun environmentName(`value`: Output) {
        this.environmentName = value
    }

    /**
     * @param value The geo-location where the resource lives
     */
    @JvmName("gtkhqhduarnyeqfi")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value Name of the Managed Certificate.
     */
    @JvmName("qrhywdpejfkfcsxw")
    public suspend fun managedCertificateName(`value`: Output) {
        this.managedCertificateName = value
    }

    /**
     * @param value Certificate resource specific properties
     */
    @JvmName("mjfsynybcpfkxcsx")
    public suspend fun properties(`value`: Output) {
        this.properties = value
    }

    /**
     * @param value The name of the resource group. The name is case insensitive.
     */
    @JvmName("gcxkevdxgrnerjdt")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value Resource tags.
     */
    @JvmName("mtykfgccipusdyui")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value Name of the Managed Environment.
     */
    @JvmName("bbygbhsovoiwbglt")
    public suspend fun environmentName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.environmentName = mapped
    }

    /**
     * @param value The geo-location where the resource lives
     */
    @JvmName("aycogvfgkhtfsnmm")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value Name of the Managed Certificate.
     */
    @JvmName("ebtgtjuxcbuhrvbf")
    public suspend fun managedCertificateName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.managedCertificateName = mapped
    }

    /**
     * @param value Certificate resource specific properties
     */
    @JvmName("wiqoulgcxicstlub")
    public suspend fun properties(`value`: ManagedCertificatePropertiesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.properties = mapped
    }

    /**
     * @param argument Certificate resource specific properties
     */
    @JvmName("webbwpabqdjvktnd")
    public suspend fun properties(argument: suspend ManagedCertificatePropertiesArgsBuilder.() -> Unit) {
        val toBeMapped = ManagedCertificatePropertiesArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.properties = mapped
    }

    /**
     * @param value The name of the resource group. The name is case insensitive.
     */
    @JvmName("kydxunyajmnwlkwq")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value Resource tags.
     */
    @JvmName("ppyovybohqmnivdx")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values Resource tags.
     */
    @JvmName("bwjmsxuoresqptvs")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): ManagedCertificateArgs = ManagedCertificateArgs(
        environmentName = environmentName,
        location = location,
        managedCertificateName = managedCertificateName,
        properties = properties,
        resourceGroupName = resourceGroupName,
        tags = tags,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy