/AWS1/IF_R53=>LISTHOSTEDZONESBYVPC()¶
About ListHostedZonesByVPC¶
Lists all the private hosted zones that a specified VPC is associated with, regardless
of which Amazon Web Services account or Amazon Web Services service owns the hosted zones.
The HostedZoneOwner structure in the response contains one of the following
values:
-
An
OwningAccountelement, which contains the account number of either the current Amazon Web Services account or another Amazon Web Services account. Some services, such as Cloud Map, create hosted zones using the current account. -
An
OwningServiceelement, which identifies the Amazon Web Services service that created and owns the hosted zone. For example, if a hosted zone was created by Amazon Elastic File System (Amazon EFS), the value ofOwnerisefs.amazonaws.com.
ListHostedZonesByVPC returns the hosted zones associated with the specified VPC and does not reflect the hosted zone
associations to VPCs via Route 53 Profiles. To get the associations to a Profile, call the ListProfileResourceAssociations API.
When listing private hosted zones, the hosted zone and the Amazon VPC must belong to the same partition where the hosted zones were created. A partition is a group of Amazon Web Services Regions. Each Amazon Web Services account is scoped to one partition.
The following are the supported partitions:
-
aws- Amazon Web Services Regions -
aws-cn- China Regions -
aws-us-gov- Amazon Web Services GovCloud (US) Region
For more information, see Access Management in the Amazon Web Services General Reference.
Method Signature¶
METHODS /AWS1/IF_R53~LISTHOSTEDZONESBYVPC
IMPORTING
!IV_VPCID TYPE /AWS1/R53VPCID OPTIONAL
!IV_VPCREGION TYPE /AWS1/R53VPCREGION OPTIONAL
!IV_MAXITEMS TYPE /AWS1/R53INTEGER OPTIONAL
!IV_NEXTTOKEN TYPE /AWS1/R53PAGINATIONTOKEN OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_r53lsthostedzonesby03
RAISING
/AWS1/CX_R53INVALIDINPUT
/AWS1/CX_R53INVPAGINATIONTOKEN
/AWS1/CX_R53CLIENTEXC
/AWS1/CX_R53SERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_vpcid TYPE /AWS1/R53VPCID /AWS1/R53VPCID¶
The ID of the Amazon VPC that you want to list hosted zones for.
iv_vpcregion TYPE /AWS1/R53VPCREGION /AWS1/R53VPCREGION¶
For the Amazon VPC that you specified for
VPCId, the Amazon Web Services Region that you created the VPC in.
Optional arguments:¶
iv_maxitems TYPE /AWS1/R53INTEGER /AWS1/R53INTEGER¶
(Optional) The maximum number of hosted zones that you want Amazon Route 53 to return. If the specified VPC is associated with more than
MaxItemshosted zones, the response includes aNextTokenelement.NextTokencontains an encrypted token that identifies the first hosted zone that Route 53 will return if you submit another request.
iv_nexttoken TYPE /AWS1/R53PAGINATIONTOKEN /AWS1/R53PAGINATIONTOKEN¶
If the previous response included a
NextTokenelement, the specified VPC is associated with more hosted zones. To get more hosted zones, submit anotherListHostedZonesByVPCrequest.For the value of
NextToken, specify the value ofNextTokenfrom the previous response.If the previous response didn't include a
NextTokenelement, there are no more hosted zones to get.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_r53lsthostedzonesby03 /AWS1/CL_R53LSTHOSTEDZONESBY03¶
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->listhostedzonesbyvpc(
iv_maxitems = 123
iv_nexttoken = |string|
iv_vpcid = |string|
iv_vpcregion = |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_hostedzonesummaries( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_resourceid = lo_row_1->get_hostedzoneid( ).
lv_dnsname = lo_row_1->get_name( ).
lo_hostedzoneowner = lo_row_1->get_owner( ).
IF lo_hostedzoneowner IS NOT INITIAL.
lv_awsaccountid = lo_hostedzoneowner->get_owningaccount( ).
lv_hostedzoneowningservice = lo_hostedzoneowner->get_owningservice( ).
ENDIF.
ENDIF.
ENDLOOP.
lv_integer = lo_result->get_maxitems( ).
lv_paginationtoken = lo_result->get_nexttoken( ).
ENDIF.