Updated on 2025-11-19 GMT+08:00

Deleting a Node Pool

Function

This API is used to remove a created node pool. This function is not supported for yearly/monthly resource pools. This API is used when you need to delete a specified node pool when the tasks in the node pool are complete, the configuration is incorrect, or resources need to be cleared. Before using this API, ensure that the node pool exists and you have the administrator permissions. After the deletion, the node pool is permanently removed, and related resources and configurations are cleared. If the node pool does not exist, the user does not have the permission to perform the operation, or the node pool cannot be deleted, for example, it is a yearly/monthly resource pool or the node pool is in use, 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.

URI

DELETE /v2/{project_id}/pools/{pool_name}/nodepools/{nodepool_name}

Table 1 Path Parameters

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

Request Parameters

None

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

apiVersion

String

Definition: API version.

Range:

  • v2

kind

String

Node pool type. The options are as follows:

  • NodePool: node pool

metadata

NodePoolMetadata object

Definition: Node pool metadata.

spec

NodePoolSpec object

Definition: Node pool expectation.

status

NodePoolStatus object

Definition: Node pool status.

Table 3 NodePoolMetadata

Parameter

Type

Description

name

String

Definition: Node pool name. You can specify the name. If not specified, the default name is used.

Range: N/A

Table 4 NodePoolSpec

Parameter

Type

Description

resources

PoolResource object

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

Range: N/A

Table 5 PoolResource

Parameter

Type

Description

flavor

String

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

Range: N/A

count

Integer

Definition: Committed specifications.

Range: N/A

maxCount

Integer

Definition: Elastic usage of the resource flavor. This parameter value is the same the count value in a physical pool. It is greater than or equal to the count value in a logical pool.

Range: N/A

azs

Array of PoolNodeAz objects

Definition: AZ distribution of the node pool.

nodePool

String

Definition: Node pool name, for example, nodePool-1.

Range: N/A

taints

Array of Taints objects

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

labels

Map<String,String>

Definition: Kubernetes label, in key-value pair format.

Range: N/A

tags

Array of UserTags objects

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

Range: N/A

network

NodeNetwork object

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

extendParams

Map<String,String>

Definition: Custom configuration parameters.

  • 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

Definition: Information about batch creation.

os

Os object

Definition: OS image information.

Table 6 Taints

Parameter

Type

Description

key

String

Definition: Key.

Range: N/A

value

String

Value.

effect

String

Effect.

Table 7 UserTags

Parameter

Type

Description

key

String

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

Range: N/A

value

String

Value.

Table 8 NodeNetwork

Parameter

Type

Description

vpc

String

  • Definition: VPC ID.

Constraints: N/A

Range: N/A

Default Value: N/A

subnet

String

Definition: Subnet ID.

Constraints: N/A

Range: N/A

Default Value: N/A

securityGroups

Array of strings

Definition: Security group ID set.

Constraints: N/A

Table 9 CreatingStep

Parameter

Type

Description

step

Integer

Definition: Step of a supernode.

Constraints: N/A

Range: Only the step contained in the resource specification details is supported.

Default Value: N/A

type

String

Definition: Batch creation type.

Constraints: N/A

Range:

  • hyperinstance: supernode

Default Value: N/A

Table 10 Os

Parameter

Type

Description

name

String

Definition: OS name.

Range: N/A

imageId

String

Definition: OS image ID.

Range: N/A

imageType

String

Definition: OS image type.

Range:

  • private: private image

Table 11 NodePoolStatus

Parameter

Type

Description

resources

resources object

Definition: Resources in different states in a node pool.

Table 12 resources

Parameter

Type

Description

creating

PoolResourceFlavorCount object

Definition: Number of resources that are being created.

available

PoolResourceFlavorCount object

Definition: Number of available resources.

abnormal

PoolResourceFlavorCount object

Definition: Number of abnormal resources.

deleting

PoolResourceFlavorCount object

Definition: Number of resources that are being deleted.

Table 13 PoolResourceFlavorCount

Parameter

Type

Description

flavor

String

Definition: Resource flavor ID.

Range: N/A

count

Integer

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

Range: 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.

Range: N/A

azs

Array of PoolNodeAz objects

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

nodePool

String

Definition: Node pool ID.

Range: N/A

Table 14 PoolNodeAz

Parameter

Type

Description

az

String

Definition: AZ name.

Range: N/A

count

Integer

Definition: Number of AZ resource instances.

Range: N/A

Status code: 400

Table 15 Response body parameters

Parameter

Type

Description

error_code

String

  • Definition: ModelArts error code.

Range: N/A

error_msg

String

Definition: Error message.

Range: N/A

Example Requests

Delete a node pool.

DELETE https://{endpoint}/v2/{project_id}/pools/{pool_name}/nodepools/{nodepool_name}

{ }

Example Responses

Status code: 200

success

{
  "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 code: 400

Bad request

{
  "error_code" : "ModelArts.50004000",
  "error_msg" : "Bad request."
}

Status Codes

Status Code

Description

200

success

400

Bad request

Error Codes

See Error Codes.