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
|
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
|
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
|
Parameter |
Type |
Description |
|---|---|---|
|
nodes |
Array of NodesResultMsg objects |
Definition: IDs and statuses of resource pool nodes that are operated in batches. Range: N/A |
|
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:
|
Status code: 404
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot