Adds DNS forwarding configurations to an SCG5000 or SCG5000-5G instance. The device version must be 3.4.2 or later.
Debugging
Authorization information
There is currently no authorization information disclosed in the API.
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
SagInsId | string | Yes | The ID of the instance. | sag-v9un1ccz22owd76lf8 |
SagSn | string | Yes | The serial number (SN) of the device. | sagf4dkqh78 |
Domain | string | Yes | The domain name. Note
For example, you can enter *.baidu.com to specify the domain name baidu.com. | www.aliyun.com |
MasterIp | string | Yes | The primary DNS server. | 114.114.114.114 |
SlaveIp | string | No | The secondary DNS server. | 172.16.0.14 |
Mode | string | No | The forwarding mode. Note
| first |
OutboundPortType | string | No | The type of the egress port. Note
Enumeration Value:
| Tunnel |
OutboundPortIndex | string | No | The number of the egress port. Note
| 0 |
OutboundPortName | string | No | The egress port. Note
| eth0 |
RegionId | string | Yes | The ID of the region where the instance is deployed. | cn-shanghai |
Response parameters
Examples
Sample success responses
JSON
format
{
"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"
}
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
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. | The current version of 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. | - |
For a list of error codes, visit the Service error codes.