Queries the list of nodes in a specified cluster.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ehpc:ListNodes |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ClusterId |
string |
Yes |
The ID of the cluster that you want to query. You can call ListClusters to obtain the cluster ID. |
ehpc-hz-FYUr32**** |
| Role |
string |
No |
The type of the node. Valid values:
|
Manager |
| HostName |
string |
No |
The name of the node. Fuzzy match is supported. MySQL regular expressions are supported. |
test-HostName |
| PageNumber |
integer |
No |
The page number. Pages start from page 1. |
1 |
| PageSize |
integer |
No |
The number of entries per page. Valid values: 1 to 100. Default value: 10. |
10 |
| Sequence |
string |
No |
The sorting order of the node list. Valid values:
Default value: Forward. Note
This parameter is used together with SortBy. For example, if SortBy is set to AddedTime and Sequence is set to Forward, nodes are sorted by the time when they were added to the cluster in ascending order. |
Forward |
| SortBy |
string |
No |
The sorting method of the node list. Valid values:
|
AddedTime |
| Filter |
string |
No |
The filter option for node status. The value format is {"status":"node_status"}. Replace node_status with the status of the node. Valid values:
|
{"status":"running"} |
| PrivateIpAddress |
string |
No |
The private IP address. |
172.16.**.** |
| HostNamePrefix |
string |
No |
The hostname prefix. Queries nodes with the specified prefix. |
compute |
| HostNameSuffix |
string |
No |
The hostname suffix. Queries nodes with the specified suffix. |
01 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| PageSize |
integer |
The number of entries per page. |
1 |
| RequestId |
string |
The request ID. |
89A1AC0F-4A6C-4F3D-98F9-BEF9A823**** |
| PageNumber |
integer |
The current page number. |
1 |
| TotalCount |
integer |
The total number of entries. |
1 |
| Nodes |
object |
||
| NodeInfo |
array<object> |
The node list information. |
|
|
array<object> |
|||
| VpcId |
string |
The VPC ID. |
vpc-bp1gnu8br4ay7beb2w**** |
| Status |
string |
The node status. Valid values:
|
running |
| HtEnabled |
boolean |
Indicates whether hyper-threading is enabled. |
true |
| Expired |
boolean |
Indicates whether the subscription node has expired. If the node uses the pay-as-you-go billing method, false is returned. |
false |
| ImageOwnerAlias |
string |
The image type. Valid values:
|
system |
| LockReason |
string |
The reason why the node is locked. Valid values:
An empty string is returned by default. |
financial |
| HostName |
string |
The node name. |
test-HostName |
| InstanceType |
string |
The instance type of the node. |
ecs.c5.large |
| PublicIpAddress |
string |
The public IP address. |
172.16.**.** |
| SpotStrategy |
string |
The bidding strategy of the compute node. |
NoSpot |
| CreatedByEhpc |
boolean |
Indicates whether the node is created by E-HPC.
|
true |
| RegionId |
string |
The region ID. |
cn-hangzhou |
| VSwitchId |
string |
The vSwitch ID. |
vsw-bp1e47optm9g58zcu**** |
| IpAddress |
string |
The IP address of the node. |
172.16.**.** |
| ExpiredTime |
string |
The expiration time of the subscription node. The time follows the ISO 8601 standard in the UTC time zone. If the node uses the pay-as-you-go billing method, an empty value is returned. |
2020-06-09T06:22:02.000Z |
| Version |
string |
The version of the cluster client. |
1.0.78 |
| ZoneId |
string |
The zone ID. |
cn-hangzhou-b |
| AddTime |
string |
The time when the node was added to the cluster. The time follows the ISO 8601 standard in the UTC time zone. |
2020-06-09T06:22:02.000Z |
| ImageId |
string |
The image ID. |
centos_7_06_64_20G_alibase_20190711.vhd |
| Location |
string |
The location of the node. Valid values:
|
PublicCloud |
| Id |
string |
The node ID. |
i-bp15707mys2rsy0j**** |
| CreateMode |
string |
The mode in which the node was created. Valid values:
|
manual |
| Roles |
object |
||
| Role |
array |
The type of the node. Valid values:
Schedulers and domain servers are management nodes. |
|
|
string |
The type of the node. Valid values:
Schedulers and domain servers are management nodes. |
[“Compute”] |
|
| TotalResources |
object |
The total resources used by the node. |
|
| Gpu |
integer |
The number of GPU cards. |
0 |
| Cpu |
integer |
The number of CPUs. |
1 |
| Memory |
integer |
The total memory resources. Unit: GB. |
1024 |
| UsedResources |
object |
The resource usage of the compute node. An empty value is returned for other types of nodes. |
|
| Gpu |
integer |
The number of GPU cards. |
0 |
| Cpu |
integer |
The number of CPUs. |
0 |
| Memory |
integer |
The total memory resources. Unit: GB. |
0 |
| StateInSched |
string |
The node status as viewed from the scheduler. The status varies depending on the scheduler. |
active |
Examples
Success response
JSON format
{
"PageSize": 1,
"RequestId": "89A1AC0F-4A6C-4F3D-98F9-BEF9A823****",
"PageNumber": 1,
"TotalCount": 1,
"Nodes": {
"NodeInfo": [
{
"VpcId": "vpc-bp1gnu8br4ay7beb2w****",
"Status": "running",
"HtEnabled": true,
"Expired": false,
"ImageOwnerAlias": "system",
"LockReason": "financial",
"HostName": "test-HostName",
"InstanceType": "ecs.c5.large",
"PublicIpAddress": "172.16.**.**",
"SpotStrategy": "NoSpot",
"CreatedByEhpc": true,
"RegionId": "cn-hangzhou",
"VSwitchId": "vsw-bp1e47optm9g58zcu****",
"IpAddress": "172.16.**.**",
"ExpiredTime": "2020-06-09T06:22:02.000Z",
"Version": "1.0.78",
"ZoneId": "cn-hangzhou-b",
"AddTime": "2020-06-09T06:22:02.000Z",
"ImageId": "centos_7_06_64_20G_alibase_20190711.vhd",
"Location": "PublicCloud",
"Id": "i-bp15707mys2rsy0j****",
"CreateMode": "manual",
"Roles": {
"Role": [
"[“Compute”]"
]
},
"TotalResources": {
"Gpu": 0,
"Cpu": 1,
"Memory": 1024
},
"UsedResources": {
"Gpu": 0,
"Cpu": 0,
"Memory": 0
},
"StateInSched": "active"
}
]
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParams | The specified parameter %s is invalid. | The specified parameter %s is invalid. |
| 400 | NotEnabled | You have not enabled this service | You have not enabled this service |
| 500 | UnknownError | An unknown error occurred. | An unknown error occurred. |
| 404 | ClusterNotFound | The specified cluster does not exist. | The specified instance does not exist. |
| 404 | ManagerNotFound | The manager nodes do not exist or their status is abnormal. | The manager nodes do not exist or their status is abnormal. |
| 503 | ServiceUnavailable | The request has failed due to a temporary failure of the server | The request has failed due to a temporary failure of the server. |
| 406 | EcsError | An error occurred while calling the ECS API operation. | ECS API call error. %s |
| 406 | DbError | A database service error occurred. | Database request failed. |
| 406 | RedisError | A Redis service error occurred. | Redis request failed. |
| 406 | AgentError | The agent service request failed. | The cluster-side command failed to run. %s |
| 406 | AliyunError | An Alibaba Cloud product error occurred. | Alibaba Cloud product error. %s |
| 407 | NotAuthorized | You are not authorized by RAM for this request. | The request is not authorized by RAM. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.