All Products
Search
Document Center

DataWorks:ListResourceGroups

Last Updated:Oct 17, 2024

Queries a list of resource groups of a specific type.

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

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
ResourceGroupTypeintegerYes

The type of the resource group that you want to query. Valid values:

  • 0: DataWorks
  • 1: scheduling
  • 2: MaxCompute
  • 3: Platform for AI (PAI)
  • 4: Data Integration
  • 7: exclusive resource group for scheduling (An ID is generated for the purchased resource when you purchase an exclusive resource group for scheduling.)
  • 9: DataService Studio
  • Default value: 1

If the value indicates a compute engine, the resource groups to query are the ones that were created when you purchased the compute engine.

3
KeywordstringNo

The keyword that is used for fuzzy match by resource group name and identifier.

abc
BizExtKeystringNo

The category of the resource group. Valid values:

  • default (default): shared resource group
  • single: exclusive resource group
default
ResourceManagerResourceGroupIdstringNo

The resource group ID.

rg-acfmzbn7pti3zfa
Tagsarray<object>No

The tags.

objectNo
KeystringNo

The tag key.

Env
ValuestringNo

The tag value.

Test

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

HttpStatusCodeinteger

The HTTP status code.

200
RequestIdstring

The request ID.

0bc1411515937635973****
Successboolean

Indicates whether the request was successful.

true
Dataarray<object>

The resource groups.

Dataobject
Statusinteger

The status of the resource group. Valid values:

  • 0: NORMAL, which indicates that the resource group is running or in service.
  • 1: STOP, which indicates that the resource group has expired and is frozen.
  • 2: DELETED, which indicates that the resource group is released or destroyed.
  • 3: CREATING, which indicates that the resource group is being created or started.
  • 4: CREATE_FAILED, which indicates that the resource group fails to be created or started.
  • 5: UPDATING, which indicates that the resource group is being scaled out or upgraded.
  • 6: UPDATE_FAILED, which indicates that the resource group fails to be scaled out or upgraded.
  • 7: DELETING, which indicates that the resource group is being released or destroyed.
  • 8: DELETE_FAILED, which indicates that the resource group fails to be released or destroyed.
  • 9: TIMEOUT, which indicates that the operation performed on the resource group times out. All operations may time out. This value is temporarily available only for DataService Studio.
0
UpdateTimestring

The time when the resource group was last updated.

Jul 9, 2018 2:43:37 PM
IsDefaultboolean

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
Clusterstring

The name of the cluster. This parameter is returned only if the type of the resource group is MaxCompute or PAI.

AY18G
EnableKpboolean

Indicates whether the UID of an Alibaba Cloud account is used for access. Valid values:

  • true: The MaxCompute compute engine uses the UID of the Alibaba Cloud account as the display name of the account for access.
  • false: The MaxCompute compute engine uses the name of the Alibaba Cloud account as the display name of the account for access. The remaining values are useless. This parameter is returned only if the type of the resource group is MaxCompute.
false
ResourceGroupTypestring

The type of the resource group. Valid values:

  • 0: DataWorks
  • 2: MaxCompute
  • 3: PAI
  • 4: Data Integration
  • 7: scheduling
  • 9: DataService Studio
3
CreateTimestring

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

Jul 9, 2018 2:43:37 PM
Identifierstring

The identifier of the resource group.

e1815577-2f4e-4c5e-b29****
Modestring

The mode of the resource group. Valid values:

  • ISOLATE: exclusive resource group that adopts the subscription billing method
  • SHARE: shared resource group that adopts the pay-as-you-go billing method
  • DEVELOP: resource group for developers
SHARE
BizExtKeystring

The category of the resource group. Valid values:

  • default: shared resource group
  • single: exclusive resource group
default
Sequenceinteger

The sequence number of the resource group. Created resource groups are sorted in ascending order by sequence number.

300
Specsobject

The details of the resource group. The content enclosed in braces {} is the details of the resource group.

{}
Namestring

The name of the resource group.

abc
Idlong

The resource group ID.

1234567
TenantIdlong

The tenant ID.

1234567
ResourceManagerResourceGroupIdstring

The ID of your Alibaba Cloud resource group.

rg-acfmzbn7pti3zfa
Tagsarray<object>

The tags.

Tagobject
Keystring

The tag key.

Env
Valuestring

The tag value.

Test

Examples

Sample success responses

JSONformat

{
  "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 codeError codeError messageDescription
400Invalid.Tenant.ConnectionNotExistsThe connection does not exist.The connection does not exist.
400Invalid.Tenant.ProjectNotExistsThe project does not exist.The project does not exist.
400Invalid.Tenant.UserNotInProjectThe user is not in the project.The user is not in the project.
403Invalid.Tenant.UserIsNotProjectOwnerOrAdminThe user is not a project administrator or owner.The user is not a project administrator or owner.
403Invalid.Tenant.UserNotInTenantThe user is not in tenant.The user is not in tenant.

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

Change history

Change timeSummary of changesOperation
2022-12-13The Error code has changed. The request parameters of the API has changedView Change Details
2022-10-31API Description Update. The Error code has changed. The request parameters of the API has changed. The response structure of the API has changedView Change Details