DescribeGatewayDNS

Updated at: 2024-09-19 08:52

Queries the information about the DNS server configured for a gateway.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

调试

Request parameters

Parameter Type Required Example Description
Parameter Type Required Example Description
Action String Yes DescribeGatewayDNS

The operation that you want to perform. Set the value to DescribeGatewayDNS.

GatewayId String Yes gw-000eg44nmxbsfwbvq***

The ID of the gateway.

Response parameters

Parameter Type Example Description
Parameter Type Example Description
RequestId String 89398CFB-4EB6-4C7E-BB3C-EF213AC8FA50

The ID of the request.

Success Boolean true

Indicates whether the request is successful.

Code String 200

The HTTP status code. If the request is successful, 200 is returned.

Message String successful

The description of the status code.

DnsServer String 100.100.2.136,100.100.2.188

The list of IP addresses. Separate multiple IP addresses with commas (,).

Examples

Sample requests

http(s)://[Endpoint]/?Action=DescribeGatewayDNS
&GatewayId=gw-000eg44nmxbsfwbvq***
&<Common request parameters>

Sample success responses

XML format

<DescribeGatewayDNSResponse>
      <RequestId>ACB4BBBB-9046-4D46-BA93-0737DE78B735</RequestId>
      <Message>successful</Message>
      <Code>200</Code>
      <Success>true</Success>
      <DnsServer>100.100.2.136,100.100.2.188</DnsServer>
</DescribeGatewayDNSResponse>

JSON format

{
    "RequestId":"ACB4BBBB-9046-4D46-BA93-0737DE78B735",
    "Message":"successful",
    "Code":"200",
    "Success":true,
    "DnsServer":"100.100.2.136,100.100.2.188"
}

Error codes

HttpCode Error code Error message Description
HttpCode Error code Error message Description
400 GatewayInUpgrading The gateway is upgrading. Try again later. The error message returned because the gateway is being upgraded. Try again later.
400 GatewayNotExist The specified gateway does not exist. You must specify a valid parameter. The error message returned because the specified gateway does not exist. Check whether the parameters are valid.
400 GatewayInOperation The gateway is processing requests. Try again later. The error message returned because another operation is in progress. Try again later.
400 GatewayStatusRunningRequired The gateway is not in the Running state. Try again later. The error message returned because the gateway is not in the Running state. Try again later.
400 EmptyGatewayId You must enter a valid ID for the gateway. The error message returned because the gateway ID is not specified.

For a list of error codes, visit the API Error Center.

  • On this page (1, T)
  • Debugging
  • Request parameters
  • Response parameters
  • Examples
  • Error codes
Feedback