Obtaining Nodes in a Node Pool
Function
This API is used to obtain details about all nodes in a specified node pool. This API is used when you need to obtain the details about a node pool, such as the node status, resource usage, or resource management. Before using this API, ensure that the node pool exists and you have the permission to access the node pool. After the API is called, the system returns the node list of the node pool, including the node ID, name, status, IP address, and resource usage. If the node pool does not exist, the user does not have the permission to access the node pool, or the node pool is unavailable, 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, no identity policy-based permission required for calling this API.
URI
GET /v2/{project_id}/pools/{pool_name}/nodepools/{nodepool_name}/nodes
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Definition: User 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 name. Constraints: N/A Range: N/A Default Value: N/A |
|
nodepool_name |
Yes |
String |
Definition: Node pool name. Constraints: N/A Range: N/A Default Value: N/A |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
continue |
No |
String |
Definition: Position of the previous page during pagination query. Constraints: N/A Range: N/A Default Value: N/A |
|
limit |
No |
String |
Definition: Number of records returned in a single pagination query. Constraints: N/A Range: N/A Default Value: N/A |
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: 400
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