• Data Warehouse Service

dws
  1. Help Center
  2. Data Warehouse Service
  3. API Reference
  4. API Description
  5. Cluster Management APIs
  6. Querying Cluster Details

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 parameter description

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    String

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

    cluster_id

    Yes

    String

    Cluster ID

Request

Sample request

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

Response

  • Sample 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",        
            "node_type_id": "5ddb1071-c5d7-40e0-a874-8a032e81a697",
            "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-9eb7-4b2a-98f3-3c8843ea3574"
            },        
            "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>"
                },
                {
                    "connect_info": "192.168.0.12:8000",
                    "jdbc_url": "jdbc:postgresql://192.168.0.12: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",
                "status": "GROWING",
                "start_time": "2018-02-14T14:28:14Z"
            }, 
    
            "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

    Mandatory

    Type

    Description

    cluster

    Yes

    Object

    Cluster object

    id

    Yes

    String

    Cluster ID

    status

    Yes

    String

    Cluster status, which can be one of the following:

    • CREATING
    • AVAILABLE
    • UNAVAILABLE
    • CREATION FAILED

    name

    Yes

    String

    Cluster name

    updated

    Yes

    Time

    Last modification time of a cluster. The format is ISO8601:YYYY-MM-DDThh:mm:ssZ.

    created

    Yes

    Time

    Cluster creation time. The format is ISO8601:YYYY-MM-DDThh:mm:ssZ.

    user_name

    Yes

    String

    Administrator username

    sub_status

    Yes

    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

    Yes

    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

    Yes

    Map

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

    • GROWING
    • RESTORING
    • SNAPSHOTTING
    • REPAIRING
    • GREATING

      The key value indicates the progress of the ongoing task.

    node_type

    Yes

    UUID

    Node type

    node_type_id

    Yes

    UUID

    ID of a node type

    subnet_id

    Yes

    UUID

    Subnet ID

    security_group_id

    Yes

    UUID

    ID of a security group

    number_of_node

    Yes

    Integer

    Number of nodes

    availability_zone

    Yes

    String

    AZ

    port

    Yes

    Integer

    Service port of a cluster (8000 to 10000). The default value is 8000.

    vpc_id

    Yes

    UUID

    VPC ID

    public_ip

    Yes

    Object. For details, see Table 3.

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

    public_endpoints

    Yes

    Array. For details, see Table 4.

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

    endpoints

    Yes

    Array. For details, see Table 5.

    View the private network connection information about the cluster.

    version

    Yes

    String

    Data warehouse version

    maintain_window

    Yes

    Object. For details, see Table 6.

    Cluster maintenance time window

    resize_info

    No

    Object. For details, see Table 7.

    Cluster scale-out status details

    failed_reasons

    No

    Object. For details, see Table 8.

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

    tags

    Yes

    Array. For details, see Table 9.

    Tags in a cluster

    parameter_group

    No

    Object. For details, see Table 10.

    Information about the parameter group associated with the cluster

    Table 3 public_ip field data structure description

    Parameter

    Mandatory

    Type

    Description

    public_bind_type

    Yes

    String

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

    • auto_assign
    • not_use
    • bind_existing

    eip_id

    No

    UUID

    EIP ID

    status

    No

    String

    Binding status of an EIP. The parameter value is as follows:

    • FAIL

    error_message

    No

    String

    Cause of an EIP binding failure

    Table 4 public_endpoints field data structure description

    Parameter

    Mandatory

    Type

    Description

    public_connect_info

    No

    String

    Public network connection information

    jdbc_url

    No

    String

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

    jdbc:postgresql://< public_connect_info>/<YOUR_DATABASE_NAME>

    Table 5 endpoints field data structure description

    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 6 maintain_window field data structure description

    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. The format is HH:mm. The time zone is GMT+0.

    end_time

    No

    String

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

    Table 7 resize_info field data structure description

    Parameter

    Mandatory

    Type

    Description

    target_node_num

    No

    Int

    Number of nodes after the scale-out

    origin_node_num

    No

    Int

    Number of nodes before the scale-out

    status

    No

    String

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

    • GROWING
    • RESIZE_FAILURE

    start_time

    No

    String

    Scale-out start time. The format is ISO8601:YYYY-MM-DDThh:mm:ss.

    Table 8 failed_reasons field data structure description

    Parameter

    Mandatory

    Type

    Description

    error_code

    No

    String

    Error code. Possible values can be:

    • DWS.6000: indicates that cluster creation fails.
    • DWS.6001: indicates that cluster scale-out fails.
    • DWS.6002: indicates that cluster restart fails.
    • DWS.6003: indicates that cluster restoration fails.

    error_msg

    No

    String

    Error message

    Table 9 tags field data structure description

    Parameter

    Mandatory

    Type

    Description

    key

    No

    String

    Tag key

    value

    No

    String

    Tag value

    Table 10 parameter_group field data structure description

    Parameter

    Mandatory

    Type

    Description

    id

    Yes

    String

    Parameter group ID

    name

    Yes

    String

    Parameter group name

    status

    Yes

    String

    Cluster parameter status. Possible values are:

    • In-Sync: synchronized
    • Applying: in application
    • Pending-Reboot: restart for the modification to take effect
    • Sync-Failure: application failure

Returned Value

  • Normal

    200

  • Abnormal
    Table 11 Returned value description

    Returned Value

    Description

    400 Bad Request

    Request error.

    401 Unauthorized

    Authentication failed.

    403 Forbidden

    You do not have the rights to perform the operation.

    404 Not Found

    The requested resource was not found.

    500 Internal Server Error

    Internal service error.

    503 Service Unavailable

    The service is unavailable.