Lists Ray clusters.
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
| Action | Access level | Resource type | Condition key | Dependent action |
|---|---|---|---|---|
emr-serverless-spark:ListRayCluster | none | All Resources (*) | None | None |
To call this API, your RAM user or RAM role must be granted the emr-serverless-spark:ListRayCluster action in a Resource Access Management (RAM) policy. For APIs without resource-level permissions, use an asterisk (*) in the Resource element of the policy. For information about common condition keys, see Common condition keys.
Request syntax
GET /api/v1/workspaces/{workspaceId}/rayCluster HTTP/1.1Path parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
workspaceId | string | No | The workspace ID. | w-d2d82aa09155 |
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
pageSize | integer | No | The number of entries per page. Default value: 20. Valid values: 1 to 100. | 20 |
pageNum | integer | No | The page number. | 1 |
Response elements
| Element | Type | Description | Example |
|---|---|---|---|
requestId | string | The request ID. | DD6B1B2A-5837-5237-ABE4-FF0C8944 |
rayClusters | array\<object\> | The Ray clusters. | — |
rayClusters[].clusterId | string | The cluster ID. | ray-uiulpgow9xljimm1 |
rayClusters[].name | string | The name of the Ray cluster. | testRayCluster |
rayClusters[].displayReleaseVersion | string | The Ray engine version. | ray-1.0.0 (Ray 2.47.1, Python 3.12) |
rayClusters[].description | string | The description. | Ray Cluster for dev. |
rayClusters[].networkServiceName | string | The name of the network connectivity service. | vpc |
rayClusters[].state | string | The cluster state. Valid values: Starting, Running, Stopping, Stopped, Error. | Running |
rayClusters[].createTime | integer | The time when the cluster was created. | 1723722279800 |
rayClusters[].modifiedTime | integer | The time when the cluster was last modified. | 1723722279800 |
rayClusters[].startTime | integer | The time when the cluster was started. | 1723722279800 |
rayClusters[].creator | string | The UID of the user who created the cluster. | 202077646755123991 |
rayClusters[].creatorName | string | The nickname of the creator. | Alice |
rayClusters[].modifier | string | The UID of the user who last updated the cluster. | 202077646755123991 |
rayClusters[].modifierName | string | The nickname of the modifier. | Alice |
rayClusters[].userId | string | The ID of the Alibaba Cloud account. | 1234567890 |
rayClusters[].instanceId | string | The ID of the Ray cluster instance. | ray-uiulpgow9xljimm1-xxxxxxx |
rayClusters[].dashboardUrl | string | The URL of the Ray cluster dashboard. | https://emr-spark-ray-gateway-cn-hangzhou.aliyuncs.com?token=xxxxxxxxx |
rayClusters[].grpcEndpoint | string | The gRPC endpoint for the internal network. The domain name can also be used to submit Ray jobs. | ray://emr-spark-ray-gateway-cn-hanghzou-internal.emr.aliyuncs.com:80 |
rayClusters[].modified | boolean | Indicates whether the configuration has been modified. | false |
rayClusters[].message | string | The error message. | ok |
rayClusters[].headSpec | object | The head node configuration. | — |
rayClusters[].headSpec.queueName | string | The queue name. | root_queue |
rayClusters[].headSpec.cpu | string | The number of CPU cores. | 2 |
rayClusters[].headSpec.memory | string | The memory size. Unit: Gi. | 8Gi |
rayClusters[].headSpec.replica | integer | The number of head nodes. | 1 |
rayClusters[].headSpec.gpuSpec | string | The GPU instance type. | ecs.gn6i-c4g1.xlarge |
rayClusters[].headSpec.enableAutoScaling | boolean | Specifies whether automatic scaling is enabled for worker nodes. | false |
rayClusters[].headSpec.idleTimeoutSeconds | integer | The idle timeout period for worker nodes, in seconds. | 60 |
rayClusters[].workerSpec | array\<object\> | The worker node configurations. | — |
rayClusters[].workerSpec[].groupName | string | The name of the worker group. | Group1 |
rayClusters[].workerSpec[].workerType | string | The worker type. | CPU |
rayClusters[].workerSpec[].replica | integer | The number of worker nodes. | 2 |
rayClusters[].workerSpec[].queueName | string | The queue name. | root_queue |
rayClusters[].workerSpec[].cpu | string | The number of CPU cores. | 2 |
rayClusters[].workerSpec[].memory | string | The memory size. Unit: Gi. | 8Gi |
rayClusters[].workerSpec[].gpuSpec | string | The GPU instance type. | ecs.gn6i-c4g1.xlarge |
rayClusters[].workerSpec[].minReplica | integer | The minimum number of worker nodes when automatic scaling is enabled. | 1 |
rayClusters[].workerSpec[].maxReplica | integer | The maximum number of worker nodes when automatic scaling is enabled. | 10 |
State values
| Value | Description |
|---|---|
Starting | The cluster is starting. |
Running | The cluster is running. |
Stopping | The cluster is stopping. |
Stopped | The cluster is stopped. |
Error | The cluster has failed. |
Examples
Success response
{
"requestId": "DD6B1B2A-5837-5237-ABE4-FF0C8944",
"rayClusters": [
{
"clusterId": "ray-uiulpgow9xljimm1",
"name": "testRayCluster",
"displayReleaseVersion": "ray-1.0.0 (Ray 2.47.1, Python 3.12)",
"description": "Ray Cluster for dev.",
"networkServiceName": "vpc",
"headSpec": {
"queueName": "root_queue",
"cpu": "2",
"memory": "8Gi",
"enableAutoScaling": false,
"idleTimeoutSeconds": 60,
"replica": 1,
"gpuSpec": "ecs.gn6i-c4g1.xlarge"
},
"workerSpec": [
{
"groupName": "Group1",
"workerType": "CPU",
"replica": 2,
"queueName": "root_queue",
"cpu": "2",
"memory": "8Gi",
"minReplica": 1,
"maxReplica": 10,
"gpuSpec": "ecs.gn6i-c4g1.xlarge"
}
],
"state": "Running",
"createTime": 1723722279800,
"modifiedTime": 1723722279800,
"creator": "202077646755123991",
"creatorName": "Alice",
"modifier": "202077646755123991",
"modifierName": "Alice",
"userId": "1234567890",
"dashboardUrl": "https://emr-spark-ray-gateway-cn-hangzhou.aliyuncs.com?token=xxxxxxxxx",
"modified": false,
"message": "ok",
"instanceId": "ray-uiulpgow9xljimm1-xxxxxxx",
"startTime": 1723722279800,
"grpcEndpoint": "ray://emr-spark-ray-gateway-cn-hanghzou-internal.emr.aliyuncs.com:80"
}
]
}Error codes
See Error codes for a complete list.
Release notes
See Release notes for a complete list.