All Products
Search
Document Center

DataWorks:ListResourceGroups

Last Updated:Dec 19, 2024

Queries a list of resource groups.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is 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.
OperationAccess levelResource typeCondition keyAssociated operation
dataworks:ListResourceGroupslist
*DwResourceGroup
acs:dataworks:{#regionId}:{#accountId}:dwresourcegroup/*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
NamestringNo

The name of a resource group, which is used for fuzzy match.

Resource
ProjectIdlongNo

The ID of the DataWorks workspace.

1000
StatusesarrayNo

The statuses of resource groups.

StatusestringNo

The status of resource groups. Valid values:

  • Normal: The resource groups are running or in use.
  • Stop: The resource groups are expired.
  • Deleted: The resource group is released or destroyed.
  • Creating: The resource groups are being started.
  • CreateFailed: The resource groups fail to be started.
  • Updating: The resource groups are being scaled in or out, or the configurations of the resource groups are being changed.
  • UpdateFailed: The resource groups fail to be scaled out or upgraded.
  • Deleting: The resource groups are being released or destroyed.
  • DeleteFailed: The resource groups fail to be released or destroyed.
  • Timeout: The operations that are performed on the resource groups time out.
Normal
ResourceGroupTypesarrayNo

The types of resource groups to query. If you do not configure this parameter, only serverless resource groups are returned by default.

stringNo

The type of resource group. Valid values:

  • CommonV2: serverless resource group
  • ExclusiveDataIntegration: exclusive resource group for Data Integration
  • ExclusiveScheduler: exclusive resource group for scheduling
  • ExclusiveDataService: exclusive resource group for DataService Studio
CommonV2
PaymentTypestringNo

The billing method of resource groups. Valid values: PrePaid and PostPaid. The value PrePaid indicates the subscription billing method, and the value PostPaid indicates the pay-as-you-go billing method.

PrePaid

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

Successboolean

Indicates whether the request was successful. Valid values: true and false.

true
ResourceGroupListarray<object>

The resource groups returned.

Dataobject

The details about a resource group.

Idstring

The ID of the resource group.

Serverless_res_group_524257424564736_6831777003XXXXX
Namestring

The name of the resource group.

common_resource_group
Remarkstring

The description of the resource group.

PaymentTypestring

The billing method of the resource group. Valid values: PrePaid and PostPaid. The value PrePaid indicates the subscription billing method, and the value PostPaid indicates the pay-as-you-go billing method.

PrePaid
Statusstring

The status of the resource group. Valid values:

  • Normal: The resource group is running or in use.
  • Stop: The resource group is expired.
  • Deleted: The resource group is released or destroyed.
  • Creating: The resource group is being started.
  • CreateFailed: The resource group fails to be started.
  • Updating: The resource group is being scaled in or out, or the configurations of the resource group are being changed.
  • UpdateFailed: The resource group fails to be scaled out or upgraded.
  • Deleting: The resource group is being released or destroyed.
  • DeleteFailed: The resource group fails to be released or destroyed.
  • Timeout: The operations that are performed on the resource group time out.
Normal
Specobject

The specifications of the resource group.

Standardstring

The details about the specifications.

2CU
Amountinteger

The number of resources in the resource group.

1
ResourceGroupTypestring

The type the resource group. Valid values:

  • CommonV2: serverless resource group
  • ExclusiveDataIntegration: exclusive resource group for Data Integration
  • ExclusiveScheduler: exclusive resource group for scheduling
  • ExclusiveDataService: exclusive resource group for DataService Studio
CommonV2
OrderInstanceIdstring

The instance ID of the order that is used to create the resource group.

c442b330-3b10-4584-959e-736e4edXXXXX
CreateUserstring

The ID of the account that is used to create the resource group.

11075500042XXXXX
CreateTimelong

The time when the resource group was created. The value is a 64-bit timestamp.

1727055811000
DefaultVpcIdstring

The ID of the virtual private cloud (VPC) with which the resource group is associated by default.

vpc-m2et4f3oc8msfbccXXXXX
DefaultVswicthIdstring

The ID of the vSwitch with which the resource group is associated by default.

vsw-uf8usrhs7hjd9amsXXXXX
RequestIdstring

The request ID. You can use the ID to query logs and troubleshoot issues.

6A6CBE87-9F91-1323-B680-E7A7065XXXXX

Examples

Sample success responses

JSONformat

{
  "Success": true,
  "ResourceGroupList": [
    {
      "Id": "Serverless_res_group_524257424564736_6831777003XXXXX",
      "Name": "common_resource_group",
      "Remark": "",
      "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"
    }
  ],
  "RequestId": "6A6CBE87-9F91-1323-B680-E7A7065XXXXX"
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history