How to restart a cluster on databricks using databricks-CLI?

User16790091296
Databricks Employee
Databricks Employee

I'm trying to restart an existing cluster in Databricks on Azure using databricks-cli.

I'm using the following command:

databricks clusters restart {"cluster_id": "0710-121255-liner30"}

But it gives giving me this error:

Error: Missing option "--cluster-id".

User16766737456
Databricks Employee
Databricks Employee

Can you try:

databricks clusters restart --cluster-id <the-cluster-id>
$ databricks clusters restart --help
Usage: databricks clusters restart [OPTIONS]
 
  Restarts a Databricks cluster given its ID.
 
  If the cluster is not currently in a RUNNING state, nothing will happen
 
Options:
  --cluster-id CLUSTER_ID  Can be found in the URL at https://*.cloud.databric
                           ks.com/#/setting/clusters/$CLUSTER_ID/configuration
                           .  [required]
  --debug                  Debug Mode. Shows full stack trace on error.
  --profile TEXT           CLI connection profile to use. The default profile
                           is "DEFAULT".
  -h, --help               Show this message and exit.