Updated on 2024-11-29 GMT+08:00

Terminating a Cluster

Scenario

This API is used to delete a cluster after data processing and analysis are completed or the cluster is abnormal.

Clusters in any of the following states cannot be terminated:
  • Scaling-out: The cluster is being scaled out.
  • Scaling-in: The cluster is being scaled in.
  • Starting: The cluster is being started.
  • Terminating: The cluster is being deleted.
  • Terminated: The cluster has been terminated.
  • Failed: The cluster is failed.

For details on how to call APIs, see Making an API Request.

Constraints

  • You have obtained the project ID of the region where the cluster is to be created. For details, see Obtaining a Project ID.
  • You have obtained the cluster ID, that is, the value of cluster_id in the command output returned after the cluster is successfully created. For details about how to obtain the cluster ID, see Obtaining a Cluster ID.

Procedure

  • API

    URI format: DELETE /V1.1/{project_id}/clusters/{cluster_id}

    For details, see Terminating a Cluster.

  • Example request

    DELETE: https://{endpoint}/v1.1/{project_id}/clusters/{cluster_id}

    • For details about {endpoint}, see Endpoints.
    • For details about {project_id}, see Obtaining a Project ID.
    • {cluster_id} indicates the value of cluster_id in the command output returned after the cluster is successfully created. You can also obtain the value of cluster_id by referring to Obtaining a Cluster ID.

    Request body: None

  • Example response
    {
    	"result": "succeeded"
    }