Queries resource groups of a specified type.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
Action | String | Yes | ListResourceGroups | The operation that you want to perform. Set the value to ListResourceGroups. |
ResourceGroupType | Integer | Yes | 3 | The type of the resource groups that you want to query. Valid values:
If the value indicates a compute engine, the resource groups to query are the ones that were created when you purchased the compute engine. |
Keyword | String | No | abc | The keyword that is used for fuzzy match by resource group name and identifier. |
BizExtKey | String | No | default | The category of the resource groups. Valid values:
|
ResourceManagerResourceGroupId | String | No | rg-acfmzbn7pti3zfa | The resource group ID. |
Tags | Array | No | The tags. |
|
Key | String | No | Env | The tag key. |
Value | String | No | Test | The tag value. |
Response parameters
Parameter | Type | Example | Description |
HttpStatusCode | Integer | 200 | The HTTP status code returned. |
RequestId | String | 0bc1411515937635973**** | The request ID. You can use the ID to locate logs and troubleshoot issues. |
Success | Boolean | true | Indicates whether the request was successful. |
Data | Array of Data | The resource groups. |
|
Status | Integer | 0 | The status of the resource group. Valid values:
|
UpdateTime | String | Jul 9, 2018 2:43:37 PM | The time when the resource group was last updated. |
IsDefault | Boolean | true | Indicates whether the resource group is the default resource group. Valid values:
|
Cluster | String | AY18G | The name of the cluster. This parameter is returned only if the type of the resource group is MaxCompute or PAI. |
EnableKp | Boolean | false | Indicates whether the UID of an Alibaba Cloud account is used for access. Valid values:
|
ResourceGroupType | String | 3 | The type of the resource group. Valid values:
|
CreateTime | String | Jul 9, 2018 2:43:37 PM | The time when the cluster was created. Example: Jul 9, 2018 02:43:37 PM. |
Identifier | String | e1815577-2f4e-4c5e-b29**** | The identifier of the resource group. |
Mode | String | SHARE | The mode of the resource group. Valid values:
|
BizExtKey | String | default | The category of the resource group. Valid values:
|
Sequence | Integer | 300 | The sequence number of the resource group. Created resource groups are sorted in ascending order by sequence number. |
Specs | Map | The details of the resource group. The content enclosed in braces {} is the details of the resource group. |
|
Name | String | abc | The name of the resource group. |
Id | Long | 1234567 | The resource group ID. |
TenantId | Long | 1234567 | The tenant ID. |
ResourceManagerResourceGroupId | String | rg-acfmzbn7pti3zfa | The ID of your Alibaba Cloud resource group. |
Tags | Array of Tag | The tags. |
|
Key | String | Env | The tag key. |
Value | String | Test | The tag value. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=ListResourceGroups
&ResourceGroupType=3
&Keyword=abc
&BizExtKey=default
&ResourceManagerResourceGroupId=rg-acfmzbn7pti3zfa
&Tags=[{"Key":"Env","Value":"Test"}]
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<ListResourceGroupsResponse>
<HttpStatusCode>200</HttpStatusCode>
<RequestId>0bc1411515937635973****</RequestId>
<Success>true</Success>
<Data>
<Status>0</Status>
<UpdateTime>Jul 9, 2018 2:43:37 PM</UpdateTime>
<IsDefault>true</IsDefault>
<Cluster>AY18G</Cluster>
<EnableKp>false</EnableKp>
<ResourceGroupType>3</ResourceGroupType>
<CreateTime>Jul 9, 2018 2:43:37 PM</CreateTime>
<Identifier>e1815577-2f4e-4c5e-b29****</Identifier>
<Mode>SHARE</Mode>
<BizExtKey>default</BizExtKey>
<Sequence>300</Sequence>
<Name>abc</Name>
<Id>1234567</Id>
<TenantId>1234567</TenantId>
<ResourceManagerResourceGroupId>rg-acfmzbn7pti3zfa</ResourceManagerResourceGroupId>
<Tags>
<Key>Env</Key>
<Value>Test</Value>
</Tags>
</Data>
</ListResourceGroupsResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"HttpStatusCode" : 200,
"RequestId" : "0bc1411515937635973****",
"Success" : true,
"Data" : [ {
"Status" : 0,
"UpdateTime" : "Jul 9, 2018 2:43:37 PM",
"IsDefault" : true,
"Cluster" : "AY18G",
"EnableKp" : false,
"ResourceGroupType" : "3",
"CreateTime" : "Jul 9, 2018 2:43:37 PM",
"Identifier" : "e1815577-2f4e-4c5e-b29****",
"Mode" : "SHARE",
"BizExtKey" : "default",
"Sequence" : 300,
"Name" : "abc",
"Id" : 1234567,
"TenantId" : 1234567,
"ResourceManagerResourceGroupId" : "rg-acfmzbn7pti3zfa",
"Tags" : [ {
"Key" : "Env",
"Value" : "Test"
} ]
} ]
}
Error codes
HTTP status code | Error code | Error message | Description |
400 | Invalid.Tenant.ConnectionNotExists | The connection does not exist. | The specified data source does not exist. |
400 | Invalid.Tenant.ProjectNotExists | The project does not exist. | The specified workspace does not exist. |
400 | Invalid.Tenant.UserNotInProject | The user is not in the project. | The user is not added to the workspace. |
403 | Invalid.Tenant.UserIsNotProjectOwnerOrAdmin | The user is not a project administrator or owner. | The user is not the workspace owner or administrator. |
403 | Invalid.Tenant.UserNotInTenant | The user is not in tenant. | The user does not belong to the tenant. |
For a list of error codes, see Service error codes.