Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.azurenative.maps.kotlin.AccountArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.maps.kotlin
import com.pulumi.azurenative.maps.AccountArgs.builder
import com.pulumi.azurenative.maps.kotlin.enums.Kind
import com.pulumi.azurenative.maps.kotlin.inputs.MapsAccountPropertiesArgs
import com.pulumi.azurenative.maps.kotlin.inputs.MapsAccountPropertiesArgsBuilder
import com.pulumi.azurenative.maps.kotlin.inputs.SkuArgs
import com.pulumi.azurenative.maps.kotlin.inputs.SkuArgsBuilder
import com.pulumi.core.Either
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.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* An Azure resource which represents access to a suite of Maps REST APIs.
* Azure REST API version: 2021-02-01. Prior API version in Azure Native 1.x: 2018-05-01.
* Other available API versions: 2018-05-01, 2021-12-01-preview, 2023-06-01, 2023-08-01-preview, 2023-12-01-preview, 2024-01-01-preview.
* ## Example Usage
* ### Create Gen1 Account
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var account = new AzureNative.Maps.Account("account", new()
* {
* AccountName = "myMapsAccount",
* Kind = AzureNative.Maps.Kind.Gen1,
* Location = "global",
* Properties = new AzureNative.Maps.Inputs.MapsAccountPropertiesArgs
* {
* DisableLocalAuth = false,
* },
* ResourceGroupName = "myResourceGroup",
* Sku = new AzureNative.Maps.Inputs.SkuArgs
* {
* Name = AzureNative.Maps.Name.S0,
* },
* Tags =
* {
* { "test", "true" },
* },
* });
* });
* ```
* ```go
* package main
* import (
* maps "github.com/pulumi/pulumi-azure-native-sdk/maps/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := maps.NewAccount(ctx, "account", &maps.AccountArgs{
* AccountName: pulumi.String("myMapsAccount"),
* Kind: pulumi.String(maps.KindGen1),
* Location: pulumi.String("global"),
* Properties: &maps.MapsAccountPropertiesArgs{
* DisableLocalAuth: pulumi.Bool(false),
* },
* ResourceGroupName: pulumi.String("myResourceGroup"),
* Sku: &maps.SkuArgs{
* Name: pulumi.String(maps.NameS0),
* },
* Tags: pulumi.StringMap{
* "test": pulumi.String("true"),
* },
* })
* 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.maps.Account;
* import com.pulumi.azurenative.maps.AccountArgs;
* import com.pulumi.azurenative.maps.inputs.MapsAccountPropertiesArgs;
* import com.pulumi.azurenative.maps.inputs.SkuArgs;
* 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 account = new Account("account", AccountArgs.builder()
* .accountName("myMapsAccount")
* .kind("Gen1")
* .location("global")
* .properties(MapsAccountPropertiesArgs.builder()
* .disableLocalAuth(false)
* .build())
* .resourceGroupName("myResourceGroup")
* .sku(SkuArgs.builder()
* .name("S0")
* .build())
* .tags(Map.of("test", "true"))
* .build());
* }
* }
* ```
* ### Create Gen2 Account
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var account = new AzureNative.Maps.Account("account", new()
* {
* AccountName = "myMapsAccount",
* Kind = AzureNative.Maps.Kind.Gen2,
* Location = "global",
* Properties = new AzureNative.Maps.Inputs.MapsAccountPropertiesArgs
* {
* DisableLocalAuth = true,
* },
* ResourceGroupName = "myResourceGroup",
* Sku = new AzureNative.Maps.Inputs.SkuArgs
* {
* Name = AzureNative.Maps.Name.G2,
* },
* Tags =
* {
* { "test", "true" },
* },
* });
* });
* ```
* ```go
* package main
* import (
* maps "github.com/pulumi/pulumi-azure-native-sdk/maps/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := maps.NewAccount(ctx, "account", &maps.AccountArgs{
* AccountName: pulumi.String("myMapsAccount"),
* Kind: pulumi.String(maps.KindGen2),
* Location: pulumi.String("global"),
* Properties: &maps.MapsAccountPropertiesArgs{
* DisableLocalAuth: pulumi.Bool(true),
* },
* ResourceGroupName: pulumi.String("myResourceGroup"),
* Sku: &maps.SkuArgs{
* Name: pulumi.String(maps.NameG2),
* },
* Tags: pulumi.StringMap{
* "test": pulumi.String("true"),
* },
* })
* 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.maps.Account;
* import com.pulumi.azurenative.maps.AccountArgs;
* import com.pulumi.azurenative.maps.inputs.MapsAccountPropertiesArgs;
* import com.pulumi.azurenative.maps.inputs.SkuArgs;
* 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 account = new Account("account", AccountArgs.builder()
* .accountName("myMapsAccount")
* .kind("Gen2")
* .location("global")
* .properties(MapsAccountPropertiesArgs.builder()
* .disableLocalAuth(true)
* .build())
* .resourceGroupName("myResourceGroup")
* .sku(SkuArgs.builder()
* .name("G2")
* .build())
* .tags(Map.of("test", "true"))
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:maps:Account myMapsAccount /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Maps/accounts/{accountName}
* ```
* @property accountName The name of the Maps Account.
* @property kind Get or Set Kind property.
* @property location The geo-location where the resource lives
* @property properties The map account properties.
* @property resourceGroupName The name of the resource group. The name is case insensitive.
* @property sku The SKU of this account.
* @property tags Resource tags.
*/
public data class AccountArgs(
public val accountName: Output? = null,
public val kind: Output>? = null,
public val location: Output? = null,
public val properties: Output? = null,
public val resourceGroupName: Output? = null,
public val sku: Output? = null,
public val tags: Output>? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.maps.AccountArgs =
com.pulumi.azurenative.maps.AccountArgs.builder()
.accountName(accountName?.applyValue({ args0 -> args0 }))
.kind(
kind?.applyValue({ args0 ->
args0.transform({ args0 -> args0 }, { args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.location(location?.applyValue({ args0 -> args0 }))
.properties(properties?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.sku(sku?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.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 accountName: Output? = null
private var kind: Output>? = null
private var location: Output? = null
private var properties: Output? = null
private var resourceGroupName: Output? = null
private var sku: Output? = null
private var tags: Output>? = null
/**
* @param value The name of the Maps Account.
*/
@JvmName("ukavrtvjfkewhahy")
public suspend fun accountName(`value`: Output) {
this.accountName = value
}
/**
* @param value Get or Set Kind property.
*/
@JvmName("xykhcvwcufgyllmo")
public suspend fun kind(`value`: Output>) {
this.kind = value
}
/**
* @param value The geo-location where the resource lives
*/
@JvmName("icaysxkukpnpobbg")
public suspend fun location(`value`: Output) {
this.location = value
}
/**
* @param value The map account properties.
*/
@JvmName("erycqfvdvrvidpma")
public suspend fun properties(`value`: Output) {
this.properties = value
}
/**
* @param value The name of the resource group. The name is case insensitive.
*/
@JvmName("squlpcnyqirbetfb")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value The SKU of this account.
*/
@JvmName("donyrjiieuygsmnx")
public suspend fun sku(`value`: Output) {
this.sku = value
}
/**
* @param value Resource tags.
*/
@JvmName("bqeqmapecnbbuuea")
public suspend fun tags(`value`: Output>) {
this.tags = value
}
/**
* @param value The name of the Maps Account.
*/
@JvmName("dfowovqtsklrnxhi")
public suspend fun accountName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.accountName = mapped
}
/**
* @param value Get or Set Kind property.
*/
@JvmName("cddwumjqxwsnjorl")
public suspend fun kind(`value`: Either?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.kind = mapped
}
/**
* @param value Get or Set Kind property.
*/
@JvmName("vxduggxyptdtwpbf")
public fun kind(`value`: String) {
val toBeMapped = Either.ofLeft(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.kind = mapped
}
/**
* @param value Get or Set Kind property.
*/
@JvmName("pspxifyarvakganh")
public fun kind(`value`: Kind) {
val toBeMapped = Either.ofRight(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.kind = mapped
}
/**
* @param value The geo-location where the resource lives
*/
@JvmName("nnkcucxhvjtkgyhs")
public suspend fun location(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.location = mapped
}
/**
* @param value The map account properties.
*/
@JvmName("ikbaewlsyvknpibb")
public suspend fun properties(`value`: MapsAccountPropertiesArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.properties = mapped
}
/**
* @param argument The map account properties.
*/
@JvmName("bofdgvritjabdfhk")
public suspend fun properties(argument: suspend MapsAccountPropertiesArgsBuilder.() -> Unit) {
val toBeMapped = MapsAccountPropertiesArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.properties = mapped
}
/**
* @param value The name of the resource group. The name is case insensitive.
*/
@JvmName("htcgqofgqqokepgp")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value The SKU of this account.
*/
@JvmName("smajupetecnycjpp")
public suspend fun sku(`value`: SkuArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.sku = mapped
}
/**
* @param argument The SKU of this account.
*/
@JvmName("gkoyelmnekayqqdx")
public suspend fun sku(argument: suspend SkuArgsBuilder.() -> Unit) {
val toBeMapped = SkuArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.sku = mapped
}
/**
* @param value Resource tags.
*/
@JvmName("huvmqbfbkkxmwbyj")
public suspend fun tags(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param values Resource tags.
*/
@JvmName("vmlhfojvwwmjqmdq")
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(
accountName = accountName,
kind = kind,
location = location,
properties = properties,
resourceGroupName = resourceGroupName,
sku = sku,
tags = tags,
)
}