Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Co-authored-by: Lu, Huayi <luhuayi@huawei.com> Co-committed-by: Lu, Huayi <luhuayi@huawei.com>
50 KiB
Querying the Cluster List
Function
This API is used to query and display the cluster list.
URI
GET /v1.0/{project_id}/clusters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details about how to obtain the project ID, see Obtaining a Project ID. |
Request Parameters
None
Response Parameters
Parameter |
Type |
Description |
---|---|---|
clusters |
Array of ClusterInfo objects |
List of cluster objects |
count |
Integer |
Total number of cluster objects |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Cluster ID |
name |
String |
Cluster name |
status |
String |
Cluster status. The value can be one of the following:
|
version |
String |
Data warehouse version |
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 |
port |
Integer |
Service port of a cluster. The value ranges from 8000 to 30000. The default value is 8000. |
endpoints |
Array of Endpoints objects |
Private network connection information about the cluster. |
nodes |
Array of Nodes objects |
Cluster instance |
tags |
Array of Tags object |
Tags in a cluster |
user_name |
String |
Administrator username |
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. |
recent_event |
Integer |
Number of events |
availability_zone |
String |
AZ |
enterprise_project_id |
String |
Enterprise project ID. The value 0 indicates the ID of the default enterprise project. |
node_type |
String |
Node type |
vpc_id |
String |
Specifies the VPC ID. |
subnet_id |
String |
Subnet ID |
public_ip |
PublicIp object |
Public IP address. If the parameter is not specified, public connection is not used by default. |
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. |
action_progress |
Map<String,String> |
Task information, consisting of a key and a value. The key indicates an ongoing task, and the value indicates the progress of the ongoing task.
The following is an example: "action_progress": {"SNAPSHOTTING":"16%"} |
sub_status |
String |
Sub-status of clusters in the AVAILABLE state. The value can be one of the following:
|
task_status |
String |
Cluster management task. The value can be one of the following:
|
security_group_id |
String |
Security group ID |
failed_reasons |
FailedReason object |
Cause of failure. If the parameter is left empty, the cluster is in the normal state. |
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> |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Cluster instance ID |
status |
String |
Cluster instance status |
Parameter |
Type |
Description |
---|---|---|
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: =*<>\,|/ |
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 can contain only letters, digits, hyphens (-), and underscores (_). |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
public_bind_type |
Yes |
String |
Binding type of an EIP. The value can be one of the following:
|
eip_id |
No |
String |
EIP ID |
Example Request
GET https://{Endpoint}/v1.0/89cd04f168b84af6be287f71730fdb4b/clusters
Response example
{ "clusters": [ { "id": "7d85f602-a948-4a30-afd4-e84f47471c15", "name": "dws-1", "status": "AVAILABLE", "version": "1.2.0", "updated": "2016-02-10T14:28:14Z", "created": "2016-02-10T14:26:14Z", "port": 8000, "endpoints": [{ "connect_info": "192.168.0.12:8000", "jdbc_url": "jdbc:postgresql://192.168.0.12:8000/<YOUR_DATABASE_name>" }] , "nodes" : [ { "id" : "acaf62a4-41b3-4106-bf6b-2f669d88291e", "status" : "200" }, { "id" : "d32de51e-4fcd-4e5a-a9dc-bb903abb494b", "status" : "200" }, { "id" : "d71a4a25-c9bc-4ffd-9f4a-e422aef327f9", "status" : "200" } ], "tags":[ { "key": "key1", "value": "value1" }, { "key": "key2", "value": "value2" }], "user_name": "dbadmin", "number_of_node": 3, "recent_event": 6, "availability_zone": "eu-de-01", "enterprise_project_id":"aca4e50a-266f-4786-827c-f8d6cc3fbada", "node_type": "dws.d1.xlarge.ultrahigh", "vpc_id": "85b20d7e-9eb7-4b2a-98f3-3c8843ea3574", "subnet_id": "374eca02-cfc4-4de7-8ab5-dbebf7d9a720", "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>" }], "action_progress": {"SNAPSHOTTING": "20%"}, "sub_status": "READONLY", "task_status": "SNAPSHOTTING", "security_group_id": "dc3ec145-9029-4b39-b5a3-ace5a01f772b" }], "count":"2" }
Status Code
Status Code |
Description |
---|---|
200 |
The cluster list is queried. |
400 |
Request error. |
401 |
Authentication failed. |
403 |
You do not have required permissions. |
404 |
No resources found. |
500 |
Internal service error. |
503 |
Service unavailable. |