Querying the Cluster Node List - ListNodes
Function
This API is used to query the list of cluster nodes.
Constraints
None
Debugging
You can debug this API in API Explorer, which supports automatic authentication and authorization. API Explorer can automatically generate sample SDK code and supports sample SDK code debugging.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, no identity policy-based permissions are required for calling this API.
URI
GET /v2/{project_id}/clusters/{cluster_id}/nodes
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Definition Project ID. Constraints N/A Range The value must consist of 1 to 64 characters. Only letters and digits are allowed. Default Value N/A |
| cluster_id | Yes | String | Definition Cluster ID Constraints N/A 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 | Definition Name of the node groups to be queried. Constraints N/A Range The value can contain 3 to 14 characters. Default Value N/A |
| limit | No | Integer | Definition Number of records displayed on each page in the returned result. Constraints N/A Range ≥1 Default Value 10 |
| offset | No | Integer | Definition Offset from which the node list query begins. This parameter is used in conjunction with limit. For example, if there are 30 nodes in total, setting offset to 1 and limit to 10 means the query starts from the 12th node, and a maximum of 10 nodes can be retrieved at a time. Constraints N/A Range ≥1 Default Value 1 |
| node_name | No | String | Definition Node name. Fuzzy search is supported. Constraints N/A Range N/A Default Value N/A |
| sort_key | No | String | Definition Sorting key. You can set node names as the key. Constraints N/A Range node_name: node name Default Value N/A |
| sort_dir | No | String | Definition Sorting order. desc indicates descending order, and asc indicates ascending order. Constraints N/A Range desc: descending order asc: ascending order Default Value N/A |
| query_node_detail | No | Boolean | Definition Whether to query node details. If this parameter is set to true, the interface performance may be affected. Constraints N/A Range true: Query node details. false: Do not query node details. Default Value false |
| query_ecs_detail | No | Boolean | Definition Whether to query ECS details. ECS APIs may be called. Constraints N/A Range true: Query ECS details. false: Do not query ECS details. Default Value false |
| internal_ip | No | String | Definition Internal IP address. Constraints N/A 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 | Definition Node list. For details, see Table 4. Constraints N/A Range N/A Default Value N/A |
| node_total | Integer | Definition Number of nodes. Constraints N/A Range N/A Default Value N/A |
| Parameter | Type | Description |
|---|---|---|
| node_name | String | Definition Node name, which is the same as that on Manager. Constraints N/A Range N/A Default Value N/A |
| resource_id | String | Definition Resource ID. Unique identity of a node. For yearly/monthly nodes, the ID can be used to query bills. Constraints N/A Range N/A Default Value N/A |
| node_group_name | String | Definition Node group name. Constraints N/A Range N/A Default Value N/A |
| node_type | String | Definition Node type. Available values include Task, Core, and Master. Constraints N/A Range A cluster must contain Master nodes and may contain Core and Task nodes.
Default Value N/A |
| billing_type | String | Definition on-period: yearly/monthly; on-quantity: pay-per-use. Constraints N/A Range
Default Value N/A |
| deployment_type | String | Definition Deployment type. The Server hosts are supported. Constraints N/A Range SERVER: Host type Default Value N/A |
| server_info | ServerInfo object | Definition If the deployment type is Server, this parameter cannot be empty. For details, see Table 5. Constraints N/A Range N/A Default Value N/A |
| tags | Array of Tag objects | Definition Node tag. For details, see Table 7. Constraints N/A Range N/A Default Value N/A |
| node_detail | NodeDetail object | Definition Node monitoring information. This parameter is returned only after IAM synchronization. For details, see Table 8. Constraints N/A Range N/A Default Value N/A |
| node_status | String | Definition Node status. Status of operations on the corresponding page. Constraints N/A Range Default Value N/A |
| component_infos | Array of ComponentInfo objects | Definition Component instance information array. For details, see Table 9. Constraints N/A Range N/A Default Value N/A |
| Parameter | Type | Description |
|---|---|---|
| server_id | String | Definition Server ID. Constraints N/A Range N/A Default Value N/A |
| server_name | String | Definition Server name. Constraints N/A Range N/A Default Value N/A |
| server_type | String | Definition Server type. Available options are ECS and BMS. Constraints N/A Range
Default Value N/A |
| data_volumes | Array of VolumeInfo objects | Definition Data disk. For details, see Table 6. Constraints N/A Range N/A Default Value N/A |
| root_volume | VolumeInfo object | Definition System disk. For details, see Table 6. Constraints N/A Range N/A Default Value N/A |
| cpu_type | String | Definition CPU type. Available options are x86 and Arm. Constraints N/A Range Default Value N/A |
| cpu | String | Definition Number of vCPUs. Constraints N/A Range N/A Default Value N/A |
| mem | String | Definition Memory size. Constraints N/A Range N/A Default Value N/A |
| internal_ip | String | Definition Internal IP address. Constraints N/A Range N/A Default Value N/A |
| Parameter | Type | Description |
|---|---|---|
| type | String | Definition Disk type. Constraints N/A Range
Default Value N/A |
| size | Integer | Definition Disk size. Unit: GB. Constraints N/A Range N/A Default Value N/A |
| count | Integer | Definition Disk quantity. Constraints N/A Range N/A Default Value N/A |
| Parameter | Type | Description |
|---|---|---|
| key | String | Definition Tag key Constraints N/A Range N/A Default Value N/A |
| value | String | Definition Tag value. Constraints N/A Range N/A Default Value N/A |
| Parameter | Type | Description |
|---|---|---|
| running_status | String | Definition Running status. Constraints N/A Range Default Value N/A |
| cpu_usage | String | Definition CPU utilization rate. Constraints N/A Range N/A Default Value N/A |
| memory_usage | String | Definition Memory utilization rate. Constraints N/A Range N/A Default Value N/A |
| disk_usage | String | Definition Disk usage. Constraints N/A Range N/A Default Value N/A |
| total_memory | String | Definition Total memory. Unit: MB. Constraints N/A Range N/A Default Value N/A |
| available_memory | String | Definition Available memory. Unit: MB. Constraints N/A Range N/A Default Value N/A |
| total_hard_disk_space | String | Definition Total hard disk space. Unit: GB Constraints N/A Range N/A Default Value N/A |
| available_hard_disk_space | String | Definition Available hard disk space. Unit: GB Constraints N/A Range N/A Default Value N/A |
| network_read | String | Definition Network read speed. Unit: Byte/s Constraints N/A Range N/A Default Value N/A |
| network_write | String | Definition Network write speed. Unit: Byte/s Constraints N/A Range N/A Default Value N/A |
| Parameter | Type | Description |
|---|---|---|
| id | String | Definition Component ID Constraints N/A Range N/A Default Value N/A |
| name | String | Definition Component name Constraints N/A Range N/A Default Value N/A |
| instance_group_name | String | Definition Name of the group to which the component belongs. Constraints N/A Range N/A Default Value N/A |
| running_status | String | Definition Running status. Constraints N/A Range Default Value N/A |
| ha_status | String | Definition HA status. Constraints N/A Range
Default Value N/A |
| config_status | String | Definition Configuration status. Constraints N/A Range
Default Value N/A |
| role_name | String | Definition Role name. Constraints N/A Range N/A Default Value N/A |
| role_short_name | String | Definition Abbreviation of a role name. Constraints N/A Range N/A Default Value N/A |
| role_type | String | Definition Role type. Constraints N/A Range N/A Default Value N/A |
| service_name | String | Definition Service name. Constraints N/A Range N/A Default Value N/A |
| pair_name | String | Definition Pair name. Constraints N/A Range N/A Default Value N/A |
| relation_pairs | String | Definition Associated pair Constraints N/A Range N/A Default Value N/A |
| support_decom | String | Definition Whether Decom is supported. Constraints N/A Range N/A Default Value N/A |
| support_reinstall | String | Definition Whether reinstallation is supported. Constraints N/A Range N/A Default Value N/A |
| support_collect_stack_info | String | Definition Whether stack information can be collected. Constraints N/A 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
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot