You can call the AllocateInstancePublicConnection operation to apply for a public endpoint for an ApsaraDB RDS instance.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | AllocateInstancePublicConnection |
The operation that you want to perform. Set the value to AllocateInstancePublicConnection. |
DBInstanceId | String | Yes | rm-uf6wjk5***** |
The ID of the instance. |
ConnectionStringPrefix | String | Yes | test1234 |
The prefix of the public endpoint. A valid public endpoint is in the following format: Prefix.Database engine.rds.aliyuncs.com. Example: test1234.mysql.rds.aliyuncs.com. Note The value can be 5 to 40 characters in length and can contain letters, digits, and
hyphens (-). The value cannot contain any of the following characters: ~ ! # % ^ &
* = + | {} ; : ' " , <> / ?
|
Port | String | Yes | 3306 |
The public port of the instance. Valid values: 1000 to 5999. |
BabelfishPort | String | No | 1433 |
The Tabular Data Stream (TDS) port of the instance for which Babelfish is enabled. Note This parameter applies only to ApsaraDB RDS for PostgreSQL instances. For more information
about Babelfish for ApsaraDB RDS for PostgreSQL, see Introduction to Babelfish.
|
GeneralGroupName | String | No | rgc-bp1tkv8***** |
The name of the dedicated cluster to which the instance belongs. This parameter takes effect only when the instance runs MySQL on RDS Standard Edition and is created in a dedicated cluster. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
DbInstanceName | String | rm-bp1***** |
The ID of the instance. |
RequestId | String | 65BDA532-28AF-4122-AA39-B382721EEE64 |
The ID of the request. |
ConnectionString | String | test*****.mysql.rds.aliyuncs.com |
The endpoint that is used to connect to the instance. |
Examples
Sample requests
http(s)://rds.aliyuncs.com/?Action=AllocateInstancePublicConnection
&ConnectionStringPrefix=test1234
&DBInstanceId=rm-uf6wjk5*****
&Port=3306
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<AllocateInstancePublicConnectionResponse>
<DbInstanceName>rm-bp1*****</DbInstanceName>
<RequestId>65BDA532-28AF-4122-AA39-B382721EEE64</RequestId>
<ConnectionString>test*****.mysql.rds.aliyuncs.com</ConnectionString>
</AllocateInstancePublicConnectionResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"DbInstanceName" : "rm-bp1*****",
"RequestId" : "65BDA532-28AF-4122-AA39-B382721EEE64",
"ConnectionString" : "test*****.mysql.rds.aliyuncs.com"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | OtherEndpoint.Exist | Other endpoint exist. | The error message returned because the specified prefix of the public endpoint already exists. |
For a list of error codes, visit the API Error Center.