This API is used to stop a cluster.
For details, see Calling APIs.
POST /v1.1/{project_id}/clusters/{cluster_id}/action
Parameter | Mandatory | Type | Description |
|---|---|---|---|
project_id | Yes | String | Project ID. For details about how to obtain it, see Project ID and Account ID. |
cluster_id | Yes | String | Cluster ID |
Parameter | Mandatory | Type | Description |
|---|---|---|---|
X-Auth-Token | Yes | String | User token. It can be obtained by calling the IAM API (value of X-Subject-Token in the response header). |
Parameter | Mandatory | Type | Description |
|---|---|---|---|
stop | Yes | stop object | Cluster stop operation. For details, see the descriptions of stop parameters. |
Parameter | Mandatory | Type | Description |
|---|---|---|---|
stopMode | Yes | String | Stop mode.
|
delayTime | No | Integer | Shutdown delay, in seconds. This parameter is valid only when stopMode is set to GRACEFULLY. If the value is -1, the system waits until all jobs are complete and stops accepting new jobs. If the value is greater than 0, the system stops the cluster after the specified delay and stops accepting new jobs. |
Status code: 200
Parameter | Type | Description |
|---|---|---|
jobId | Array of strings | Job ID |
Stopping a Cluster
POST /v1.1/1551c7f6c808414d8e9f3c514a170f2e/clusters/bae65496-643e-47ca-84af-948672de7eeb/action{"stop" : {"stopMode" : "GRACEFULLY","delayTime" : -1}}
Status code: 200
Request succeeded.
{"jobId" : [ "ff8080815e59d92d015e5b27ccb0004d" ]}
Status Code | Description |
|---|---|
200 | Request succeeded. |
400 | Request error. |
401 | Authentication failed. |
403 | No operation permissions. |
404 | No resources found. |
500 | Internal service error. For details about the returned error code, see Error Codes. |
503 | Service unavailable. |
See Error Codes.