Skip to main content

accounts

Creates, updates, deletes, gets or lists an accounts resource.

Overview

Nameaccounts
TypeResource
Idazure.maps.accounts

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
accountSasTokenstringThe shared access signature access token.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_sasselectresource_group_name, account_name, subscription_idCreate and list an account shared access signature token. Use this SAS token for authentication to Azure Maps REST APIs through various Azure Maps SDKs. As prerequisite to create a SAS Token. Prerequisites: 1. Create or have an existing User Assigned Managed Identity in the same Azure region as the account. 2. Create or update an Azure Maps account with the same Azure region as the User Assigned Managed Identity is placed.
getselectresource_group_name, account_name, subscription_idGet a Maps Account.
list_by_resource_groupselectresource_group_name, subscription_idGet all Maps Accounts in a Resource Group.
list_by_subscriptionselectsubscription_idGet all Maps Accounts in a Subscription.
create_or_updateinsertresource_group_name, account_name, subscription_id, location, skuCreate or update a Maps Account. A Maps Account holds the keys which allow access to the Maps REST APIs.
updateupdateresource_group_name, account_name, subscription_idUpdates a Maps Account. Only a subset of the parameters may be updated after creation, such as Sku, Tags, Properties.
create_or_updatereplaceresource_group_name, account_name, subscription_id, location, skuCreate or update a Maps Account. A Maps Account holds the keys which allow access to the Maps REST APIs.
deletedeleteresource_group_name, account_name, subscription_idDelete a Maps Account.
list_keysexecresource_group_name, account_name, subscription_idGet the keys to use with the Maps APIs. A key is used to authenticate and authorize access to the Maps REST APIs. Only one key is needed at a time; two are given to provide seamless key regeneration.
regenerate_keysexecresource_group_name, account_name, subscription_id, keyTypeRegenerate either the primary or secondary key for use with the Maps APIs. The old key will stop working immediately.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
account_namestringThe name of the Maps Account. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring

SELECT examples

Create and list an account shared access signature token. Use this SAS token for authentication to Azure Maps REST APIs through various Azure Maps SDKs. As prerequisite to create a SAS Token. Prerequisites: 1. Create or have an existing User Assigned Managed Identity in the same Azure region as the account. 2. Create or update an Azure Maps account with the same Azure region as the User Assigned Managed Identity is placed.

SELECT
accountSasToken
FROM azure.maps.accounts
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND account_name = '{{ account_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Create or update a Maps Account. A Maps Account holds the keys which allow access to the Maps REST APIs.

INSERT INTO azure.maps.accounts (
tags,
location,
properties,
sku,
kind,
identity,
resource_group_name,
account_name,
subscription_id
)
SELECT
'{{ tags }}',
'{{ location }}' /* required */,
'{{ properties }}',
'{{ sku }}' /* required */,
'{{ kind }}',
'{{ identity }}',
'{{ resource_group_name }}',
'{{ account_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
identity,
kind,
location,
properties,
sku,
systemData,
tags,
type
;

UPDATE examples

Updates a Maps Account. Only a subset of the parameters may be updated after creation, such as Sku, Tags, Properties.

UPDATE azure.maps.accounts
SET
tags = '{{ tags }}',
kind = '{{ kind }}',
sku = '{{ sku }}',
identity = '{{ identity }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND account_name = '{{ account_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
identity,
kind,
location,
properties,
sku,
systemData,
tags,
type;

REPLACE examples

Create or update a Maps Account. A Maps Account holds the keys which allow access to the Maps REST APIs.

REPLACE azure.maps.accounts
SET
tags = '{{ tags }}',
location = '{{ location }}',
properties = '{{ properties }}',
sku = '{{ sku }}',
kind = '{{ kind }}',
identity = '{{ identity }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND account_name = '{{ account_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND location = '{{ location }}' --required
AND sku = '{{ sku }}' --required
RETURNING
id,
name,
identity,
kind,
location,
properties,
sku,
systemData,
tags,
type;

DELETE examples

Delete a Maps Account.

DELETE FROM azure.maps.accounts
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND account_name = '{{ account_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

Get the keys to use with the Maps APIs. A key is used to authenticate and authorize access to the Maps REST APIs. Only one key is needed at a time; two are given to provide seamless key regeneration.

EXEC azure.maps.accounts.list_keys 
@resource_group_name='{{ resource_group_name }}' --required,
@account_name='{{ account_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;