Locking Node Functions in Batches
Function
This API is used to lock node functions in batches. Locked functions cannot be used on the console.
URI
POST /v2/{project_id}/pools/{pool_name}/nodes/batch-lock
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 ID. The value is the metadata.name field in the resource pool details. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
nodeNames |
Yes |
Array of strings |
Names of nodes to be locked. |
actions |
Yes |
Array of strings |
Action performed for a lock. The options are as follows:
|
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
nodes |
Array of strings |
Names of nodes that are successfully updated. |
Status code: 404
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Example Requests
Lock node functions in batches.
POST /v2/{project_id}/pools/{pool_name}/nodes/batch-lock { "nodeNames" : [ "os-node-created-xzz78" ], "actions" : [ "delete" ] }
Example Responses
Status code: 200
OK.
{ "nodes" : [ { "name" : "os-node-created-xzz78" } ] }
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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.