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

com.pulumi.azure.keyvault.kotlin.CertificateIssuerArgs.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.14.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.keyvault.kotlin

import com.pulumi.azure.keyvault.CertificateIssuerArgs.builder
import com.pulumi.azure.keyvault.kotlin.inputs.CertificateIssuerAdminArgs
import com.pulumi.azure.keyvault.kotlin.inputs.CertificateIssuerAdminArgsBuilder
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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Manages a Key Vault Certificate Issuer.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const current = azure.core.getClientConfig({});
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "example-resources",
 *     location: "West Europe",
 * });
 * const exampleKeyVault = new azure.keyvault.KeyVault("example", {
 *     name: "examplekeyvault",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     skuName: "standard",
 *     tenantId: current.then(current => current.tenantId),
 * });
 * const exampleCertificateIssuer = new azure.keyvault.CertificateIssuer("example", {
 *     name: "example-issuer",
 *     orgId: "ExampleOrgName",
 *     keyVaultId: exampleKeyVault.id,
 *     providerName: "DigiCert",
 *     accountId: "0000",
 *     password: "example-password",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * current = azure.core.get_client_config()
 * example = azure.core.ResourceGroup("example",
 *     name="example-resources",
 *     location="West Europe")
 * example_key_vault = azure.keyvault.KeyVault("example",
 *     name="examplekeyvault",
 *     location=example.location,
 *     resource_group_name=example.name,
 *     sku_name="standard",
 *     tenant_id=current.tenant_id)
 * example_certificate_issuer = azure.keyvault.CertificateIssuer("example",
 *     name="example-issuer",
 *     org_id="ExampleOrgName",
 *     key_vault_id=example_key_vault.id,
 *     provider_name="DigiCert",
 *     account_id="0000",
 *     password="example-password")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Azure = Pulumi.Azure;
 * return await Deployment.RunAsync(() =>
 * {
 *     var current = Azure.Core.GetClientConfig.Invoke();
 *     var example = new Azure.Core.ResourceGroup("example", new()
 *     {
 *         Name = "example-resources",
 *         Location = "West Europe",
 *     });
 *     var exampleKeyVault = new Azure.KeyVault.KeyVault("example", new()
 *     {
 *         Name = "examplekeyvault",
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *         SkuName = "standard",
 *         TenantId = current.Apply(getClientConfigResult => getClientConfigResult.TenantId),
 *     });
 *     var exampleCertificateIssuer = new Azure.KeyVault.CertificateIssuer("example", new()
 *     {
 *         Name = "example-issuer",
 *         OrgId = "ExampleOrgName",
 *         KeyVaultId = exampleKeyVault.Id,
 *         ProviderName = "DigiCert",
 *         AccountId = "0000",
 *         Password = "example-password",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/keyvault"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		current, err := core.GetClientConfig(ctx, nil, nil)
 * 		if err != nil {
 * 			return err
 * 		}
 * 		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
 * 			Name:     pulumi.String("example-resources"),
 * 			Location: pulumi.String("West Europe"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleKeyVault, err := keyvault.NewKeyVault(ctx, "example", &keyvault.KeyVaultArgs{
 * 			Name:              pulumi.String("examplekeyvault"),
 * 			Location:          example.Location,
 * 			ResourceGroupName: example.Name,
 * 			SkuName:           pulumi.String("standard"),
 * 			TenantId:          pulumi.String(current.TenantId),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = keyvault.NewCertificateIssuer(ctx, "example", &keyvault.CertificateIssuerArgs{
 * 			Name:         pulumi.String("example-issuer"),
 * 			OrgId:        pulumi.String("ExampleOrgName"),
 * 			KeyVaultId:   exampleKeyVault.ID(),
 * 			ProviderName: pulumi.String("DigiCert"),
 * 			AccountId:    pulumi.String("0000"),
 * 			Password:     pulumi.String("example-password"),
 * 		})
 * 		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.CoreFunctions;
 * import com.pulumi.azure.core.ResourceGroup;
 * import com.pulumi.azure.core.ResourceGroupArgs;
 * import com.pulumi.azure.keyvault.KeyVault;
 * import com.pulumi.azure.keyvault.KeyVaultArgs;
 * import com.pulumi.azure.keyvault.CertificateIssuer;
 * import com.pulumi.azure.keyvault.CertificateIssuerArgs;
 * 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) {
 *         final var current = CoreFunctions.getClientConfig();
 *         var example = new ResourceGroup("example", ResourceGroupArgs.builder()
 *             .name("example-resources")
 *             .location("West Europe")
 *             .build());
 *         var exampleKeyVault = new KeyVault("exampleKeyVault", KeyVaultArgs.builder()
 *             .name("examplekeyvault")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .skuName("standard")
 *             .tenantId(current.applyValue(getClientConfigResult -> getClientConfigResult.tenantId()))
 *             .build());
 *         var exampleCertificateIssuer = new CertificateIssuer("exampleCertificateIssuer", CertificateIssuerArgs.builder()
 *             .name("example-issuer")
 *             .orgId("ExampleOrgName")
 *             .keyVaultId(exampleKeyVault.id())
 *             .providerName("DigiCert")
 *             .accountId("0000")
 *             .password("example-password")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: example-resources
 *       location: West Europe
 *   exampleKeyVault:
 *     type: azure:keyvault:KeyVault
 *     name: example
 *     properties:
 *       name: examplekeyvault
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *       skuName: standard
 *       tenantId: ${current.tenantId}
 *   exampleCertificateIssuer:
 *     type: azure:keyvault:CertificateIssuer
 *     name: example
 *     properties:
 *       name: example-issuer
 *       orgId: ExampleOrgName
 *       keyVaultId: ${exampleKeyVault.id}
 *       providerName: DigiCert
 *       accountId: '0000'
 *       password: example-password
 * variables:
 *   current:
 *     fn::invoke:
 *       Function: azure:core:getClientConfig
 *       Arguments: {}
 * ```
 * 
 * ## Import
 * Key Vault Certificate Issuers can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:keyvault/certificateIssuer:CertificateIssuer example "https://key-vault-name.vault.azure.net/certificates/issuers/example"
 * ```
 * @property accountId The account number with the third-party Certificate Issuer.
 * @property admins One or more `admin` blocks as defined below.
 * @property keyVaultId The ID of the Key Vault in which to create the Certificate Issuer. Changing this forces a new resource to be created.
 * @property name The name which should be used for this Key Vault Certificate Issuer. Changing this forces a new Key Vault Certificate Issuer to be created.
 * @property orgId The ID of the organization as provided to the issuer.
 * @property password The password associated with the account and organization ID at the third-party Certificate Issuer. If not specified, will not overwrite any previous value.
 * @property providerName The name of the third-party Certificate Issuer. Possible values are: `DigiCert`, `GlobalSign`, `OneCertV2-PrivateCA`, `OneCertV2-PublicCA` and `SslAdminV2`.
 */
public data class CertificateIssuerArgs(
    public val accountId: Output? = null,
    public val admins: Output>? = null,
    public val keyVaultId: Output? = null,
    public val name: Output? = null,
    public val orgId: Output? = null,
    public val password: Output? = null,
    public val providerName: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.keyvault.CertificateIssuerArgs =
        com.pulumi.azure.keyvault.CertificateIssuerArgs.builder()
            .accountId(accountId?.applyValue({ args0 -> args0 }))
            .admins(admins?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .keyVaultId(keyVaultId?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .orgId(orgId?.applyValue({ args0 -> args0 }))
            .password(password?.applyValue({ args0 -> args0 }))
            .providerName(providerName?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [CertificateIssuerArgs].
 */
@PulumiTagMarker
public class CertificateIssuerArgsBuilder internal constructor() {
    private var accountId: Output? = null

    private var admins: Output>? = null

    private var keyVaultId: Output? = null

    private var name: Output? = null

    private var orgId: Output? = null

    private var password: Output? = null

    private var providerName: Output? = null

    /**
     * @param value The account number with the third-party Certificate Issuer.
     */
    @JvmName("yrvcwbsojeuggtoc")
    public suspend fun accountId(`value`: Output) {
        this.accountId = value
    }

    /**
     * @param value One or more `admin` blocks as defined below.
     */
    @JvmName("gvummtkleiwhhssa")
    public suspend fun admins(`value`: Output>) {
        this.admins = value
    }

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

    /**
     * @param values One or more `admin` blocks as defined below.
     */
    @JvmName("mtoubbbhnuavxwdd")
    public suspend fun admins(values: List>) {
        this.admins = Output.all(values)
    }

    /**
     * @param value The ID of the Key Vault in which to create the Certificate Issuer. Changing this forces a new resource to be created.
     */
    @JvmName("mlaicbgsftupptqt")
    public suspend fun keyVaultId(`value`: Output) {
        this.keyVaultId = value
    }

    /**
     * @param value The name which should be used for this Key Vault Certificate Issuer. Changing this forces a new Key Vault Certificate Issuer to be created.
     */
    @JvmName("yvfrklldcqagfrtp")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The ID of the organization as provided to the issuer.
     */
    @JvmName("nrjoajlgflnndtpu")
    public suspend fun orgId(`value`: Output) {
        this.orgId = value
    }

    /**
     * @param value The password associated with the account and organization ID at the third-party Certificate Issuer. If not specified, will not overwrite any previous value.
     */
    @JvmName("mwapfokuygetbudq")
    public suspend fun password(`value`: Output) {
        this.password = value
    }

    /**
     * @param value The name of the third-party Certificate Issuer. Possible values are: `DigiCert`, `GlobalSign`, `OneCertV2-PrivateCA`, `OneCertV2-PublicCA` and `SslAdminV2`.
     */
    @JvmName("oaegelcxhanwixkq")
    public suspend fun providerName(`value`: Output) {
        this.providerName = value
    }

    /**
     * @param value The account number with the third-party Certificate Issuer.
     */
    @JvmName("ctoxicsquoqpakmg")
    public suspend fun accountId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.accountId = mapped
    }

    /**
     * @param value One or more `admin` blocks as defined below.
     */
    @JvmName("ejulqqmqhrdyrxkb")
    public suspend fun admins(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.admins = mapped
    }

    /**
     * @param argument One or more `admin` blocks as defined below.
     */
    @JvmName("pxaugjrshwgqsbfx")
    public suspend fun admins(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            CertificateIssuerAdminArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.admins = mapped
    }

    /**
     * @param argument One or more `admin` blocks as defined below.
     */
    @JvmName("llcmrbskydiswtoy")
    public suspend fun admins(vararg argument: suspend CertificateIssuerAdminArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            CertificateIssuerAdminArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.admins = mapped
    }

    /**
     * @param argument One or more `admin` blocks as defined below.
     */
    @JvmName("pjlwsgnitqkwbvpw")
    public suspend fun admins(argument: suspend CertificateIssuerAdminArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(CertificateIssuerAdminArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.admins = mapped
    }

    /**
     * @param values One or more `admin` blocks as defined below.
     */
    @JvmName("ydtuegplqavcppgl")
    public suspend fun admins(vararg values: CertificateIssuerAdminArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.admins = mapped
    }

    /**
     * @param value The ID of the Key Vault in which to create the Certificate Issuer. Changing this forces a new resource to be created.
     */
    @JvmName("imvbfbawfmlxdoxo")
    public suspend fun keyVaultId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.keyVaultId = mapped
    }

    /**
     * @param value The name which should be used for this Key Vault Certificate Issuer. Changing this forces a new Key Vault Certificate Issuer to be created.
     */
    @JvmName("vmnpymwhgnskjwnc")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The ID of the organization as provided to the issuer.
     */
    @JvmName("nhrtljlgjdkutlkt")
    public suspend fun orgId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.orgId = mapped
    }

    /**
     * @param value The password associated with the account and organization ID at the third-party Certificate Issuer. If not specified, will not overwrite any previous value.
     */
    @JvmName("ivaufvlqvvcuwrxd")
    public suspend fun password(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.password = mapped
    }

    /**
     * @param value The name of the third-party Certificate Issuer. Possible values are: `DigiCert`, `GlobalSign`, `OneCertV2-PrivateCA`, `OneCertV2-PublicCA` and `SslAdminV2`.
     */
    @JvmName("exwyanowfunnrkbs")
    public suspend fun providerName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.providerName = mapped
    }

    internal fun build(): CertificateIssuerArgs = CertificateIssuerArgs(
        accountId = accountId,
        admins = admins,
        keyVaultId = keyVaultId,
        name = name,
        orgId = orgId,
        password = password,
        providerName = providerName,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy