Help Center/ ModelArts/ API Reference/ Node Management/ Unlocking Node Functions in Batches
Updated on 2025-11-19 GMT+08:00

Unlocking Node Functions in Batches

Function

This API is used to unlock functions of a specified node in batches. After the unlocking, the functions become available on the console. This API is used when you need to unlock the locked functions in batches after the system maintenance or test. Before using this API, ensure that the node function has been locked and the user has the administrator permission. After the unlocking, the functions of the specified node become available on the console, and the user can use the functions. If the node function is not locked, the user does not have the permission to perform the operation, 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.

URI

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

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: 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 the metadata.name field in the resource pool details.

Constraints: N/A

Range: N/A

Default Value: N/A

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

nodeNames

Yes

Array of strings

Definition: Names of nodes whose lock status needs to be changed.

Constraints: N/A

actions

Yes

Array of strings

Definition: Function type to be changed.

Constraints: N/A

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

nodes

Array of NodesResultMsg objects

Definition: IDs and statuses of resource pool nodes that are operated in batches.

Range: N/A

Table 4 NodesResultMsg

Parameter

Type

Description

name

String

Definition*: ID of the unlocked resource pool node. The value is the same as that of metadata.name in the node details.

Range: N/A

status

String

Definition: Batch operation result of resource pool nodes.

Range:

  • failed: The operation failed.

  • success: The operation succeeded.

Status code: 404

Table 5 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

Unlock node functions in batches.

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

{
  "nodeNames" : [ "os-node-created-xzz78" ],
  "actions" : [ "delete" ]
}

Example Responses

Status code: 200

OK

{
  "nodes" : [ {
    "name" : "os-node-created-xzz78",
    "status" : "success"
  } ]
}

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.