Obtaining Nodes in a Resource Pool
Function
This API is used to obtain nodes in a resource 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}/nodes
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Definition: Project ID. For details, see Obtaining a Project ID and Name. Constraints: N/A Range: N/A Default Value: N/A |
pool_name |
Yes |
String |
Definition: Resource pool ID. The value is obtained from the metadata.name field in the resource pool details. Constraints: N/A *Range: The value can contain 36 to 63 characters. It must start with a lowercase letter and cannot end with a hyphen (-). Digits and hyphens (-) are allowed. Default Value: N/A |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
continue |
No |
String |
Definition: Offset parameter of the pagination query Constraints: 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 |
limit |
No |
Integer |
Definition: Number of resources returned in a single pagination query Constraints: N/A Range: 0 to 500 Default Value: 500 |
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: 404
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Range: N/A |
error_msg |
String |
Definition: Error message. Range: N/A |
Example Requests
Obtain nodes in a resource pool.
GET https://{endpoint}/v2/{project_id}/pools/{pool_name}/nodes { }
Example Responses
Status code: 200
OK
{ "kind" : "NodeList", "apiVersion" : "v2", "metadata" : { }, "items" : [ { "kind" : "Node", "apiVersion" : "v2", "metadata" : { "name" : "os-node-created-zlncn", "creationTimestamp" : "2022-09-16T05:32:44Z" }, "spec" : { "flavor" : "modelarts.vm.cpu.4ud" }, "status" : { "phase" : "Available", "az" : "cn-north-7c", "privateIp" : "192.168.0.1", "resources" : { "cpu" : "3920m", "memory" : "6270Mi" }, "availableResources" : { "cpu" : "2970m", "memory" : "4558Mi" } } }, { "kind" : "Node", "apiVersion" : "v2", "metadata" : { "name" : "os-node-created-4s522", "creationTimestamp" : "2022-09-16T03:20:53Z" }, "spec" : { "flavor" : "modelarts.vm.cpu.4ud" }, "status" : { "phase" : "Available", "az" : "cn-north-7c", "privateIp" : "192.168.0.2", "resources" : { "cpu" : "3920m", "memory" : "6270Mi" }, "availableResources" : { "cpu" : "2970m", "memory" : "4558Mi" } } }, { "kind" : "Node", "apiVersion" : "v2", "metadata" : { "name" : "os-node-created-v7hfj", "creationTimestamp" : "2022-09-16T09:16:37Z" }, "spec" : { "flavor" : "modelarts.vm.cpu.4ud" }, "status" : { "phase" : "Available", "az" : "cn-north-7c", "privateIp" : "192.168.0.3", "resources" : { "cpu" : "3920m", "memory" : "6270Mi" }, "availableResources" : { "cpu" : "3720m", "memory" : "5670Mi" } } } ] }
Status code: 404
Not found.
{ "error_code" : "ModelArts.50015001", "error_msg" : "pool not found" }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
404 |
Not found. |
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