/AWS1/CL_EC2=>DESCRIBEAVAILABILITYZONES()
¶
About DescribeAvailabilityZones¶
Describes the Availability Zones, Local Zones, and Wavelength Zones that are available to you.
For more information about Availability Zones, Local Zones, and Wavelength Zones, see Regions and zones in the Amazon EC2 User Guide.
The order of the elements in the response, including those within nested structures, might vary. Applications should not assume the elements appear in a particular order.
Method Signature¶
IMPORTING¶
Optional arguments:¶
it_zonenames
TYPE /AWS1/CL_EC2ZONENAMESTRLIST_W=>TT_ZONENAMESTRINGLIST
TT_ZONENAMESTRINGLIST
¶
The names of the Availability Zones, Local Zones, and Wavelength Zones.
it_zoneids
TYPE /AWS1/CL_EC2ZONEIDSTRINGLIST_W=>TT_ZONEIDSTRINGLIST
TT_ZONEIDSTRINGLIST
¶
The IDs of the Availability Zones, Local Zones, and Wavelength Zones.
iv_allavailabilityzones
TYPE /AWS1/EC2BOOLEAN
/AWS1/EC2BOOLEAN
¶
Include all Availability Zones, Local Zones, and Wavelength Zones regardless of your opt-in status.
If you do not use this parameter, the results include only the zones for the Regions where you have chosen the option to opt in.
iv_dryrun
TYPE /AWS1/EC2BOOLEAN
/AWS1/EC2BOOLEAN
¶
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
.
it_filters
TYPE /AWS1/CL_EC2FILTER=>TT_FILTERLIST
TT_FILTERLIST
¶
The filters.
group-long-name
- The long name of the zone group for the Availability Zone (for example,US West (Oregon) 1
), the Local Zone (for example, for Zone groupus-west-2-lax-1
, it isUS West (Los Angeles)
, or the Wavelength Zone (for example, for Zone groupus-east-1-wl1
, it isUS East (Verizon)
.
group-name
- The name of the zone group for the Availability Zone (for example,us-east-1-zg-1
), the Local Zone (for example,us-west-2-lax-1
), or the Wavelength Zone (for example,us-east-1-wl1
).
message
- The Zone message.
opt-in-status
- The opt-in status (opted-in
|not-opted-in
|opt-in-not-required
).
parent-zone-id
- The ID of the zone that handles some of the Local Zone and Wavelength Zone control plane operations, such as API calls.
parent-zone-name
- The ID of the zone that handles some of the Local Zone and Wavelength Zone control plane operations, such as API calls.
region-name
- The name of the Region for the Zone (for example,us-east-1
).
state
- The state of the Availability Zone, the Local Zone, or the Wavelength Zone (available
|unavailable
|constrained
).
zone-id
- The ID of the Availability Zone (for example,use1-az1
), the Local Zone (for example,usw2-lax1-az1
), or the Wavelength Zone (for example,us-east-1-wl1-bos-wlz-1
).
zone-name
- The name of the Availability Zone (for example,us-east-1a
), the Local Zone (for example,us-west-2-lax-1a
), or the Wavelength Zone (for example,us-east-1-wl1-bos-wlz-1
).
zone-type
- The type of zone (availability-zone
|local-zone
|wavelength-zone
).
RETURNING¶
oo_output
TYPE REF TO /aws1/cl_ec2describeazsresult
/AWS1/CL_EC2DESCRIBEAZSRESULT
¶
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->/aws1/if_ec2~describeavailabilityzones(
it_filters = VALUE /aws1/cl_ec2filter=>tt_filterlist(
(
new /aws1/cl_ec2filter(
it_values = VALUE /aws1/cl_ec2valuestringlist_w=>tt_valuestringlist(
( new /aws1/cl_ec2valuestringlist_w( |string| ) )
)
iv_name = |string|
)
)
)
it_zoneids = VALUE /aws1/cl_ec2zoneidstringlist_w=>tt_zoneidstringlist(
( new /aws1/cl_ec2zoneidstringlist_w( |string| ) )
)
it_zonenames = VALUE /aws1/cl_ec2zonenamestrlist_w=>tt_zonenamestringlist(
( new /aws1/cl_ec2zonenamestrlist_w( |string| ) )
)
iv_allavailabilityzones = ABAP_TRUE
iv_dryrun = ABAP_TRUE
).
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_availabilityzones( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_availabilityzoneoptinst = lo_row_1->get_optinstatus( ).
LOOP AT lo_row_1->get_messages( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_string = lo_row_3->get_message( ).
ENDIF.
ENDLOOP.
lv_string = lo_row_1->get_regionname( ).
lv_string = lo_row_1->get_zonename( ).
lv_string = lo_row_1->get_zoneid( ).
lv_string = lo_row_1->get_groupname( ).
lv_string = lo_row_1->get_networkbordergroup( ).
lv_string = lo_row_1->get_zonetype( ).
lv_string = lo_row_1->get_parentzonename( ).
lv_string = lo_row_1->get_parentzoneid( ).
lv_string = lo_row_1->get_grouplongname( ).
lv_availabilityzonestate = lo_row_1->get_state( ).
ENDIF.
ENDLOOP.
ENDIF.
To describe your Availability Zones¶
This example describes the Availability Zones that are available to you. The response includes Availability Zones only for the current region.
DATA(lo_result) = lo_client->/aws1/if_ec2~describeavailabilityzones( ).