Gets the value that Amazon Route 53 returns in response to a DNS request for a specified record name and type. You can optionally specify the IP address of a DNS resolver, an EDNS0 client subnet IP address, and a subnet mask.
See also: AWS API Documentation
See ‘aws help’ for descriptions of global parameters.
test-dns-answer
--hosted-zone-id <value>
--record-name <value>
--record-type <value>
[--resolver-ip <value>]
[--edns0-client-subnet-ip <value>]
[--edns0-client-subnet-mask <value>]
[--cli-input-json | --cli-input-yaml]
[--generate-cli-skeleton <value>]
--hosted-zone-id
(string)
The ID of the hosted zone that you want Amazon Route 53 to simulate a query for.
--record-name
(string)
The name of the resource record set that you want Amazon Route 53 to simulate a query for.
--record-type
(string)
The type of the resource record set.
Possible values:
SOA
A
TXT
NS
CNAME
MX
NAPTR
PTR
SRV
SPF
AAAA
CAA
DS
--resolver-ip
(string)
If you want to simulate a request from a specific DNS resolver, specify the IP address for that resolver. If you omit this value,
TestDnsAnswer
uses the IP address of a DNS resolver in the AWS US East (N. Virginia) Region (us-east-1
).
--edns0-client-subnet-ip
(string)
If the resolver that you specified for resolverip supports EDNS0, specify the IPv4 or IPv6 address of a client in the applicable location, for example,
192.0.2.44
or2001:db8:85a3::8a2e:370:7334
.
--edns0-client-subnet-mask
(string)
If you specify an IP address for
edns0clientsubnetip
, you can optionally specify the number of bits of the IP address that you want the checking tool to include in the DNS query. For example, if you specify192.0.2.44
foredns0clientsubnetip
and24
foredns0clientsubnetmask
, the checking tool will simulate a request from 192.0.2.0/24. The default value is 24 bits for IPv4 addresses and 64 bits for IPv6 addresses.The range of valid values depends on whether
edns0clientsubnetip
is an IPv4 or an IPv6 address:
IPv4 : Specify a value between 0 and 32
IPv6 : Specify a value between 0 and 128
--cli-input-json
| --cli-input-yaml
(string)
Reads arguments from the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton
. If other arguments are provided on the command line, those values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally. This may not be specified along with --cli-input-yaml
.
--generate-cli-skeleton
(string)
Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input
, prints a sample input JSON that can be used as an argument for --cli-input-json
. Similarly, if provided yaml-input
it will print a sample input YAML that can be used with --cli-input-yaml
. If provided with the value output
, it validates the command inputs and returns a sample output JSON for that command.
See ‘aws help’ for descriptions of global parameters.
Nameserver -> (string)
The Amazon Route 53 name server used to respond to the request.
RecordName -> (string)
The name of the resource record set that you submitted a request for.
RecordType -> (string)
The type of the resource record set that you submitted a request for.
RecordData -> (list)
A list that contains values that Amazon Route 53 returned for this resource record set.
(string)
A value that Amazon Route 53 returned for this resource record set. A
RecordDataEntry
element is one of the following:
For non-alias resource record sets, a
RecordDataEntry
element contains one value in the resource record set. If the resource record set contains multiple values, the response includes oneRecordDataEntry
element for each value.For multiple resource record sets that have the same name and type, which includes weighted, latency, geolocation, and failover, a
RecordDataEntry
element contains the value from the appropriate resource record set based on the request.For alias resource record sets that refer to AWS resources other than another resource record set, the
RecordDataEntry
element contains an IP address or a domain name for the AWS resource, depending on the type of resource.For alias resource record sets that refer to other resource record sets, a
RecordDataEntry
element contains one value from the referenced resource record set. If the referenced resource record set contains multiple values, the response includes oneRecordDataEntry
element for each value.
ResponseCode -> (string)
A code that indicates whether the request is valid or not. The most common response code is
NOERROR
, meaning that the request is valid. If the response is not valid, Amazon Route 53 returns a response code that describes the error. For a list of possible response codes, see DNS RCODES on the IANA website.
Protocol -> (string)
The protocol that Amazon Route 53 used to respond to the request, either
UDP
orTCP
.