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

com.pulumi.azure.appservice.kotlin.CertificateOrderArgs.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.appservice.kotlin

import com.pulumi.azure.appservice.CertificateOrderArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Manages an App Service Certificate Order.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "example-resources",
 *     location: "West Europe",
 * });
 * const exampleCertificateOrder = new azure.appservice.CertificateOrder("example", {
 *     name: "example-cert-order",
 *     resourceGroupName: example.name,
 *     location: "global",
 *     distinguishedName: "CN=example.com",
 *     productType: "Standard",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="example-resources",
 *     location="West Europe")
 * example_certificate_order = azure.appservice.CertificateOrder("example",
 *     name="example-cert-order",
 *     resource_group_name=example.name,
 *     location="global",
 *     distinguished_name="CN=example.com",
 *     product_type="Standard")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Azure = Pulumi.Azure;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Azure.Core.ResourceGroup("example", new()
 *     {
 *         Name = "example-resources",
 *         Location = "West Europe",
 *     });
 *     var exampleCertificateOrder = new Azure.AppService.CertificateOrder("example", new()
 *     {
 *         Name = "example-cert-order",
 *         ResourceGroupName = example.Name,
 *         Location = "global",
 *         DistinguishedName = "CN=example.com",
 *         ProductType = "Standard",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/appservice"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
 * 			Name:     pulumi.String("example-resources"),
 * 			Location: pulumi.String("West Europe"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = appservice.NewCertificateOrder(ctx, "example", &appservice.CertificateOrderArgs{
 * 			Name:              pulumi.String("example-cert-order"),
 * 			ResourceGroupName: example.Name,
 * 			Location:          pulumi.String("global"),
 * 			DistinguishedName: pulumi.String("CN=example.com"),
 * 			ProductType:       pulumi.String("Standard"),
 * 		})
 * 		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.azure.core.ResourceGroup;
 * import com.pulumi.azure.core.ResourceGroupArgs;
 * import com.pulumi.azure.appservice.CertificateOrder;
 * import com.pulumi.azure.appservice.CertificateOrderArgs;
 * 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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
 *             .name("example-resources")
 *             .location("West Europe")
 *             .build());
 *         var exampleCertificateOrder = new CertificateOrder("exampleCertificateOrder", CertificateOrderArgs.builder()
 *             .name("example-cert-order")
 *             .resourceGroupName(example.name())
 *             .location("global")
 *             .distinguishedName("CN=example.com")
 *             .productType("Standard")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: example-resources
 *       location: West Europe
 *   exampleCertificateOrder:
 *     type: azure:appservice:CertificateOrder
 *     name: example
 *     properties:
 *       name: example-cert-order
 *       resourceGroupName: ${example.name}
 *       location: global
 *       distinguishedName: CN=example.com
 *       productType: Standard
 * ```
 * 
 * ## Import
 * App Service Certificate Orders can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:appservice/certificateOrder:CertificateOrder example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.CertificateRegistration/certificateOrders/certificateorder1
 * ```
 * @property autoRenew true if the certificate should be automatically renewed when it expires; otherwise, false. Defaults to `true`.
 * @property csr Last CSR that was created for this order.
 * @property distinguishedName The Distinguished Name for the App Service Certificate Order.
 * > **NOTE:** Either `csr` or `distinguished_name` must be set - but not both.
 * @property keySize Certificate key size. Defaults to `2048`.
 * @property location Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Currently the only valid value is `global`.
 * @property name Specifies the name of the certificate. Changing this forces a new resource to be created.
 * @property productType Certificate product type, such as `Standard` or `WildCard`. Defaults to `Standard`.
 * @property resourceGroupName The name of the resource group in which to create the certificate. Changing this forces a new resource to be created.
 * @property tags (Optional) A mapping of tags to assign to the resource.
 * @property validityInYears Duration in years (must be between `1` and `3`). Defaults to `1`.
 */
public data class CertificateOrderArgs(
    public val autoRenew: Output? = null,
    public val csr: Output? = null,
    public val distinguishedName: Output? = null,
    public val keySize: Output? = null,
    public val location: Output? = null,
    public val name: Output? = null,
    public val productType: Output? = null,
    public val resourceGroupName: Output? = null,
    public val tags: Output>? = null,
    public val validityInYears: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.appservice.CertificateOrderArgs =
        com.pulumi.azure.appservice.CertificateOrderArgs.builder()
            .autoRenew(autoRenew?.applyValue({ args0 -> args0 }))
            .csr(csr?.applyValue({ args0 -> args0 }))
            .distinguishedName(distinguishedName?.applyValue({ args0 -> args0 }))
            .keySize(keySize?.applyValue({ args0 -> args0 }))
            .location(location?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .productType(productType?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .validityInYears(validityInYears?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [CertificateOrderArgs].
 */
@PulumiTagMarker
public class CertificateOrderArgsBuilder internal constructor() {
    private var autoRenew: Output? = null

    private var csr: Output? = null

    private var distinguishedName: Output? = null

    private var keySize: Output? = null

    private var location: Output? = null

    private var name: Output? = null

    private var productType: Output? = null

    private var resourceGroupName: Output? = null

    private var tags: Output>? = null

    private var validityInYears: Output? = null

    /**
     * @param value true if the certificate should be automatically renewed when it expires; otherwise, false. Defaults to `true`.
     */
    @JvmName("nceuajbhwubhsukb")
    public suspend fun autoRenew(`value`: Output) {
        this.autoRenew = value
    }

    /**
     * @param value Last CSR that was created for this order.
     */
    @JvmName("neadtajfxrtfaiau")
    public suspend fun csr(`value`: Output) {
        this.csr = value
    }

    /**
     * @param value The Distinguished Name for the App Service Certificate Order.
     * > **NOTE:** Either `csr` or `distinguished_name` must be set - but not both.
     */
    @JvmName("biypodqbqmcwbouy")
    public suspend fun distinguishedName(`value`: Output) {
        this.distinguishedName = value
    }

    /**
     * @param value Certificate key size. Defaults to `2048`.
     */
    @JvmName("abhelwiwkagvyryj")
    public suspend fun keySize(`value`: Output) {
        this.keySize = value
    }

    /**
     * @param value Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Currently the only valid value is `global`.
     */
    @JvmName("uykqxkykchfsahxl")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value Specifies the name of the certificate. Changing this forces a new resource to be created.
     */
    @JvmName("kwaxouvpqomdeyuh")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Certificate product type, such as `Standard` or `WildCard`. Defaults to `Standard`.
     */
    @JvmName("efbcpgqwwgcwvuln")
    public suspend fun productType(`value`: Output) {
        this.productType = value
    }

    /**
     * @param value The name of the resource group in which to create the certificate. Changing this forces a new resource to be created.
     */
    @JvmName("kaandcqnjbshohhp")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

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

    /**
     * @param value Duration in years (must be between `1` and `3`). Defaults to `1`.
     */
    @JvmName("cxbaivsbvknewosp")
    public suspend fun validityInYears(`value`: Output) {
        this.validityInYears = value
    }

    /**
     * @param value true if the certificate should be automatically renewed when it expires; otherwise, false. Defaults to `true`.
     */
    @JvmName("oxrhcyehvebldlos")
    public suspend fun autoRenew(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.autoRenew = mapped
    }

    /**
     * @param value Last CSR that was created for this order.
     */
    @JvmName("wpsacwxwokopyyxc")
    public suspend fun csr(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.csr = mapped
    }

    /**
     * @param value The Distinguished Name for the App Service Certificate Order.
     * > **NOTE:** Either `csr` or `distinguished_name` must be set - but not both.
     */
    @JvmName("lpxgwdvvxqoghhye")
    public suspend fun distinguishedName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.distinguishedName = mapped
    }

    /**
     * @param value Certificate key size. Defaults to `2048`.
     */
    @JvmName("leowxgdmvhcrvxtq")
    public suspend fun keySize(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.keySize = mapped
    }

    /**
     * @param value Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Currently the only valid value is `global`.
     */
    @JvmName("hkedgsjtyrveyauu")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

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

    /**
     * @param value Certificate product type, such as `Standard` or `WildCard`. Defaults to `Standard`.
     */
    @JvmName("fcjanjlmbblkcdim")
    public suspend fun productType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.productType = mapped
    }

    /**
     * @param value The name of the resource group in which to create the certificate. Changing this forces a new resource to be created.
     */
    @JvmName("uwutivqqbxtqcfcu")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

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

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

    /**
     * @param value Duration in years (must be between `1` and `3`). Defaults to `1`.
     */
    @JvmName("mdmwcupdvyjyqcdd")
    public suspend fun validityInYears(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.validityInYears = mapped
    }

    internal fun build(): CertificateOrderArgs = CertificateOrderArgs(
        autoRenew = autoRenew,
        csr = csr,
        distinguishedName = distinguishedName,
        keySize = keySize,
        location = location,
        name = name,
        productType = productType,
        resourceGroupName = resourceGroupName,
        tags = tags,
        validityInYears = validityInYears,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy