Performing Operations on a Component Instance
Function
This API is used to perform operations 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 Parameters
Request parameters
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| action | String | Yes | Operation. Value: start, stop, restart, scale, or rollback. |
| parameters | Object | No | Operation parameter, which is provided when action is set to scale or rollback. See Table 3. |
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| replica | Integer | No | Number of instances, which is provided when action is set to scale. |
| hosts | Array | No | ECS ID list, which specifies the ECS host deployed during VM capacity expansion. |
| version | String | No | Version number, which is provided when action is set to rollback and can be obtained using the snapshot query API. |
Response Parameters
Response parameters
| Parameter | Type | Description |
|---|---|---|
| job_id | String | Job ID. |
Example
Example request
{
"action": "start",
"parameters": {
"replica": 0,
"hosts": [
"string"
],
"version": "string"
}
} Example response
{
"job_id": "JOB66761060-f209-407c-a093-4df6f531b9dc"
} Status Code
| HTTP Status Code | Description |
|---|---|
| 200 | OK |
| 400 | Bad Request |
| 404 | Not Found |
| 500 | Internal Server Error |
Error code must be in the format of SVCSTG.00100.[Error_ID]. Example: SVCSTG.00100400. See Error Codes of Application Management APIs.
Last Article: Obtaining All Instances of a Component
Next Article: Modifying an Application Component Instance
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.