Creates a public or internal endpoint for a specified PolarDB cluster.

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


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 Yes CreateDBEndpointAddress

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

DBClusterId String Yes pc-**************

The ID of the cluster.

DBEndpointId String Yes pe-**************

The ID of the endpoint.

Note You can call the DescribeDBClusterEndpoints operation to query endpoint details.
ConnectionStringPrefix String No test-1

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.
NetType String Yes Public

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

Response parameters

Parameter Type Example Description
RequestId String 6BD9CDE4-5E7B-4BF3-9BB8-83C73E******

The ID of the request.


Sample requests

&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK


JSON format

HTTP/1.1 200 OK

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

Error codes

HTTP status code Error code Error message Description
400 EndpointStatus.NotSupport Current endpoint status does not support this operation. The error message returned because this operation is not supported while the node is in the current state.
400 NetTypeExists Specified net type already existed. The error message returned because the specified network type already exists.
404 InvalidDBCluster.NotFound The DBClusterId provided does not exist in our records. The error message returned because the specified cluster ID does not exist.
404 InvalidDBClusterId.NotFound The DBClusterId provided does not exist in our records. The error message returned because the specified DBClusterId does not exist in the current record.

For a list of error codes, see Service error codes.