调用CreateDBEndpointAddress接口创建PolarDB集群主地址、默认集群地址和自定义集群地址的公网连接地址。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称 类型 是否必选 示例值 描述
Action String CreateDBEndpointAddress

系统规定参数,取值为CreateDBEndpointAddress

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

集群ID。

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

连接地址ID。

说明 可通过接口DescribeDBClusterEndpoints查询连接地址详情。
NetType String Public

新增连接地址的网络类型,仅支持Public(公网)连接地址。

ConnectionStringPrefix String test-1

新的连接地址前缀。连接地址前缀需满足如下条件:

  • 由小写字母、数字、中划线(-)组成。
  • 以字母开头,以数字或字母结尾。
  • 长度为6~40个字符。

返回数据

名称 类型 示例值 描述
RequestId String 6BD9CDE4-5E7B-4BF3-9BB8-83C73E******

请求ID。

示例

请求示例

http(s)://polardb.aliyuncs.com/?Action=CreateDBEndpointAddress
&DBClusterId=pc-**************
&DBEndpointId=pe-**************
&NetType=Public
&<公共请求参数>

正常返回示例

XML格式

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

JSON格式

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

错误码

HttpCode 错误码 错误信息 描述
404 InvalidDBCluster.NotFound The DBClusterId provided does not exist in our records. 当前的记录中不存在提供的DBClusterId。

访问错误中心查看更多错误码。