You can call the AllocateInstancePublicConnection operation to apply for a public endpoint for an ApsaraDB RDS instance.


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 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 Example:

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*****

The endpoint that is used to connect to the instance.


Sample requests

&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK


JSON format

HTTP/1.1 200 OK

  "DbInstanceName" : "rm-bp1*****",
  "RequestId" : "65BDA532-28AF-4122-AA39-B382721EEE64",
  "ConnectionString" : "test*****"

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.