We recommend using Azure Native.
Azure v6.21.0 published on Friday, Mar 7, 2025 by Pulumi
azure.maps.getAccount
Explore with Pulumi AI
Use this data source to access information about an existing Azure Maps Account.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.maps.getAccount({
    name: "production",
    resourceGroupName: "maps",
});
export const mapsAccountId = example.then(example => example.id);
import pulumi
import pulumi_azure as azure
example = azure.maps.get_account(name="production",
    resource_group_name="maps")
pulumi.export("mapsAccountId", example.id)
package main
import (
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/maps"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := maps.LookupAccount(ctx, &maps.LookupAccountArgs{
			Name:              "production",
			ResourceGroupName: "maps",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("mapsAccountId", example.Id)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() => 
{
    var example = Azure.Maps.GetAccount.Invoke(new()
    {
        Name = "production",
        ResourceGroupName = "maps",
    });
    return new Dictionary<string, object?>
    {
        ["mapsAccountId"] = example.Apply(getAccountResult => getAccountResult.Id),
    };
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.maps.MapsFunctions;
import com.pulumi.azure.maps.inputs.GetAccountArgs;
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 example = MapsFunctions.getAccount(GetAccountArgs.builder()
            .name("production")
            .resourceGroupName("maps")
            .build());
        ctx.export("mapsAccountId", example.applyValue(getAccountResult -> getAccountResult.id()));
    }
}
variables:
  example:
    fn::invoke:
      function: azure:maps:getAccount
      arguments:
        name: production
        resourceGroupName: maps
outputs:
  mapsAccountId: ${example.id}
Using getAccount
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getAccount(args: GetAccountArgs, opts?: InvokeOptions): Promise<GetAccountResult>
function getAccountOutput(args: GetAccountOutputArgs, opts?: InvokeOptions): Output<GetAccountResult>def get_account(name: Optional[str] = None,
                resource_group_name: Optional[str] = None,
                tags: Optional[Mapping[str, str]] = None,
                opts: Optional[InvokeOptions] = None) -> GetAccountResult
def get_account_output(name: Optional[pulumi.Input[str]] = None,
                resource_group_name: Optional[pulumi.Input[str]] = None,
                tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                opts: Optional[InvokeOptions] = None) -> Output[GetAccountResult]func LookupAccount(ctx *Context, args *LookupAccountArgs, opts ...InvokeOption) (*LookupAccountResult, error)
func LookupAccountOutput(ctx *Context, args *LookupAccountOutputArgs, opts ...InvokeOption) LookupAccountResultOutput> Note: This function is named LookupAccount in the Go SDK.
public static class GetAccount 
{
    public static Task<GetAccountResult> InvokeAsync(GetAccountArgs args, InvokeOptions? opts = null)
    public static Output<GetAccountResult> Invoke(GetAccountInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetAccountResult> getAccount(GetAccountArgs args, InvokeOptions options)
public static Output<GetAccountResult> getAccount(GetAccountArgs args, InvokeOptions options)
fn::invoke:
  function: azure:maps/getAccount:getAccount
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Name string
- Specifies the name of the Maps Account.
- ResourceGroup stringName 
- Specifies the name of the Resource Group in which the Maps Account is located.
- Dictionary<string, string>
- Name string
- Specifies the name of the Maps Account.
- ResourceGroup stringName 
- Specifies the name of the Resource Group in which the Maps Account is located.
- map[string]string
- name String
- Specifies the name of the Maps Account.
- resourceGroup StringName 
- Specifies the name of the Resource Group in which the Maps Account is located.
- Map<String,String>
- name string
- Specifies the name of the Maps Account.
- resourceGroup stringName 
- Specifies the name of the Resource Group in which the Maps Account is located.
- {[key: string]: string}
- name str
- Specifies the name of the Maps Account.
- resource_group_ strname 
- Specifies the name of the Resource Group in which the Maps Account is located.
- Mapping[str, str]
- name String
- Specifies the name of the Maps Account.
- resourceGroup StringName 
- Specifies the name of the Resource Group in which the Maps Account is located.
- Map<String>
getAccount Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- PrimaryAccess stringKey 
- The primary key used to authenticate and authorize access to the Maps REST APIs.
- ResourceGroup stringName 
- SecondaryAccess stringKey 
- The primary key used to authenticate and authorize access to the Maps REST APIs. The second key is given to provide seamless key regeneration.
- SkuName string
- The SKU of the Azure Maps Account.
- XMsClient stringId 
- A unique identifier for the Maps Account.
- Dictionary<string, string>
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- PrimaryAccess stringKey 
- The primary key used to authenticate and authorize access to the Maps REST APIs.
- ResourceGroup stringName 
- SecondaryAccess stringKey 
- The primary key used to authenticate and authorize access to the Maps REST APIs. The second key is given to provide seamless key regeneration.
- SkuName string
- The SKU of the Azure Maps Account.
- XMsClient stringId 
- A unique identifier for the Maps Account.
- map[string]string
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- primaryAccess StringKey 
- The primary key used to authenticate and authorize access to the Maps REST APIs.
- resourceGroup StringName 
- secondaryAccess StringKey 
- The primary key used to authenticate and authorize access to the Maps REST APIs. The second key is given to provide seamless key regeneration.
- skuName String
- The SKU of the Azure Maps Account.
- xMs StringClient Id 
- A unique identifier for the Maps Account.
- Map<String,String>
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- primaryAccess stringKey 
- The primary key used to authenticate and authorize access to the Maps REST APIs.
- resourceGroup stringName 
- secondaryAccess stringKey 
- The primary key used to authenticate and authorize access to the Maps REST APIs. The second key is given to provide seamless key regeneration.
- skuName string
- The SKU of the Azure Maps Account.
- xMs stringClient Id 
- A unique identifier for the Maps Account.
- {[key: string]: string}
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- primary_access_ strkey 
- The primary key used to authenticate and authorize access to the Maps REST APIs.
- resource_group_ strname 
- secondary_access_ strkey 
- The primary key used to authenticate and authorize access to the Maps REST APIs. The second key is given to provide seamless key regeneration.
- sku_name str
- The SKU of the Azure Maps Account.
- x_ms_ strclient_ id 
- A unique identifier for the Maps Account.
- Mapping[str, str]
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- primaryAccess StringKey 
- The primary key used to authenticate and authorize access to the Maps REST APIs.
- resourceGroup StringName 
- secondaryAccess StringKey 
- The primary key used to authenticate and authorize access to the Maps REST APIs. The second key is given to provide seamless key regeneration.
- skuName String
- The SKU of the Azure Maps Account.
- xMs StringClient Id 
- A unique identifier for the Maps Account.
- Map<String>
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the azurermTerraform Provider.