添加DNS轉寄,適用於裝置類型為SCG5000或SCG5000-5G的Smart Access Gateway執行個體,且裝置版本為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 |
是 |
Smart Access Gateway執行個體所屬的地區 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. |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。