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

com.pulumi.azure.maps.kotlin.AccountArgs.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.maps.kotlin

import com.pulumi.azure.maps.AccountArgs.builder
import com.pulumi.azure.maps.kotlin.inputs.AccountCorsArgs
import com.pulumi.azure.maps.kotlin.inputs.AccountCorsArgsBuilder
import com.pulumi.azure.maps.kotlin.inputs.AccountDataStoreArgs
import com.pulumi.azure.maps.kotlin.inputs.AccountDataStoreArgsBuilder
import com.pulumi.azure.maps.kotlin.inputs.AccountIdentityArgs
import com.pulumi.azure.maps.kotlin.inputs.AccountIdentityArgsBuilder
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.Boolean
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Manages an Azure Maps Account.
 * ## 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 exampleAccount = new azure.maps.Account("example", {
 *     name: "example-maps-account",
 *     resourceGroupName: example.name,
 *     skuName: "S1",
 *     localAuthenticationEnabled: true,
 *     tags: {
 *         environment: "Test",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="example-resources",
 *     location="West Europe")
 * example_account = azure.maps.Account("example",
 *     name="example-maps-account",
 *     resource_group_name=example.name,
 *     sku_name="S1",
 *     local_authentication_enabled=True,
 *     tags={
 *         "environment": "Test",
 *     })
 * ```
 * ```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 exampleAccount = new Azure.Maps.Account("example", new()
 *     {
 *         Name = "example-maps-account",
 *         ResourceGroupName = example.Name,
 *         SkuName = "S1",
 *         LocalAuthenticationEnabled = true,
 *         Tags =
 *         {
 *             { "environment", "Test" },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/maps"
 * 	"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 = maps.NewAccount(ctx, "example", &maps.AccountArgs{
 * 			Name:                       pulumi.String("example-maps-account"),
 * 			ResourceGroupName:          example.Name,
 * 			SkuName:                    pulumi.String("S1"),
 * 			LocalAuthenticationEnabled: pulumi.Bool(true),
 * 			Tags: pulumi.StringMap{
 * 				"environment": pulumi.String("Test"),
 * 			},
 * 		})
 * 		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.maps.Account;
 * import com.pulumi.azure.maps.AccountArgs;
 * 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 exampleAccount = new Account("exampleAccount", AccountArgs.builder()
 *             .name("example-maps-account")
 *             .resourceGroupName(example.name())
 *             .skuName("S1")
 *             .localAuthenticationEnabled(true)
 *             .tags(Map.of("environment", "Test"))
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: example-resources
 *       location: West Europe
 *   exampleAccount:
 *     type: azure:maps:Account
 *     name: example
 *     properties:
 *       name: example-maps-account
 *       resourceGroupName: ${example.name}
 *       skuName: S1
 *       localAuthenticationEnabled: true
 *       tags:
 *         environment: Test
 * ```
 * 
 * ## Import
 * A Maps Account can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:maps/account:Account example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Maps/accounts/my-maps-account
 * ```
 * @property cors A `cors` block as defined below
 * @property dataStores One or more `data_store` blocks as defined below.
 * @property identity An `identity` block as defined below.
 * @property localAuthenticationEnabled Is local authentication enabled for this Azure Maps Account? When `false`, all authentication to the Azure Maps data-plane REST API is disabled, except Azure AD authentication. Defaults to `true`.
 * @property location The Location in which the Azure Maps Account should be provisioned. Changing this forces a new resource to be created. Defaults to `global`.
 * @property name The name of the Azure Maps Account. Changing this forces a new resource to be created.
 * @property resourceGroupName The name of the Resource Group in which the Azure Maps Account should exist. Changing this forces a new resource to be created.
 * @property skuName The SKU of the Azure Maps Account. Possible values are `S0`, `S1` and `G2`. Changing this forces a new resource to be created.
 * > **Note:** Gen1 SKUs (`S0` and `S1`) are deprecated and can no longer be used for new deployments, which should instead use a Gen2 SKU (`G2`) - more information can be found [in the Azure documentation](https://learn.microsoft.com/azure/azure-maps/how-to-manage-pricing-tier).
 * @property tags A mapping of tags to assign to the Azure Maps Account.
 */
public data class AccountArgs(
    public val cors: Output? = null,
    public val dataStores: Output>? = null,
    public val identity: Output? = null,
    public val localAuthenticationEnabled: Output? = null,
    public val location: Output? = null,
    public val name: Output? = null,
    public val resourceGroupName: Output? = null,
    public val skuName: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.maps.AccountArgs =
        com.pulumi.azure.maps.AccountArgs.builder()
            .cors(cors?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .dataStores(
                dataStores?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .identity(identity?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .localAuthenticationEnabled(localAuthenticationEnabled?.applyValue({ args0 -> args0 }))
            .location(location?.applyValue({ args0 -> args0 }))
            .name(name?.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 [AccountArgs].
 */
@PulumiTagMarker
public class AccountArgsBuilder internal constructor() {
    private var cors: Output? = null

    private var dataStores: Output>? = null

    private var identity: Output? = null

    private var localAuthenticationEnabled: Output? = null

    private var location: Output? = null

    private var name: Output? = null

    private var resourceGroupName: Output? = null

    private var skuName: Output? = null

    private var tags: Output>? = null

    /**
     * @param value A `cors` block as defined below
     */
    @JvmName("gvjoesqlexdamyii")
    public suspend fun cors(`value`: Output) {
        this.cors = value
    }

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

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

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

    /**
     * @param value An `identity` block as defined below.
     */
    @JvmName("vewfmngpjujedjth")
    public suspend fun identity(`value`: Output) {
        this.identity = value
    }

    /**
     * @param value Is local authentication enabled for this Azure Maps Account? When `false`, all authentication to the Azure Maps data-plane REST API is disabled, except Azure AD authentication. Defaults to `true`.
     */
    @JvmName("wkbynmykppilqgtk")
    public suspend fun localAuthenticationEnabled(`value`: Output) {
        this.localAuthenticationEnabled = value
    }

    /**
     * @param value The Location in which the Azure Maps Account should be provisioned. Changing this forces a new resource to be created. Defaults to `global`.
     */
    @JvmName("cfmlwllhafmgbjya")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value The name of the Azure Maps Account. Changing this forces a new resource to be created.
     */
    @JvmName("laaecavujkwevhcy")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The name of the Resource Group in which the Azure Maps Account should exist. Changing this forces a new resource to be created.
     */
    @JvmName("eyasylserqgeeyil")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value The SKU of the Azure Maps Account. Possible values are `S0`, `S1` and `G2`. Changing this forces a new resource to be created.
     * > **Note:** Gen1 SKUs (`S0` and `S1`) are deprecated and can no longer be used for new deployments, which should instead use a Gen2 SKU (`G2`) - more information can be found [in the Azure documentation](https://learn.microsoft.com/azure/azure-maps/how-to-manage-pricing-tier).
     */
    @JvmName("tvybpddcwicftmfr")
    public suspend fun skuName(`value`: Output) {
        this.skuName = value
    }

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

    /**
     * @param value A `cors` block as defined below
     */
    @JvmName("ilwgnpfojauyfypk")
    public suspend fun cors(`value`: AccountCorsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.cors = mapped
    }

    /**
     * @param argument A `cors` block as defined below
     */
    @JvmName("nouvooxvcddfvwlr")
    public suspend fun cors(argument: suspend AccountCorsArgsBuilder.() -> Unit) {
        val toBeMapped = AccountCorsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.cors = mapped
    }

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

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

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

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

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

    /**
     * @param value An `identity` block as defined below.
     */
    @JvmName("kyntllbjmfseisfv")
    public suspend fun identity(`value`: AccountIdentityArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.identity = mapped
    }

    /**
     * @param argument An `identity` block as defined below.
     */
    @JvmName("syxnvsckgflvklyg")
    public suspend fun identity(argument: suspend AccountIdentityArgsBuilder.() -> Unit) {
        val toBeMapped = AccountIdentityArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.identity = mapped
    }

    /**
     * @param value Is local authentication enabled for this Azure Maps Account? When `false`, all authentication to the Azure Maps data-plane REST API is disabled, except Azure AD authentication. Defaults to `true`.
     */
    @JvmName("batiljttyvwmithb")
    public suspend fun localAuthenticationEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.localAuthenticationEnabled = mapped
    }

    /**
     * @param value The Location in which the Azure Maps Account should be provisioned. Changing this forces a new resource to be created. Defaults to `global`.
     */
    @JvmName("ybbtlhytkrgwrsdp")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

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

    /**
     * @param value The name of the Resource Group in which the Azure Maps Account should exist. Changing this forces a new resource to be created.
     */
    @JvmName("vindncoryqnsncbw")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value The SKU of the Azure Maps Account. Possible values are `S0`, `S1` and `G2`. Changing this forces a new resource to be created.
     * > **Note:** Gen1 SKUs (`S0` and `S1`) are deprecated and can no longer be used for new deployments, which should instead use a Gen2 SKU (`G2`) - more information can be found [in the Azure documentation](https://learn.microsoft.com/azure/azure-maps/how-to-manage-pricing-tier).
     */
    @JvmName("evjtiivolkjdxouy")
    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 to assign to the Azure Maps Account.
     */
    @JvmName("hppsjvybhskvdcqb")
    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 to assign to the Azure Maps Account.
     */
    @JvmName("ydfdrogtgicaonsh")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): AccountArgs = AccountArgs(
        cors = cors,
        dataStores = dataStores,
        identity = identity,
        localAuthenticationEnabled = localAuthenticationEnabled,
        location = location,
        name = name,
        resourceGroupName = resourceGroupName,
        skuName = skuName,
        tags = tags,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy