All Products
Search
Document Center

DataWorks:ListComputeResources

Last Updated:Mar 30, 2026

Queries the list of computing resources that meet the specified business information.

Operation description

  1. DataWorks Basic Edition or a more advanced edition is required.

  2. You must have at least one of the following roles in the DataWorks workspace:

  3. Tenant Owner, Workspace Administrator, Deploy, Developer, Visitor, Project Owner, O&M, Model Designer, Security Administrator, Data Analyst, Development Platform Administrator, Data Governance Administrator

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:ListComputeResources

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

ProjectId

integer

Yes

The ID of the DataWorks workspace.

21229

Name

string

No

The name of the computing resource.

category name

Types

array

No

The filter for computing resource types. You can configure multiple types for filtering.

string

No

The type of the computing resource.

hologres

EnvType

string

No

The environment type of the computing resource. Valid values:

  • Dev

  • Prod

Dev

PageNumber

integer

No

The page number to query. The default value is 1, which indicates the first page.

1

PageSize

integer

No

The number of entries per page. The default value is 10, and the maximum value is 100.

10

SortBy

string

No

The field to sort the computing resource list by. Supported fields include name, creation time, and computing resource ID.

  • CreateTime: Sorts by creation time

  • Id: Sorts by computing resource ID

  • Name: Sorts by computing resource name.

  • CreateTimeWithDefaultFirst: Sorts based on whether it is the default resource and by creation time, with the default computing resource listed first.

Default value: CreateTime

CreateTimeWithDefaultFirst

Order

string

No

The sort direction of the computing resource list. Valid values:

  • Desc: descending order.

  • Asc: ascending order.

Default value: Desc

Asc

Response elements

Element

Type

Description

Example

object

The returned result.

RequestId

string

The request ID. Used to locate logs and troubleshoot issues.

7C352CB7-CD88-50CF-9D0D-E81BDF02XXXX

PagingInfo

object

Pagination information.

TotalCount

integer

The total number of records.

100

PageSize

integer

The number of records per page.

10

PageNumber

integer

The current page number.

1

ComputeResources

array<object>

The list of computing resources. Each element is a computing resource group that contains information about the development environment (if any) and the production environment.

array<object>

Information about the computing resource group, which includes computing resources for the development environment (if any) and the production environment. The computing resources for the development and production environments have the same name and type but different IDs.

Name

string

The name of the computing resource.

cal_all_vemg_workflow_parallel

Type

string

The type of the computing resource.

hologres

ComputeResource

array<object>

Details of a single computing resource.

object

Details of a single computing resource.

Id

integer

The computing resource ID, which is the unique identifier for the resource.

8649832502405358603

ConnectionProperties

any

The category of the added compute resource. Different types have different subtypes with corresponding parameter constraints. Examples: InstanceMode: The instance mode. UrlMode: The connection string mode.

{\n \"clusterIdentifier\": \"c-da123456\",\n \"database\": \"testdb\",\n \"loginMode\":\"Anonymous\",\n \"defaultFS\":\"127.0.0.1\",\n \"envType\": \"Prod\"\n}

ConnectionPropertiesMode

string

The specific connection configuration details for the computing resource, including the connection address, access identity, and environment information. envType, which specifies the computing resource environment, is a property of this object. Valid values:

  • Dev

  • Prod Different types of computing resources have different attribute specifications under different configuration modes (ConnectionPropertiesMode).

UrlMode

Description

string

The unique identifier of the computing resource.

home_feed

CreateTime

integer

The creation time (timestamp).

1624387842781448

CreateUser

string

The creator ID.

1648711113000

ModifyTime

integer

The last modified time of the computing resource (timestamp).

1624387842781448

ModifyUser

string

The modifier ID.

1648711113000

WhetherDefault

boolean

Specifies whether it is the default compute resource.

true

Examples

Success response

JSON format

{
  "RequestId": "7C352CB7-CD88-50CF-9D0D-E81BDF02XXXX",
  "PagingInfo": {
    "TotalCount": 100,
    "PageSize": 10,
    "PageNumber": 1,
    "ComputeResources": [
      {
        "Name": "cal_all_vemg_workflow_parallel",
        "Type": "hologres",
        "ComputeResource": [
          {
            "Id": 8649832502405359000,
            "ConnectionProperties": "{\\n    \\\"clusterIdentifier\\\": \\\"c-da123456\\\",\\n    \\\"database\\\": \\\"testdb\\\",\\n    \\\"loginMode\\\":\\\"Anonymous\\\",\\n    \\\"defaultFS\\\":\\\"127.0.0.1\\\",\\n    \\\"envType\\\": \\\"Prod\\\"\\n}",
            "ConnectionPropertiesMode": "UrlMode",
            "Description": "home_feed",
            "CreateTime": 1624387842781448,
            "CreateUser": "1648711113000",
            "ModifyTime": 1624387842781448,
            "ModifyUser": "1648711113000",
            "WhetherDefault": true
          }
        ]
      }
    ]
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.