All Products
Search
Document Center

DataWorks:ListResourceGroups

Last Updated:Oct 09, 2026

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

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

dataworks:ListResourceGroups

get

TenantResourceGroup

acs:dataworks:{#regionId}:{#accountId}:exclusive_resource_group/*

None None

Request parameters

Parameter

Type

Required

Description

Example

ResourceGroupType

integer

No

The ID of the resource group type to query. Valid values:

  • 0: DataWorks.

  • 1: Scheduling.

  • 2: MaxCompute.

  • 3: PAI.

  • 4: Data Integration.

  • 7: The purchase resource ID generated when you purchase an exclusive scheduling resource group.

  • 9: dataService. Default value: 1. If the value represents an engine, the returned list contains resource groups created when you purchase the engine.

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: Public resource group. This is the default value.

  • single: Exclusive resource group.

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:

  • NORMAL(0): The resource group is normal and is running or in service.

  • STOP(1): The resource group has expired and is frozen.

  • DELETED(2): The resource group is released or destroyed.

  • CREATING(3): The resource group is being created or started.

  • CREATE_FAILED(4): The resource group fails to be created or started.

  • UPDATING(5): The resource group is being scaled out or upgraded.

  • UPDATE_FAILED(6): The resource group fails to be scaled out or upgraded.

  • DELETING(7): The resource group is being released or destroyed.

  • DELETE_FAILED(8): The resource group fails to be released or destroyed.

  • TIMEOUT(9): The operation on the resource group times out. All modification operations may time out. This value is temporarily provided only for Data Service.

0

UpdateTime

string

The time when the resource group was last updated. The format is MMM d, yyyy h:mm:ss a, such as Jul 9, 2018 2:43:37 PM.

Jul 9, 2018 2:43:37 PM

IsDefault

boolean

Indicates whether the resource group is the default resource group. Valid values:

  • true: The resource group is the default resource group.

  • false: The resource group is not the default resource group.

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:

  • true: The MaxCompute engine uses the Alibaba Cloud account UID as the display name of the access account.

  • false: The MaxCompute engine uses the Alibaba Cloud account name as the display name of the access account. This parameter is meaningless for other types and takes effect only for the MaxCompute engine.

false

ResourceGroupType

string

The type of the resource group. Valid values:

  • 0: DataWorks.

  • 2: MaxCompute.

  • 3: PAI.

  • 4: Data Integration.

  • 7: Scheduling.

  • 9: dataService.

3

CreateTime

string

The time when the cluster was created. Example format: Jul 9, 2018 2:43:37 PM.

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:

  • ISOLATE: Subscription exclusive resource group.

  • SHARE: Pay-as-you-go public resource group.

  • DEVELOP: Developer edition.

SHARE

BizExtKey

string

The category of the resource group. Valid values:

  • default: Public resource group.

  • single: Exclusive resource group.

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.