Querying the Cluster List of a Tenant
Function
This API is used to query the list of clusters of a tenant. Following parameters are involved in this API: name, status, cursor, next, limit, and order.
| Parameter | Description |
|---|---|
| name | Cluster name. |
| status | Status code of a cluster. For details, see Status Code. |
| cursor | Cluster ID. |
| next | Whether to switch to the previous or next page. The value can be true or false. The default value is true. |
| limit | Number of returned data records. The default value is 10. |
| order | Query result display. Value asc indicates that the query results are displayed in ascending order, and value desc indicates that the query results are displayed in descending order. |
URI
- URI format
GET /v1.0/{project_id}/reserved_clusters
- Parameter description
Table 2 URI parameter description Parameter
Mandatory
Description
project_id
Yes
Project ID. For details about how to obtain the project ID, see Obtaining a Project ID.
Request
None
Response
- Example response
{ "message_id": "CS.20040", "message": "Querying of the cluster list succeeds.", "payload": { "total": 1, "clusters": [ { "cluster_id": 10, "name": "mycluster2", "desc": "Cluster description", "status_code": 5, "status_name": "cluster_running", "status_desc": "cluster_running", "spu_used": 0, "maximum_spu_quota": 100, "region_id": "cn-north-1", "error_reason": "", "created_at": 1550081520879, "vpc_cidr": "", "subnet_cidr": "", "subnet_gateway": "", "manager_node_spu": "2", "sys_enterprise_project_id": "0", "sys_enterprise_project_name": "" } ] }, "current_time": 1550199862985 } - Parameter description
Table 3 Response parameters Parameter
Mandatory
Type
Description
message_id
No
String
Message type ID.
message
No
String
Message content.
payload
No
None
Information about the exclusive cluster.
total
No
Int
Number of clusters.
clusters
No
None
Cluster list.
cluster_id
No
Int
Cluster ID.
name
No
String
Cluster name.
desc
No
String
Cluster description.
status_code
No
Int
Status code for a cluster.
status_name
No
String
Status name of a cluster. Possible values are:
- cluster_creating
- cluster_create_fail
- cluster_create_success
- cluster_starting
- cluster_running
- cluster_deleting
- cluster_delete_fail
status_desc
No
String
Status description of a cluster.
spu_used
No
Int
SPU quota used by a cluster.
maximum_spu_quota
No
Int
Maximum SPU quota of a cluster.
region_id
No
String
Region where a cluster is currently located.
error_reason
No
String
Cause of the error that results in cluster status exceptions.
created_at
No
Int
Time when a cluster is created.
vpc_cidr
No
String
VPC CIDR block where the cluster is located.
subnet_cidr
No
String
Subnet CIDR block where the cluster is located.
subnet_gateway
No
String
Subnet gateway for the cluster.
manager_node_spu
No
Int
SPU used for the management nodes of the cluster.
sys_enterprise_project_id
No
String
ID of the enterprise project to which the cluster belongs.
sys_enterprise_project_name
No
String
Name of the enterprise project to which the cluster belongs.
current_time
No
Int
Current time, expressed by milliseconds.
Status Code
Table 4 describes the status code.
Error Code
For details, see Error Codes.
Last Article: Deleting an Exclusive Cluster
Next Article: Updating an Exclusive Cluster
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.