All Products
Search
Document Center

DataWorks:GetComputeResource

Last Updated:Jan 12, 2026

Queries the specified computing resource based on the computing resource ID.

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

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
dataworks:GetComputeResourceget
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
IdlongYes

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

11792
ProjectIdlongYes

The ID of the DataWorks workspace.

10003

Response parameters

ParameterTypeDescriptionExample
object

The returned result.

RequestIdstring

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

9252F32F-D855-549E-8898-61CF5A733050
ComputeResourceobject

The details of the computing resource.

Idlong

The ID of the computing resource.

16738
ProjectIdlong

The ID of the workspace to which the computing resource belongs.

52660
Namestring

The name of the computing resource.

MyCs
Typestring

The type of the computing resource.

hologres
ConnectionPropertiesany

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 various configuration modes (ConnectionPropertiesMode).
{ "envType": "Prod", "regionId": "cn-beijing", "instanceId": "hgprecn-cn-x0r3oun4k001", "database": "testdb", "securityProtocol": "authTypeNone", "authType": "Executor", "authIdentity": "1107550004253538" }
ConnectionPropertiesModestring

The addition category of the computing resource. Different types will have different subtypes, each with corresponding parameter constraints. For instance:

  • InstanceMode: Instance mode
  • UrlMode: Connection String Mode
  • CdhMode: CDH mode
InstanceMode
Descriptionstring

The description of the computing resource.

My Description
CreateTimelong

The creation time, in timestamp format.

1698286929333
CreateUserstring

The ID of the creator.

1107550004253538
ModifyTimelong

The last modification time, in timestamp format.

1698286929333
ModifyUserstring

The ID of the modifier.

1107550004253538
QualifiedNamestring

The business unique key for the computing resource. For example, the format for Hologres is ${tenantOwnerId}:${regionId}:${type}:${instanceId}:${database}.

1107550004253538:cn-beijing:holo:hgprecn-cn-x0r3oun4k001:testdb
WhetherDefaultboolean

Specifies whether it is the default computing resource.

true

Examples

Sample success responses

JSONformat

{
  "RequestId": "9252F32F-D855-549E-8898-61CF5A733050",
  "ComputeResource": {
    "Id": 16738,
    "ProjectId": 52660,
    "Name": "MyCs",
    "Type": "hologres",
    "ConnectionProperties": {
      "envType": "Prod",
      "regionId": "cn-beijing",
      "instanceId": "hgprecn-cn-x0r3oun4k001",
      "database": "testdb",
      "securityProtocol": "authTypeNone",
      "authType": "Executor",
      "authIdentity": 1107550004253538
    },
    "ConnectionPropertiesMode": "InstanceMode",
    "Description": "My Description",
    "CreateTime": 1698286929333,
    "CreateUser": 1107550004253538,
    "ModifyTime": 1698286929333,
    "ModifyUser": 1107550004253538,
    "QualifiedName": "1107550004253538:cn-beijing:holo:hgprecn-cn-x0r3oun4k001:testdb",
    "WhetherDefault": true
  }
}

Error codes

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

Change history

Change timeSummary of changesOperation
2025-11-25Add OperationView Change Details