Applies for a public endpoint for an ApsaraDB for Redis instance.

You can also apply for public endpoints in the ApsaraDB for Redis console. For more information, see Use a public endpoint to connect to an ApsaraDB for Redis 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.

RegionId String No cn-hangzhou

The region ID of the instance.

InstanceId String Yes r-bp1zxszhcgatnx****

The ID of the instance.

ConnectionStringPrefix String Yes r-bp1zxszhcgatnx****

The prefix of the public endpoint. The prefix must start with a lowercase letter and can contain lowercase letters and digits. The prefix can be 8 to 40 characters in length.

Note The endpoint is in the <prefix> format.
Port String Yes 6379

The service port number of the instance. Valid values: 1024 to 65535.

Response parameters

Parameter Type Example Description
RequestId String 20C8341E-B5AD-4B24-BD82-D73241522ABF

The ID of the request.


Sample requests
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK


JSON format

HTTP/1.1 200 OK

  "RequestId" : "20C8341E-B5AD-4B24-BD82-D73241522ABF"

Error codes

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