You can call this operation to apply for a public endpoint for an ApsaraDB for Redis instance.

For more information about how to perform the corresponding operation in the console, 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 No AllocateInstancePublicConnection

The operation that you want to perform. Set the value to AllocateInstancePublicConnection.

InstanceId String Yes r-bp1xxxxxxxxxxxxx

The ID of the instance.

ConnectionStringPrefix String Yes r-bp1xxxxxxxxxxxxx

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

The public endpoint of the ApsaraDB for Redis instance is in the <Prefix>.redis.rds.aliyuncs.com 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.

Examples

Sample requests

https://r-kvstore.aliyuncs.com/
?Action=AllocateInstancePublicConnection
&ConnectionStringPrefix=r-bp1xxxxxxxxxxxxx
&InstanceId=r-bp1xxxxxxxxxxxxx
&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.