All Products
Search
Document Center

:ListResourceGroups

最終更新日:May 06, 2024

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. Set the value to ListResourceGroups.

ResourceGroupType Integer Yes 3

The type of the resource groups 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.

Keyword String No abc

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

BizExtKey String No default

The category of the resource groups. Valid values:

  • default: shared resource group
  • single: exclusive resource group
  • Default value: default
ResourceManagerResourceGroupId String No rg-acfmzbn7pti3zfa

The resource group ID.

Tags Array No

The tags.

Key String No Env

The tag key.

Value String No Test

The tag value.

Response parameters

Parameter Type Example Description
HttpStatusCode Integer 200

The HTTP status code returned.

RequestId String 0bc1411515937635973****

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

Success Boolean true

Indicates whether the request was successful.

Data Array of Data

The resource groups.

Status Integer 0

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.
UpdateTime String Jul 9, 2018 2:43:37 PM

The time when the resource group was last updated.

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.
Cluster String AY18G

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

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.

ResourceGroupType String 3

The type of the resource group. Valid values:

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

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

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

The identifier of the 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
BizExtKey String default

The category of the resource group. Valid values:

  • default: shared resource group
  • single: exclusive resource group
Sequence Integer 300

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

Specs Map

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

Name String abc

The name of the resource group.

Id Long 1234567

The resource group ID.

TenantId Long 1234567

The tenant ID.

ResourceManagerResourceGroupId String rg-acfmzbn7pti3zfa

The ID of your Alibaba Cloud resource group.

Tags Array of Tag

The tags.

Key String Env

The tag key.

Value String Test

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 code Error code Error message Description
400 Invalid.Tenant.ConnectionNotExists The connection does not exist. The specified data source does not exist.
400 Invalid.Tenant.ProjectNotExists The project does not exist. The specified workspace does not exist.
400 Invalid.Tenant.UserNotInProject The user is not in the project. The user is not added to the workspace.
403 Invalid.Tenant.UserIsNotProjectOwnerOrAdmin The user is not a project administrator or owner. The user is not the workspace owner or administrator.
403 Invalid.Tenant.UserNotInTenant The user is not in tenant. The user does not belong to the tenant.

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