Queries resource groups of a specified type.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ListResourceGroups

The operation that you want to perform.

RegionId String Yes cn-shanghai

The ID of the region where the DataWorks workspace resides. For example, the ID of the China (Shanghai) region is cn-shanghai, and that of the China (Zhangjiakou) region is cn-zhangjiakou. The system automatically determines the value of this parameter based on the endpoint used to call the operation.

ResourceGroupType Integer Yes 3

The resource group type based on which you want to query resource groups. Valid values:

  • 0: DataWorks
  • 1: Scheduling
  • 2: MaxCompute
  • 3: Machine Learning Platform for AI (PAI)
  • 4: Data Integration
  • 8: App Studio
  • 9: DataService Studio

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

Keyword String No abc

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

BizExtKey String No default

The category of the resource group. Valid values:

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

Response parameters

Parameter Type Example Description
Data Array of Data

The resource groups.

BizExtKey String default

The category of the resource group. Valid values:

  • default: shared resource group
  • single: exclusive resource group
Cluster String AY18G

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

CreateTime String Jul 9, 2018 2:43:37 PM

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

EnableKp Boolean false

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.

Id Long 1234567

The ID of the resource group.

Identifier String e1815577-2f4e-4c5e-b29****

The identifier of the resource group.

IsDefault Boolean true

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.
Mode String SHARE

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
Name String abc

The name of the resource group.

ResourceGroupType String 3

The type of the resource group. Valid values:

  • 0: DataWorks
  • 2: MaxCompute
  • 3: PAI
  • 4: Data Integration
  • 7: scheduling
  • 8: App Studio
  • 9: DataService Studio
Sequence Integer 300

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

Specs Map null

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

Status Integer 0

The status of the resource group. Valid values:

  • NORMAL(0): The resource group 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 performed on the resource group times out. All operations may time out. This value is temporarily available only for DataService Studio.
TenantId Long 1234567

The ID of the tenant.

UpdateTime String Jul 9, 2018 2:43:37 PM

The time when the resource group was last updated.

HttpStatusCode Integer 200

The HTTP status code that is returned.

RequestId String 0bc1411515937635973****

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

Success Boolean true

Indicates whether the request is successful.

Examples

Sample requests

http(s)://[Endpoint]/?Action=ListResourceGroups
&RegionId=cn-shanghai
&ResourceGroupType=3
&<Common request parameters>

Sample success responses

XML format

<RequestId>0bc1411515937635973****</RequestId>
<HttpStatusCode>200</HttpStatusCode>
<Data>
    <Status>0</Status>
    <IsDefault>true</IsDefault>
    <CreateTime>Jul 9, 2018 2:43:37 PM</CreateTime>
    <Mode>SHARE</Mode>
    <Cluster>AY18G</Cluster>
    <Sequence>300</Sequence>
    <ResourceGroupType>3</ResourceGroupType>
    <Name>abc</Name>
    <TenantId>1234567</TenantId>
    <Identifier>e1815577-2f4e-4c5e-b29****</Identifier>
    <EnableKp>false</EnableKp>
    <BizExtKey>default</BizExtKey>
    <UpdateTime>Jul 9, 2018 2:43:37 PM</UpdateTime>
    <Id>1234567</Id>
    <Specs>{}</Specs>
</Data>
<Success>true</Success>

JSON format

{
    "RequestId": "0bc1411515937635973****",
    "HttpStatusCode": 200,
    "Data": {
        "Status": 0,
        "IsDefault": true,
        "CreateTime": "Jul 9, 2018 2:43:37 PM",
        "Mode": "SHARE",
        "Cluster": "AY18G",
        "Sequence": 300,
        "ResourceGroupType": 3,
        "Name": "abc",
        "TenantId": 1234567,
        "Identifier": "e1815577-2f4e-4c5e-b29****",
        "EnableKp": false,
        "BizExtKey": "default",
        "UpdateTime": "Jul 9, 2018 2:43:37 PM",
        "Id": 1234567,
        "Specs": "{}"
    },
    "Success": true
}

Error codes

HTTP status code Error code Error message Description
400 Invalid.Tenant.ConnectionNotExists The connection does not exist. The error message returned because the specified data source does not exist.
400 Invalid.Tenant.ProjectNotExists The project does not exist. The error message returned because the specified project does not exist.
403 Invalid.Tenant.UserIsNotProjectOwnerOrAdmin The user is not a project administrator or owner. The error message returned because the user is not the workspace owner or a workspace administrator.
400 Invalid.Tenant.UserNotInProject The user is not in the project. The error message returned because the user is not added to the workspace.
403 Invalid.Tenant.UserNotInTenant The user is not in tenant. The error message returned because the user does not belong to the tenant.

For a list of error codes, visit the API Error Center.