Start or Terminate a Cluster
- PUT /api/v1.3/clusters/(string: id_or_label)/state
Use this API to start or terminate a cluster.
Caution
You must not manually launch instances in the security groups created by Qubole when a cluster is active. Launching the instances in the Qubole security groups would result in the incorrect display of the number of nodes in the Clusters UI page.
Required Role
The following users can make this API call:
Users who belong to the system-user or system-admin group.
Users who belong to 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 |
Examples
Start a Cluster
Caution
You must not manually launch instances in the security groups created by Qubole when a cluster is active. Launching the instances in the Qubole security groups would result in the incorrect display of the number of nodes in the Clusters UI page.
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/v1.3/clusters/1710/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.
Response
{"message":"Starting cluster with id 1710."}
Terminate a Running Cluster
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/v1.3/clusters/1710/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.
Response
{"message":"Terminating cluster with id 1710."}