現時此頁面僅用英語顯示,繁體中文內容正在準備中。感謝您的耐心等待。

AllocateDirectConnection

更新時間:2025-03-27 11:33

Applies for a private endpoint for a Tair (Redis OSS-compatible) instance.

Operation description

Clients can bypass proxy nodes and use private endpoints to connect to cluster instances. This is similar to the connection to native Redis clusters. The direct connection mode can reduce communication overheads and the response time of Tair (Redis OSS-compatible).

To call this operation, make sure that the instance meets the following requirements:

  • The instance is a cluster instance.
  • The instance is deployed in classic mode.
  • The instance is deployed in a virtual private cloud (VPC). If the instance is deployed in the classic network, you can call the SwitchNetwork operation to change the network type to VPC.
  • SSL encryption is disabled for the instance. If SSL encryption is enabled, you can call the ModifyInstanceSSL operation to disable SSL encryption.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
OperationAccess levelResource typeCondition keyAssociated operation
kvstore:AllocateDirectConnectioncreate
*DBInstance
acs:kvstore:{#regionId}:{#accountId}:instance/{#instanceId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ParameterTypeRequiredDescriptionExample
InstanceIdstringYes

The ID of the instance.

r-bp1zxszhcgatnx****
ConnectionStringstringNo

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

redisdirect123
PortstringNo

The port number of the instance. Valid values: 1024 to 65535. Default value: 6379.

6379

Response parameters

ParameterTypeDescriptionExample
ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

5D622714-AEDD-4609-9167-F5DDD3D1****

Examples

Sample success responses

JSONformat

{
  "RequestId": "5D622714-AEDD-4609-9167-F5DDD3D1****"
}

Error codes

HTTP status codeError codeError messageDescription
HTTP status codeError codeError messageDescription
400NetTypeExistsSpecified net type already existed-
400InvalidConnTypeSpecified DB instance conn type is not valid.-
400TaskHasExistThe task already exists.The task already exists.
400ConnectionStringAlreadyExistsSpecified connection string already exists in the Aliyun RDS.-
400InvalidConnectionString.FormatSpecified connection string is not valid.The connection string is invalid. Use a different one.
400DirectConnectionAlreadyExistsSpecified instance direct connection already exists.-
400InvalidVPCParamGroupSpecified vpc param group is not valid.-
400InvalidConnectionStringConnectionString is invalid, valid regex: ^\w+$The prefix of the endpoint is invalid. 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.
403UnsupportedEngineVersionCurrent engine version does not support operations.-
403IncorrectMinorVersionCurrent engine minor version does not support operations.The operation is not supported by the minor version of the instance. Update the instance to the latest minor version and try again.
403InstanceStatus.NotSupportInstance status does not support this operation.The error message returned because the operation is not supported while the instance is in the current state.
404InvalidDbInstanceId.NotFoundSpecified instance does not exist.The specified instance does not exist

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
Change timeSummary of changesOperation
2025-03-25API Description Update. The Error code has changedView Change Details
  • 本頁導讀 (1)
  • Operation description
  • Debugging
  • Authorization information
  • Request parameters
  • Response parameters
  • Examples
  • Error codes
  • Change history
文檔反饋
phone 聯絡我們