You can call the ModifyDBProxyEndpointAddress operation to modify an endpoint that is used to connect to the database proxy of an ApsaraDB RDS instance.
After you enable the database proxy feature, a default proxy endpoint is generated. The proxy terminal feature is bound to the default proxy endpoint. You can create, modify, or delete a proxy endpoint.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ModifyDBProxyEndpointAddress |
The operation that you want to perform. Set the value to ModifyDBProxyEndpointAddress. |
DBInstanceId | String | Yes | rm-t4n3a**** |
The ID of the instance. You can call the DescribeDBInstances operation to query the ID of the instance. |
DBProxyEndpointId | String | Yes | ta9um4**** |
The ID of the proxy endpoint. You can call the DescribeDBProxyEndpoint operation to query the ID of the proxy endpoint. |
DBProxyNewConnectString | String | No | test123456 |
The new prefix of the proxy endpoint. Enter a prefix. Note You must specify at least one of the DBProxyNewConnectString and DBProxyNewConnectStringPort parameters.
|
DBProxyNewConnectStringPort | String | No | 3307 |
The port number that is associated with the proxy endpoint. Enter a port number. Note You must specify at least one of the DBProxyNewConnectString and DBProxyNewConnectStringPort parameters.
|
DBProxyConnectStringNetType | String | No | Public |
The network type of the proxy endpoint. Valid values:
If the instance runs MySQL, the default value of this parameter is Classic. Note If the instance runs PostgreSQL, you must set this parameter to Public or VPC.
|
DBProxyEngineType | String | No | normal |
An internal parameter. You do not need to specify this parameter. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 50F6C32B-DD73-4DA1-ADA2-0EAF2B0FCD8A |
The ID of the request. |
Examples
Sample requests
http(s)://rds.aliyuncs.com/?Action=ModifyDBProxyEndpointAddress
&DBInstanceId=rm-t4n3a****
&DBProxyEndpointId=ta9um4****
&DBProxyNewConnectString=test123456
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<ModifyDBProxyEndpointAddressResponse>
<RequestId>50F6C32B-DD73-4DA1-ADA2-0EAF2B0FCD8A</RequestId>
</ModifyDBProxyEndpointAddressResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "50F6C32B-DD73-4DA1-ADA2-0EAF2B0FCD8A"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidConnectionString.Format | Specified connection string is not valid. | The error message returned because the new prefix of the proxy endpoint is invalid. The prefix must be 5 to 40 characters in length. |
400 | InvalidPort.Malformed | Specified port is not valid. | The error message returned because the port number that you specified is invalid. |
400 | InvalidConnectionString.Duplicate | Specified connection string already exists in the Aliyun RDS. | The error message returned because the proxy endpoint ID that you specified already exists. Specify a different ID. |
400 | InvalidConnectionStringOrPort.Duplicate | Specified connection string or port want to be modified is the same with current net type. | The error message returned because the proxy endpoint ID or port number that you specified already exists. Specify a different proxy endpoint ID or port number. |
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 | ParameterLeastAssociate | Must input at least one optional parameter. | The error message returned because the restoreTime parameter and the BackupId parameter of the instance are both empty. Specify at least one of the parameters and try again. |
404 | InvalidConnectionString.NotFound | Specified connection string or net type is not found. | The error message returned because the proxy endpoint that you specified cannot be found. Check whether the proxy endpoint that you specified is correct. |
404 | Endpoint.NotFound | Specified endpoint is not found. | The error message returned because the port number that you specified cannot be found. |
For a list of error codes, visit the API Error Center.