Help Center/ ModelArts/ API Reference/ Resource Management/ Deleting nodes in batches
Updated on 2024-05-30 GMT+08:00

Deleting nodes in batches

Function

This API is used to delete nodes from a specified resource pool in batches. At least one node must be reserved in the 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

POST /v2/{project_id}/pools/{pool_name}/nodes/batch-delete

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

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

deleteNodeNames

Yes

Array of strings

Names of the nodes to be deleted.

Response Parameters

Status code: 404

Table 3 Response body parameters

Parameter

Type

Description

error_code

String

Error codes of ModelArts.

error_msg

String

Error message.

Example Requests

The following is an example of how to delete nodes in batches.

POST /v2/{project_id}/pools/{pool_name}/nodes/batch-delete

{
  "deleteNodeNames" : [ "os-node-created-mnmcf" ]
}

Example Responses

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.