availability_zones
Creates, updates, deletes, gets or lists an availability_zones resource.
Overview
| Name | availability_zones |
| Type | Resource |
| Id | aws.ec2.availability_zones |
Fields
The following fields are returned by SELECT queries:
- describe_availability_zones
| Name | Datatype | Description |
|---|---|---|
geography | string | The geography information for the Availability Zone or Local Zone. The geography is returned as a list. |
group_long_name | string | The long name of the Availability Zone group, Local Zone group, or Wavelength Zone group. |
group_name | string | The 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 |
messages | string | Any messages about the Availability Zone, Local Zone, or Wavelength Zone. |
network_border_group | string | The name of the network border group. |
opt_in_status | string | For 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_id | string | The ID of the zone that handles some of the Local Zone or Wavelength Zone control plane operations, such as API calls. |
parent_zone_name | string | The name of the zone that handles some of the Local Zone or Wavelength Zone control plane operations, such as API calls. |
region_name | string | The name of the Region. |
state | string | The state of the Availability Zone, Local Zone, or Wavelength Zone. The possible values are available, unavailable, and constrained. |
sub_geography | string | The sub-geography information for the Availability Zone or Local Zone. The sub-geography is returned as a list. |
zone_id | string | The ID of the Availability Zone, Local Zone, or Wavelength Zone. |
zone_name | string | The name of the Availability Zone, Local Zone, or Wavelength Zone. |
zone_type | string | The type of zone. Valid values: availability-zone | local-zone | wavelength-zone |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_availability_zones | select | region | ZoneName, ZoneId, AllAvailabilityZones, DryRun, Filter | 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. |
modify_availability_zone_group | update | GroupName, OptInStatus, region | DryRun | Changes 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.
| Name | Datatype | Description |
|---|---|---|
GroupName | string | The name of the Availability Zone group, Local Zone group, or Wavelength Zone group. |
OptInStatus | string | Indicates 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. |
region | string | AWS region (default: us-east-1) |
AllAvailabilityZones | boolean | 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. |
DryRun | boolean | 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 is UnauthorizedOperation. |
Filter | array | 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 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). |
ZoneId | array | The IDs of the Availability Zones, Local Zones, and Wavelength Zones. |
ZoneName | array | The names of the Availability Zones, Local Zones, and Wavelength Zones. |
SELECT examples
- describe_availability_zones
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
- modify_availability_zone_group
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;