suspend-cluster

Description

Suspends a running Managed Service cluster.

Usage

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

Flags

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

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

For information on global flags, see Global Flags.

Remarks

  • Only unlimited storage clusters can be suspended, which are clusters created in a region that supports unlimited storage. Otherwise, the cluster is a standard cluster that cannot be suspended. Run singlestore list-clusters --cluster-id <clusterID> to view the region of a cluster. To display information about available regions, run singlestore list-regions.

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

  • When a cluster is suspended, it may take some time to reach the “Suspended” state. Run singlestore list-clusters --cluster-id <clusterID> to view the cluster state.

  • Suspended clusters are charged only for storage and save cost on computing (see details).

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 suspended 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

Suspend a cluster.

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

The cluster may take some time to be fully “Suspended”. In the meantime, you can run the following command to verify the cluster state.

singlestore 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": "Suspending",
    	"version": "7.5.11",
    	"firewallRanges": [
      	"192.168.0.1/32"
    	],
    	"createdAt": "2021-10-04T06:14:35Z",
    	"expiresAt": "2100-01-02T22:04:05Z"
  	}
	]
  }
}