Updated on 2025-08-20 GMT+08:00

Obtaining Node Pools

Function

This API is used to obtain node pools.

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

Table 1 Path Parameters

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.

Request Parameters

None

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

apiVersion

String

API version. The options are as follows:

  • v2

kind

String

Resource type. The options are as follows:

  • NodePoolList: node list

items

Array of NodePool objects

Node pool list.

Table 3 NodePool

Parameter

Type

Description

apiVersion

String

API version. The options are as follows:

  • v2

kind

String

Node pool type. The options are as follows:

  • NodePool: node pool

metadata

NodePoolMetadata object

Node pool metadata.

spec

NodePoolSpec object

Node pool specifications.

status

NodePoolStatus object

Node pool status.

Table 4 NodePoolMetadata

Parameter

Type

Description

name

String

Node pool name. You can specify a name. If no name is specified, the default name is used.

Table 5 NodePoolSpec

Parameter

Type

Description

resources

PoolResource object

List of resources in a node pool, including resource flavors, quantity, and custom configurations.

Table 6 PoolResource

Parameter

Type

Description

flavor

String

Resource flavor name, for example, modelarts.vm.gpu.t4u8.

count

Integer

Minimum count for the flavors in a pool.

maxCount

Integer

Elastic usage of the resource flavor. This parameter value is the same as the count value in a physical pool.

azs

Array of PoolNodeAz objects

AZ where resource pool nodes are deployed.

nodePool

String

Node pool name, for example, nodePool-1.

taints

Array of Taint objects

Taints to be added to nodes to set anti-affinity. This parameter cannot be specified for a non-privileged pool.

labels

Map<String,String>

Kubernetes label, in the format of a key-value pair.

tags

Array of UserTag objects

Resource tag. This parameter cannot be specified for a non-privileged pool.

network

NodeNetwork object

Network configuration. This parameter cannot be specified for a non-privileged pool.

extendParams

Map<String,String>

Customize the parameter configurations.

  • dockerBaseSize: Specify the container engine space size of a resource pool node. The value 0 indicates that the size is not limited.

creatingStep

CreatingStep object

Batch creation information.

os

Os object

OS image information.

Table 7 Taint

Parameter

Type

Description

key

String

Key.

value

String

Value.

effect

String

Effect.

Table 8 UserTag

Parameter

Type

Description

key

String

Key. The value cannot start with CCE- or __type_baremetal.

value

String

Value.

Table 9 NodeNetwork

Parameter

Type

Description

vpc

String

VPC ID.

subnet

String

Subnet ID.

securityGroups

Array of strings

Security group IDs.

Table 10 CreatingStep

Parameter

Type

Description

step

Integer

Creation step.

type

String

Batch creation type. The options are as follows:

  • rack: entire cabinet

Table 11 Os

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:

  • private: private image

Default Value: N/A

Table 12 NodePoolStatus

Parameter

Type

Description

resources

resources object

Resources in different states in a node pool.

Table 13 resources

Parameter

Type

Description

creating

PoolResourceFlavorCount object

Number of resources that are being created.

available

PoolResourceFlavorCount object

Number of available resources.

abnormal

PoolResourceFlavorCount object

Number of abnormal resources.

deleting

PoolResourceFlavorCount object

Number of resources that are being deleted.

Table 14 PoolResourceFlavorCount

Parameter

Type

Description

flavor

String

Definition: Resource flavor ID.

Constraints: N/A

Range: N/A

Default Value: N/A

count

Integer

Definition: Number of resource specification instances in a resource pool.

Constraints: N/A

Range: N/A

Default Value: N/A

maxCount

Integer

Definition: Number of elastic resource specification instances in a resource pool. The value of this parameter in a physical pool is the same as that of count.

Constraints: N/A

Range: N/A

Default Value: N/A

azs

Array of PoolNodeAz objects

Definition: AZ distribution of the resource specification instances to be created in a resource pool.

Constraints: N/A

Range: N/A

Default Value: N/A

nodePool

String

Definition: Node pool ID.

Constraints: N/A

Range: N/A

Default Value: N/A

Table 15 PoolNodeAz

Parameter

Type

Description

az

String

  • Definition: AZ name.

Constraints: N/A

Range: N/A

Default Value: N/A

count

Integer

Definition: Number of AZ resource instances.

Constraints: N/A

Range: N/A

Default Value: N/A

Example Requests

Obtain node pools.

GET https://{endpoint}/v2/{project_id}/pools/{pool_name}/nodepools

{ }

Example Responses

Status code: 200

OK.

{
  "kind" : "NodePoolList",
  "apiVersion" : "v2",
  "items" : [ {
    "kind" : "NodePool",
    "apiVersion" : "v2",
    "metadata" : {
      "name" : "modelarts.vm.2u4g.dcc-Default"
    },
    "spec" : {
      "resources" : {
        "nodePool" : "modelarts.vm.2u4g.dcc-Default",
        "flavor" : "modelarts.vm.2u4g.dcc",
        "count" : 1,
        "maxCount" : 1,
        "network" : {
          "vpc" : "277e9abc-0e6b-431a-9232-cfd25d5fc566",
          "subnet" : "03796378-c356-4c14-826b-e4913aa9c8b9",
          "securityGroups" : [ "0a15b48d-06f1-41e4-b782-ade90087bf59" ]
        }
      }
    },
    "status" : {
      "resources" : {
        "available" : {
          "nodePool" : "modelarts.vm.2u4g.dcc-Default",
          "flavor" : "modelarts.vm.2u4g.dcc",
          "count" : 1,
          "maxCount" : 1,
          "azs" : [ {
            "az" : "cn-north-7c",
            "count" : 1
          } ]
        }
      }
    }
  }, {
    "kind" : "NodePool",
    "apiVersion" : "v2",
    "metadata" : {
      "name" : "nodepool-1"
    },
    "spec" : {
      "resources" : {
        "nodePool" : "nodepool-1",
        "flavor" : "modelarts.vm.2u4g.dcc",
        "count" : 1,
        "maxCount" : 1,
        "network" : {
          "vpc" : "277e9abc-0e6b-431a-9232-cfd25d5fc566",
          "subnet" : "03796378-c356-4c14-826b-e4913aa9c8b9",
          "securityGroups" : [ "0a15b48d-06f1-41e4-b782-ade90087bf59" ]
        }
      }
    },
    "status" : {
      "resources" : {
        "available" : {
          "nodePool" : "nodepool-1",
          "flavor" : "modelarts.vm.2u4g.dcc",
          "count" : 1,
          "maxCount" : 1,
          "azs" : [ {
            "az" : "cn-north-7c",
            "count" : 1
          } ]
        }
      }
    }
  } ]
}

Status Codes

Status Code

Description

200

OK.

Error Codes

See Error Codes.