All Products
Search
Document Center

Alibaba Cloud DNS:DescribeDomainNs

Last Updated:Oct 24, 2024

Queries the name servers configured for a specified domain name and checks whether all the name servers are Alibaba Cloud Domain Name System (DNS) servers.

Operation description

Note You can call this operation to query the authoritative servers of a domain name registry to obtain the name servers for a domain name. If the domain name is in an invalid state, such as serverHold or clientHold, an error may be returned.

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:
    • 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
alidns:DescribeDomainNsget
  • domain
    acs:alidns::{#accountId}:domain/{#DomainName}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
LangstringNo

The language.

en
DomainNamestringYes

The domain name.

example.com

Response parameters

ParameterTypeDescriptionExample
object
AllAliDnsboolean

Indicates whether all the name servers are Alibaba Cloud DNS servers.

true
RequestIdstring

The request ID.

16C7DC7A-2FA7-4D14-8B12-88A2BB6373DB
ExpectDnsServersarray

The Domain Name System (DNS) server names assigned by Alibaba Cloud DNS.

ExpectDnsServerstring

The DNS server name assigned by Alibaba Cloud DNS.

x1.alidns.com,x2.alidns.com
DnsServersarray

The DNS server names configured for the domain name.

DnsServerstring

The DNS server name configured for the domain name.

vip1.alidns.com,vip2.alidns.com
IncludeAliDnsboolean

Indicates whether the name servers include Alibaba Cloud DNS servers.

true
DetectFailedReasonCodestring

The cause code of the detection failure.

DnsCheck.Failed

Examples

Sample success responses

JSONformat

{
  "AllAliDns": true,
  "RequestId": "16C7DC7A-2FA7-4D14-8B12-88A2BB6373DB",
  "ExpectDnsServers": {
    "ExpectDnsServer": [
      "x1.alidns.com,x2.alidns.com"
    ]
  },
  "DnsServers": {
    "DnsServer": [
      "vip1.alidns.com,vip2.alidns.com"
    ]
  },
  "IncludeAliDns": true,
  "DetectFailedReasonCode": "DnsCheck.Failed"
}

Error codes

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

Change history

Change timeSummary of changesOperation
2023-03-15API Description Update. The API operation is not deprecated.. The response structure of the API has changedView Change Details