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 allows you to ensure 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 must be enabled for the instance.
  • The minor engine version that the dedicated proxies of the instance run must be 1.12.8 or later.
  • The instance must run 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 a restart of the instance. 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.

DbInstanceId String Yes rm-t4n3axxxxx

The ID of the instance.

DbProxyEndpointId String Yes ta9um4xxxxx

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

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 a restart of the instance. Proceed with caution.
RegionId String No cn-hangzhou

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

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

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

JSON format

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

Error codes

HttpCode Error code Error message Description
400 MinorVersionNotSupport The current database minor version does not support the operation. The error message returned because the current minor engine version does not support this operation.
400 InvalidDbProxyStatus The proxy status of the database is abnormal. The error message returned because the dedicated proxies of the instance are in an abnormal state.
403 RDSCategoryNotSupport The specified instance category does not support this operation. The error message returned because the instance does not support this operation.
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 the backend service does not support SSL.
404 InvalidDbProxyConnectionString.NotFound The specified database proxy connection string is not found. The error message returned because the specified proxy endpoint cannot be found.

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