创建PolarDB集群主地址、默认集群地址和自定义集群地址的公网连接地址。
接口说明
支持为 PolarDB 集群的主地址、默认集群地址和自定义集群地址创建公网连接地址。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
polardb:CreateDBEndpointAddress |
create |
*dbcluster
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| DBClusterId |
string |
是 |
集群 ID。 |
pc-************** |
| DBEndpointId |
string |
是 |
连接地址 ID。 说明
可通过接口 DescribeDBClusterEndpoints 查询连接地址详情。 |
pe-************** |
| ConnectionStringPrefix |
string |
否 |
新的连接地址前缀。连接地址前缀需满足如下条件:
|
test-1 |
| NetType |
string |
是 |
新增连接地址的网络类型,固定为 Public(公网)。 |
Public |
| VPCId |
string |
否 |
专有网络 ID |
vpc-********** |
| SecurityGroupId |
string |
否 |
ECS 安全组 ID |
sg-bp************** |
| ZoneInfo |
array<object> |
否 |
可用区信息。 |
|
|
object |
否 |
|||
| ZoneId |
string |
否 |
可用区 ID。 |
cn-hangzhou-b |
| VSwitchId |
string |
否 |
虚拟交换机 ID。 |
vsw-********** |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
1 |
||
| RequestId |
string |
请求 ID。 |
6BD9CDE4-5E7B-4BF3-9BB8-83C73E****** |
示例
正常返回示例
JSON格式
{
"RequestId": "6BD9CDE4-5E7B-4BF3-9BB8-83C73E******"
}
异常返回示例
JSON格式
{
"RequestId": "D0CEC6AC-7760-409A-A0D5-E6CD8660E9CC"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | EndpointStatus.NotSupport | Current endpoint status does not support this operation. | |
| 400 | NetTypeExists | Specified net type already existed. | 指定的网络类型已存在 |
| 400 | MissParameter.NetType | When NetType is set to NlbVpc, the VPCId, SecurityGroupId and ZoneInfo is needed. | NetType 为 NlbVpc 时,VPCId、SecurityGroupId 和 ZoneInfo 不能为空。 |
| 400 | InvalidDBEndpointId.Malformed | The specified parameter DBEndpointId is not valid. | 指定的参数DBEndpointId无效 |
| 400 | InvalidNetType.Malformed | The specified parameter NetType is not valid. | 指定的参数NetType无效。 |
| 400 | InvalidConnectionStringPrefix.Malformed | The specified parameter ConnectionStringPrefix is not valid. | 指定的参数ConnectionStringPrefix无效。 |
| 404 | InvalidDBClusterId.NotFound | The DBClusterId provided does not exist in our records. | 当前的记录中不存在提供的 DBClusterId。 |
| 404 | InvalidDBClusterId.Malformed | The specified parameter DBClusterId is not valid. | 指定的参数DBClusterId无效 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。