CreateRayCluster

更新时间:
复制 MD 格式

Creates a Ray cluster.

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

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request syntax

POST /api/v1/workspaces/{workspaceId}/rayCluster HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

workspaceId

string

No

The workspace ID.

w-d2d82aa09155

Request parameters

Parameter

Type

Required

Description

Example

body

object

No

The request struct.

name

string

No

The name of the Ray cluster. The name must be 1 to 64 characters in length.

testRayCluster

displayReleaseVersion

string

No

The version of the Ray engine.

ray-1.0.0 (Ray 2.47.1, Python 3.12)

description

string

No

The description of the cluster.

Ray Cluster for dev.

networkServiceName

string

No

The name of the network connection.

vpc

headSpec

object

No

The parameters for the head node of the Ray cluster.

queueName

string

No

The queue name.

root_queue

cpu

string

No

The number of CPU cores.

2

memory

string

No

The memory size, in GiB.

8Gi

enableAutoScaling

boolean

No

Specifies whether to enable automatic scaling for worker nodes.

false

idleTimeoutSeconds

integer

No

The idle timeout period in seconds for worker nodes when automatic scaling is enabled.

60

gpuSpec

string

No

ecs.gn6i-c4g1.xlarge

workerSpec

array<object>

No

The parameters for the worker nodes of the Ray cluster. You can specify up to 50 worker groups.

object

No

The struct of the worker node.

groupName

string

No

The name of the worker group.

WorkerGroup1

workerType

string

No

The worker type.

CPU

replica

integer

No

The number of worker nodes. The minimum value is 1.

2

queueName

string

No

The queue name.

root_queue

cpu

string

No

The number of CPU cores.

4

memory

string

No

The memory size, in GiB.

16Gi

minReplica

integer

No

The minimum number of worker nodes for automatic scaling. The minimum value is 1. This value must be less than or equal to maxReplica.

1

maxReplica

integer

No

The maximum number of worker nodes for automatic scaling. The minimum value is 1.

10

gpuSpec

string

No

ecs.gn6i-c4g1.xlarge

extraParam

string

No

Additional parameters. The value must be in JSON format.

{}

volumeIds

array

No

string

No

vol-1234567890

Response elements

Element

Type

Description

Example

object

Schema of Response

requestId

string

The request ID.

DD6B1B2A-5837-5237-ABE4-FF0C8944

clusterId

string

The ID of the Ray cluster.

ray-k7nm8ahl5te4tg91

Examples

Success response

JSON format

{
  "requestId": "DD6B1B2A-5837-5237-ABE4-FF0C8944",
  "clusterId": "ray-k7nm8ahl5te4tg91"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.