You can call this operation to query the DNS servers used by a Smart Access Gateway (SAG) instance.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | No | DescribeSagUserDns |
The operation that you want to perform. Set the value to DescribeSagUserDns. |
RegionId | String | Yes | cn-shanghai |
The ID of the region where the SAG instance is deployed. |
SmartAGId | String | Yes | sag-whfn**** |
The ID of the SAG instance. |
SmartAGSn | String | Yes | sag32a30**** |
The serial number (SN) of the SAG device. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
MasterDns | String | 192.XX.XX.1 |
The IP address of the primary DNS server. |
RequestId | String | 0937DEA0-AB4B-42F4-9314-07B97D30282B |
The ID of the request. |
SlaveDns | String | 192.XX.XX.2 |
The IP address of the secondary DNS server. |
TaskStates | Array |
The information about the query task. |
|
CreateTime | String | 1586852928000 |
The time when the query task was created. |
ErrorCode | String | 200 |
The error code returned for a query task. The 200 error code indicates that the query task is successful. |
ErrorMessage | String | Successful |
The error message returned for a query task. The Successful error message indicates that the query task is successful. |
State | String | Succeed |
The status of the query task. Valid values:
|
Examples
Sample requests
http(s)://smartag.cn-shanghai.aliyuncs.com/? Action=DescribeSagUserDns
&RegionId=cn-shanghai
&SmartAGId=sag-whfn****
&SmartAGSn=sag32a30****
&<Common request parameters>
Sample success responses
XML
format
<DescribeSagUserDnsResponse>
<RequestId>9D6594D7-F265-47D1-9F41-D4B2A9F9D3BC</RequestId>
<SlaveDns>2.XX.XX.2</SlaveDns>
<TaskStates>
<State>Succeed</State>
<CreateTime>1586852928000</CreateTime>
<ErrorCode>200</ErrorCode>
<ErrorMessage>Successful</ErrorMessage>
</TaskStates>
<MasterDns>1.XX.XX.1</MasterDns>
</DescribeSagUserDnsResponse>
JSON
format
{
"RequestId": "9D6594D7-F265-47D1-9F41-D4B2A9F9D3BC",
"SlaveDns": "2.XX.XX.2",
"TaskStates": [
{
"State": "Succeed",
"CreateTime": 1586852928000,
"ErrorCode": "200",
"ErrorMessage": "Successful"
}
],
"MasterDns": "1.XX.XX.1"
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
400 | SAG.InstanceNoFound | The specified SAG instance does not exist. | The error message returned because the specified SAG instance does not exist. |
400 | SAG.SoftwareNotSupport | The specified SAG software edition instance does not support ACL. | The error message returned because the version of the specified SAG instance does not support ACLs. |
500 | SmartAccessGatewayInArrears | The specified Smart Access Gateway has expired. | The error message returned because the specified SAG instance has expired. Renew the SAG instance first. |
500 | SmartAccessGatewayNotActivated | The specified Smart Access Gateway has not been activated. | The error message returned because the specified SAG instance has not been activated. Activate the SAG instance first. |
403 | SmartAccessGatewayNotOnline | The specified smart access gateway is not online. | The error message returned because the specified SAG device is not connected to Alibaba Cloud. |
500 | SmartAccessGatewayOffline | The request cannot be completed. The Smart Access Gateway is offline. | The error message returned because the specified SAG device is disconnected form Alibaba Cloud. |
400 | InstanceNotExit | The specified instance does not exist. | The error message returned because the specified instance does not exist. |
400 | ConfigUnsynchronized | The network configuration is not synchronized. | The error message returned because the network settings are not synchronized between the SAG device and instance. |
403 | FeatureNotSupport | The current edition of the smart access gateway does not support this feature. | The error message returned because the current version of the specified SAG instance does not support this feature. |
403 | FeatureNotSupportForActiveSmartAG | The current edition of the active smart access gateway does not support this feature. | The error message returned because the current version of the active SAG device does not support this feature. |
403 | FeatureNotSupportForStandBySmartAG | The current edition of the standby smart access gateway does not support this feature. | The error message returned because the current version of the standby SAG device does not support this feature. |
For a list of error codes, visit the API Error Center.