Enabling or Disabling SSL
Function
This API is used to configure SSL. This API is only supported by single-node, master/standby, and Redis Cluster DCS Redis 6.0 basic edition instances.
Calling Method
For details, see Calling APIs.
URI
PUT /v2/{project_id}/instances/{instance_id}/ssl
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID. For details, see Obtaining a Project ID. |
| instance_id | Yes | String | Instance ID. |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| enabled | Yes | Boolean | Enabling or disabling SSL. |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| job_id | String | DCS task ID. |
| instance_id | String | Instance ID. |
Status code: 400
| Parameter | Type | Description |
|---|---|---|
| error_msg | String | Error message. |
| error_code | String | Error code. |
| error_ext_msg | String | Extended error information. This parameter is not used currently and is set to null. |
Status code: 500
| Parameter | Type | Description |
|---|---|---|
| error_msg | String | Error message. |
| error_code | String | Error code. |
| error_ext_msg | String | Extended error information. This parameter is not used currently and is set to null. |
Example Requests
PUT https://{dcs_endpoint}/v2/{project_id}/instances/{instance_id}/ssl
{
"enabled" : true
} Example Responses
Status code: 200
SSL enabled or disabled.
{
"job_id" : "ff8080817fe01bb2017fe3cf68860481",
"instance_id" : "5560df16-cebf-4473-95c4-d1b573c16e79"
} Status code: 400
Invalid request.
{
"error_code" : "DCS.4201",
"error_msg" : "Do not support SSL."
} Status code: 500
Internal service error.
{
"error_code" : "DCS.5010",
"error_msg" : "Failed to operate SSL in database."
} Status Codes
| Status Code | Description |
|---|---|
| 200 | SSL enabled or disabled. |
| 400 | Invalid request. |
| 500 | Internal service error. |
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.