You need to enable JavaScript to run this app.
文档中心
TrafficRoute DNS 套件

TrafficRoute DNS 套件

复制全文
下载 pdf
解析器Resolver
CreateResolverEndpoint - 添加终端节点
复制全文
下载 pdf
CreateResolverEndpoint - 添加终端节点

添加一个终端节点。

使用说明

请求频率:每秒最多调用 10 次。

请求说明

  • 请求方式:POST
  • 请求地址:https://private-zone.volcengineapi.com/?Action=CreateResolverEndpoint?Version=2022-06-01

调试

请求参数

除了以下参数,您还需要 对请求进行鉴权

参数
类型
是否必填
示例值
描述
Action
String

CreateResolverEndpoint

要执行的操作,取值:CreateResolverEndpoint。

Version
String

2022-06-01

API的版本,取值:2022-06-01。

Name
String

node01

终端节点的名称。支持 UTF-8 格式。

EndpointType
String

IPv4

终端节点类型。

  • IPv4:IPv4 节点。
  • DualStack:双栈节点。
Direction
String

OUTBOUND

终端节点的 DNS 请求转发方向。

  • OUTBOUND:(默认)出站终端节点,把来自 VPC 内的 DNS 查询请求转发到外部的 DNS 服务器。
  • INBOUND:入站终端节点,把来自外部的 DNS 查询请求转发到解析器。
VpcID
String

vpc-h15hzxxxxxx3utjvu

终端节点所在的 VPC 的 ID。

VpcRegion
String

cn-beijing

终端节点所在的 VPC 的地域。

SecurityGroupID
String

sg-h15i0xxxxxxdhyk2s20

适用于终端节点 IP 地址的安全组 ID。终端节点默认会使用预设安全组:

  • 对于出站终端节点:入方向拒绝流量通行;出方向放通 0.0.0.0/0 的 TCP 53 端口和 UDP 53 端口
  • 对于入站终端节点:入方向放通 0.0.0.0/0 的 TCP 53 端口和 UDP 53 端口;出方向拒绝流量通行。
IpConfigs
Array of Object

终端节点的可用区、子网和 IP 配置。

VpcTrns
Array of String

["trn:vpc:cn-beijing:12345678:vpc/vpc-3reow******hxad79k"]

域名所关联的一个或多个 VPC 的 TRN。格式为 trn:vpc:region:accountId:vpc/vpcId。如果您需要验证子用户是否对域名关联的 VPC 所在的项目有操作权限,您需要传入该参数。

ProjectName
String

default

终端节点所属的项目名称。默认为 default

Tags
Array of Object

[{"Key":"key1", "Value":"value1"},{"Key":"key2", "Value":"value2"}]

终端节点所属的一个或多个标签。一个资源最多能关联 50 个标签。

返回参数

下表仅列出本接口特有的返回参数。更多信息请参见返回结构

参数
类型
示例值
描述
EndpointID
Long

238

终端节点的 ID。

请求示例

POST https://private-zone.volcengineapi.com/?Action=CreateResolverEndpoint&Version=2022-06-01

{
    "Name": "testEndPoint",
    "VpcID": "vpc-h15hzxxxxxx3utjvu",
    "VpcRegion": "xxxx",
    "SecurityGroupID": "sg-h15i0xxxxxxdhyk2s20",
    "IpConfigs": [
        {
            "AzID": "cn-beijing-a",
            "SubnetID": "subnet-pedexxxxxxx6puq6gc",
            "IP": "172.16.0.2"
        }
    ]
}

返回示例

{
    "ResponseMetadata": {
        "RequestId": "20230614140553EC822FFD341E9C19EF59",
        "Action": "CreateResolverEndpoint",
        "Version": "2022-06-01",
        "Service": "private_zone",
        "Region": "cn"
    },

    "Result": {
        "EndpointID": 238
    }
     
}

错误码

下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。

状态码
错误码
错误信息
说明
400
ErrRegionNotSupport

%s of [%s] not supported by private_zone

private_zone不支持[%s]地域的%s

400
ErrServiceNotTrusted

ServiceLinkedRole of private_zone is not trusted

未信任private_zone服务关联角色

400
ErrParamInvalid

validation fail: params:[%s] , value:[%v]

参数校验失败

400
OutboundIpNotEnough

at least 2 outbound IPs required

至少需要两个出站源IP

400
OutboundIpExceedsLimit

at most 6 outbound IPs can be specified

最多指定6个出站源IP

400
ErrIpv4Format

error format %s

IPv4格式错误

400
ErrIPNotInVpc

%s does not belong to %s

指定的IP不属于子网

400
ErrReservedIP

reserved ip %s is not allowed to use

不可以指定系统保留IP(%s)

400
ErrOutboundIpInUse

specified ip %s of %s is in use

指定的出站IP正在使用中

400
ErrTagResourceFailed

%v

添加标签失败

400
ErrDuplicatedTagKeys

duplicate tag keys

重复的标签键

400
ErrResourceNotFound

the specified resource does not exist.

指定的资源不存在

400
ErrServiceTagNotSupport

service tag is not support

服务标签不允许操作

400
ErrLimitExceeded

you've reached the limit on the number of %s that you can operate at one time

已达到单次可操作数量的上限

400
ErrInvalidOutboundIp

the specified ip %s is malformed

指定的弹性网卡IP不合法

500
ErrInternalServer

server internal error

服务内部错误

最近更新时间:2025.05.22 20:08:15
这个页面对您有帮助吗?
有用
有用
无用
无用