/AWS1/IF_R53=>LISTRESOURCERECORDSETS()¶
About ListResourceRecordSets¶
Lists the resource record sets in a specified hosted zone.
ListResourceRecordSets returns up to 300 resource record sets at a time
in ASCII order, beginning at a position specified by the name and
type elements.
Sort order
ListResourceRecordSets sorts results first by DNS name with the labels
reversed, for example:
com.example.www.
Note the trailing dot, which can change the sort order when the record name contains
characters that appear before . (decimal 46) in the ASCII table. These
characters include the following: ! " # $ % & ' ( ) * + , -
When multiple records have the same DNS name, ListResourceRecordSets
sorts results by the record type.
Specifying where to start listing records
You can use the name and type elements to specify the resource record set that the list begins with:
- If you do not specify Name or Type
-
The results begin with the first resource record set that the hosted zone contains.
- If you specify Name but not Type
-
The results begin with the first resource record set in the list whose name is greater than or equal to
Name. - If you specify Type but not Name
-
Amazon Route 53 returns the
InvalidInputerror. - If you specify both Name and Type
-
The results begin with the first resource record set in the list whose name is greater than or equal to
Name, and whose type is greater than or equal toType.Type is only used to sort between records with the same record Name.
Resource record sets that are PENDING
This action returns the most current version of the records. This includes records
that are PENDING, and that are not yet available on all Route 53 DNS
servers.
Changing resource record sets
To ensure that you get an accurate listing of the resource record sets for a hosted
zone at a point in time, do not submit a ChangeResourceRecordSets request
while you're paging through the results of a ListResourceRecordSets
request. If you do, some pages may display results without the latest changes while
other pages display results with the latest changes.
Displaying the next page of results
If a ListResourceRecordSets command returns more than one page of
results, the value of IsTruncated is true. To display the next
page of results, get the values of NextRecordName,
NextRecordType, and NextRecordIdentifier (if any) from the
response. Then submit another ListResourceRecordSets request, and specify
those values for StartRecordName, StartRecordType, and
StartRecordIdentifier.
Method Signature¶
METHODS /AWS1/IF_R53~LISTRESOURCERECORDSETS
IMPORTING
!IV_HOSTEDZONEID TYPE /AWS1/R53RESOURCEID OPTIONAL
!IV_STARTRECORDNAME TYPE /AWS1/R53DNSNAME OPTIONAL
!IV_STARTRECORDTYPE TYPE /AWS1/R53RRTYPE OPTIONAL
!IV_STARTRECORDIDENTIFIER TYPE /AWS1/R53RESOURCERECORDSETID OPTIONAL
!IV_MAXITEMS TYPE /AWS1/R53INTEGER OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_r53lstresrcrecsetsrsp
RAISING
/AWS1/CX_R53INVALIDINPUT
/AWS1/CX_R53NOSUCHHOSTEDZONE
/AWS1/CX_R53CLIENTEXC
/AWS1/CX_R53SERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_hostedzoneid TYPE /AWS1/R53RESOURCEID /AWS1/R53RESOURCEID¶
The ID of the hosted zone that contains the resource record sets that you want to list.
Optional arguments:¶
iv_startrecordname TYPE /AWS1/R53DNSNAME /AWS1/R53DNSNAME¶
The first name in the lexicographic ordering of resource record sets that you want to list. If the specified record name doesn't exist, the results begin with the first resource record set that has a name greater than the value of
name.
iv_startrecordtype TYPE /AWS1/R53RRTYPE /AWS1/R53RRTYPE¶
The type of resource record set to begin the record listing from.
Valid values for basic resource record sets:
A|AAAA|CAA|CNAME|MX|NAPTR|NS|PTR|SOA|SPF|SRV|TXTValues for weighted, latency, geolocation, and failover resource record sets:
A|AAAA|CAA|CNAME|MX|NAPTR|PTR|SPF|SRV|TXTValues for alias resource record sets:
API Gateway custom regional API or edge-optimized API: A
CloudFront distribution: A or AAAA
Elastic Beanstalk environment that has a regionalized subdomain: A
Elastic Load Balancing load balancer: A | AAAA
S3 bucket: A
VPC interface VPC endpoint: A
Another resource record set in this hosted zone: The type of the resource record set that the alias references.
Constraint: Specifying
typewithout specifyingnamereturns anInvalidInputerror.
iv_startrecordidentifier TYPE /AWS1/R53RESOURCERECORDSETID /AWS1/R53RESOURCERECORDSETID¶
Resource record sets that have a routing policy other than simple: If results were truncated for a given DNS name and type, specify the value of
NextRecordIdentifierfrom the previous response to get the next resource record set that has the current DNS name and type.
iv_maxitems TYPE /AWS1/R53INTEGER /AWS1/R53INTEGER¶
(Optional) The maximum number of resource records sets to include in the response body for this request. If the response includes more than
maxitemsresource record sets, the value of theIsTruncatedelement in the response istrue, and the values of theNextRecordNameandNextRecordTypeelements in the response identify the first resource record set in the next group ofmaxitemsresource record sets.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_r53lstresrcrecsetsrsp /AWS1/CL_R53LSTRESRCRECSETSRSP¶
Domain /AWS1/RT_ACCOUNT_ID Primitive Type NUMC
Examples¶
Syntax Example¶
This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.
DATA(lo_result) = lo_client->listresourcerecordsets(
iv_hostedzoneid = |string|
iv_maxitems = 123
iv_startrecordidentifier = |string|
iv_startrecordname = |string|
iv_startrecordtype = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
LOOP AT lo_result->get_resourcerecordsets( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_dnsname = lo_row_1->get_name( ).
lv_rrtype = lo_row_1->get_type( ).
lv_resourcerecordsetidenti = lo_row_1->get_setidentifier( ).
lv_resourcerecordsetweight = lo_row_1->get_weight( ).
lv_resourcerecordsetregion = lo_row_1->get_region( ).
lo_geolocation = lo_row_1->get_geolocation( ).
IF lo_geolocation IS NOT INITIAL.
lv_geolocationcontinentcod = lo_geolocation->get_continentcode( ).
lv_geolocationcountrycode = lo_geolocation->get_countrycode( ).
lv_geolocationsubdivisionc = lo_geolocation->get_subdivisioncode( ).
ENDIF.
lv_resourcerecordsetfailov = lo_row_1->get_failover( ).
lv_resourcerecordsetmultiv = lo_row_1->get_multivalueanswer( ).
lv_ttl = lo_row_1->get_ttl( ).
LOOP AT lo_row_1->get_resourcerecords( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_rdata = lo_row_3->get_value( ).
ENDIF.
ENDLOOP.
lo_aliastarget = lo_row_1->get_aliastarget( ).
IF lo_aliastarget IS NOT INITIAL.
lv_resourceid = lo_aliastarget->get_hostedzoneid( ).
lv_dnsname = lo_aliastarget->get_dnsname( ).
lv_aliashealthenabled = lo_aliastarget->get_evaluatetargethealth( ).
ENDIF.
lv_healthcheckid = lo_row_1->get_healthcheckid( ).
lv_trafficpolicyinstanceid = lo_row_1->get_trafficpolicyinstanceid( ).
lo_cidrroutingconfig = lo_row_1->get_cidrroutingconfig( ).
IF lo_cidrroutingconfig IS NOT INITIAL.
lv_uuid = lo_cidrroutingconfig->get_collectionid( ).
lv_cidrlocationnamedefault = lo_cidrroutingconfig->get_locationname( ).
ENDIF.
lo_geoproximitylocation = lo_row_1->get_geoproximitylocation( ).
IF lo_geoproximitylocation IS NOT INITIAL.
lv_awsregion = lo_geoproximitylocation->get_awsregion( ).
lv_localzonegroup = lo_geoproximitylocation->get_localzonegroup( ).
lo_coordinates = lo_geoproximitylocation->get_coordinates( ).
IF lo_coordinates IS NOT INITIAL.
lv_latitude = lo_coordinates->get_latitude( ).
lv_longitude = lo_coordinates->get_longitude( ).
ENDIF.
lv_bias = lo_geoproximitylocation->get_bias( ).
ENDIF.
ENDIF.
ENDLOOP.
lv_pagetruncated = lo_result->get_istruncated( ).
lv_dnsname = lo_result->get_nextrecordname( ).
lv_rrtype = lo_result->get_nextrecordtype( ).
lv_resourcerecordsetidenti = lo_result->get_nextrecordidentifier( ).
lv_integer = lo_result->get_maxitems( ).
ENDIF.