terminate-cluster

Description

Terminates a Managed Service cluster in an organization.

Usage

singlestore terminate-cluster --cluster-id [FLAGS] [GLOBAL_FLAG]

Flags

--cluster-id=clusterID - The clusterID of the cluster that needs to be terminated. To find the list of clusters and their IDs, run singlestore list-clusters.

-h, --help - Help information for the singlestore terminate-cluster command.

For information on global flags, see Global Flags.

Remarks

  • This command can only terminate clusters in the organization that is mapped to the API key used. To terminate a cluster in a different organization, set up the respective API key before running this command.

  • When a cluster is terminated, it may take some time to reach the “Terminated” state. To verify the cluster state, run singlestore list-clusters --cluster-id <clusterID>.

  • Terminated clusters cannot be reinstated.

Output

The command outputs the following fields in JSON format.

status string - Indicates the status of the command execution, such as “success”, “fail”, or “error”. The command typically fails when the preconditions are not met. The “error” status usually indicates an API error.

data struct - If the command executes successfully, the clusterID of the terminated cluster is returned. Upon failure, the reason for the command failure is returned. No data is returned if the status is “error”.

message string - This field is returned if the command status is “error”. A description of the API error is returned.

Examples

Terminate a cluster.

singlestore terminate-cluster --cluster-id 9456ba80-f7ab-4397-b495-d52593bc8dbe
****
{
  "status": "success",
  "data": {
	"clusterID": "9456ba80-f7ab-4397-b495-d52593bc8dbe"
  }
}

You may verify that the cluster is terminated by running the following command:

singlestore list-clusters --cluster-id 9456ba80-f7ab-4397-b495-d52593bc8dbe
****
{
  "status": "success",
  "data": {
	"clusters": [
  	{
    	"name": "sample-cluster",
    	"clusterID": "9456ba80-f7ab-4397-b495-d52593bc8dbe",
    	"region": {
      	"regionID": "c74bb6a6-0f14-4d56-bc80-1d874fa277b7",
      	"region": "Asia Pacific Southeast 2 (Sydney)",
      	"provider": "AWS"
    	},
    	"size": "1.0",
    	"state": "Terminated",
    	"version": "7.5.11",
    	"createdAt": "2021-10-04T06:14:35Z",
    	"expiresAt": "2100-01-02T22:04:05Z",
    	"terminatedAt": "2021-10-04T06:27:55Z"
  	}
	]
  }
}