Changing the Node Specifications
Function
This API is used to adjust the specifications (such as step) of a specified node. For example, you can expand the node from 8-node supernode to 16-node supernode. This API is used when you need to adjust the resource capacity of a node, optimize resource utilization, or upgrade the system based on service requirements. Before using this API, ensure that the node has been created and can be modified, the target specifications are supported, and the user has the administrator permissions. After the specifications are changed, the resource capacity of the node is adjusted as required, and related services and configurations are reloaded to adapt to the new specifications. If the node does not exist, the node cannot be modified, the target specifications are not supported, or the user does not have the permission to perform the operation, an error message will be returned.
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-resize
|
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 |
|---|---|---|---|
|
nodes |
Yes |
Array of ResizeNodeInfo objects |
Definition: Information about the batch of supernodes to be scaled. Constraints: A maximum of 50 supernodes can be scaled at a time. |
|
source |
Yes |
NodeResizeParams object |
Definition: Source node pool and specifications information of the supernode to be changed. Constraints: N/A |
|
target |
Yes |
NodeResizeParams object |
Definition: Target node pool and specifications information of the supernode to be changed. Constraints: N/A |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
batchUID |
No |
String |
Definition: Node batch ID, which is required for batch change and can be obtained from the os.modelarts.node/batch.uid tag of the node. Constraints: N/A Range: N/A Default Value: N/A |
|
deleteNodeNames |
No |
Array of strings |
Definition: List of nodes to be scaled in a batch scale-in scenario. Constraints: N/A |
Response Parameters
Status code: 200
OK
Status code: 404
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Range: N/A |
|
error_msg |
String |
Definition: Error message. Range: N/A |
Example Requests
Increasing the number of nodes from 8 to 10 in a supernode batch e7d2ad87-f082-445e-ade0-e493147a1570
/v2/{project_id}/pools/{pool_name}/nodes/scale-hyperinstance-batch
{
"nodes" : [ {
"batchUID" : "e7d2ad87-f082-445e-ade0-e493147a1570"
} ],
"source" : {
"nodePool" : "np01",
"flavor" : "modelarts.bm.npu.arm.snt9c",
"creatingStep" : {
"type" : "hyperinstance",
"step" : 8
}
},
"target" : {
"nodePool" : "np02",
"flavor" : "modelarts.bm.npu.arm.snt9c",
"creatingStep" : {
"type" : "hyperinstance",
"step" : 10
}
}
}
Example Responses
Status code: 200
OK
{ }
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