All Products
Search
Document Center

Smart Access Gateway:UpdateSmartAccessGatewayDnsForward

Last Updated:Jul 31, 2025

Modifies the DNS forwarding configurations for a Smart Access Gateway (SAG) SCG5000 or SCG5000-5G instance. The version of the device must be 3.4.2 or later.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
smartag:UpdateSmartAccessGatewayDnsForward
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
SagInsIdstringYes

The ID of the instance.

sag-v9un1ccz22owd76lf8
SagSnstringYes

The serial number (SN) of the device.

sagf4dkqh78
InstanceIdstringYes

The ID of the instance.

sagv3dnsforward-nc7qabskj17werc7su
MasterIpstringYes

The primary DNS server.

114.114.114.114
SlaveIpstringNo

The secondary DNS server.

172.16.0.14
ModestringNo

The forwarding mode.

Note
  • This parameter is not in use. Ignore this parameter.
first
OutboundPortTypestringNo

The type of the egress port.

Note
  • A value of Tunnel specifies a tunnel, and a value of PhysicalPort specifies a physical port.
Enumeration Value:
  • Tunnel: Tunnel.
  • PhysicalPort: PhysicalPort.
  • None: None.
PhysicalPort
OutboundPortIndexintegerNo

The number of the egress port.

Note
  • This parameter is optional if OutboundPortType is set to PhysicalPort. Ignore this parameter if OutboundPortType is set to Tunnel.
  • The value of OutboundPortIndex is the unique index of the port name specified by poOutboundPortName. For example, 0 is the index for the port named eth0, and 2 is the index for the port named lte.
0
OutboundPortNamestringNo

The egress port.

Note
  • This parameter is optional if OutboundPortType is set to PhysicalPort. Ignore this parameter if OutboundPortType is set to Tunnel.
  • The value of OutboundPortIndex is the unique index of the port name specified by poOutboundPortName. For example, 0 is the index for the port named eth0, and 2 is the index for the port named lte.
eth0
RegionIdstringYes

The ID of the region in which the SAG instance resides.

cn-shanghai
DomainstringYes

The domain name.

Note
  • Wildcard domain names are supported. You can use the wildcard character asterisk (*) to specify a wildcard domain name.

For example, you can enter *.baidu.com to specify the domain name baidu.com.

www.aliyun.com

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

Id of the request

284045DE-4C2D-463D-9F27-B6898E67D120
Successstring

Indicates whether the request is successful.

Enumeration Value:
  • true: true.
  • false: false.
true
Codestring

The response code.

200
Messagestring

The response message.

Successful
HttpStatusCodestring

The HTTP status code.

200

Examples

Sample success responses

JSONformat

{
  "RequestId": "284045DE-4C2D-463D-9F27-B6898E67D120",
  "Success": true,
  "Code": 200,
  "Message": "Successful",
  "HttpStatusCode": 200
}

Error codes

HTTP status codeError codeError messageDescription
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-
400CCN.DNS.Forward.IdNotExistDNS forwarding does not exist.-
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.The current version of Smart Access Gateway does not support this feature.

For a list of error codes, visit the Service error codes.