Skip to main content

availability_zones

Creates, updates, deletes, gets or lists an availability_zones resource.

Overview

Nameavailability_zones
TypeResource
Idaws.ec2.availability_zones

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
geographystringThe geography information for the Availability Zone or Local Zone. The geography is returned as a list.
group_long_namestringThe long name of the Availability Zone group, Local Zone group, or Wavelength Zone group.
group_namestringThe name of the zone group. For example: Availability Zones - us-east-1-zg-1 Local Zones - us-west-2-lax-1 Wavelength Zones - us-east-1-wl1-bos-wlz-1
messagesstringAny messages about the Availability Zone, Local Zone, or Wavelength Zone.
network_border_groupstringThe name of the network border group.
opt_in_statusstringFor Availability Zones, this parameter always has the value of opt-in-not-required. For Local Zones and Wavelength Zones, this parameter is the opt-in status. The possible values are opted-in and not-opted-in.
parent_zone_idstringThe ID of the zone that handles some of the Local Zone or Wavelength Zone control plane operations, such as API calls.
parent_zone_namestringThe name of the zone that handles some of the Local Zone or Wavelength Zone control plane operations, such as API calls.
region_namestringThe name of the Region.
statestringThe state of the Availability Zone, Local Zone, or Wavelength Zone. The possible values are available, unavailable, and constrained.
sub_geographystringThe sub-geography information for the Availability Zone or Local Zone. The sub-geography is returned as a list.
zone_idstringThe ID of the Availability Zone, Local Zone, or Wavelength Zone.
zone_namestringThe name of the Availability Zone, Local Zone, or Wavelength Zone.
zone_typestringThe type of zone. Valid values: availability-zone | local-zone | wavelength-zone

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_availability_zonesselectregionZoneName, ZoneId, AllAvailabilityZones, DryRun, FilterDescribes 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.
modify_availability_zone_groupupdateGroupName, OptInStatus, regionDryRunChanges the opt-in status of the specified zone group for your account.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
GroupNamestringThe name of the Availability Zone group, Local Zone group, or Wavelength Zone group.
OptInStatusstringIndicates whether to opt in to the zone group. The only valid value is opted-in. You must contact Amazon Web Services Support to opt out of a Local Zone or Wavelength Zone group.
regionstringAWS region (default: us-east-1)
AllAvailabilityZonesbooleanInclude 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.
DryRunbooleanChecks 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 is UnauthorizedOperation.
FilterarrayThe 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 group us-west-2-lax-1, it is US West (Los Angeles), or the Wavelength Zone (for example, for Zone group us-east-1-wl1, it is US 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).
ZoneIdarrayThe IDs of the Availability Zones, Local Zones, and Wavelength Zones.
ZoneNamearrayThe names of the Availability Zones, Local Zones, and Wavelength Zones.

SELECT examples

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.

SELECT
geography,
group_long_name,
group_name,
messages,
network_border_group,
opt_in_status,
parent_zone_id,
parent_zone_name,
region_name,
state,
sub_geography,
zone_id,
zone_name,
zone_type
FROM aws.ec2.availability_zones
WHERE region = '{{ region }}' -- required
AND ZoneName = '{{ ZoneName }}'
AND ZoneId = '{{ ZoneId }}'
AND AllAvailabilityZones = '{{ AllAvailabilityZones }}'
AND DryRun = '{{ DryRun }}'
AND Filter = '{{ Filter }}'
;

UPDATE examples

Changes the opt-in status of the specified zone group for your account.

UPDATE aws.ec2.availability_zones
SET
-- No updatable properties
WHERE
GroupName = '{{ GroupName }}' --required
AND OptInStatus = '{{ OptInStatus }}' --required
AND region = '{{ region }}' --required
AND DryRun = {{ DryRun}}
RETURNING
return;