Querying Cluster Details

Function

This API is used to query cluster details.

URI

  • URI format

    GET /v1.0/{project_id}/clusters/{cluster_id}
    
  • Parameter description

    Table 1 URI parameters

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    String

    Project ID. For details about how to obtain the ID, see Obtaining a Project ID.

    cluster_id

    Yes

    String

    Cluster ID. For details about how to obtain the ID, see Obtaining the Cluster ID.

Request Message

Request example

GET /v1.0/89cd04f168b84af6be287f71730fdb4b/clusters/b5c45780-1006-49e3-b2d5-b3229975bbc7

Response Message

  • Example response

    {
        "cluster": {
            "id": "7d85f602-a948-4a30-afd4-e84f47471c15",
            "status": "AVAILABLE",
            "name": "dws-1",
            "updated": "2018-02-10T14:28:14Z",
            "created": "2018-02-10T14:28:14Z",
            "user_name": "dbadmin",
            "sub_status": "READONLY",
            "task_status": "SNAPSHOTTING",
            "action_progress": {"SNAPSHOTTING": "20%"},
            "node_type":   "dws.m1.xlarge.ultrahigh",
    
            "subnet_id": "374eca02-cfc4-4de7-8ab5-dbebf7d9a720",
            "security_group_id": "dc3ec145-9029-4b39-b5a3-ace5a01f772b",
            "number_of_node": 3,
            "availability_zone": "eu-de-01",
            "port": 8000,
            "vpc_id": "85b20d7e-9eb7-4b2a-98f3-3c8843ea3574",
            "public_ip": {
                "public_bind_type": "auto_assign",
                "eip_id": "85b20d7e-9etypeb2a-98f3-3c8843ea3574"
            },
            "private_ip":["192.168.0.12","192.168.0.66"],
            "public_endpoints": [
                {
                    "public_connect_info": "10.0.0.8:8000",
                    "jdbc_url": "jdbc:postgresql://10.0.0.8:8000/<YOUR_DATABASE_name>"
                }
             ],
            "endpoints": [
                {
                    "connect_info": "192.168.0.10:8000",
                    "jdbc_url": "jdbc:postgresql://192.168.0.10:8000/<YOUR_DATABASE_name>"
                }
             ],
            "version": "1.2.0",
            "maintain_window": {
                "day": "Wed",
                "start_time": "22:00",
                "end_time": "02:00"
            },
            "resize_info" : {
                "target_node_num": "6",
                "origin_node_num": "3",
                "resize_status": "GROWING",
                "start_time": "2018-02-14T14:28:14Z"
            },
            "enterprise_project_id": "6a6a18fe-417a-4188-9214-75fd08c22065",
            "recent_event": 6,
            "tags":[
                {
                    "key": "key1",
                    "value": "value1"
                 },
                {
                    "key": "key2",
                    "value": "value2"
                 }
              ],
    
             "parameter_group": {               "id": "157e9cc4-64a8-11e8-adc0-fa7ae01bbebc",
                  "name": "Default-Parameter-Group-dws ",               "status": "In-Sync"
             }
        }
    }
    
  • Parameter description

    Table 2 Response parameter description

    Parameter

    Type

    Description

    cluster

    ClusterDetail object

    Cluster object

    Table 3 ClusterDetail

    Parameter

    Type

    Description

    id

    String

    Cluster ID

    status

    String

    Cluster status. The value can be one of the following:

    • CREATING

    • AVAILABLE

    • UNAVAILABLE

    • CREATION FAILED

    name

    String

    Cluster name

    updated

    String

    Last modification time of a cluster. Format: ISO8601:YYYY-MM-DDThh:mm:ssZ

    created

    String

    Cluster creation time. Format: ISO8601: YYYY-MM-DDThh:mm:ssZ

    user_name

    String

    Administrator name

    sub_status

    String

    Sub-status of clusters in the AVAILABLE state. The value can be one of the following:

    • NORMAL

    • READONLY

    • REDISTRIBUTING

    • REDISTRIBUTION-FAILURE

    • UNBALANCED

    • UNBALANCED | READONLY

    • DEGRADED

    • DEGRADED | READONLY

    • DEGRADED | UNBALANCED

    • UNBALANCED | REDISTRIBUTING

    • UNBALANCED | REDISTRIBUTION-FAILURE

    • READONLY | REDISTRIBUTION-FAILURE

    • UNBALANCED | READONLY | REDISTRIBUTION-FAILURE

    • DEGRADED | REDISTRIBUTION-FAILURE

    • DEGRADED | UNBALANCED | REDISTRIBUTION-FAILURE

    • DEGRADED | UNBALANCED | READONLY | REDISTRIBUTION-FAILURE

    • DEGRADED | UNBALANCED | READONLY

    task_status

    String

    Cluster management task. The value can be one of the following:

    • RESTORING

    • SNAPSHOTTING

    • GROWING

    • REBOOTING

    • SETTING_CONFIGURATION

    • CONFIGURING_EXT_DATASOURCE

    • DELETING_EXT_DATASOURCE

    • REBOOT_FAILURE

    • RESIZE_FAILURE

    action_progress

    Map<String,String>

    The key indicates an ongoing task. The value can be one of the following:

    • GROWING

    • RESTORING

    • SNAPSHOTTING

    • REPAIRING

    • CREATING

    The value indicates the task progress.

    node_type

    String

    Node type

    subnet_id

    String

    Subnet ID

    security_group_id

    String

    Security group ID

    number_of_node

    Integer

    Number of cluster nodes. For a cluster, the value ranges from 3 to 256. For a hybrid data warehouse (standalone), the value is 1.

    availability_zone

    String

    AZ

    port

    Integer

    Service port of a cluster. The value ranges from 8000 to 30000. The default value is 8000.

    vpc_id

    String

    VPC ID

    public_ip

    PublicIp object

    Public IP address. If the parameter is not specified, public connection is not used by default.

    private_ip

    Array of strings

    List of private network IP addresses

    public_endpoints

    Array of PublicEndpoints objects

    Public network connection information about the cluster. If the parameter is not specified, the public network connection information is not used by default.

    endpoints

    Array of Endpoints objects

    Private network connection information about the cluster.

    version

    String

    Data warehouse version

    maintain_window

    MaintainWindow object

    Cluster maintenance window

    resize_info

    ResizeInfo object

    Cluster scale-out details

    enterprise_project_id

    String

    Enterprise project ID. The value 0 indicates the ID of the default enterprise project.

    recent_event

    Integer

    Number of events

    tags

    Array of Tags objects

    Labels in a cluster

    parameter_group

    ParameterGroup object

    Parameter group details

    node_type_id

    String

    Node type ID

    failed_reasons

    FailedReason object

    Cause of failure. If the parameter is left empty, the cluster is in the normal state.

    Table 4 FailedReason

    Parameter

    Type

    Description

    error_code

    String

    Error code

    error_msg

    String

    Error message

    Table 5 PublicIp

    Parameter

    Mandatory

    Type

    Description

    public_bind_type

    Yes

    String

    Binding type of an EIP. The value can be one of the following:

    • auto_assign

    • not_use

    • bind_existing

    eip_id

    No

    String

    EIP ID

    Table 6 PublicEndpoints

    Parameter

    Mandatory

    Type

    Description

    public_connect_info

    No

    String

    Public network connection information

    jdbc_url

    No

    String

    JDBC URL of the public network. The following is the default format:

    jdbc:postgresql://< public_connect_info>/<YOUR_DATABASE_name>

    Table 7 Endpoints

    Parameter

    Mandatory

    Type

    Description

    connect_info

    Yes

    String

    Private network connection information

    jdbc_url

    Yes

    String

    JDBC URL on the private network. The following is the default format:

    jdbc:postgresql://< connect_info>/<YOUR_DATABASE_name>

    Table 8 MaintainWindow

    Parameter

    Mandatory

    Type

    Description

    day

    No

    String

    Maintenance time in each week in the unit of day. The value can be one of the following:

    • Mon

    • Tue

    • Wed

    • Thu

    • Fri

    • Sat

    • Sun

    start_time

    No

    String

    Maintenance start time in HH:mm format. The time zone is GMT+0.

    end_time

    No

    String

    Maintenance end time in HH:mm format. The time zone is GMT+0.

    Table 9 ResizeInfo

    Parameter

    Type

    Description

    target_node_num

    Integer

    Number of nodes after the scale-out

    origin_node_num

    Integer

    Number of nodes before the scale-out

    resize_status

    String

    Scale-out status. The value can be one of the following:

    • GROWING

    • RESIZE_FAILURE

    start_time

    String

    Scale-out start time. Format: ISO8601:YYYY-MM-DDThh:mm:ss

    Table 10 Tags

    Parameter

    Type

    Description

    key

    String

    Key. A key can contain a maximum of 36 Unicode characters, which cannot be null. The first and last characters cannot be spaces. Only letters, digits, hyphens (-), and underscores (_) are allowed. It cannot contain the following characters: =*<>\,|/

    value

    String

    Value. A value can contain a maximum of 43 Unicode characters, which can be null. The first and last characters cannot be spaces. Only letters, digits, hyphens (-), and underscores (_) are allowed. It cannot contain the following characters: =*<>\,|/

    Table 11 ParameterGroup

    Parameter

    Mandatory

    Type

    Description

    id

    Yes

    String

    Parameter group ID

    name

    Yes

    String

    Parameter group name

    status

    Yes

    String

    Cluster parameter status. The value can be one of the following:

    • In-Sync: synchronized

    • Applying: in application

    • Pending-Reboot: restart for the modification to take effect

    • Sync-Failure: application failure

Status Code

  • Normal

    200

  • Exception

    Table 12 Returned values

    Returned Value

    Description

    400 Bad Request

    Request error.

    401 Unauthorized

    Authorization failed.

    403 Forbidden

    No operation permission.

    404 Not Found

    No resources found.

    500 Internal Server Error

    Internal service error.

    503 Service Unavailable

    The service is unavailable.