Restarting DCS Instances or Clearing DCS Instance Data¶
Function¶
This API is used to restart a running DCS instance.
Data clearance operations cannot be undone on DCS Redis 4.0 and 5.0 instances.
URI¶
PUT /v1.0/{project_id}/instances/status
Table 1 describes the parameter.
Parameter | Type | Mandatory | Description |
---|---|---|---|
project_id | String | Yes | Project ID. |
Request¶
Request parameters
Table 2 describes the request parameters.
Parameter | Type | Mandatory | Description |
---|---|---|---|
action | String | Yes | Action performed on DCS instances. Options: restart, and flush. Note Only DCS Redis 4.0 and 5.0 instances can be flushed. |
instances | Array | Yes | List of DCS instance IDs. |
Example request
Request URL:
PUT https://{dcs_endpoint}/v1.0/{project_id}/instances/status
Example:
{ "action": "restart", "instances": [ "2e803f66-fbb0-47ad-b6cb-fb87f5bed4ef" ] }
Response¶
Response parameters
Table 3 describes the response parameter.
Parameter | Type | Description |
---|---|---|
results | Array | Indicates the result of instance modification. |
Parameter | Type | Description |
---|---|---|
instance | String | DCS instance ID. |
result | String | Instance modification result. Options: success or failed |
Example response
{
"results": [
{
"result": "success",
"instance": "2e803f66-fbb0-47ad-b6cb-fb87f5bed4ef"
}
]
}
Status Code¶
Table 5 describes the status code of successful operations. For details about other status codes, see Table 1.
Status Code | Description |
---|---|
200 | Successfully restarted DCS instance or cleared DCS instance data. |