ListResourceGroups
Retrieves a list of resource groups.
Operation description
DataWorks Basic Edition or later is required.
Make sure that the service-linked role AliyunServiceRoleForDataWorks is created before you call this API operation.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dataworks:ListResourceGroups |
list |
*DwResourceGroup
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Name |
string |
No |
The name of the resource group for fuzzy match. |
Resource |
| ProjectId |
integer |
No |
The ID of the workspace to which the resource group belongs. |
1000 |
| Statuses |
array |
No |
The statuses of the resource groups to query. |
|
|
string |
No |
The status of the resource group to query. Valid values:
Valid values:
|
Normal |
|
| ResourceGroupTypes |
array |
No |
The types of the resource groups to query. If this parameter is left empty, general-purpose resource groups are queried by default. |
|
|
string |
No |
The type of the resource group. Valid values:
Valid values:
|
CommonV2 |
|
| PaymentType |
string |
No |
The billing method of the resource group. Valid values:
Valid values:
|
PrePaid |
| AliyunResourceGroupId |
string |
No |
The ID of the Alibaba Cloud resource group. |
rg-aek2kqofrgXXXXX |
| AliyunResourceTags |
array<object> |
No |
The Alibaba Cloud tags. |
|
|
object |
No |
The Alibaba Cloud tag. |
||
| Key |
string |
No |
The key of the tag. |
key |
| Value |
string |
No |
The value of the tag. |
value |
| PageSize |
integer |
No |
The number of entries per page. |
100 |
| PageNumber |
integer |
No |
The page number. |
1 |
| SortBy |
string |
No |
The fields by which to sort the results. You can sort the results by fields such as scheduled time and start time. The format is 'Sort field+Sort order (Desc/Asc)'. Asc can be omitted. Valid values for the sort field:
Default value: CreateTime Asc. |
CreateTime Asc |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| Success |
boolean |
Indicates whether the request is successful. |
true |
| PagingInfo |
object |
The pagination information. |
|
| ResourceGroupList |
array<object> |
The list of resource groups. |
|
|
array<object> |
The details of the resource group. |
||
| Id |
string |
The unique identifier of the resource group. |
Serverless_res_group_524257424564736_6831777003XXXXX |
| Name |
string |
The name of the resource group. |
common_resource_group |
| Remark |
string |
The remark of the resource group. |
Create a general-purpose resource group for common tasks |
| PaymentType |
string |
The billing method of the resource group. Valid values: PrePaid (subscription) and PostPaid (pay-as-you-go). Valid values:
|
PrePaid |
| Status |
string |
The status of the resource group to query. Valid values:
Valid values:
|
Normal |
| Spec |
object |
The specifications of the resource group. |
|
| Standard |
string |
The specification details. |
2CU |
| Amount |
integer |
The quantity. |
1 |
| ResourceGroupType |
string |
The type of the resource group. Valid values:
Valid values:
|
CommonV2 |
| OrderInstanceId |
string |
The order instance ID of the resource group. |
c442b330-3b10-4584-959e-736e4edXXXXX |
| CreateUser |
string |
The ID of the user who created the resource group. |
11075500042XXXXX |
| CreateTime |
integer |
The time when the resource group was created. The value is a 64-bit timestamp. |
1727055811000 |
| DefaultVpcId |
string |
The ID of the default VPC associated with the general-purpose resource group. |
vpc-m2et4f3oc8msfbccXXXXX |
| DefaultVswicthId |
string |
The ID of the default vSwitch associated with the general-purpose resource group. |
vsw-uf8usrhs7hjd9amsXXXXX |
| AliyunResourceGroupId |
string |
The ID of the Alibaba Cloud resource group. |
rg-aek2kqofrgXXXXX |
| AliyunResourceTags |
array<object> |
The Alibaba Cloud tags. |
|
|
object |
The Alibaba Cloud tag. |
||
| Key |
string |
The tag key. |
Key |
| Value |
string |
The tag value. |
Value |
| PageNumber |
integer |
The page number. |
1 |
| PageSize |
integer |
The number of entries per page. |
100 |
| TotalCount |
integer |
The total number of data entries. |
100 |
| RequestId |
string |
The request ID. You can use the ID to locate logs and troubleshoot issues. |
6A6CBE87-9F91-1323-B680-E7A7065XXXXX |
Examples
Success response
JSON format
{
"Success": true,
"PagingInfo": {
"ResourceGroupList": [
{
"Id": "Serverless_res_group_524257424564736_6831777003XXXXX",
"Name": "common_resource_group",
"Remark": "Create a general-purpose 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
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.