Obtaining Nodes in a Node Pool
Function
This API is used to obtain nodes in a node pool.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
URI
GET /v2/{project_id}/pools/{pool_name}/nodepools/{nodepool_name}/nodes
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details, see Obtaining a Project ID and Name. |
pool_name |
Yes |
String |
Resource pool name. |
nodepool_name |
Yes |
String |
Node pool name. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
continue |
No |
String |
Position of the previous page during pagination query. |
limit |
No |
String |
Number of records returned for a single pagination query. |
Request Parameters
None
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
apiVersion |
String |
Definition: API version of a resource. Constraints: N/A Range:
Default Value: N/A |
kind |
String |
Definition: Resource type. Constraints: N/A Range:
Default Value: N/A |
metadata |
NodeListMetadata object |
Definition: Metadata of a node list. Constraints: N/A Range: N/A Default Value: N/A |
items |
Array of Node objects |
Definition: Node resource list. Constraints: N/A Range: N/A Default Value: N/A |
Parameter |
Type |
Description |
---|---|---|
continue |
String |
Definition: Offset parameter of the pagination query. Constraints: This parameter is optional. Range: The value is obtained from the metadata.continue field in the response to the last pagination query. An empty value indicates no offset. Default Value: N/A |
remainingItemCount |
Long |
Definition: Number of remaining resources in a pagination query. Default Value: N/A |
Parameter |
Type |
Description |
---|---|---|
apiVersion |
String |
Definition: API version of a resource. Constraints: N/A Range:
Default Value: N/A |
kind |
String |
Definition: Resource type. Constraints: N/A Range:
Default Value: N/A |
metadata |
metadata object |
Definition: Metadata of a node resource. Constraints: N/A Range: N/A Default Value: N/A |
spec |
NodeSpec object |
Definition: Specifications of a node resource. Constraints: N/A Range: N/A Default Value: N/A |
status |
NodeStatus object |
Definition: Status of a node resource. Constraints: N/A Range: N/A Default Value: N/A |
Parameter |
Type |
Description |
---|---|---|
name |
String |
Definition: ID of a node resource. Constraints: N/A Range: N/A Default Value: N/A |
creationTimestamp |
String |
Definition: Time when a node is created. Example: 2025-11-01T03:49:41Z. Constraints: N/A Range: N/A Default Value: N/A |
annotations |
NodeVOAnnotations object |
Definition: Node annotations. Constraints: N/A Range: N/A Default Value: N/A |
Parameter |
Type |
Description |
---|---|---|
os.modelarts/npu-topology-placement |
String |
Definition: Topology of the NPU resource usage. The value is a 16-bit binary number, where the first bit from the right indicates PU 1. 1 indicates occupied, and 0 indicates idle. For example, if PUs 1 and 15 are occupied in a 16-PU server, the value is 0100000000000001. If PUs 1 and 7 are occupied in an 8-PU server, the returned value is 0000000001000001. Constraints: N/A Range: N/A Default Value: N/A |
Parameter |
Type |
Description |
---|---|---|
flavor |
String |
Definition: ID of node resource specifications. Constraints: N/A Range: N/A Default Value: N/A |
extendParams |
extendParams object |
Definition: Custom configuration information of a node. Constraints: N/A Range: N/A Default Value: N/A |
os |
Os object |
Definition: OS of a node. Constraints: N/A Range: N/A Default Value: N/A |
Parameter |
Type |
Description |
---|---|---|
dockerBaseSize |
String |
Definition: Container engine space of a node. The value 0 indicates that the size is not limited. Constraints: N/A Range: N/A Default Value: N/A |
Parameter |
Type |
Description |
---|---|---|
name |
String |
Definition: OS name. Constraints: N/A Range: N/A Default Value: N/A |
imageId |
String |
Definition: OS image ID. Constraints: N/A Range: N/A Default Value: N/A |
imageType |
String |
Definition: OS image type. Constraints: N/A Range:
Default Value: N/A |
Parameter |
Type |
Description |
---|---|---|
phase |
String |
Definition: Status of a node. Constraints: N/A Range:
Default Value: N/A |
az |
String |
Definition: AZ where a node is located. Constraints: N/A Range: N/A Default Value: N/A |
privateIp |
String |
Definition: IP address of a node. Constraints: N/A Range: N/A Default Value: N/A |
resources |
NodeResource object |
Definition: Resources of a node. Constraints: N/A Range: N/A Default Value: N/A |
availableResources |
NodeResource object |
Definition: Available resources of a node. Constraints: N/A Range: N/A Default Value: N/A |
Parameter |
Type |
Description |
---|---|---|
cpu |
String |
Definition: Number of CPU cores on a node. Constraints: N/A Range: N/A Default Value: N/A |
memory |
String |
Definition: Memory size of a node. The unit is GiB. Constraints: N/A Range: N/A Default Value: N/A |
nvidia.com/gpu |
String |
Definition: Number of GPUs on a node. Constraints: N/A Range: N/A Default Value: N/A |
huawei.com/ascend-snt3 |
String |
Definition: Number of snt3 NPUs on a node. Constraints: N/A Range: N/A Default Value: N/A |
huawei.com/ascend-snt9 |
String |
Definition: Number of snt9 NPUs on a node. Constraints: N/A Range: N/A Default Value: N/A |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Range: N/A |
error_msg |
String |
Definition: Error message. Range: N/A |
Example Requests
Obtain nodes in a node pool.
GET https://{endpoint}/v2/{project_id}/pools/{pool_name}/nodepools/{nodepool_name}/nodes { "kind" : "NodeList", "apiVersion" : "v2", "metadata" : { }, "items" : [ { "kind" : "Node", "apiVersion" : "v2", "metadata" : { "name" : "node-dly-4", "creationTimestamp" : "2024-01-29T09:28:26Z", "labels" : { "os.modelarts.node/cluster" : "dly-lite", "os.modelarts.node/nodepool" : "nodepool-1" } }, "spec" : { "flavor" : "modelarts.vm.2u4g.dcc", "hostNetwork" : { "vpc" : "277e9abc-0e6b-431a-9232-cfd25d5fc566", "subnet" : "03796378-c356-4c14-826b-e4913aa9c8b9", "securityGroups" : [ "0a15b48d-06f1-41e4-b782-ade90087bf59" ] } }, "status" : { "phase" : "Available", "az" : "cn-north-7c", "privateIp" : "192.168.1.132", "resources" : { "cpu" : "1930m", "memory" : "1912Mi" } } } ] }
Example Responses
Status code: 200
OK.
{ "kind" : "NodeList", "apiVersion" : "v2", "metadata" : { }, "items" : [ { "kind" : "Node", "apiVersion" : "v2", "metadata" : { "name" : "node-dly-4", "creationTimestamp" : "2024-01-29T09:28:26Z" }, "spec" : { "flavor" : "modelarts.vm.2u4g.dcc" }, "status" : { "phase" : "Available", "az" : "cn-north-7c", "privateIp" : "192.168.1.132", "resources" : { "cpu" : "1930m", "memory" : "1912Mi" } } } ] }
Status code: 400
Bad request
{ "error_code" : "ModelArts.50004000", "error_msg" : "Bad request. invalid nodepool name" }
Status Codes
Status Code |
Description |
---|---|
200 |
OK. |
400 |
Bad request |
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