Obtaining Nodes in a Resource Pool
Function
This API is used to obtain the node list of a specified resource pool. This API is used when you need to obtain the details about a resource pool, such as the node distribution, status, or resource usage. Before using this API, ensure that the resource pool has been created and is available, and you have the required permission. After the query, the system returns the detailed information about the nodes in the resource pool, including the node ID, status, and resource usage, helping you manage and optimize resources. If the resource pool does not exist, you do not have the permission to access the resource pool, or the request parameters are invalid, the API will return an error message.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
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, the following identity policy-based permissions are required.
Action
Access Level
Resource Type (*: required)
Condition Key
Alias
Dependencies
modelarts:pool:get
Read
pool *
g:ResourceTag/<tag-key>
-
-
-
g:EnterpriseProjectId
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: The value can contain 1 to 64 characters. Letters, digits, and hyphens (-) are allowed. 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: 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. Range: N/A 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 the resource. Range: |
|
kind |
String |
Definition: Resource type. Range: |
|
metadata |
NodeListMetadata object |
Definition: Metadata of a node list. |
|
items |
Array of Node objects |
Definition: Node resource list. |
|
Parameter |
Type |
Description |
|---|---|---|
|
continue |
String |
Definition: Offset parameter of the pagination query. Range: The value is obtained from the metadata.continue field in the response to the last pagination query. An empty value indicates no offset. |
|
remainingItemCount |
Long |
Definition: Number of remaining resources in a pagination query. Default Value: N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
apiVersion |
String |
Definition: API version of the resource. Range: |
|
kind |
String |
Definition: Resource type. Range: |
|
metadata |
NodeMetadata object |
Definition: Metadata of a node resource. |
|
spec |
NodeSpec object |
Definition: Specifications of a node resource. |
|
status |
NodeStatus object |
Definition: Status of a node resource. |
|
Parameter |
Type |
Description |
|---|---|---|
|
name |
String |
Definition: Node name. Range: N/A |
|
creationTimestamp |
String |
Definition: Creation time. Range: N/A |
|
labels |
NodeLabels object |
Definition: Node labels. |
|
annotations |
NodeVOAnnotations object |
Definition: Node annotations. |
|
Parameter |
Type |
Description |
|---|---|---|
|
os.modelarts.node/cluster |
String |
Definition: Name of the cluster where the node is located. Range: N/A |
|
os.modelarts.node/elastic.quota |
String |
Definition: Logical pool bound to the node. Range: N/A |
|
os.modelarts.node/nodepool |
String |
Definition: ID of the node pool where the node is located. Range: N/A |
|
os.modelarts.node/batch.uid |
String |
Definition: Batch creation ID. Range: N/A |
|
os.modelarts.node/batch.name |
String |
Definition: Batch creation name. Range: N/A |
|
os.modelarts.node/batch.type |
String |
Definition: Batch creation type. Range |
|
os.modelarts.node/batch.count |
String |
Definition: Number of nodes created in batches. Range: N/A |
|
os.modelarts/resource.id |
String |
Definition: Node resource ID. Range: N/A |
|
os.modelarts/tenant.domain.id |
String |
Definition: Tenant ID of a node, which records the tenant account under which the node is created. Range: N/A |
|
os.modelarts/tenant.project.id |
String |
Definition: Project ID of a node, which records the project under which the node is created. Range: N/A |
|
os.modelarts/billing.status |
String |
Definition: Node billing status. Range |
|
os.modelarts.node/volcano.scheduler.cabinet-exclusive |
String |
Definition: Whether the node is exclusively occupied by a full-rack job. If yes, tha tag exists and its value is the ID of the exclusive training job. Range: N/A |
|
cce.kubectl.kubernetes.io/cabinet |
String |
Definition: IP address of the TOR switch where the node is located. Use hyphens (-) to separate multiple IP addresses of TOR switches. Range: N/A |
|
os.modelarts.node/underlying.instance.id |
String |
Definition: Instance ID of the underlying resources of the node, for example, the ECS instance ID of the supernode. Range: N/A |
|
os.modelarts.node/ha.redundant.enabled |
String |
Definition: Whether HA redundancy is enabled for the node. Range |
|
os.modelarts.node/nodepoolname |
String |
Definition: Name of the node pool where the node is located. The value can contain 2 to 50 characters and must start with a lowercase letter. It cannot end with a hyphen (-) or -default. Only lowercase letters, hyphens (-), and digits are allowed. Range: 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: Node specifications. Range: N/A. |
|
os |
Os object |
Definition: OS image information. |
|
hostNetwork |
NodeNetwork object |
Definition: Node network information. |
|
rootVolume |
VolumeVO object |
Definition: System disk information. |
|
dataVolumes |
Array of VolumeVO objects |
Definition: Data disk information. |
|
extendParams |
ResourceExtendParams object |
Definition: Custom configuration. |
|
Parameter |
Type |
Description |
|---|---|---|
|
name |
String |
Definition: OS name and version, for example, EulorOS 2.5. This parameter can be left blank when a private image is specified. Range: N/A. |
|
imageId |
String |
Definition: OS image ID. Range: N/A. |
|
imageType |
String |
Definition: OS image type. This parameter must be specified when a private image is set. By default, the preset image is used. You do not need to specify this field. Range: |
|
autoMatch |
String |
Definition: Automatic OS image matching configuration. If this parameter is set, the optimal image is automatically selected, and this parameter is automatically cleared. Range: OS name and version, for example, EulorOS 2.5. |
|
Parameter |
Type |
Description |
|---|---|---|
|
vpc |
String |
Range: N/A. |
|
subnet |
String |
Definition: Subnet ID. Range: N/A. |
|
securityGroups |
Array of strings |
Definition: Security group ID set. |
|
Parameter |
Type |
Description |
|---|---|---|
|
volumeType |
String |
Definition: Disk type.. Range: |
|
size |
String |
Definition: Disk size, in GiB. Range: N/A. |
|
count |
Integer |
Definition: Number of disks. If this parameter is not specified, the default value 1 is used. Range: N/A. |
|
Parameter |
Type |
Description |
|---|---|---|
|
phase |
String |
Definition: Status of a node. Range: |
|
az |
String |
Definition: AZ where a node is located. Range: N/A |
|
privateIp |
String |
Definition: IP address of a node. Range: N/A |
|
resources |
NodeResource object |
Definition: Resources of a node. |
|
availableResources |
NodeResource object |
Definition: Available resources of a node. |
|
Parameter |
Type |
Description |
|---|---|---|
|
cpu |
String |
Definition: Number of CPU cores on a node. Range: N/A |
|
memory |
String |
Definition: Memory size of a node, in GiB. Range: N/A |
|
nvidia.com/gpu |
String |
Definition: Number of GPUs on a node. Range: N/A |
|
huawei.com/ascend-snt3 |
String |
Definition: Number of snt3 NPUs on a node. Range: N/A |
|
huawei.com/ascend-snt9 |
String |
Definition: Number of snt9 NPUs on a node. Range: N/A |
Status code: 404
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