Creates a public-facing or classic network endpoint for a specified PolarDB cluster.

Note
  • You can create a public-facing or classic network endpoint for the primary endpoint, the default cluster endpoint, or a custom cluster endpoint.
  • You can create classic network endpoints only on the China site (aliyun.com).

Debugging

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 No 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 IDs.
ConnectionStringPrefix String No test-1

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

  • It can contain lowercase letters, digits, and hyphens (-).
  • It must start with a letter and end with a digit or a letter.
  • It must be 6 to 40 characters in length.
NetType String Yes Public

The network type of the endpoint. Set the value to Public (public network).

Response parameters

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

The ID of the request.

Examples

Sample requests

http(s)://polardb.aliyuncs.com/?Action=CreateDBEndpointAddress
&DBClusterId=pc-**************
&DBEndpointId=pe-**************
&NetType=Public
&<Common Request Parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<CreateDBEndpointAddressResponse>
<RequestId>6BD9CDE4-5E7B-4BF3-9BB8-83C73E******</RequestId>
</CreateDBEndpointAddressResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

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

Error codes

For a list of error codes, visit the API Error Center.