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.
Debugging
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>.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
&InstanceId=r-bp1zxszhcgatnx****
&ConnectionStringPrefix=r-bp1zxszhcgatnx****
&Port=6379
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<AllocateInstancePublicConnectionResponse>
<RequestId>20C8341E-B5AD-4B24-BD82-D73241522ABF</RequestId>
</AllocateInstancePublicConnectionResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "20C8341E-B5AD-4B24-BD82-D73241522ABF"
}
Error codes
For a list of error codes, visit the API Error Center.