Queries a list of resource groups.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- For mandatory resource types, indicate with a prefix of * .
- If the permissions cannot be granted at the resource level,
All Resourcesis used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
| Operation | Access level | Resource type | Condition key | Associated operation |
|---|---|---|---|---|
| dataworks:ListResourceGroups | list | *DwResourceGroup acs:dataworks:{#regionId}:{#accountId}:dwresourcegroup/* |
| none |
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| Name | string | No | The name of a resource group, which is used for fuzzy match. | Resource |
| ProjectId | long | No | The ID of the DataWorks workspace. | 1000 |
| Statuses | array | No | The statuses of resource groups. | |
| string | No | The status of resource groups. Valid values:
| Normal | |
| ResourceGroupTypes | array | No | The types of resource groups to query. If you do not configure this parameter, only serverless resource groups are returned by default. | |
| string | No | Resource group types:
| CommonV2 | |
| PaymentType | string | No | The billing method of resource groups. Valid values:
| PrePaid |
| AliyunResourceGroupId | string | No | Alibaba Cloud Resource Group ID | rg-aek2kqofrgXXXXX |
| AliyunResourceTags | array<object> | No | Alibaba Cloud tag list | |
| object | No | Alibaba Cloud label | ||
| Key | string | No | Tag Key | key |
| Value | string | No | Tag Value | value |
| PageSize | integer | No | The number of entries per page. | 100 |
| PageNumber | integer | No | The page number. | 1 |
| SortBy | string | No | The list of fields used for sorting. Fields such as TriggerTime and StartedTime are supported. You must configure this parameter in the Sorting field + Sort by (Desc/Asc). By default, results are sorted in ascending order. Valid values:
Default value: CreateTime Asc | CreateTime Asc |
Response parameters
Examples
Sample success responses
JSONformat
{
"Success": true,
"PagingInfo": {
"ResourceGroupList": [
{
"Id": "Serverless_res_group_524257424564736_6831777003XXXXX",
"Name": "common_resource_group",
"Remark": "Create a common resource group for common tasks",
"PaymentType": "PrePaid",
"Status": "Normal",
"Spec": {
"Standard": "2CU",
"Amount": 1
},
"ResourceGroupType": "CommonV2",
"OrderInstanceId": "c442b330-3b10-4584-959e-736e4edXXXXX",
"CreateUser": "11075500042XXXXX",
"CreateTime": 1727055811000,
"DefaultVpcId": "vpc-m2et4f3oc8msfbccXXXXX",
"DefaultVswicthId": "vsw-uf8usrhs7hjd9amsXXXXX",
"AliyunResourceGroupId": "rg-aek2kqofrgXXXXX",
"AliyunResourceTags": [
{
"Key": "Key",
"Value": "Value"
}
]
}
],
"PageNumber": 1,
"PageSize": 100,
"TotalCount": 100
},
"RequestId": "6A6CBE87-9F91-1323-B680-E7A7065XXXXX"
}Error codes
For a list of error codes, visit the Service error codes.
Change history
| Change time | Summary of changes | Operation |
|---|---|---|
| 2025-02-21 | The response structure of the API has changed | View Change Details |
| 2025-02-10 | The response structure of the API has changed | View Change Details |
| 2025-01-02 | The request parameters of the API has changed. The response structure of the API has changed | View Change Details |
