Subscriptions - List
取得租使用者的所有訂用帳戶。
GET https://management.azure.com/subscriptions?api-version=2022-12-01
URI 參數
| 名稱 | 位於 | 必要 | 類型 | Description |
|---|---|---|---|---|
|
api-version
|
query | True |
string minLength: 1 |
要用於這項作業的 API 版本。 |
回應
| 名稱 | 類型 | Description |
|---|---|---|
| 200 OK |
確定 - 傳回訂用帳戶陣列。 |
|
| Other Status Codes |
描述作業失敗原因的錯誤回應。 |
安全性
azure_auth
Azure Active Directory OAuth2 流
類型:
oauth2
Flow:
implicit
授權 URL:
https://login.microsoftonline.com/common/oauth2/authorize
範圍
| 名稱 | Description |
|---|---|
| user_impersonation | 模擬您的用戶帳戶 |
範例
GetAllSubscriptions
範例要求
GET https://management.azure.com/subscriptions?api-version=2022-12-01
範例回覆
{
"value": [
{
"id": "/subscriptions/291bba3f-e0a5-47bc-a099-3bdcb2a50a05",
"subscriptionId": "291bba3f-e0a5-47bc-a099-3bdcb2a50a05",
"tenantId": "31c75423-32d6-4322-88b7-c478bdde4858",
"displayName": "Example Subscription",
"state": "Enabled",
"subscriptionPolicies": {
"locationPlacementId": "Internal_2014-09-01",
"quotaId": "Internal_2014-09-01",
"spendingLimit": "Off"
},
"authorizationSource": "RoleBased",
"managedByTenants": [
{
"tenantId": "8f70baf1-1f6e-46a2-a1ff-238dac1ebfb7"
}
],
"tags": {
"tagKey1": "tagValue1",
"tagKey2": "tagValue2"
}
},
{
"id": "/subscriptions/72ac930a-f34e-42d8-b06d-dc2a9e12ed71",
"subscriptionId": "72ac930a-f34e-42d8-b06d-dc2a9e12ed71",
"tenantId": "2a0ff0de-96b2-4859-bb7c-a430d07a3e0c",
"displayName": "Example Subscription2",
"state": "Enabled",
"subscriptionPolicies": {
"locationPlacementId": "Internal_2014-09-01",
"quotaId": "Internal_2014-09-01",
"spendingLimit": "Off"
},
"authorizationSource": "RoleBased",
"managedByTenants": [
{
"tenantId": "8f70baf1-1f6e-46a2-a1ff-238dac1ebfb7"
},
{
"tenantId": "f7fb6af2-321d-47c8-9c0f-b0239eaad39a"
}
],
"tags": {
"tagKey1": "tagValue1",
"tagKey2": "tagValue2"
}
}
],
"nextLink": "..."
}
定義
| 名稱 | Description |
|---|---|
|
Cloud |
資源管理要求的錯誤回應。 |
|
Error |
資源管理錯誤其他資訊。 |
|
Error |
錯誤詳細數據。 |
|
Error |
錯誤回應 |
|
Managed |
管理訂用帳戶之租用戶的相關信息。 |
|
spending |
訂用帳戶消費限制。 |
| Subscription |
訂用帳戶資訊。 |
|
Subscription |
訂用帳戶清單作業回應。 |
|
Subscription |
訂用帳戶原則。 |
|
Subscription |
訂用帳戶狀態。 可能的值為 Enabled、Warned、PastDue、Disabled 和 Deleted。 |
CloudError
資源管理要求的錯誤回應。
| 名稱 | 類型 | Description |
|---|---|---|
| error |
錯誤回應 |
ErrorAdditionalInfo
資源管理錯誤其他資訊。
| 名稱 | 類型 | Description |
|---|---|---|
| info |
object |
其他資訊。 |
| type |
string |
其他信息類型。 |
ErrorDetail
錯誤詳細數據。
| 名稱 | 類型 | Description |
|---|---|---|
| additionalInfo |
錯誤其他資訊。 |
|
| code |
string |
錯誤碼。 |
| details |
錯誤詳細數據。 |
|
| message |
string |
錯誤訊息。 |
| target |
string |
錯誤目標。 |
ErrorResponse
錯誤回應
| 名稱 | 類型 | Description |
|---|---|---|
| error |
error 物件。 |
ManagedByTenant
管理訂用帳戶之租用戶的相關信息。
| 名稱 | 類型 | Description |
|---|---|---|
| tenantId |
string |
管理租使用者的租用戶標識碼。 這是全域唯一識別碼 (GUID)。 |
spendingLimit
訂用帳戶消費限制。
| 值 | Description |
|---|---|
| On | |
| Off | |
| CurrentPeriodOff |
Subscription
訂用帳戶資訊。
| 名稱 | 類型 | Description |
|---|---|---|
| authorizationSource |
string |
要求的授權來源。 有效值為舊版、RoleBased、略過、直接和管理的一或多個組合。 例如,『Legacy, RoleBased』。 |
| displayName |
string |
訂用帳戶顯示名稱。 |
| id |
string |
訂用帳戶的完整標識碼。 例如,/subscriptions/8d65815f-a5b6-402f-9298-045155da7d74 |
| managedByTenants |
數位,包含管理訂用帳戶的租使用者。 |
|
| state |
訂用帳戶狀態。 可能的值為 Enabled、Warned、PastDue、Disabled 和 Deleted。 |
|
| subscriptionId |
string |
訂用帳戶標識碼。 |
| subscriptionPolicies |
訂用帳戶原則。 |
|
| tags |
object |
附加至訂用帳戶的標記。 |
| tenantId |
string |
訂用帳戶租用戶標識碼。 |
SubscriptionListResult
訂用帳戶清單作業回應。
| 名稱 | 類型 | Description |
|---|---|---|
| nextLink |
string |
要取得下一組結果的URL。 |
| value |
訂用帳戶的陣列。 |
SubscriptionPolicies
訂用帳戶原則。
| 名稱 | 類型 | Description |
|---|---|---|
| locationPlacementId |
string |
訂用帳戶位置放置標識碼。 標識符會指出訂用帳戶可看見哪些區域。 例如,位置放置標識碼為 Public_2014-09-01 的訂用帳戶可以存取 Azure 公用區域。 |
| quotaId |
string |
訂用帳戶配額標識碼。 |
| spendingLimit |
訂用帳戶消費限制。 |
SubscriptionState
訂用帳戶狀態。 可能的值為 Enabled、Warned、PastDue、Disabled 和 Deleted。
| 值 | Description |
|---|---|
| Enabled | |
| Warned | |
| PastDue | |
| Disabled | |
| Deleted |