All Products
Search
Document Center

PolarDB:CreateDBEndpointAddress

Last Updated:Oct 10, 2024

Creates a public endpoint for the primary endpoint, the default cluster endpoint, or a custom cluster endpoint.

Operation description

Note You can create a public endpoint for the primary endpoint, the default cluster endpoint, or a custom cluster endpoint.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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
polardb:CreateDBEndpointAddresscreate
  • dbcluster
    acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DBClusterIdstringYes

The ID of the cluster.

pc-**************
DBEndpointIdstringYes

The ID of the endpoint.

Note You can call the DescribeDBClusterEndpoints operation to query endpoint details.
pe-**************
ConnectionStringPrefixstringNo

The prefix of the new endpoint. The prefix of the endpoint must meet the following requirements:

  • The prefix can contain lowercase letters, digits, and hyphens (-).
  • The prefix must start with a letter and end with a digit or a letter.
  • The prefix must be 6 to 40 characters in length.
test-1
NetTypestringYes

The network type of the endpoint. Set the value to Public.

Public
VPCIdstringNo

The ID of the virtual private cloud (VPC).

vpc-**********
SecurityGroupIdstringNo

The ID of the ECS security group.

sg-bp**************
ZoneInfoarray<object>No

The details of the zones.

objectNo
ZoneIdstringNo

The ID of the zone.

cn-hangzhou-b
VSwitchIdstringNo

The ID of the vSwitch.

vsw-**********

Response parameters

ParameterTypeDescriptionExample
object

1

RequestIdstring

The ID of the request.

6BD9CDE4-5E7B-4BF3-9BB8-83C73E******

Examples

Sample success responses

JSONformat

{
  "RequestId": "6BD9CDE4-5E7B-4BF3-9BB8-83C73E******"
}

Error codes

HTTP status codeError codeError messageDescription
400EndpointStatus.NotSupportCurrent endpoint status does not support this operation.This operation is not supported while the node is in the current state.
400NetTypeExistsSpecified net type already existed.The specified network type already exists.
400MissParameter.NetTypeWhen NetType is set to NlbVpc, the VPCId, SecurityGroupId and ZoneInfo is needed.If NetType is set to NlbVpc, VPCId, SecurityGroupId and ZoneInfo must be specified.
400InvalidDBEndpointId.MalformedThe specified parameter DBEndpointId is not valid.The specified DBEndpointId parameter is invalid.
400InvalidNetType.MalformedThe specified parameter NetType is not valid.The specified NetType parameter is invalid.
400InvalidConnectionStringPrefix.MalformedThe specified parameter ConnectionStringPrefix is not valid.The specified ConnectionStringPrefix parameter is invalid.
404InvalidDBClusterId.NotFoundThe DBClusterId provided does not exist in our records.The specified DBClusterId parameter does not exist in the current record.
404InvalidDBClusterId.MalformedThe specified parameter DBClusterId is not valid.The specified DBClusterId parameter is invalid.
404InvalidDBClusterId.NotFoundThe DBInstanceId provided does not exist in our records.The specified DBClusterId parameter does not exist in the current record.

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

Change history

Change timeSummary of changesOperation
2023-09-12The Error code has changedView Change Details
2023-06-12The Error code has changedView Change Details
2023-05-11The Error code has changed. The request parameters of the API has changedView Change Details