添加DNS转发,适用于设备类型为SCG5000或SCG5000-5G的智能接入网关实例,且设备版本为3.4.2及以上。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
smartag:AddSmartAccessGatewayDnsForward |
*全部资源
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| SagInsId |
string |
是 |
网关实例 id |
sag-v9un1ccz22owd76lf8 |
| SagSn |
string |
是 |
设备 SN |
sagf4dkqh78 |
| Domain |
string |
是 |
域名 说明
|
www.aliyun.com |
| MasterIp |
string |
是 |
主 DNS |
114.114.114.114 |
| SlaveIp |
string |
否 |
备 DNS |
172.16.0.14 |
| Mode |
string |
否 |
转发模式 说明
|
first |
| OutboundPortType |
string |
否 |
出接口类型 说明
枚举值:
|
Tunnel |
| OutboundPortIndex |
string |
否 |
出接口序号 说明
枚举值:
|
0 |
| OutboundPortName |
string |
否 |
出接口 说明
枚举值:
|
eth0 |
| RegionId |
string |
是 |
智能接入网关实例所属的地域 ID。 |
cn-shanghai |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
Schema of Response |
||
| RequestId |
string |
Id of the request |
E93884AC-6C21-4FEA-8E3A-7377D33B194F |
| Success |
boolean |
是否成功 |
true |
| Code |
string |
错误码。200 标识查询任务成功 |
200 |
| Message |
string |
返回信息 |
Successful |
| HttpStatusCode |
integer |
HTTP 状态码 |
200 |
| Data |
object |
业务数据 |
|
| InstanceId |
string |
实例 ID |
sagv3dnsforward-nc7qabskj17werc7su |
| Domain |
string |
域名 |
yfiy.cn |
| MasterIp |
string |
主 DNS |
14.104.81.13 |
| SlaveIp |
string |
备 DNS |
172.16.0.14 |
| Mode |
string |
转发模式 |
first |
| OutboundPortType |
string |
出接口类型 |
PhysicalPort |
| OutboundPortIndex |
integer |
出接口序号 |
0 |
| OutboundPortName |
string |
出接口 |
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 |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | InvalidSpec.FeatureNotSupport | The current edition of the cloudbranch does not support this feature. | |
| 400 | GATEWAY.InvalidSN | The specified gateway serial number does not exist. | |
| 400 | CCN.DuplicateDNSForwardingDomain | Duplicate DNS forwarding domain | |
| 400 | ConfigUnsynchronized | The configs of device are unsynchronized,please check whether the device is online | |
| 400 | DeviceNotExist | The specified device does not exist | |
| 400 | FeatureNotSupport | The current edition of the smart access gateway does not support this feature. | |
| 400 | CCN.DNS.Forward.CreateFailed | failed to create dns forward config | |
| 404 | ResourceNotFound.Device | The specified resource of Device is not found. |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。