You can call this operation to query the domain name system (DNS) host of a domain name.

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
Action String Yes QueryDnsHost

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

InstanceId String Yes ST2017120814571100001303

The instance ID of the domain name whose DNS host you want to query. You can call the QueryDomainList operation to query the instance ID.

Lang String No en

The language of the error message to return. Valid values:

  • zh: Chinese
  • en: English

Default value:en

UserClientIp String No 127.0.0.1

The IP address of the client used by the user to initiate the query.

Response parameters

Parameter Type Example Description
DnsHostList Array

The DNS host information returned.

DnsName String ns3

The name of the DNS server corresponding to the DNS host that was queried.

IpList List 185.27.XX.XX, 218.83.XX.XX

The list of IP addresses.

RequestId String 18A313DD-3AF3-40AA-84F9-56BA45DC511F

The ID of the request.

Examples

Sample requests


http(s)://[Endpoint]/? Action=QueryDnsHost
&InstanceId=ST2017120814571100001303
&<Common request parameters>

Sample success responses

XML format

<QueryDnsHostResponse>
      <DnsHostList>
            <DnsHost>
                  <DnsName>ns3</DnsName>
                  <IpList>
                        <ip>185.27.XX.XX</ip>
                        <ip>218.83.XX.XX</ip>
                  </IpList>
            </DnsHost>
      </DnsHostList>
      <RequestId>18A313DD-3AF3-40AA-84F9-56BA45DC511F</RequestId>
</QueryDnsHostResponse>

JSON format

{
	"requestId":"6A973B69-7B5F-4959-AA89-ED4010541D20",
	"dnsHostList":[
		{
			"ipList":[
				"185.27.XX.XX",
				"218.83.XX.XX"
			],
			"dnsName":"ns3"
		}
	]
}

Error codes

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