Creates a public endpoint for the primary endpoint, the default cluster endpoint, or a custom cluster endpoint of a PolarDB cluster.
Operation description
You can create a public endpoint for the primary endpoint, the default cluster endpoint, or a custom cluster endpoint of a PolarDB cluster.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
polardb:CreateDBEndpointAddress |
create |
*dbcluster
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| DBClusterId |
string |
Yes |
The cluster ID. |
pc-************** |
| DBEndpointId |
string |
Yes |
The endpoint ID. Note
For more information, see DescribeDBClusterEndpoints. |
pe-************** |
| ConnectionStringPrefix |
string |
No |
The prefix of the new endpoint. The prefix must meet the following requirements:
|
test-1 |
| NetType |
string |
Yes |
The network type of the new endpoint. Set the value to Public. |
Public |
| VPCId |
string |
No |
The ID of the virtual private cloud (VPC). |
vpc-********** |
| SecurityGroupId |
string |
No |
The ID of the ECS security group. |
sg-bp************** |
| ZoneInfo |
array<object> |
No |
The zone information. |
|
|
object |
No |
|||
| ZoneId |
string |
No |
The zone ID. |
cn-hangzhou-b |
| VSwitchId |
string |
No |
The virtual switch ID. |
vsw-********** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
1 |
||
| RequestId |
string |
The request ID. |
6BD9CDE4-5E7B-4BF3-9BB8-83C73E****** |
Examples
Success response
JSON format
{
"RequestId": "6BD9CDE4-5E7B-4BF3-9BB8-83C73E******"
}
Error response
JSON format
{
"RequestId": "D0CEC6AC-7760-409A-A0D5-E6CD8660E9CC"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | EndpointStatus.NotSupport | Current endpoint status does not support this operation. | |
| 400 | NetTypeExists | Specified net type already existed. | The specified network type already exists. |
| 400 | MissParameter.NetType | When 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. |
| 400 | InvalidDBEndpointId.Malformed | The specified parameter DBEndpointId is not valid. | The specified DBEndpointId parameter is invalid. |
| 400 | InvalidNetType.Malformed | The specified parameter NetType is not valid. | The specified NetType parameter is invalid. |
| 400 | InvalidConnectionStringPrefix.Malformed | The specified parameter ConnectionStringPrefix is not valid. | The specified ConnectionStringPrefix parameter is invalid. |
| 404 | InvalidDBClusterId.NotFound | The DBClusterId provided does not exist in our records. | The specified DBClusterId parameter does not exist in the current record. |
| 404 | InvalidDBClusterId.Malformed | The specified parameter DBClusterId is not valid. | The specified DBClusterId parameter is invalid. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.