Querying the Operations Performed on a Component Instance
Function
This API is used to query the operations performed on a component instance.
URI
POST /v2/{project_id}/cas/applications/{application_id}/components/{component_id}/instances/{instance_id}/action
|
Parameter |
Type |
Mandatory |
Description |
|---|---|---|---|
|
project_id |
String |
Yes |
Tenant's project ID. |
|
application_id |
String |
Yes |
Application ID. |
|
component_id |
String |
Yes |
Component ID. |
|
instance_id |
String |
Yes |
Component instance ID. |
Request
|
Parameter |
Type |
Mandatory |
Description |
|---|---|---|---|
|
action |
String |
Yes |
Operation. Value: start, stop, restart, scale, or rollback. |
|
parameters |
Object |
No |
Operation parameter, which is mandatory when action is set to scale or rollback. See Table 3. |
|
Parameter |
Type |
Mandatory |
Description |
|---|---|---|---|
|
replica |
Integer |
No |
Number of instances, which is mandatory when action is set to scale. |
|
hosts |
Array |
No |
ECS ID list. This parameter specifies the ECS deployed during VM scaling, and is mandatory for scaling. |
|
version |
String |
No |
Version number, which is mandatory when action is set to rollback. You can obtain the version number by using the API in Obtaining Component Instance Snapshots. |
Response
|
Parameter |
Type |
Description |
|---|---|---|
|
job_id |
String |
Job ID. |
Example
Example request
{
"action": "scale",
"parameters": {
"replica": 4
}
}
Example response
{
"job_id": "JOB66761060-f209-407c-a093-4df6f531b9dc"
}
Status Code
|
Status Code |
Description |
|---|---|
|
200 |
OK |
|
400 |
Bad Request |
|
404 |
Not Found |
|
500 |
Internal Server Error |
Error Code
Error code must be in the format of SVCSTG.00100.[Error_ID]. Example: SVCSTG.00100400. See Error Codes of Application Management APIs.
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