You can call this operation to configure SSL encryption for an ApsaraDB for Redis instance.

You can also configure SSL encryption in the console. For more information, see Configure SSL encryption.

Note To specify the earliest supported SSL version, you can call the ModifyInstanceConfig operation and modify the required parameter.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String No ModifyInstanceSSL

The operation that you want to perform. Set the value to ModifyInstanceSSL.

InstanceId String Yes r-bp1xxxxxxxxxxxxx

The ID of the instance for which you want to configure SSL encryption.

SSLEnabled String Yes Enable

Modifies the SSL status. Valid values:

  • Disable: disables SSL encryption.
  • Enable: enables SSL encryption.
  • Update: updates the SSL certificate.

Response parameters

Parameter Type Example Description
InstanceId String r-bp1xxxxxxxxxxxxx

The ID of the instance.

TaskId String 1111111111

The ID of the task.

RequestId String 52D901ED-E0A5-42FB-B9DB-39C295C37738

The ID of the request.

Examples

Sample requests

https://r-kvstore.aliyuncs.com/?Action=ModifyInstanceSSL
&InstanceId=r-bp1xxxxxxxxxxxxx
&SSLEnabled=Enable
&<Common request parameters>

Sample success responses

XML format

<ModifyInstanceSSLResponse>
      <InstanceId>r-xxxxxxxxxxxxxxx</InstanceId>
      <RequestId>52D901ED-E0A5-42FB-B9DB-39C295C37738</RequestId>
      <TaskId>1111111111</TaskId>
</ModifyInstanceSSLResponse>

JSON format

{"TaskId":"1111111111","RequestId":"52D901ED-E0A5-42FB-B9DB-39C295C37738","InstanceId":"r-bp1xxxxxxxxxxxxx"}

Error codes

HTTP status code Error code Error message Description
403 IncorrectDBInstanceState Current DB instance state does not support this operation. The error message returned because the status of the instance does not support this operation. This operation is supported only when the instance is in the running state.
403 IncorrectDBInstanceLockMode Current DB instance lock mode does not support this operation. The error message returned because the current lock mode of the instance does not support this operation.
400 InvalidParameters.Format Specified parameters is not valid. The error message returned because the specified parameters are invalid.

For a list of error codes, visit the API Error Center.