Querying the Cluster List

Function

This API is used to query the CDM cluster list.

URI

  • URI format
    GET /v1.1/{project_id}/clusters?enterprise_project_id=all_granted_eps
  • 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.

Request

Sample request
GET /v1.1/1551c7f6c808414d8e9f3c514a170f2e/clusters

Response

  • Sample response
    {
      "clusters": [{
        "version": "x.x.x",
        "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",
        "isFrozen": "0",
        "statusDetail": "Normal",
        "actionProgress": {},
        "config_status": "In-Sync"
      }]
    }
  • Parameter description

    Parameter

    Mandatory

    Type

    Description

    clusters

    Yes

    List

    Cluster list. For details, see Description of the clusters parameter.

  • Description of the clusters parameter

    Parameter

    Mandatory

    Type

    Description

    version

    Yes

    String

    Cluster version

    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: Running
    • 300: Failed
    • 303: Creation failed
    • 800: Frozen
    • 900: Stopped
    • 910: Stopping
    • 920: Starting

    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

    Dictionary

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