Adds DNS forwarding for Smart Access Gateway instances whose device type is SCG5000 or SCG5000-5G and whose device version is 3.4.2 or later.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
smartag:AddSmartAccessGatewayDnsForward |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| SagInsId |
string |
Yes |
The ID of the gateway instance. |
sag-v9un1ccz22owd76lf8 |
| SagSn |
string |
Yes |
The SN of the device. |
sagf4dkqh78 |
| Domain |
string |
Yes |
The domain name. Note
|
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 outbound port type. Note
Valid values:
|
Tunnel |
| OutboundPortIndex |
string |
No |
The outbound port index. Note
Valid values:
|
0 |
| OutboundPortName |
string |
No |
The outbound port. Note
Valid values:
|
eth0 |
| RegionId |
string |
Yes |
The region ID of the Smart Access Gateway instance. |
cn-shanghai |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
Id of the request |
E93884AC-6C21-4FEA-8E3A-7377D33B194F |
| Success |
boolean |
Indicates whether the request is successful. |
true |
| Code |
string |
The error code. A value of 200 indicates that the task is successful. |
200 |
| Message |
string |
The returned message. |
Successful |
| HttpStatusCode |
integer |
The HTTP status code. |
200 |
| Data |
object |
The response data. |
|
| InstanceId |
string |
The instance ID. |
sagv3dnsforward-nc7qabskj17werc7su |
| Domain |
string |
The domain name. |
yfiy.cn |
| MasterIp |
string |
The primary DNS server. |
14.104.81.13 |
| SlaveIp |
string |
The secondary DNS server. |
172.16.0.14 |
| Mode |
string |
The forwarding mode. |
first |
| OutboundPortType |
string |
The outbound port type. |
PhysicalPort |
| OutboundPortIndex |
integer |
The outbound port index. |
0 |
| OutboundPortName |
string |
The outbound port. |
eth0 |
Examples
Success response
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. | |
| 400 | CCN.DNS.Forward.CreateFailed | failed to create dns forward config | |
| 404 | ResourceNotFound.Device | The specified resource of Device is not found. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.