You can call this operation to apply for the public IP address of an instance.


You can use OpenAPI Explorer to perform debugging. OpenAPI Explorer allows you to perform various operations to simplify API usage. For example, you can retrieve APIs, call APIs, and dynamically generate SDK example code.

Request parameters

Parameter Type Required? Example Description
Action String Yes AllocateInstancePublicConnection

The operation that you want to perform. Set this parameter to AllocateInstancePublicConnection.

ConnectionStringPrefix String Yes

The public IP address. The prefix can be customized.

Note It must be 5 to 40 characters in length. It can contain letters, digits, and hyphens (-). It cannot contain Chinese characters andthe following special characters:

~ ! # % ^ & * = + \ | { } ; : ' " , < > / ?

DBInstanceId String Yes rm-uf6wjk5xxxxxxx

The ID of the instance.

Port String Yes 3306

The connection port of the public network. Valid values: 1000 to 5999

AccessKeyId String No LTAIfCxxxxxxx

The AccessKey ID issued by Alibaba Cloud for users to access services.

Response parameters

Parameter Type Example Description
RequestId String 65BDA532-28AF-4122-AA39-B382721EEE64

The ID of the request.


Sample requests

http(s):// Action=AllocateInstancePublicConnection
&<Common request parameters>

Successful response examples

XML format


JSON format

	"RequestId":" 65BDA532-28AF-4122-AA39-B382721EEE64"

Error codes

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