Accounts - List Keys

取得與地圖服務 API 搭配使用的金鑰。 密鑰是用來驗證和授權對地圖 REST API 的存取權。 一次只需要一個金鑰;提供兩個 ,以提供順暢的密鑰重新產生。

POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Maps/accounts/{accountName}/listKeys?api-version=2023-06-01

URI 參數

名稱 位於 必要 類型 Description
accountName
path True

string

地圖服務帳戶的名稱。

resourceGroupName
path True

string

資源群組的名稱。 名稱不區分大小寫。

subscriptionId
path True

string

目標訂用帳戶的標識碼。

api-version
query True

string

用於此作業的 API 版本。

回應

名稱 類型 Description
200 OK

MapsAccountKeys

要求成功。

Other Status Codes

ErrorResponse

發生意外錯誤。

安全性

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

名稱 Description
user_impersonation 模擬您的用戶帳戶

範例

List Keys

Sample Request

POST https://management.azure.com/subscriptions/21a9967a-e8a9-4656-a70b-96ff1c4d05a0/resourceGroups/myResourceGroup/providers/Microsoft.Maps/accounts/myMapsAccount/listKeys?api-version=2023-06-01

Sample Response

{
  "primaryKey": "<primaryKey>",
  "primaryKeyLastUpdated": "2021-07-02T01:01:01.1075056Z",
  "secondaryKey": "<secondaryKey>",
  "secondaryKeyLastUpdated": "2021-07-02T01:01:01.1075056Z"
}

定義

名稱 Description
ErrorAdditionalInfo

資源管理錯誤其他資訊。

ErrorDetail

錯誤詳細數據。

ErrorResponse

錯誤回應

MapsAccountKeys

可用來存取地圖 REST API 的索引鍵集合。 密鑰輪替提供兩個金鑰,而不會中斷。

ErrorAdditionalInfo

資源管理錯誤其他資訊。

名稱 類型 Description
info

object

其他資訊。

type

string

其他信息類型。

ErrorDetail

錯誤詳細數據。

名稱 類型 Description
additionalInfo

ErrorAdditionalInfo[]

錯誤其他資訊。

code

string

錯誤碼。

details

ErrorDetail[]

錯誤詳細資料。

message

string

錯誤訊息。

target

string

錯誤目標。

ErrorResponse

錯誤回應

名稱 類型 Description
error

ErrorDetail

錯誤物件。

MapsAccountKeys

可用來存取地圖 REST API 的索引鍵集合。 密鑰輪替提供兩個金鑰,而不會中斷。

名稱 類型 Description
primaryKey

string

用來存取地圖 REST API 的主要金鑰。

primaryKeyLastUpdated

string

主鍵的上次更新日期和時間。

secondaryKey

string

用於存取地圖 REST API 的次要金鑰。

secondaryKeyLastUpdated

string

次要金鑰的上次更新日期和時間。