Queries resource groups.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ListResourceGroups |
The operation that you want to perform. Set the value to ListResourceGroups. |
Status | String | No | OK |
The status of the resource group. Valid values:
|
PageNumber | Integer | No | 1 |
The number of the page to return. Pages start from page 1. Default value: 1. |
PageSize | Integer | No | 10 |
The number of entries to return on each page. Valid values: 1 to 100. Default value: 10. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
PageNumber | Integer | 1 |
The number of the returned page. |
PageSize | Integer | 10 |
The number of entries returned per page. |
RequestId | String | 4B450CA1-36E8-4AA2-8461-86B42BF4CC4E |
The ID of the request. |
ResourceGroups | Array |
The information of the resource groups. |
|
ResourceGroup | |||
AccountId | String | 123456789**** |
The ID of the Alibaba Cloud account to which the resource group belongs. |
CreateDate | String | 2015-01-23T12:33:18Z |
The time when the resource group was created. |
DisplayName | String | my-project |
The display name of the resource group. |
Id | String | rg-9gLOoK**** |
The ID of the resource group. |
Name | String | my-project |
The unique identifier of the resource group. |
Status | String | OK |
The status of the resource group. Valid values:
|
TotalCount | Integer | 2 |
The total number of returned entries. |
Examples
Sample requests
https://resourcemanager.aliyuncs.com/?Action=ListResourceGroups
&<Common request parameters>
Sample success responses
XML
format
<ListResourceGroupsResponse>
<RequestId>4B450CA1-36E8-4AA2-8461-86B42BF4CC4E</RequestId>
<PageNumber>1</PageNumber>
<PageSize>10</PageSize>
<TotalCount>2</TotalCount>
<ResourceGroups>
<ResourceGroups>
<Id>rg-1hSBH2****</Id>
<AccountId>123456789****</AccountId>
<Name>default</Name>
<DisplayName>Default resource group</DisplayName>
<Status>OK</Status>
<CreateDate>2015-01-23T12:33:18Z</CreateDate>
</ResourceGroups>
<ResourceGroups>
<Id>rg-9gLOoK****</Id>
<AccountId>123456789****</AccountId>
<Name>my-project</Name>
<DisplayName>my-project</DisplayName>
<Status>OK</Status>
<CreateDate>2015-01-23T12:33:18Z</CreateDate>
</ResourceGroups>
</ResourceGroups>
</ListResourceGroupsResponse>
JSON
format
{
"RequestId" : "4B450CA1-36E8-4AA2-8461-86B42BF4CC4E",
"PageNumber": 1,
"PageSize": 10,
"TotalCount": 2,
"ResourceGroups" : {
"ResourceGroups" : [
{
"Id": "rg-1hSBH2****",
"AccountId": "123456789****",
"Name": "default",
"DisplayName": "Default resource group",
"Status": "OK",
"CreateDate": "2015-01-23T12:33:18Z"
},
{
"Id": "rg-9gLOoK****",
"AccountId": "123456789****",
"Name": "my-project",
"DisplayName": "my-project",
"Status": "OK",
"CreateDate": "2015-01-23T12:33:18Z"
}
]
}
}
Error codes
For a list of error codes, visit the API Error Center.