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

ParameterTypeRequiredExampleDescription
ActionStringYesListResourceGroups

The operation that you want to perform. Set the value to ListResourceGroups.

ResourceGroupTypeIntegerYes3

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

  • 0: DataWorks
  • 1: scheduling
  • 2: MaxCompute
  • 3: Machine Learning 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.

KeywordStringNoabc

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

BizExtKeyStringNodefault

The category of the resource groups. Valid values:

  • default: shared resource group
  • single: exclusive resource group
  • Default value: default
ResourceManagerResourceGroupIdStringNorg-acfmzbn7pti3zfa

The ID of the resource group.

TagsArrayNo

The tags.

KeyStringNoEnv

The tag key.

ValueStringNoTest

The tag value.

Response parameters

ParameterTypeExampleDescription
HttpStatusCodeInteger200

The HTTP status code returned.

RequestIdString0bc1411515937635973****

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

SuccessBooleantrue

Indicates whether the request was successful.

DataArray of Data

The resource groups.

StatusInteger0

The status of the resource group. Valid values:

  • 0: The resource group is running or in service.
  • 1: The resource group has expired and is frozen.
  • 2: The resource group is released or destroyed.
  • 3: The resource group is being created or started.
  • 4: The resource group fails to be created or started.
  • 5: The resource group is being scaled out or upgraded.
  • 6: The resource group fails to be scaled out or upgraded.
  • 7: The resource group is being released or destroyed.
  • 8: The resource group fails to be released or destroyed.
  • 9: The operation performed on the resource group times out. All operations may time out. This value is temporarily available only for DataService Studio.
UpdateTimeStringJul 9, 2018 2:43:37 PM

The time when the resource group was last updated.

IsDefaultBooleantrue

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.
ClusterStringAY18G

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

EnableKpBooleanfalse

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.

ResourceGroupTypeString3

The type of the resource group. Valid values:

  • 0: DataWorks
  • 2: MaxCompute
  • 3: PAI
  • 4: Data Integration
  • 7: scheduling
  • 9: DataService Studio
CreateTimeStringJul 9, 2018 2:43:37 PM

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

IdentifierStringe1815577-2f4e-4c5e-b29****

The identifier of the resource group.

ModeStringSHARE

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
BizExtKeyStringdefault

The category of the resource group. Valid values:

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

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

SpecsMap

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

NameStringabc

The name of the resource group.

IdLong1234567

The ID of the resource group.

TenantIdLong1234567

The ID of the tenant.

ResourceManagerResourceGroupIdStringrg-acfmzbn7pti3zfa

The ID of your Alibaba Cloud resource group.

TagsArray of Tag

The tags.

KeyStringEnv

The tag key.

ValueStringTest

The tag value.

Examples

Sample requests

http(s)://[Endpoint]/?Action=ListResourceGroups
&ResourceGroupType=3
&Keyword=abc
&BizExtKey=default
&ResourceManagerResourceGroupId=rg-acfmzbn7pti3zfa
&Tags=[{"Key":"Env","Value":"Test"}]
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

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

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "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,
    "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 error message returned because the specified data source does not exist.
400Invalid.Tenant.ProjectNotExistsThe project does not exist.The error message returned because the specified workspace does not exist.
400Invalid.Tenant.UserNotInProjectThe user is not in the project.The error message returned because the user is not added to the workspace.
403Invalid.Tenant.UserIsNotProjectOwnerOrAdminThe user is not a project administrator or owner.The error message returned because the user is not the workspace owner or workspace administrator.
403Invalid.Tenant.UserNotInTenantThe user is not in tenant.The error message returned because the user does not belong to the tenant.

For a list of error codes, see Service error codes.