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

com.pulumi.azurenative.web.kotlin.CertificateArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azurenative.web.kotlin

import com.pulumi.azurenative.web.CertificateArgs.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.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * SSL certificate for an app.
 * Azure REST API version: 2022-09-01. Prior API version in Azure Native 1.x: 2020-12-01.
 * Other available API versions: 2015-08-01, 2016-03-01, 2020-10-01, 2023-01-01, 2023-12-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 certificate = new AzureNative.Web.Certificate("certificate", new()
 *     {
 *         HostNames = new[]
 *         {
 *             "ServerCert",
 *         },
 *         Location = "East US",
 *         Name = "testc6282",
 *         Password = "",
 *         ResourceGroupName = "testrg123",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	web "github.com/pulumi/pulumi-azure-native-sdk/web/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := web.NewCertificate(ctx, "certificate", &web.CertificateArgs{
 * 			HostNames: pulumi.StringArray{
 * 				pulumi.String("ServerCert"),
 * 			},
 * 			Location:          pulumi.String("East US"),
 * 			Name:              pulumi.String("testc6282"),
 * 			Password:          pulumi.String(""),
 * 			ResourceGroupName: pulumi.String("testrg123"),
 * 		})
 * 		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.web.Certificate;
 * import com.pulumi.azurenative.web.CertificateArgs;
 * 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 certificate = new Certificate("certificate", CertificateArgs.builder()
 *             .hostNames("ServerCert")
 *             .location("East US")
 *             .name("testc6282")
 *             .password("")
 *             .resourceGroupName("testrg123")
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:web:Certificate testc6282 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}
 * ```
 * @property canonicalName CNAME of the certificate to be issued via free certificate
 * @property domainValidationMethod Method of domain validation for free cert
 * @property hostNames Host names the certificate applies to.
 * @property keyVaultId Key Vault Csm resource Id.
 * @property keyVaultSecretName Key Vault secret name.
 * @property kind Kind of resource.
 * @property location Resource Location.
 * @property name Name of the certificate.
 * @property password Certificate password.
 * @property pfxBlob Pfx blob.
 * @property resourceGroupName Name of the resource group to which the resource belongs.
 * @property serverFarmId Resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}".
 * @property tags Resource tags.
 */
public data class CertificateArgs(
    public val canonicalName: Output? = null,
    public val domainValidationMethod: Output? = null,
    public val hostNames: Output>? = null,
    public val keyVaultId: Output? = null,
    public val keyVaultSecretName: Output? = null,
    public val kind: Output? = null,
    public val location: Output? = null,
    public val name: Output? = null,
    public val password: Output? = null,
    public val pfxBlob: Output? = null,
    public val resourceGroupName: Output? = null,
    public val serverFarmId: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.web.CertificateArgs =
        com.pulumi.azurenative.web.CertificateArgs.builder()
            .canonicalName(canonicalName?.applyValue({ args0 -> args0 }))
            .domainValidationMethod(domainValidationMethod?.applyValue({ args0 -> args0 }))
            .hostNames(hostNames?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .keyVaultId(keyVaultId?.applyValue({ args0 -> args0 }))
            .keyVaultSecretName(keyVaultSecretName?.applyValue({ args0 -> args0 }))
            .kind(kind?.applyValue({ args0 -> args0 }))
            .location(location?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .password(password?.applyValue({ args0 -> args0 }))
            .pfxBlob(pfxBlob?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .serverFarmId(serverFarmId?.applyValue({ args0 -> args0 }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [CertificateArgs].
 */
@PulumiTagMarker
public class CertificateArgsBuilder internal constructor() {
    private var canonicalName: Output? = null

    private var domainValidationMethod: Output? = null

    private var hostNames: Output>? = null

    private var keyVaultId: Output? = null

    private var keyVaultSecretName: Output? = null

    private var kind: Output? = null

    private var location: Output? = null

    private var name: Output? = null

    private var password: Output? = null

    private var pfxBlob: Output? = null

    private var resourceGroupName: Output? = null

    private var serverFarmId: Output? = null

    private var tags: Output>? = null

    /**
     * @param value CNAME of the certificate to be issued via free certificate
     */
    @JvmName("uwajdpmihytrtbac")
    public suspend fun canonicalName(`value`: Output) {
        this.canonicalName = value
    }

    /**
     * @param value Method of domain validation for free cert
     */
    @JvmName("ktpoljinagegkvwo")
    public suspend fun domainValidationMethod(`value`: Output) {
        this.domainValidationMethod = value
    }

    /**
     * @param value Host names the certificate applies to.
     */
    @JvmName("sovtsskhoxpcwfuf")
    public suspend fun hostNames(`value`: Output>) {
        this.hostNames = value
    }

    @JvmName("ffcwhnktahibvcey")
    public suspend fun hostNames(vararg values: Output) {
        this.hostNames = Output.all(values.asList())
    }

    /**
     * @param values Host names the certificate applies to.
     */
    @JvmName("lsxctvsxegbfrnor")
    public suspend fun hostNames(values: List>) {
        this.hostNames = Output.all(values)
    }

    /**
     * @param value Key Vault Csm resource Id.
     */
    @JvmName("nxgwminnnvhwqvim")
    public suspend fun keyVaultId(`value`: Output) {
        this.keyVaultId = value
    }

    /**
     * @param value Key Vault secret name.
     */
    @JvmName("xuintmxhglrvidgx")
    public suspend fun keyVaultSecretName(`value`: Output) {
        this.keyVaultSecretName = value
    }

    /**
     * @param value Kind of resource.
     */
    @JvmName("mwoarhexjidtwwtx")
    public suspend fun kind(`value`: Output) {
        this.kind = value
    }

    /**
     * @param value Resource Location.
     */
    @JvmName("gyocjrowuussbwbp")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value Name of the certificate.
     */
    @JvmName("nfmqxyryfwxfmeuo")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Certificate password.
     */
    @JvmName("idulbmbjhnhdwfio")
    public suspend fun password(`value`: Output) {
        this.password = value
    }

    /**
     * @param value Pfx blob.
     */
    @JvmName("ldvmkingfnukeejm")
    public suspend fun pfxBlob(`value`: Output) {
        this.pfxBlob = value
    }

    /**
     * @param value Name of the resource group to which the resource belongs.
     */
    @JvmName("fofabtuosfldumob")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value Resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}".
     */
    @JvmName("tonelenwgesqpyiv")
    public suspend fun serverFarmId(`value`: Output) {
        this.serverFarmId = value
    }

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

    /**
     * @param value CNAME of the certificate to be issued via free certificate
     */
    @JvmName("dwyefstdbjhsmsfv")
    public suspend fun canonicalName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.canonicalName = mapped
    }

    /**
     * @param value Method of domain validation for free cert
     */
    @JvmName("vlotgcbqkymowkfj")
    public suspend fun domainValidationMethod(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.domainValidationMethod = mapped
    }

    /**
     * @param value Host names the certificate applies to.
     */
    @JvmName("naxrqdhnsjwngdrq")
    public suspend fun hostNames(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.hostNames = mapped
    }

    /**
     * @param values Host names the certificate applies to.
     */
    @JvmName("uiwfkoagyavifgve")
    public suspend fun hostNames(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.hostNames = mapped
    }

    /**
     * @param value Key Vault Csm resource Id.
     */
    @JvmName("bpyoabwjdvvaspqp")
    public suspend fun keyVaultId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.keyVaultId = mapped
    }

    /**
     * @param value Key Vault secret name.
     */
    @JvmName("agafqbtkoxlbpkkd")
    public suspend fun keyVaultSecretName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.keyVaultSecretName = mapped
    }

    /**
     * @param value Kind of resource.
     */
    @JvmName("bywrxlvvhghftvxk")
    public suspend fun kind(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.kind = mapped
    }

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

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

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

    /**
     * @param value Pfx blob.
     */
    @JvmName("kehwdivqllbmouhm")
    public suspend fun pfxBlob(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.pfxBlob = mapped
    }

    /**
     * @param value Name of the resource group to which the resource belongs.
     */
    @JvmName("baghwkvfgimsyqwd")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value Resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}".
     */
    @JvmName("arpmfmcvkwqsuhvs")
    public suspend fun serverFarmId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.serverFarmId = mapped
    }

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

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

    internal fun build(): CertificateArgs = CertificateArgs(
        canonicalName = canonicalName,
        domainValidationMethod = domainValidationMethod,
        hostNames = hostNames,
        keyVaultId = keyVaultId,
        keyVaultSecretName = keyVaultSecretName,
        kind = kind,
        location = location,
        name = name,
        password = password,
        pfxBlob = pfxBlob,
        resourceGroupName = resourceGroupName,
        serverFarmId = serverFarmId,
        tags = tags,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy