共用方式為


az maps account

管理Azure 地圖服務帳戶。

命令

名稱 Description 類型 狀態
az maps account create

建立地圖帳戶。 地圖帳戶會保存金鑰,允許存取地圖 REST API。

核心 GA
az maps account delete

刪除地圖帳戶。

核心 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 原則上切換功能,以停用Azure 地圖服務本機驗證支援。 這會停用任何使用量的共用金鑰驗證。

接受的值: false, true
--kind

取得或設定 Kind 屬性。

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

設定對應帳戶資源要用於受控識別型作業的資源。

使用量:--linked-resources unique-name=XX id=XX

unique-name:必要。 提供的名稱,可唯一識別連結的資源。 id:必要。 格式為 '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft 的 ARM 資源識別碼。儲存體/accounts/{storageName}'。

您可以使用多個 --linked-resources 引數來指定多個動作。

--tags

以空格分隔的標記:key[=value] [key[=value] ...]。使用 「」 清除現有的標記。

--type

識別類型。

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

與資源相關聯的使用者身分識別清單。 使用者身分識別字典索引鍵參考的格式為 ARM 資源識別碼:'/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

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az maps account delete

刪除地圖帳戶。

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

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源識別碼」引數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」引數。

--resource-group -g

資源組名。

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 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

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 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

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 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

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源識別碼」引數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」引數。

--resource-group -g

資源組名。

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 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

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 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 原則上切換功能,以停用Azure 地圖服務本機驗證支援。 這會停用任何使用量的共用金鑰驗證。

接受的值: false, true
--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源識別碼」引數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」引數。

--kind

取得或設定 Kind 屬性。

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

設定對應帳戶資源要用於受控識別型作業的資源。

使用量:--linked-resources unique-name=XX id=XX

unique-name:必要。 提供的名稱,可唯一識別連結的資源。 id:必要。 格式為 '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft 的 ARM 資源識別碼。儲存體/accounts/{storageName}'。

您可以使用多個 --linked-resources 引數來指定多個動作。

--resource-group -g

資源組名。

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--tags

以空格分隔的標記:key[=value] [key[=value] ...]。使用 「」 清除現有的標記。

--type

識別類型。

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

與資源相關聯的使用者身分識別清單。 使用者身分識別字典索引鍵參考的格式為 ARM 資源識別碼:'/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

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。