You can call the ModifyDbProxyInstanceSsl operation to configure SSL encryption for the dedicated proxy endpoint of an ApsaraDB RDS instance.

ApsaraDB RDS provides the dedicated proxy feature. You can configure SSL encryption for the dedicated proxy endpoint of an instance. This ensures the data security of the instance. For more information, see Dedicated proxy.

Before you call this operation, make sure that the following requirements are met:

  • The dedicated proxy feature is enabled for the instance.
  • The minor engine version that the dedicated proxies of the instance run is 1.12.8 or later.
  • Your RDS instance runs one of the following MySQL versions and RDS editions:
    • MySQL 8.0 on RDS High-availability Edition with local SSDs. The minor engine version is 20200831 or later.
    • MySQL 5.7 on RDS High-availability Edition with local SSDs. The minor engine version is 20200831 or later.
    • MySQL 5.6 on RDS High-availability Edition with local SSDs. The minor engine version is 20200831 or later.
Note Calling this operation causes your instance to restart. Proceed with caution.

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 Yes ModifyDbProxyInstanceSsl

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

RegionId String No cn-hangzhou

The region ID of the instance. You can call the DescribeRegions operation to query the most recent region list.

DbInstanceId String Yes rm-t4n3axxxxx

The ID of the instance. You can call the DescribeDBInstances operation to query the ID of the instance.

DbProxyEndpointId String Yes ta9um4xxxxx

The ID of the proxy endpoint. You can call the DescribeDBProxyEndpoint operation to query the proxy endpoints of a proxy terminal.

DbProxyConnectString String Yes test123456.rwlb.rds.aliyuncs.com

The dedicated proxy endpoint of the instance.

DbProxySslEnabled String Yes 1

The SSL configuration setting that you want to apply on the instance. Valid values:

  • 0: disables SSL encryption.
  • 1: enables SSL encryption or modifies the endpoint that requires SSL encryption.
  • 2: updates the validity period of the SSL certificate.
Note This setting causes your instance to restart. Proceed with caution.
DBProxyEngineType String No normal

An internal parameter. You do not need to specify this parameter.

Response parameters

Parameter Type Example Description
RequestId String BF46A62B-3717-4397-9338-36BB95C898B3

The ID of the request.

Examples

Sample requests

http(s)://rds.aliyuncs.com/?Action=ModifyDbProxyInstanceSsl
&DbInstanceId=rm-t4n3axxxxx
&DbProxyEndpointId=ta9um4xxxxx
&DbProxyConnectString=test123456.rwlb.rds.aliyuncs.com
&DbProxySslEnabled=1
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<ModifyDbProxyInstanceSslResponse>
<RequestId>BF46A62B-3717-4397-9338-36BB95C898B3</RequestId>
</ModifyDbProxyInstanceSslResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "BF46A62B-3717-4397-9338-36BB95C898B3"
}

Error codes

HTTP status code Error code Error message Description
400 MinorVersionNotSupport The current database minor version does not support the operation. The error message returned because the operation is not supported by the current minor engine version.
400 InvalidDbProxyStatus The proxy status of the database is abnormal. The error message returned because the status of the database proxy of the instance is abnormal.
400 InvalidDBInstanceName Specified parameter DBInstanceName is not valid. The error message returned because the value of the DBInstanceName parameter is invalid. Check whether the value is null or an empty string.
403 RDSCategoryNotSupport The specified instance category does not support this operation. The error message returned because the operation is not supported by the current instance type.
404 Endpoint.NotFound The specified endpoint is not found. The error message returned because the specified endpoint cannot be found.
404 EnabledSSLNotSupport The backend service does not support SSL. The error message returned because SSL is not supported by backend services.
404 InvalidDbProxyConnectionString.NotFound The specified database proxy connection string is not found. The error message returned because the specified database proxy endpoint cannot be found.

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