文档

AddSmartAccessGatewayDnsForward - 添加DNS转发

添加DNS转发,适用于设备类型为SCG5000或SCG5000-5G的智能接入网关实例,且设备版本为3.4.2及以上。

调试

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

授权信息

当前API暂无授权信息透出。

请求参数

名称类型必填描述示例值
SagInsIdstring

网关实例 id

sag-v9un1ccz22owd76lf8
SagSnstring

设备 SN

sagf4dkqh78
Domainstring

域名

说明
  • 支持泛域名,支持全量匹配(域名填写“*”)。例如: *.baidu.com 允许输入的格式为 baidu.com
  • www.aliyun.com
    MasterIpstring

    主 DNS

    114.114.114.114
    SlaveIpstring

    备 DNS

    172.16.0.14
    Modestring

    转发模式

    说明
  • 无效字段,不用关注。
  • first
    OutboundPortTypestring

    出接口类型

    说明
  • Tunnel 代表隧道口,PhysicalPort 代表物理口。
  • 枚举值:
    • TunnelTunnel
    • PhysicalPortPhysicalPort
    • NoneNone
    Tunnel
    OutboundPortIndexstring

    出接口序号

    说明
  • OutboundPortType 为 PhysicalPort 时选填,OutboundPortType 为 Tunnel 时不用填写;
  • OutboundPortIndex 和 OutboundPortName 一一对应:0 - eth0;2 - lte。
  • 0
    OutboundPortNamestring

    出接口

    说明
  • OutboundPortType 为 PhysicalPort 时选填,OutboundPortType 为 Tunnel 时不用填写;
  • OutboundPortIndex 和 OutboundPortName 一一对应:0 - eth0;2 - lte。
  • eth0
    RegionIdstring

    智能接入网关实例所属的地域 ID。

    cn-shanghai

    返回参数

    名称类型描述示例值
    object

    Schema of Response

    RequestIdstring

    Id of the request

    E93884AC-6C21-4FEA-8E3A-7377D33B194F
    Successboolean

    是否成功

    true
    Codestring

    错误码。200 标识查询任务成功

    200
    Messagestring

    返回信息

    Successful
    HttpStatusCodeinteger

    HTTP 状态码

    200
    Dataobject

    业务数据

    InstanceIdstring

    实例 ID

    sagv3dnsforward-nc7qabskj17werc7su
    Domainstring

    域名

    yfiy.cn
    MasterIpstring

    主 DNS

    14.104.81.13
    SlaveIpstring

    备 DNS

    172.16.0.14
    Modestring

    转发模式

    first
    OutboundPortTypestring

    出接口类型

    PhysicalPort
    OutboundPortIndexinteger

    出接口序号

    0
    OutboundPortNamestring

    出接口

    eth0

    示例

    正常返回示例

    JSON格式

    {
      "RequestId": "E93884AC-6C21-4FEA-8E3A-7377D33B194F",
      "Success": true,
      "Code": "200",
      "Message": "Successful",
      "HttpStatusCode": 200,
      "Data": {
        "InstanceId": "sagv3dnsforward-nc7qabskj17werc7su",
        "Domain": "yfiy.cn",
        "MasterIp": "14.104.81.13",
        "SlaveIp": "172.16.0.14",
        "Mode": "first",
        "OutboundPortType": "PhysicalPort",
        "OutboundPortIndex": 0,
        "OutboundPortName": "eth0"
      }
    }

    错误码

    HTTP status code错误码错误信息描述
    400InvalidSpec.FeatureNotSupportThe current edition of the cloudbranch does not support this feature.-
    400GATEWAY.InvalidSNThe specified gateway serial number does not exist.-
    400CCN.DuplicateDNSForwardingDomainDuplicate DNS forwarding domain-
    400ConfigUnsynchronizedThe configs of device are unsynchronized,please check whether the device is online-
    400DeviceNotExistThe specified device does not exist-
    400FeatureNotSupportThe current edition of the smart access gateway does not support this feature.智能接入网关当前版本不支持该功能特性。
    400CCN.DNS.Forward.CreateFailedfailed to create dns forward config-
    404ResourceNotFound.DeviceThe specified resource of Device is not found.-

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

    • 本页导读 (1)
    文档反馈