你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

az maps account

管理Azure 地图帐户。

命令

名称 说明 类型 状态
az maps account create

创建地图帐户。 地图帐户包含允许访问 地图 REST API 的密钥。

核心 GA
az maps account delete

删除 Maps 帐户。

核心 GA
az maps account keys

管理Azure 地图帐户密钥。

核心 GA
az maps account keys list

获取要用于地图 API 的密钥。 密钥用于对 地图 REST API 的访问权限进行身份验证和授权。 一次只需要一个密钥;提供两个用于提供无缝密钥重新生成。

核心 GA
az maps account keys renew

重新生成用于地图 API 的主密钥或辅助密钥。 旧密钥将立即停止工作。

核心 GA
az maps account list

显示订阅或资源组中的所有映射帐户。

核心 GA
az maps account show

显示地图帐户的详细信息。

核心 GA
az maps account update

汇报地图帐户。 创建后只能更新参数的子集,例如 SKU、标记、属性。

核心 GA

az maps account create

创建地图帐户。 地图帐户包含允许访问 地图 REST API 的密钥。

az maps account create --account-name
                       --resource-group
                       --sku {G2, S0, S1}
                       [--accept-tos]
                       [--disable-local-auth {false, true}]
                       [--kind {Gen1, Gen2}]
                       [--linked-resources]
                       [--tags]
                       [--type {None, SystemAssigned, SystemAssigned, UserAssigned, UserAssigned}]
                       [--user-identities]

示例

使用托管标识创建帐户

az maps account create --type "SystemAssigned, UserAssigned" --user-identities "{\"/subscriptions/21a9967a-e8a9-4656-a70b-96ff1c4d05a0/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName\":{}}" --kind "Gen2" --disable-local-auth false --linked-resources id="/subscriptions/21a9967a-e8a9-4656-a70b-96ff1c4d05a0/resourceGroups/myResourceGroup/providers/Microsoft.Storage/accounts/mystorageacc" unique-name="myBatchStorageAccount" --linked-resources id="/subscriptions/21a9967a-e8a9-4656-a70b-96ff1c4d05a0/resourceGroups/myResourceGroup/providers/Microsoft.Storage/accounts/mystorageacc" unique-name="myBlobDataSource" --tags test="true" --account-name "myMapsAccount" --resource-group "myResourceGroup" --sku "S0"

创建 Gen1 帐户

az maps account create --kind "Gen1" --disable-local-auth false --tags test="true" --account-name "myMapsAccount" --resource-group "myResourceGroup" --sku "S0"

创建 Gen2 帐户

az maps account create --kind "Gen2" --disable-local-auth true --tags test="true" --account-name "myMapsAccount" --resource-group "myResourceGroup" --sku "S0"

必需参数

--account-name --name -n

映射帐户的名称。

--resource-group -g

资源组名称。

--sku -s

SKU 的名称(如 S0)。

接受的值: G2, S0, S1

可选参数

--accept-tos

必须同意许可和隐私声明才能创建帐户。

--disable-local-auth

允许 Azure Policy 上的切换功能禁用Azure 地图本地身份验证支持。 这将从任何用法中禁用共享密钥身份验证。

接受的值: false, true
--kind

获取或设置 Kind 属性。

接受的值: Gen1, Gen2
--linked-resources

设置要用于映射帐户资源的基于托管标识的操作的资源。

用法:--linked-resources unique-name=XX id=XX

unique-name:必需。 提供的名称,用于唯一标识链接的资源。 id:必需。 ARM 资源 ID 格式为:“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft。存储/accounts/{storageName}'。

可以使用多个 --linked-resources 参数来指定多个操作。

--tags

空格分隔标记:key[=value] [key[=value] ...]。使用“”清除现有标记。

--type

标识类型。

接受的值: None, SystemAssigned, SystemAssigned, UserAssigned, UserAssigned
--user-identities

与资源关联的用户标识列表。 用户标识字典密钥引用的格式为 ARM 资源 ID:“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}”。 预期值:json-string/@json-file。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

提高日志记录详细程度。 使用 --debug 获取完整的调试日志。

az maps account delete

删除 Maps 帐户。

az maps account delete [--account-name]
                       [--ids]
                       [--resource-group]
                       [--subscription]

