Start or Terminate a Cluster¶
-
PUT
/api/v2.2/clusters/<<Cluster ID>/<Cluster Label>>/state
¶
Use this API to start or terminate a cluster.
Required Role¶
The following roles can make this API call:
- A user who is part of the system-user/system-admin group.
- A user invoking this API must be part of a group associated with a role that allows start/stop operations on a cluster. See Managing Groups and Managing Roles for more information.
Parameters¶
Note
Parameters marked in bold below are mandatory. Others are optional and have default values.
Parameter | Description |
---|---|
state | It is used to state the action to perform. Its valid values are start to start a cluster and terminate to terminate it. Starting a running cluster or stopping a
terminated cluster will have no effect. |
Examples¶
Start a Cluster¶
Here is an example to start a cluster that has 170 as its cluster ID.
curl -X PUT -H "X-AUTH-TOKEN:$X_AUTH_TOKEN" -H "Content-Type: application/json" -H "Accept: application/json"
-d '{"state":"start"}' https://api.qubole.com/api/v2.2/clusters/170/state
Note
The above syntax uses https://api.qubole.com as the endpoint. Qubole provides other endpoints to access QDS that are described in Supported Qubole Endpoints on Different Cloud Providers.
Terminate a Running Cluster¶
Here is an example to terminate a running cluster that has 170 as its cluster ID.
curl -X PUT -H "X-AUTH-TOKEN:$X_AUTH_TOKEN" -H "Content-Type: application/json" -H "Accept: application/json"
-d '{"state":"terminate"}' https://api.qubole.com/api/v2.2/clusters/170/state
Note
The above syntax uses https://api.qubole.com as the endpoint. Qubole provides other endpoints to access QDS that are described in Supported Qubole Endpoints on Different Cloud Providers.