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

com.pulumi.azure.aadb2c.kotlin.DirectoryArgs.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.aadb2c.kotlin

import com.pulumi.azure.aadb2c.DirectoryArgs.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 an AAD B2C Directory.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const example = new azure.aadb2c.Directory("example", {
 *     countryCode: "US",
 *     dataResidencyLocation: "United States",
 *     displayName: "example-b2c-tenant",
 *     domainName: "exampleb2ctenant.onmicrosoft.com",
 *     resourceGroupName: "example-rg",
 *     skuName: "PremiumP1",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.aadb2c.Directory("example",
 *     country_code="US",
 *     data_residency_location="United States",
 *     display_name="example-b2c-tenant",
 *     domain_name="exampleb2ctenant.onmicrosoft.com",
 *     resource_group_name="example-rg",
 *     sku_name="PremiumP1")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Azure = Pulumi.Azure;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Azure.AadB2C.Directory("example", new()
 *     {
 *         CountryCode = "US",
 *         DataResidencyLocation = "United States",
 *         DisplayName = "example-b2c-tenant",
 *         DomainName = "exampleb2ctenant.onmicrosoft.com",
 *         ResourceGroupName = "example-rg",
 *         SkuName = "PremiumP1",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/aadb2c"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := aadb2c.NewDirectory(ctx, "example", &aadb2c.DirectoryArgs{
 * 			CountryCode:           pulumi.String("US"),
 * 			DataResidencyLocation: pulumi.String("United States"),
 * 			DisplayName:           pulumi.String("example-b2c-tenant"),
 * 			DomainName:            pulumi.String("exampleb2ctenant.onmicrosoft.com"),
 * 			ResourceGroupName:     pulumi.String("example-rg"),
 * 			SkuName:               pulumi.String("PremiumP1"),
 * 		})
 * 		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.aadb2c.Directory;
 * import com.pulumi.azure.aadb2c.DirectoryArgs;
 * 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 Directory("example", DirectoryArgs.builder()
 *             .countryCode("US")
 *             .dataResidencyLocation("United States")
 *             .displayName("example-b2c-tenant")
 *             .domainName("exampleb2ctenant.onmicrosoft.com")
 *             .resourceGroupName("example-rg")
 *             .skuName("PremiumP1")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:aadb2c:Directory
 *     properties:
 *       countryCode: US
 *       dataResidencyLocation: United States
 *       displayName: example-b2c-tenant
 *       domainName: exampleb2ctenant.onmicrosoft.com
 *       resourceGroupName: example-rg
 *       skuName: PremiumP1
 * ```
 * 
 * ## Import
 * AAD B2C Directories can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:aadb2c/directory:Directory example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.AzureActiveDirectory/b2cDirectories/directory-name
 * ```
 * @property countryCode Country code of the B2C tenant. The `country_code` should be valid for the specified `data_residency_location`. See [official docs](https://aka.ms/B2CDataResidency) for valid country codes. Required when creating a new resource. Changing this forces a new AAD B2C Directory to be created.
 * @property dataResidencyLocation Location in which the B2C tenant is hosted and data resides. The `data_residency_location` should be valid for the specified `country_code`. See [official docs](https://aka.ms/B2CDataResidenc) for more information. Changing this forces a new AAD B2C Directory to be created. Possible values are `Asia Pacific`, `Australia`, `Europe`, `Global` and `United States`.
 * @property displayName The initial display name of the B2C tenant. Required when creating a new resource. Changing this forces a new AAD B2C Directory to be created.
 * @property domainName Domain name of the B2C tenant, including the `.onmicrosoft.com` suffix. Changing this forces a new AAD B2C Directory to be created.
 * @property resourceGroupName The name of the Resource Group where the AAD B2C Directory should exist. Changing this forces a new AAD B2C Directory to be created.
 * @property skuName Billing SKU for the B2C tenant. Must be one of: `PremiumP1` or `PremiumP2` (`Standard` is not supported). See [official docs](https://aka.ms/b2cBilling) for more information.
 * @property tags A mapping of tags which should be assigned to the AAD B2C Directory.
 */
public data class DirectoryArgs(
    public val countryCode: Output? = null,
    public val dataResidencyLocation: Output? = null,
    public val displayName: Output? = null,
    public val domainName: Output? = null,
    public val resourceGroupName: Output? = null,
    public val skuName: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.aadb2c.DirectoryArgs =
        com.pulumi.azure.aadb2c.DirectoryArgs.builder()
            .countryCode(countryCode?.applyValue({ args0 -> args0 }))
            .dataResidencyLocation(dataResidencyLocation?.applyValue({ args0 -> args0 }))
            .displayName(displayName?.applyValue({ args0 -> args0 }))
            .domainName(domainName?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .skuName(skuName?.applyValue({ args0 -> args0 }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [DirectoryArgs].
 */
@PulumiTagMarker
public class DirectoryArgsBuilder internal constructor() {
    private var countryCode: Output? = null

    private var dataResidencyLocation: Output? = null

    private var displayName: Output? = null

    private var domainName: Output? = null

    private var resourceGroupName: Output? = null

    private var skuName: Output? = null

    private var tags: Output>? = null

    /**
     * @param value Country code of the B2C tenant. The `country_code` should be valid for the specified `data_residency_location`. See [official docs](https://aka.ms/B2CDataResidency) for valid country codes. Required when creating a new resource. Changing this forces a new AAD B2C Directory to be created.
     */
    @JvmName("wngggitlxqepgxyp")
    public suspend fun countryCode(`value`: Output) {
        this.countryCode = value
    }

    /**
     * @param value Location in which the B2C tenant is hosted and data resides. The `data_residency_location` should be valid for the specified `country_code`. See [official docs](https://aka.ms/B2CDataResidenc) for more information. Changing this forces a new AAD B2C Directory to be created. Possible values are `Asia Pacific`, `Australia`, `Europe`, `Global` and `United States`.
     */
    @JvmName("jbyuhblhajfkoiri")
    public suspend fun dataResidencyLocation(`value`: Output) {
        this.dataResidencyLocation = value
    }

    /**
     * @param value The initial display name of the B2C tenant. Required when creating a new resource. Changing this forces a new AAD B2C Directory to be created.
     */
    @JvmName("wrpeycybtkrctaib")
    public suspend fun displayName(`value`: Output) {
        this.displayName = value
    }

    /**
     * @param value Domain name of the B2C tenant, including the `.onmicrosoft.com` suffix. Changing this forces a new AAD B2C Directory to be created.
     */
    @JvmName("gucevpwntweueweu")
    public suspend fun domainName(`value`: Output) {
        this.domainName = value
    }

    /**
     * @param value The name of the Resource Group where the AAD B2C Directory should exist. Changing this forces a new AAD B2C Directory to be created.
     */
    @JvmName("ndbtycjhttodbogc")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value Billing SKU for the B2C tenant. Must be one of: `PremiumP1` or `PremiumP2` (`Standard` is not supported). See [official docs](https://aka.ms/b2cBilling) for more information.
     */
    @JvmName("ubijotofknnpujes")
    public suspend fun skuName(`value`: Output) {
        this.skuName = value
    }

    /**
     * @param value A mapping of tags which should be assigned to the AAD B2C Directory.
     */
    @JvmName("xfpgumflnxukxuef")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value Country code of the B2C tenant. The `country_code` should be valid for the specified `data_residency_location`. See [official docs](https://aka.ms/B2CDataResidency) for valid country codes. Required when creating a new resource. Changing this forces a new AAD B2C Directory to be created.
     */
    @JvmName("ppewcaaxgxmcqvot")
    public suspend fun countryCode(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.countryCode = mapped
    }

    /**
     * @param value Location in which the B2C tenant is hosted and data resides. The `data_residency_location` should be valid for the specified `country_code`. See [official docs](https://aka.ms/B2CDataResidenc) for more information. Changing this forces a new AAD B2C Directory to be created. Possible values are `Asia Pacific`, `Australia`, `Europe`, `Global` and `United States`.
     */
    @JvmName("ssgdfacmqnuadoqt")
    public suspend fun dataResidencyLocation(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dataResidencyLocation = mapped
    }

    /**
     * @param value The initial display name of the B2C tenant. Required when creating a new resource. Changing this forces a new AAD B2C Directory to be created.
     */
    @JvmName("txlimxpunownqewq")
    public suspend fun displayName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.displayName = mapped
    }

    /**
     * @param value Domain name of the B2C tenant, including the `.onmicrosoft.com` suffix. Changing this forces a new AAD B2C Directory to be created.
     */
    @JvmName("ndwposhawhcerimj")
    public suspend fun domainName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.domainName = mapped
    }

    /**
     * @param value The name of the Resource Group where the AAD B2C Directory should exist. Changing this forces a new AAD B2C Directory to be created.
     */
    @JvmName("bvdkpqqcvilndwlw")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value Billing SKU for the B2C tenant. Must be one of: `PremiumP1` or `PremiumP2` (`Standard` is not supported). See [official docs](https://aka.ms/b2cBilling) for more information.
     */
    @JvmName("nvysrxhmevcenxjn")
    public suspend fun skuName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.skuName = mapped
    }

    /**
     * @param value A mapping of tags which should be assigned to the AAD B2C Directory.
     */
    @JvmName("kfwbtytepceuupef")
    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 which should be assigned to the AAD B2C Directory.
     */
    @JvmName("hvqieeqauoxufthy")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): DirectoryArgs = DirectoryArgs(
        countryCode = countryCode,
        dataResidencyLocation = dataResidencyLocation,
        displayName = displayName,
        domainName = domainName,
        resourceGroupName = resourceGroupName,
        skuName = skuName,
        tags = tags,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy