Querying Cluster Details

Function

This API is used to query CDM cluster details, including the cluster version, cluster node information, creation time, and cluster status.

URI

  • URI format
    GET /v1.1/{project_id}/clusters/{cluster_id}
  • 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
GET /v1.1/1551c7f6c808414d8e9f3c514a170f2e/clusters/bae65496-643e-47ca-84af-948672de7eeb

Response

  • Sample response
    {
      "version": "x.x.x",
      "instances": [{
        "flavor": {
          "id": "fb8fe666-6734-4b11-bc6c-43d11db3c745"
        },
        "volume": {
          "type": "LOCAL_DISK",
          "size": 100
        },
        "status": "200",
        "actions": ["REBOOTING"],
        "type": "cdm",
        "id": "635dce67-3df8-4756-b4c7-90e45e687367",
        "name": "cdm-c018",
        "isFrozen": "0",
        "config_status": "In-Sync"
      }],
      "updated": "2018-09-05T08:38:25",
      "name": "cdm-c018",
      "created": "2018-09-05T08:38:25",
      "id": "bae65496-643e-47ca-84af-948672de7eeb",
      "publicEndpoint": "49.xx.xx.10",
      "status": "200",
      "actions": ["REBOOTING"],
      "isFrozen": "0",
      "statusDetail": "Normal",
      "actionProgress": {
          
      },
      "config_status": "In-Sync"
    }
  • Parameter description

    Parameter

    Mandatory

    Type

    Description

    version

    Yes

    String

    Cluster version

    instances

    Yes

    List

    Cluster node information. For details, see Description of the instances parameter.

    updated

    Yes

    String

    Time when a cluster is updated. The format is YYYY-MM-DDThh:mm:ssZ (ISO 8601).

    name

    Yes

    String

    Cluster name

    created

    Yes

    String

    Time when a cluster is created. The format is YYYY-MM-DDThh:mm:ssZ (ISO 8601).

    id

    Yes

    String

    Cluster ID

    publicEndpoint

    No

    String

    EIP bound to a cluster

    status

    Yes

    String

    Cluster status. The options are as follows:
    • 100: Creating
    • 200: Normal
    • 300: Failed
    • 303: Creation failed
    • 800: Frozen
    • 900: Stopped
    • 910: Stopping
    • 920: Starting

    actions

    No

    String

    Cluster operation status list. The options are as follows:
    • REBOOTING: Restarting
    • RESTORING: Restoring
    • REBOOT_FAILURE: Restart failed

    isFrozen

    Yes

    String

    Whether a cluster is frozen. The options are as follows:
    • 0: No
    • 1: Yes

    statusDetail

    No

    String

    Cluster status description

    actionProgress

    No

    List

    Cluster operation progress. For details, see Description of the actionProgress parameter.

    config_status

    No

    String

    Cluster configuration status. The options are as follows:

    • In-Sync: Configuration synchronized
    • Applying: Being configured
    • Sync-Failure: Configuration failed
  • Description of the instances parameter

    Parameter

    Mandatory

    Type

    Description

    flavor

    Yes

    Dictionary

    VM flavor of a node. For details, see Description of the flavor parameter.

    volume

    Yes

    Dictionary

    Disk information of a node. For details, see Description of the volume parameter.

    status

    Yes

    String

    Node status. The options are as follows:

    • 100: Creating
    • 200: Normal
    • 300: Failed
    • 303: Creation failed
    • 400: Deleted
    • 800: Frozen

    actions

    No

    String list

    Node operation status list. The options are as follows:

    • REBOOTING: Restarting
    • RESTORING: Restoring
    • REBOOT_FAILURE: Restart failed

    type

    Yes

    String

    Node type. Currently, only cdm is available.

    id

    Yes

    String

    VM ID

    name

    Yes

    String

    VM name

    isFrozen

    Yes

    String

    Whether the node is frozen. The options are as follows:

    • 0: No
    • 1: Yes

    config_status

    No

    String

    Node configuration status. The options are as follows:

    • In-Sync: Configuration synchronized
    • Applying: Being configured
    • Sync-Failure: Configuration failed
  • Description of the flavor parameter

    Parameter

    Mandatory

    Type

    Description

    id

    Yes

    String

    VM flavor ID

  • Description of the volume parameter

    Parameter

    Mandatory

    Type

    Description

    type

    Yes

    String

    Type of disks on the node. Only local disks are supported.

    size

    Yes

    Integer

    Size of the disk on the node (GB)

  • Description of the actionProgress parameter

    Parameter

    Mandatory

    Type

    Description

    CREATING

    No

    String

    Cluster creation progress. For example, 29%.

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.