调用CreateDBEndpointAddress接口创建PolarDB集群的公网连接地址。
说明 支持为PolarDB集群的主地址、默认集群地址和自定义集群地址创建公网连接地址。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | CreateDBEndpointAddress | 系统规定参数,取值为CreateDBEndpointAddress。 |
DBClusterId | String | 是 | pc-************** | 集群ID。 |
DBEndpointId | String | 是 | pe-************** | 连接地址ID。 说明 可通过接口DescribeDBClusterEndpoints查询连接地址详情。 |
ConnectionStringPrefix | String | 否 | test-1 | 新的连接地址前缀。连接地址前缀需满足如下条件:
|
NetType | String | 是 | Public | 新增连接地址的网络类型,固定为Public(公网)。 |
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
RequestId | String | 6BD9CDE4-5E7B-4BF3-9BB8-83C73E****** | 请求ID。 |
示例
请求示例
http(s)://polardb.aliyuncs.com/?Action=CreateDBEndpointAddress
&DBClusterId=pc-**************
&DBEndpointId=pe-**************
&NetType=Public
&<公共请求参数>
正常返回示例
XML
格式
HTTP/1.1 200 OK
Content-Type:application/xml
<CreateDBEndpointAddressResponse>
<RequestId>6BD9CDE4-5E7B-4BF3-9BB8-83C73E******</RequestId>
</CreateDBEndpointAddressResponse>
JSON
格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "6BD9CDE4-5E7B-4BF3-9BB8-83C73E******"
}
错误码
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | EndpointStatus.NotSupport | Current endpoint status does not support this operation. | 当前节点状态不支持此操作 |
400 | NetTypeExists | Specified net type already existed. | 指定的网络类型已存在 |
404 | InvalidDBCluster.NotFound | The DBClusterId provided does not exist in our records. | 当前的记录中不存在提供的DBClusterId。 |
404 | InvalidDBClusterId.NotFound | The DBClusterId provided does not exist in our records. | 当前的记录中不存在提供的 DBClusterId。 |
访问错误中心查看更多错误码。