You can call the ModifyDBProxyInstance operation to modify the database proxy settings of an ApsaraDB RDS instance.

Before you call the ModifyDBProxyInstance operation, make sure that the ModifyDBProxy operation is called to enable the database proxy feature for the instance.

  • The dedicated proxy feature of ApsaraDB RDS for MySQL provides capabilities such as read/write splitting and short-lived connection optimization. For more information, see What are database proxies?
  • The database proxy feature of ApsaraDB RDS for PostgreSQL supports read/write splitting. For more information, see What are database proxies?

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 ModifyDBProxyInstance

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

DBInstanceId String Yes rm-t4n3a****

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

DBProxyInstanceType String Yes DedicatedProxy

The type of database proxy that is enabled for the instance. Set the value to DedicatedProxy.

DBProxyInstanceNum String Yes 2

The number of proxy instances that are enabled. If the value of this parameter is 0, the database proxy feature is disabled for the instance. Valid values: 1 to 60.

Note The capability of the database proxy to process requests increases with the number of proxy instances that are enabled. You can monitor the load on the instance and specify an appropriate number of proxy instances based on the load monitoring data.
EffectiveTime String No MaintainTime

The time when you want to apply the new database proxy settings. Valid values:

  • Immediate: ApsaraDB RDS immediately applies the new settings.
  • MaintainTime: ApsaraDB RDS applies the new settings during the maintenance window that you specified. For more information, see Modify the maintenance window.
  • SpecificTime: ApsaraDB RDS applies the new settings at a specified point in time.

Default value: MaintainTime.

EffectiveSpecificTime String No 2019-07-10T13:15:12Z

The point in time at which you want to apply the new database proxy settings. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.

Note If you set the EffectiveTime parameter to SpecificTime, you must specify the EffectiveSpecificTime parameter.
RegionId String No cn-hangzhou

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

DBProxyEngineType String No normal

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

Response parameters

Parameter Type Example Description
RequestId String 65C55572-530E-4A53-BE03-1D08CAF0F046

The ID of the request.

Examples

Sample requests

http(s)://rds.aliyuncs.com/?Action=ModifyDBProxyInstance
&DBInstanceId=rm-t4n3a****
&DBProxyInstanceType=DedicatedProxy
&DBProxyInstanceNum=2
&EffectiveTime=Immediate
&<Common request parameters>

Sample success responses

XML format

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

<ModifyDBProxyInstanceResponse>
  <RequestId>65C55572-530E-4A53-BE03-1D08CAF0F046</RequestId>
</ModifyDBProxyInstanceResponse>

JSON format

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

{
  "RequestId" : "65C55572-530E-4A53-BE03-1D08CAF0F046"
}

Error codes

HTTP status code Error code Error message Description
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 DBInstanceStatusNotActive Current DB instance status should be active. The error message returned because the status of the instance does not support the operation.
403 InvalidInstanceLevel.Malformed The specified class code does not support the endpoint number. Please check the shard number and the current endpoint number. The error message returned because the instance type of the instance does not support the number of proxy terminals that you specified. Check the number of proxy instances and the number of proxy terminals.

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