All Products
Search
Document Center

ApsaraDB RDS:CreateDBProxyEndpointAddress

Last Updated:May 29, 2023

Creates an endpoint that is used to connect to the dedicated proxies of an instance.

Operation Description

After you enable the dedicated proxy feature for an ApsaraDB RDS for MySQL instance or enable the database proxy feature for an ApsaraDB RDS for PostgreSQL instance, a default proxy endpoint is created. You can call this operation to create proxy endpoints of different network types. For more information, see Activate and configure the database proxy feature for an ApsaraDB RDS for PostgreSQL instance and What are database proxies?

Note
  • The following network types are supported for ApsaraDB RDS for MySQL instances that use local disks: virtual private cloud (VPC), Classic, and Public.

  • The following network types are supported for instances that use cloud disks: VPC and Public. If you want to create a proxy endpoint of the public network type, you must configure IP address whitelists for the instance and its read-only instances to ensure connectivity between the client and the instance. You can call the ModifySecurityIps operation to configure an IP address whitelist for an instance.

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:
    • The required resource types are displayed in bold characters.
    • 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
rds:CreateDBProxyEndpointAddressWRITE
  • RDS
    acs:rds:{#regionId}:{#accountId}:dbinstance/{#dbinstanceId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID of the instance. You can call the DescribeRegions operation to query most recent region list.

cn-hangzhou
DBInstanceIdstringYes

The ID of the instance. You can call the DescribeDBInstances operation to query the ID of the instance.

rm-t4n3axxxxx
DBProxyEndpointIdstringYes

The ID of the proxy endpoint. You can call the DescribeDBProxyEndpoint operation to query the ID of the proxy endpoint.

ta9um4xxxxx
ConnectionStringPrefixstringYes

The prefix of the proxy endpoint. Enter a custom prefix.

test1234
DBProxyNewConnectStringPortstringNo

The port number that is associated with the proxy endpoint.

  • If the instance runs MySQL, the default value is 3306.
  • If the instance runs PostgreSQL, the default value is 5432.
3306
DBProxyConnectStringNetTypestringYes

The network type of the proxy endpoint. Valid values:

  • Public: Internet
  • VPC: Virtual Private Cloud (VPC)
  • Classic: classic network

Default value: Classic

Public
VPCIdstringNo

The ID of the VPC to which the proxy endpoint belongs. You can call the DescribeDBInstanceAttribute operation to query the ID of the VPC.

NoteThis parameter must be specified when DBProxyConnectStringNetType is set to VPC.
vpc-bpxxxxxx
VSwitchIdstringNo

The ID of the vSwitch that is associated with the specified VPC. You can call the DescribeDBInstanceAttribute operation to query the ID of the vSwitch.

NoteThis parameter must be specified when DBProxyConnectStringNetType is set to VPC.
vsw-bpxxxxxx
DBProxyEngineTypestringNo

An internal parameter. You do not need to specify this parameter.

normal
ResourceGroupIdstringNo

The ID of the resource group.

rg-acfmy*****

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

F2911788-25E8-42E5-A3A3-1B38D263F01E

Examples

Sample success responses

JSONformat

{
  "RequestId": "F2911788-25E8-42E5-A3A3-1B38D263F01E"
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidPort.MalformedSpecified port is not valid.The port number is invalid.
400NetTypeExistsSpecified net type already existed.
400IncorrectDBInstanceNetTypeCurrent DB instance net type does not support this operation.The operation failed. The operation is not supported for the network type of the RDS instance.
400InvalidConnectionString.DuplicateSpecified connection string already exists in the Aliyun RDS.The endpoint is duplicate. Specify a different endpoint.
400InvalidConnVPCIdSpecified conn vpc id is not valid.The specified VPC ID is invalid.
400InvalidVpcInstanceIdSpecified vpc instance id is not valid.The specified VPC ID is invalid.
400InvalidDBInstanceNameSpecified parameter DBInstanceName is not valid.The value of the DBInstanceName parameter is invalid. Check that the value of this parameter is not null or an empty string.
400InvalidVpcIdOrVswitchId.NotSupportedThe specified vpcId or vSwitchId is not supported.The VPC that is specified by the vpcId parameter or the vSwitch that is specified by the vSwitchId parameter is not supported. Check the values of these parameters.
400InvalidPrivateIpAddress.MismatchSpecified private IP address is not in the CIDR block of virtual switch.The VPC endpoint is invalid.
400InvalidVpcParameterSpecified VPCId VSwitchId or IPAddress or TunnelId is not valid.The values of the VPCId parameter and the VSwitchId parameter are invalid. Check the values of these parameters.
403IncorrectDBInstanceTypeCurrent DB instance type does not support this operation.The operation failed. The RDS instance is not in a ready state.
403IncorrectDBInstanceStateCurrent DB instance state does not support this operation.-
404Endpoint.NotFoundSpecified endpoint is not found.The port that is associated with the dedicated proxy endpoint cannot be found.
404InvalidVSwitchId.NotFoundThe specified VSwitch is invalid.The operation failed. The vSwitch ID is invalid. Check the vSwitch ID.
404Maxscale.NotFoundThe related maxscale instance is not found.The operation failed. No associated MaxScale instances can be found.
404IncorrectVswitchIdThe specified parameter VSwitchId is not valid.The vSwitch ID is invalid.
404InvalidDBInstanceName.NotFoundInvalid DBInstanceId NotFound.The instance ID cannot be found.

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

Change history

Change timeSummary of changesOperation
2022-06-08The error codes of the API operation change.,The input parameters of the API operation change.
Change itemChange content
Error CodesThe error codes of the API operation change.
    delete Error Codes: 400
    delete Error Codes: 403
    delete Error Codes: 404
Input ParametersThe input parameters of the API operation change.
    Added Input Parameters: DBProxyEngineType