示例

DeleteAccount

az maps account delete --name "myMapsAccount" --resource-group "myResourceGroup"

可选参数

--account-name --name -n

映射帐户的名称。

--ids

一个或多个资源 ID(空格分隔)。 它应该是包含“资源 ID”参数的所有信息的完整资源 ID。 应提供 --id 或其他“资源 ID”参数。

--resource-group -g

资源组名称。

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

提高日志记录详细程度。 使用 --debug 获取完整的调试日志。

az maps account list

显示订阅或资源组中的所有映射帐户。

az maps account list [--resource-group]

可选参数

--resource-group -g

资源组名称。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

提高日志记录详细程度。 使用 --debug 获取完整的调试日志。

az maps account show

显示地图帐户的详细信息。

az maps account show [--account-name]
                     [--ids]
                     [--resource-group]
                     [--subscription]

示例

显示地图帐户的详细信息。 (自动生成)

az maps account show --name MyMapsAccount --resource-group MyResourceGroup

可选参数

--account-name --name -n

映射帐户的名称。

--ids

一个或多个资源 ID(空格分隔)。 它应该是包含“资源 ID”参数的所有信息的完整资源 ID。 应提供 --id 或其他“资源 ID”参数。

--resource-group -g

资源组名称。

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

提高日志记录详细程度。 使用 --debug 获取完整的调试日志。

az maps account update

汇报地图帐户。 创建后只能更新参数的子集,例如 SKU、标记、属性。

az maps account update --sku {G2, S0, S1}
                       [--account-name]
                       [--disable-local-auth {false, true}]
                       [--ids]
                       [--kind {Gen1, Gen2}]
                       [--linked-resources]
                       [--resource-group]
                       [--subscription]
                       [--tags]
                       [--type {None, SystemAssigned, SystemAssigned, UserAssigned, UserAssigned}]
                       [--user-identities]

示例

更新帐户托管标识

az maps account update --type "SystemAssigned, UserAssigned" --user-identities "{\"/subscriptions/21a9967a-e8a9-4656-a70b-96ff1c4d05a0/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName\":{}}" --kind "Gen2" --linked-resources id="/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/accounts/{storageName}" unique-name="myBatchStorageAccount" --account-name "myMapsAccount" --resource-group "myResourceGroup" --sku "S1"

更新帐户标记

az maps account update --tags specialTag="true" --account-name "myMapsAccount" --resource-group "myResourceGroup" --sku "S0"

更新到 Gen1 帐户

az maps account update --kind "Gen1" --account-name "myMapsAccount" --resource-group "myResourceGroup" --sku "S0"

更新到 Gen2 帐户

az maps account update --kind "Gen2" --account-name "myMapsAccount" --resource-group "myResourceGroup" --sku "S0"

必需参数

--sku -s

SKU 的名称(如 S0)。

接受的值: G2, S0, S1

可选参数

--account-name --name -n

映射帐户的名称。

--disable-local-auth

允许 Azure Policy 上的切换功能禁用Azure 地图本地身份验证支持。 这将从任何用法中禁用共享密钥身份验证。

接受的值: false, true
--ids

一个或多个资源 ID(空格分隔)。 它应该是包含“资源 ID”参数的所有信息的完整资源 ID。 应提供 --id 或其他“资源 ID”参数。

--kind

获取或设置 Kind 属性。

接受的值: Gen1, Gen2
--linked-resources

设置要用于映射帐户资源的基于托管标识的操作的资源。

用法:--linked-resources unique-name=XX id=XX

unique-name:必需。 提供的名称,用于唯一标识链接的资源。 id:必需。 ARM 资源 ID 格式为:“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft。存储/accounts/{storageName}'。

可以使用多个 --linked-resources 参数来指定多个操作。

--resource-group -g

资源组名称。

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--tags

空格分隔标记:key[=value] [key[=value] ...]。使用“”清除现有标记。

--type

标识类型。

接受的值: None, SystemAssigned, SystemAssigned, UserAssigned, UserAssigned
--user-identities

与资源关联的用户标识列表。 用户标识字典密钥引用的格式为 ARM 资源 ID:“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}”。 预期值:json-string/@json-file。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

提高日志记录详细程度。 使用 --debug 获取完整的调试日志。