Queries a list of resource groups of a specified type.
Operation description
Before you begin: DataWorks is activated, and a DataWorks workspace is created in the destination region. Otherwise, a 403 Forbidden.Access error may be returned.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dataworks:ListResourceGroups |
get |
TenantResourceGroup
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ResourceGroupType |
integer |
No |
The ID of the resource group type to query. Valid values:
|
3 |
| Keyword |
string |
No |
The keyword used to fuzzy match resource group names and identifiers. |
abc |
| BizExtKey |
string |
No |
The category of the resource group. Valid values:
|
default |
| ResourceManagerResourceGroupId |
string |
No |
The ID of the resource group. |
rg-acfmzbn7pti3zfa |
| Tags |
array<object> |
No |
The list of tags. |
|
|
object |
No |
The tag information. |
||
| Key |
string |
No |
The tag key. |
Env |
| Value |
string |
No |
The tag value. |
Test |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response. |
||
| HttpStatusCode |
integer |
The HTTP status code. |
200 |
| RequestId |
string |
The request ID. |
0bc1411515937635973**** |
| Success |
boolean |
Indicates whether the request is successful. |
true |
| Data |
array<object> |
The list of resource groups. |
|
|
array<object> |
The resource group details. |
||
| Status |
integer |
The status of the resource group. Valid values:
|
0 |
| UpdateTime |
string |
The time when the resource group was last updated. The format is |
Jul 9, 2018 2:43:37 PM |
| IsDefault |
boolean |
Indicates whether the resource group is the default resource group. Valid values:
|
true |
| Cluster |
string |
The name of the cluster. This parameter takes effect only for MaxCompute and PAI resource groups. |
AY18G |
| EnableKp |
boolean |
Indicates whether Key Person (KP) access is used. Valid values:
|
false |
| ResourceGroupType |
string |
The type of the resource group. Valid values:
|
3 |
| CreateTime |
string |
The time when the cluster was created. Example format: |
Jul 9, 2018 2:43:37 PM |
| Identifier |
string |
The identifier of the resource group. |
e1815577-2f4e-4c5e-b29**** |
| Mode |
string |
The mode of the resource group. Valid values:
|
SHARE |
| BizExtKey |
string |
The category of the resource group. Valid values:
|
default |
| Sequence |
integer |
The sequence field. This field is used to sort the created resource groups in ascending order based on their creation sequence numbers. |
300 |
| Specs |
object |
The detailed information of the resource group. The content in {} indicates the detailed information of the resource group. |
{} |
| Name |
string |
The name of the resource group. |
abc |
| Id |
integer |
The ID of the resource group. |
1234567 |
| TenantId |
integer |
The tenant ID. |
1234567 |
| ResourceManagerResourceGroupId |
string |
The ID of the resource group. |
rg-acfmzbn7pti3zfa |
| Tags |
array<object> |
The list of tags. |
|
|
object |
The tag information. |
||
| Key |
string |
The tag key. |
Env |
| Value |
string |
The tag value. |
Test |
Examples
Success response
JSON format
{
"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,
"Specs": {},
"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 connection does not exist. |
| 400 | Invalid.Tenant.ProjectNotExists | The project does not exist. | The project does not exist. |
| 400 | Invalid.Tenant.UserNotInProject | The user is not in the project. | The user is not in the project. |
| 403 | Invalid.Tenant.UserIsNotProjectOwnerOrAdmin | The user is not a project administrator or owner. | The user is not a project administrator or owner. |
| 403 | Invalid.Tenant.UserNotInTenant | The user is not in tenant. | The user is not in tenant. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.