You need to enable JavaScript to run this app.
导航

CreateDBEndpoint

最近更新时间2023.11.15 22:39:52

首次发布时间2023.11.15 22:39:52

调用 CreateDBEndpoint 接口为指定实例创建连接终端。

请求类型

异步请求。

请求参数

名称类型是否必选示例值描述
InstanceIdStringpostgres-21a3333b****实例 ID。
EndpointTypeStringCustom连接终端类型,当前仅支持取值 Custom,即自定义类型。

ReadWriteMode

String

ReadOnly

读写模式。取值为:

  • ReadOnly:只读(默认)。
  • ReadWrite:读写。

EndpointName

String

EndpointName

实例连接终端名称。

  • 不能以数字、中划线(-)开头。
  • 只能包含中文、字母、数字、下划线(_)和中划线(-)。
  • 长度需要在 1~64 个字符内。

Nodes

String

Primary,postgres-ca7b7019****-rocbcb

连接终端配置的节点列表。

说明

  • EndpointTypeCustom 时必选。
  • 主节点无需传节点 ID,传入 Primary 字符串即可。

返回参数

null

请求示例

POST /?Action=CreateDBEndpoint&Version=2022-01-01 HTTP/1.1
Content-Type: application/json
Host: rds.volcengineapi.com
X-Date: 20231002T101010Z
Authorization: HMAC-SHA256 Credential=AKLTN2I0MmFiNzMxNWE5NDgzMzk4MmVjMTVkODlkZTZ****/20211202/cn-beijing/rds_postgresql/request,SignedHeaders=x-date, Signature=71d31fc7bcf990142851c9833c5656391486cda0ae2e0b8ada733b7c6458****
{
        "InstanceId": "postgres-ca7b7019****",
        "EndpointName": "自定义终端",
        "EndpointType": "Custom",
        "Nodes": "postgres-ca7b7019****-rocbcb",
        "ReadWriteMode": "ReadOnly"
}

返回示例

正常返回示例

{
    "ResponseMetadata": {
        "RequestId": "202308021119002CCE8C74AFEBB9023B8E",
        "Action": "CreateDBEndpoint",
        "Version": "2022-01-01",
        "Service": "rds_postgresql",
        "Region": "cn-beijing"
    },
    "Result": null
}