Account Args
data class AccountArgs(val accountName: Output<String>? = null, val identity: Output<ManagedServiceIdentityArgs>? = null, val kind: Output<Either<String, Kind>>? = null, val location: Output<String>? = null, val properties: Output<MapsAccountPropertiesArgs>? = null, val resourceGroupName: Output<String>? = null, val sku: Output<SkuArgs>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<AccountArgs>
An Azure resource which represents access to a suite of Maps REST APIs. Uses Azure REST API version 2024-07-01-preview. In version 2.x of the Azure Native provider, it used API version 2021-02-01. Other available API versions: 2020-02-01-preview, 2021-02-01, 2021-07-01-preview, 2021-12-01-preview, 2023-06-01, 2023-08-01-preview, 2023-12-01-preview, 2024-01-01-preview. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native maps [ApiVersion]
. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.
Example Usage
Create Gen2 Account
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 = "eastus",
Properties = new AzureNative.Maps.Inputs.MapsAccountPropertiesArgs
{
Cors = new AzureNative.Maps.Inputs.CorsRulesArgs
{
CorsRules = new[]
{
new AzureNative.Maps.Inputs.CorsRuleArgs
{
AllowedOrigins = new[]
{
"http://www.contoso.com",
"http://www.fabrikam.com",
},
},
},
},
DisableLocalAuth = true,
Locations = new[]
{
new AzureNative.Maps.Inputs.MapsAccountPropertiesLocationsArgs
{
LocationName = "northeurope",
},
},
},
ResourceGroupName = "myResourceGroup",
Sku = new AzureNative.Maps.Inputs.SkuArgs
{
Name = AzureNative.Maps.Name.G2,
},
Tags =
{
{ "test", "true" },
},
});
});
Content copied to clipboard
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("eastus"),
Properties: &maps.MapsAccountPropertiesArgs{
Cors: &maps.CorsRulesArgs{
CorsRules: maps.CorsRuleArray{
&maps.CorsRuleArgs{
AllowedOrigins: pulumi.StringArray{
pulumi.String("http://www.contoso.com"),
pulumi.String("http://www.fabrikam.com"),
},
},
},
},
DisableLocalAuth: pulumi.Bool(true),
Locations: maps.MapsAccountPropertiesLocationsArray{
&maps.MapsAccountPropertiesLocationsArgs{
LocationName: pulumi.String("northeurope"),
},
},
},
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
})
}
Content copied to clipboard
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.CorsRulesArgs;
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("eastus")
.properties(MapsAccountPropertiesArgs.builder()
.cors(CorsRulesArgs.builder()
.corsRules(CorsRuleArgs.builder()
.allowedOrigins(
"http://www.contoso.com",
"http://www.fabrikam.com")
.build())
.build())
.disableLocalAuth(true)
.locations(MapsAccountPropertiesLocationsArgs.builder()
.locationName("northeurope")
.build())
.build())
.resourceGroupName("myResourceGroup")
.sku(SkuArgs.builder()
.name("G2")
.build())
.tags(Map.of("test", "true"))
.build());
}
}
Content copied to clipboard
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:maps:Account myMapsAccount /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Maps/accounts/{accountName}
Content copied to clipboard
Constructors
Link copied to clipboard
constructor(accountName: Output<String>? = null, identity: Output<ManagedServiceIdentityArgs>? = null, kind: Output<Either<String, Kind>>? = null, location: Output<String>? = null, properties: Output<MapsAccountPropertiesArgs>? = null, resourceGroupName: Output<String>? = null, sku: Output<SkuArgs>? = null, tags: Output<Map<String, String>>? = null)