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

You can also apply for public endpoints in the ApsaraDB for Redis console. For more information, see Connections over the Internet.

Debugging

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.

InstanceId String Yes r-bp1zxszhcgatnx****

The ID of the instance.

ConnectionStringPrefix String Yes r-bp1zxszhcgatnx****

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

Note The format of the endpoint: <prefix>.redis.rds.aliyuncs.com.
Port String Yes 6379

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

RegionId String No cn-hangzhou

The ID of the region where the instance is deployed.

Response parameters

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

The ID of the request.

Examples

Sample requests

https://r-kvstore.aliyuncs.com/?Action=AllocateInstancePublicConnection
&InstanceId=r-bp1zxszhcgatnx****
&ConnectionStringPrefix=r-bp1zxszhcgatnx****
&Port=6379
&<Common request parameters>

Sample success responses

XML format

<AllocateInstancePublicConnectionResponse>
    <RequestId>20C8341E-B5AD-4B24-BD82-D73241522ABF</RequestId>
</AllocateInstancePublicConnectionResponse>

JSON format

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

Error codes

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