Stopping a Cluster

Function

This API is used to stop a specified CDM cluster. Stopping a CDM cluster is an asynchronous operation. You can query the stop result by periodically calling the API in Querying Cluster Details. A stopped cluster cannot execute migrations jobs or access the Job Management page. You are charged lower fees for a stopped cluster than a running cluster. When a CDM cluster is no longer used, you can call this API to save costs.

URI

  • URI format
    POST /v1.1/{project_id}/clusters/{cluster_id}/action
  • Parameter description

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    String

    Project ID. For details about how to obtain the project ID, see Obtaining the Project ID, Account Name, and AK/SK.

    cluster_id

    Yes

    String

    Cluster ID. Obtain the value from the response for Creating a Cluster.

Request

  • Sample request
    POST /v1.1/1551c7f6c808414d8e9f3c514a170f2e/clusters/bae65496-643e-47ca-84af-948672de7eeb/action
    {
      "stop": {
      }
    }
  • Parameter description

    Parameter

    Mandatory

    Type

    Description

    stop

    Yes

    Dictionary

    Stopping a cluster

Response

  • Sample response
    {
      "jobId": "ff8080815e59d92d015e5b27ccb0004d"
    }
  • Parameter description

    Parameter

    Mandatory

    Type

    Description

    jobId

    No

    String

    Job ID

Return Value

  • Normal

    200

  • Abnormal

    Return Value

    Description

    400 Bad Request

    Request error. For details about the returned error code, see Error Code.

    401 Unauthorized

    Authentication failed.

    403 Forbidden

    No operation permission.

    404 Not Found

    The requested resource is not found.

    500 Internal Server Error

    Internal service error.

    503 Service Unavailable

    Service unavailable.