Share via


Resource Groups - List

取得訂用帳戶的所有資源群組。

GET https://management.azure.com/subscriptions/{subscriptionId}/resourcegroups?api-version=2021-04-01
GET https://management.azure.com/subscriptions/{subscriptionId}/resourcegroups?$filter={$filter}&$top={$top}&api-version=2021-04-01

URI 參數

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

string

Microsoft Azure 訂用帳戶標識碼。

api-version
query True

string

用於此作業的 API 版本。

$filter
query

string

要套用至作業的篩選。

您可以依標籤名稱和值進行篩選。 例如,若要篩選標籤名稱和值,請使用 $filter=tagName eq 'tag1' 和 tagValue eq 'Value1'

$top
query

integer

int32

要傳回的結果數目。 如果傳遞 null,則傳回所有資源群組。

回應

名稱 類型 Description
200 OK

ResourceGroupListResult

確定 - 傳回資源群組的陣列。

Other Status Codes

CloudError

描述作業失敗原因的錯誤回應。

安全性

azure_auth

Azure Active Directory OAuth2 Flow

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

Scopes

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

定義

名稱 Description
CloudError

資源管理要求的錯誤回應。

ErrorAdditionalInfo

資源管理錯誤其他資訊。

ErrorResponse

錯誤回應

ResourceGroup

資源群組資訊。

ResourceGroupListResult

資源群組的清單。

ResourceGroupProperties

資源群組屬性。

CloudError

資源管理要求的錯誤回應。

名稱 類型 Description
error

ErrorResponse

錯誤回應
所有 Azure Resource Manager API 的常見錯誤回應,以傳回失敗作業的錯誤詳細數據。 (這也會遵循 OData 錯誤回應格式。)

ErrorAdditionalInfo

資源管理錯誤其他資訊。

名稱 類型 Description
info

object

其他資訊。

type

string

其他信息類型。

ErrorResponse

錯誤回應

名稱 類型 Description
additionalInfo

ErrorAdditionalInfo[]

錯誤其他資訊。

code

string

錯誤碼。

details

ErrorResponse[]

錯誤詳細資料。

message

string

錯誤訊息。

target

string

錯誤目標。

ResourceGroup

資源群組資訊。

名稱 類型 Description
id

string

資源群組的標識碼。

location

string

資源群組的位置。 建立資源群組之後無法變更它。 它必須是其中一個支援的 Azure 位置。

managedBy

string

管理此資源群組的資源識別碼。

name

string

資源群組的名稱。

properties

ResourceGroupProperties

資源群組屬性。

tags

object

附加至資源群組的標記。

type

string

資源群組的類型。

ResourceGroupListResult

資源群組的清單。

名稱 類型 Description
nextLink

string

要用於取得下一組結果的URL。

value

ResourceGroup[]

資源群組的陣列。

ResourceGroupProperties

資源群組屬性。

名稱 類型 Description
provisioningState

string

布建狀態。