All Products
Search
Document Center

Smart Access Gateway:ViewSmartAccessGatewayDnsForwards

Last Updated:Mar 29, 2024

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

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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:
    • The required resource types are displayed in bold characters.
    • 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:ViewSmartAccessGatewayDnsForwardsRead
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
SagInsIdstringYes

The ID of the instance.

sag-v9un1ccz22owd76lf8
SagSnstringYes

The serial number (SN) of the device.

sagf4dkqh78
RegionIdstringYes

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

cn-shanghai

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

Id of the request

E223E535-AE11-4158-B00F-DC107887A909
Successboolean

Indicates whether the request is successful.

true
Codestring

The response code.

200
Messagestring

The response message.

Successful
HttpStatusCodeinteger

The HTTP status code.

200
Countinteger

The total number of entries returned.

1914
Dataobject []

A DNS forwarding list.

InstanceIdstring

The ID of the instance.

sagv3dnsforward-nc7qabskj17werc7su
Domainstring

The domain name.

www.baidu.com
MasterIpstring

The primary DNS server.

172.16.58.20
SlaveIpstring

The secondary DNS server.

172.16.0.14
Modestring

The forwarding mode.

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

The type of the egress port.

Enumeration Value:
  • Tunnel: Tunnel.
  • PhysicalPort: PhysicalPort.
  • None: None.
PhysicalPort
OutboundPortIndexinteger

The number of the egress port.

Enumeration Value:
  • 0: 0.
  • 2: 2.
0
OutboundPortNamestring

The egress port.

Enumeration Value:
  • eth0: eth0.
  • lte: lte.
eth0

Examples

Sample success responses

JSONformat

{
  "RequestId": "E223E535-AE11-4158-B00F-DC107887A909",
  "Success": true,
  "Code": "200",
  "Message": "Successful",
  "HttpStatusCode": 200,
  "Count": 1914,
  "Data": [
    {
      "InstanceId": "sagv3dnsforward-nc7qabskj17werc7su",
      "Domain": "www.baidu.com",
      "MasterIp": "172.16.58.20",
      "SlaveIp": "172.16.0.14",
      "Mode": "first",
      "OutboundPortType": "PhysicalPort",
      "OutboundPortIndex": 0,
      "OutboundPortName": "eth0"
    }
  ]
}

Error codes

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