Querying the Cluster Node List
Function
This API is used to query the cluster node list.
URI
GET /v2/{project_id}/clusters/{cluster_id}/nodes
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Explanation Project ID. Constraints N/A Value range The value must consist of 1 to 64 characters. Only letters and digits are allowed. Default value N/A |
cluster_id |
Yes |
String |
Explanation Cluster ID Constraints N/A Value range The value can contain 1 to 64 characters, including only letters, digits, underscores (_), and hyphens (-). Default value N/A |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
node_group |
No |
String |
Explanation Name of the node groups to be queried. Constraints N/A Value range The value can contain 3 to 14 characters. Default value N/A |
limit |
No |
Integer |
Explanation Number of records displayed on each page in the returned result. Constraints N/A Value range ≥1 Default value 10 |
offset |
No |
Integer |
Explanation Offset from which the job list starts to be queried. Constraints N/A Value range ≥1 Default value 1 |
node_name |
No |
String |
Explanation Node name. Fuzzy search is supported. Constraints N/A Value range N/A Default value N/A |
sort_key |
No |
String |
Explanation Sorting key. You can set node names as the key. Constraints N/A Value range node_name: node name Default value N/A |
sort_dir |
No |
String |
Explanation Sorting order. desc indicates descending order, and asc indicates ascending order. Constraints N/A Value range desc: descending order asc: ascending order Default value N/A |
query_node_detail |
No |
Boolean |
Explanation Whether to query node details. If this parameter is set to true, the interface performance may be affected. Constraints N/A Value range true: Query node details. false: Do not query node details. Default value false |
query_ecs_detail |
No |
Boolean |
Explanation Whether to query ECS details. ECS APIs may be called. Constraints N/A Value range true: Query ECS details. false: Do not query ECS details. Default value false |
internal_ip |
No |
String |
Explanation Internal IP address. Constraints N/A Value range The value can contain 7 to 15 characters. Default value N/A |
Request Parameters
None
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
nodes |
Array of ClusterNode objects |
Explanation Node list. For details, see Table 4. Constraints N/A Value range N/A Default value N/A |
node_total |
Integer |
Explanation Number of nodes. Constraints N/A Value range N/A Default value N/A |
Parameter |
Type |
Description |
---|---|---|
node_name |
String |
Explanation Node name, which is the same as that on Manager. Constraints N/A Value range N/A Default value N/A |
resource_id |
String |
Explanation Resource ID. Unique identity of a node. For yearly/monthly nodes, the ID can be used to query bills. Constraints N/A Value range N/A Default value N/A |
node_group_name |
String |
Explanation Node group name. Constraints N/A Value range N/A Default value N/A |
node_type |
String |
Explanation Node type. Available values include Task, Core, and Master. Constraints N/A Value range N/A Default value N/A |
billing_type |
String |
Explanation on-period: yearly/monthly; on-quantity: pay-per-use. Constraints N/A Value range N/A Default value N/A |
deployment_type |
String |
Explanation Deployment type. The Server hosts are supported. Constraints N/A Value range N/A Default value N/A |
server_info |
ServerInfo object |
Explanation If the deployment type is Server, this parameter cannot be empty. For details, see Table 5. Constraints N/A Value range N/A Default value N/A |
tags |
Array of Tag objects |
Explanation Node tag. For details, see Table 7. Constraints N/A Value range N/A Default value N/A |
node_detail |
NodeDetail object |
Explanation Node monitoring information. This parameter is returned only after IAM synchronization. For details, see Table 8. Constraints N/A Value range N/A Default value N/A |
node_status |
String |
Explanation Node status. Status of operations on the corresponding page. Constraints N/A Value range N/A Default value N/A |
component_infos |
Array of ComponentInfo objects |
Explanation Component instance information array. For details, see Table 9. Constraints N/A Value range N/A Default value N/A |
Parameter |
Type |
Description |
---|---|---|
server_id |
String |
Explanation Server ID. Constraints N/A Value range N/A Default value N/A |
server_name |
String |
Explanation Server name. Constraints N/A Value range N/A Default value N/A |
server_type |
String |
Explanation Server type. Available options are ECS and BMS. Constraints N/A Value range N/A Default value N/A |
data_volumes |
Array of VolumeInfo objects |
Explanation Data disk. For details, see Table 6. Constraints N/A Value range N/A Default value N/A |
root_volume |
VolumeInfo object |
Explanation System disk. For details, see Table 6. Constraints N/A Value range N/A Default value N/A |
cpu_type |
String |
Explanation CPU type. Available options are x86 and Arm. Constraints N/A Value range N/A Default value N/A |
cpu |
String |
Explanation Number of vCPUs. Constraints N/A Value range N/A Default value N/A |
mem |
String |
Explanation Memory size. Constraints N/A Value range N/A Default value N/A |
internal_ip |
String |
Explanation Internal IP address. Constraints N/A Value range N/A Default value N/A |
Parameter |
Type |
Description |
---|---|---|
type |
String |
Explanation Disk type. Constraints N/A Value range
Default value N/A |
size |
Integer |
Explanation Disk size. Unit: GB. Constraints N/A Value range N/A Default value N/A |
count |
Integer |
Explanation Disk quantity. Constraints N/A Value range N/A Default value N/A |
Parameter |
Type |
Description |
---|---|---|
key |
String |
Explanation Tag key Constraints N/A Value range N/A Default value N/A |
value |
String |
Explanation Tag value. Constraints N/A Value range N/A Default value N/A |
Parameter |
Type |
Description |
---|---|---|
running_status |
String |
Explanation Running status. Constraints N/A Value range N/A Default value N/A |
cpu_usage |
String |
Explanation CPU utilization rate. Constraints N/A Value range N/A Default value N/A |
memory_usage |
String |
Explanation Memory utilization rate. Constraints N/A Value range N/A Default value N/A |
disk_usage |
String |
Explanation Disk usage. Constraints N/A Value range N/A Default value N/A |
total_memory |
String |
Explanation Total memory. Unit: MB. Constraints N/A Value range N/A Default value N/A |
available_memory |
String |
Explanation Available memory. Unit: MB. Constraints N/A Value range N/A Default value N/A |
total_hard_disk_space |
String |
Explanation Total hard disk space. Unit: GB Constraints N/A Value range N/A Default value N/A |
available_hard_disk_space |
String |
Explanation Available hard disk space. Unit: GB Constraints N/A Value range N/A Default value N/A |
network_read |
String |
Explanation Network read speed. Unit: Byte/s Constraints N/A Value range N/A Default value N/A |
network_write |
String |
Explanation Network write speed. Unit: Byte/s Constraints N/A Value range N/A Default value N/A |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Explanation Component ID Constraints N/A Value range N/A Default value N/A |
name |
String |
Explanation Component name Constraints N/A Value range N/A Default value N/A |
instance_group_name |
String |
Explanation Name of the group to which the component belongs. Constraints N/A Value range N/A Default value N/A |
running_status |
String |
Explanation Running status. Constraints N/A Value range N/A Default value N/A |
ha_status |
String |
Explanation HA status. Constraints N/A Value range N/A Default value N/A |
config_status |
String |
Explanation Configuration status. Constraints N/A Value range N/A Default value N/A |
role_name |
String |
Explanation Role name. Constraints N/A Value range N/A Default value N/A |
role_short_name |
String |
Explanation Abbreviation of a role name. Constraints N/A Value range N/A Default value N/A |
role_type |
String |
Explanation Role type. Constraints N/A Value range N/A Default value N/A |
service_name |
String |
Explanation Service name. Constraints N/A Value range N/A Default value N/A |
pair_name |
String |
Explanation Pair name. Constraints N/A Value range N/A Default value N/A |
relation_pairs |
String |
Explanation Associated pair Constraints N/A Value range N/A Default value N/A |
support_decom |
String |
Explanation Whether Decom is supported. Constraints N/A Value range N/A Default value N/A |
support_reinstall |
String |
Explanation Whether reinstallation is supported. Constraints N/A Value range N/A Default value N/A |
support_collect_stack_info |
String |
Explanation Whether stack information can be collected. Constraints N/A Value range N/A Default value N/A |
Example Request
Query all nodes in a specified node group of a cluster.
/v2/174ee662a7e24cc99bfc858c4558dbf6/clusters/f0a91b14-8884-4ba1-9e8d-0a21086c0ab4/nodes?node_group=master_node_default_group
Example Response
Status code: 200
List node information.
{ "nodes" : [ { "node_name" : "node-master1QxCW", "resource_id" : "fc1ed6bb-e3d8-4dc8-8162-ef673bff6b7b", "node_group_name" : "master_node_default_group", "node_type" : "Master", "billing_type" : "on-quantity", "deployment_type" : "SERVER", "server_info" : { "server_id" : "3687f50a-cd4e-4c67-8858-5d6555c8834c", "server_name" : "f28fb043-ecbc-401e-936e-fb321ca8d40a_node_master1QxCW", "server_type" : "ECS", "data_volumes" : [ { "type" : "SATA", "size" : 200, "count" : 1 } ], "root_volume" : { "type" : "SATA", "size" : 100, "count" : 1 }, "cpu_type" : "X86", "internal_ip" : "192.168.10.142" }, "tags" : [ { "key" : "1", "value" : "2" } ], "node_status" : "started" } ], "node_total" : 1 }
Status Codes
Status Codes |
Description |
---|---|
200 |
List of queried nodes. |
Error Codes
For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.