Querying the Cluster List
Function
This API is used to query and display the cluster list.
URI
- URI format
GET /v1.0/{project_id}/clusters - 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.
Request
Sample request
GET /v1.0/89cd04f168b84af6be287f71730fdb4b/clusters?datastoretype=dws&enterprise_project_id=aca4e50a-266f-4786-827c-f8d6cc3fbada
Response
- Sample response
{ "clusters": [ { "id": "7d85f602-a948-4a30-afd4-e84f47471c15", "status": "AVAILABLE", "sub_status": "READONLY", "task_status": "SNAPSHOTTING", "action_progress": {"SNAPSHOTTING": "20%"}, "node_type": "dws.d1.xlarge.ultrahigh", "subnet_id": "374eca02-cfc4-4de7-8ab5-dbebf7d9a720", "security_group_id": "dc3ec145-9029-4b39-b5a3-ace5a01f772b", "number_of_node": 3, "availability_zone": "cn-north-4b", "port": 8000, "name": "dws-1", "version": "1.2.0", "vpc_id": "85b20d7e-9eb7-4b2a-98f3-3c8843ea3574", "user_name": "dbadmin", "public_ip": { "public_bind_type": "auto_assign", "eip_id": "85b20d7e-9eb7-4b2a-98f3-3c8843ea3574" }, "public_endpoints": [ { "public_connect_info": "dws-1.cn-north-4.myhuaweicloud.com", "jdbc_url": "jdbc:postgresql://dws-1.cn-north-4.myhuaweicloud.com/<YOUR_DATABASE_name>" } ], "endpoints": [ { "connect_info": "dws-1.cn-north-4.myhuaweicloud.com", "jdbc_url": "jdbc:postgresql://dws-1.cn-north-4.myhuaweicloud.com/<YOUR_DATABASE_name>" } ] , "updated": "2016-02-10T14:28:14Z", "created": "2016-02-10T14:26:14Z", "enterprise_project_id":"aca4e50a-266f-4786-827c-f8d6cc3fbada", "recent_event": 6 } ] }
- Parameter description
Table 2 Response parameter description Parameter
Type
Description
clusters
Array of ClusterInfo objects
List of cluster objects
Table 3 ClusterInfo Parameter
Type
Description
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.
Valid key values include:
- GROWING
- RESTORING
- SNAPSHOTTING
- REPAIRING
- CREATING
The following is an example:
"action_progress": {"SNAPSHOTTING":"16%"}failed_reasons
Object
Cause of failure. If the parameter is left empty, the cluster is in the normal state.
availability_zone
String
AZ
endpoints
Endpoints object
Private network connection information about the cluster.
task_status
String
Cluster management task. The value can be one of the following:
- UNFREEZING
- FREEZING
- RESTORING
- SNAPSHOTTING
- GROWING
- REBOOTING
- SETTING_CONFIGURATION
- CONFIGURING_EXT_DATASOURCE
- DELETING_EXT_DATASOURCE
- REBOOT_FAILURE
- RESIZE_FAILURE
public_ip
PublicIp object
Public IP address. If the parameter is not specified, public connection is not used by default.
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
number_of_node
Integer
Number of nodes
recent_event
Integer
Number of events
vpc_id
String
VPC ID
created
String
Cluster creation time. The format is ISO8601:YYYY-MM-DDThh:mm:ssZ.
user_name
String
Username of the administrator
security_group_id
String
Security group ID
version
String
Data warehouse version
tags
Tags object
Tags in a cluster
enterprise_project_id
String
Enterprise project ID. The value 0 indicates the ID of the default enterprise project.
node_type
String
Node type
port
Integer
Service port of a cluster. The value ranges from 8000 to 30000. The default value is 8000.
name
String
Cluster name
subnet_id
String
Subnet ID
public_endpoints
PublicEndpoints object
Public network connection information about the cluster. If the parameter is not specified, the public network connection information is not used by default.
id
String
Cluster ID
updated
String
Last modification time of a cluster. The format is ISO8601:YYYY-MM-DDThh:mm:ssZ.
status
String
Cluster status. The value can be one of the following:
- CREATING
- AVAILABLE
- UNAVAILABLE
- CREATION FAILED
- FROZEN
Table 4 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 5 Tags 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 cannot contain the following characters: =*<>\,|/
Returned Value
- Normal
- Abnormal
Table 8 Returned value description Returned Value
Description
400 Bad Request
Request error.
401 Unauthorized
Authentication failed.
403 Forbidden
You do not have the permission 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.
Last Article: Creating a Cluster
Next Article: Querying Cluster Details
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.