Try AWS Native preview for resources not in the classic version.
aws.getAvailabilityZone
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
aws.getAvailabilityZone
provides details about a specific availability zone (AZ)
in the current region.
This can be used both to validate an availability zone given in a variable and to split the AZ name into its component parts of an AWS region and an AZ identifier letter. The latter may be useful e.g., for implementing a consistent subnet numbering scheme across several regions by mapping both the region and the subnet letter to network numbers.
This is different from the aws.getAvailabilityZones
(plural) data source,
which provides a list of the available zones.
Using getAvailabilityZone
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getAvailabilityZone(args: GetAvailabilityZoneArgs, opts?: InvokeOptions): Promise<GetAvailabilityZoneResult>
function getAvailabilityZoneOutput(args: GetAvailabilityZoneOutputArgs, opts?: InvokeOptions): Output<GetAvailabilityZoneResult>
def get_availability_zone(all_availability_zones: Optional[bool] = None,
filters: Optional[Sequence[GetAvailabilityZoneFilter]] = None,
name: Optional[str] = None,
state: Optional[str] = None,
zone_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetAvailabilityZoneResult
def get_availability_zone_output(all_availability_zones: Optional[pulumi.Input[bool]] = None,
filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetAvailabilityZoneFilterArgs]]]] = None,
name: Optional[pulumi.Input[str]] = None,
state: Optional[pulumi.Input[str]] = None,
zone_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetAvailabilityZoneResult]
func GetAvailabilityZone(ctx *Context, args *GetAvailabilityZoneArgs, opts ...InvokeOption) (*GetAvailabilityZoneResult, error)
func GetAvailabilityZoneOutput(ctx *Context, args *GetAvailabilityZoneOutputArgs, opts ...InvokeOption) GetAvailabilityZoneResultOutput
> Note: This function is named GetAvailabilityZone
in the Go SDK.
public static class GetAvailabilityZone
{
public static Task<GetAvailabilityZoneResult> InvokeAsync(GetAvailabilityZoneArgs args, InvokeOptions? opts = null)
public static Output<GetAvailabilityZoneResult> Invoke(GetAvailabilityZoneInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAvailabilityZoneResult> getAvailabilityZone(GetAvailabilityZoneArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: aws:index/getAvailabilityZone:getAvailabilityZone
arguments:
# arguments dictionary
The following arguments are supported:
- All
Availability boolZones Set to
true
to include all Availability Zones and Local Zones regardless of your opt in status.- Filters
List<Get
Availability Zone Filter> Configuration block(s) for filtering. Detailed below.
- Name string
Full name of the availability zone to select.
- State string
Specific availability zone state to require. May be any of
"available"
,"information"
or"impaired"
.- Zone
Id string Zone ID of the availability zone to select.
- All
Availability boolZones Set to
true
to include all Availability Zones and Local Zones regardless of your opt in status.- Filters
[]Get
Availability Zone Filter Configuration block(s) for filtering. Detailed below.
- Name string
Full name of the availability zone to select.
- State string
Specific availability zone state to require. May be any of
"available"
,"information"
or"impaired"
.- Zone
Id string Zone ID of the availability zone to select.
- all
Availability BooleanZones Set to
true
to include all Availability Zones and Local Zones regardless of your opt in status.- filters
List<Get
Availability Zone Filter> Configuration block(s) for filtering. Detailed below.
- name String
Full name of the availability zone to select.
- state String
Specific availability zone state to require. May be any of
"available"
,"information"
or"impaired"
.- zone
Id String Zone ID of the availability zone to select.
- all
Availability booleanZones Set to
true
to include all Availability Zones and Local Zones regardless of your opt in status.- filters
Get
Availability Zone Filter[] Configuration block(s) for filtering. Detailed below.
- name string
Full name of the availability zone to select.
- state string
Specific availability zone state to require. May be any of
"available"
,"information"
or"impaired"
.- zone
Id string Zone ID of the availability zone to select.
- all_
availability_ boolzones Set to
true
to include all Availability Zones and Local Zones regardless of your opt in status.- filters
Sequence[Get
Availability Zone Filter] Configuration block(s) for filtering. Detailed below.
- name str
Full name of the availability zone to select.
- state str
Specific availability zone state to require. May be any of
"available"
,"information"
or"impaired"
.- zone_
id str Zone ID of the availability zone to select.
- all
Availability BooleanZones Set to
true
to include all Availability Zones and Local Zones regardless of your opt in status.- filters List<Property Map>
Configuration block(s) for filtering. Detailed below.
- name String
Full name of the availability zone to select.
- state String
Specific availability zone state to require. May be any of
"available"
,"information"
or"impaired"
.- zone
Id String Zone ID of the availability zone to select.
getAvailabilityZone Result
The following output properties are available:
- Group
Name string For Availability Zones, this is the same value as the Region name. For Local Zones, the name of the associated group, for example
us-west-2-lax-1
.- Id string
The provider-assigned unique ID for this managed resource.
- Name string
- Name
Suffix string Part of the AZ name that appears after the region name, uniquely identifying the AZ within its region. For Availability Zones this is usually a single letter, for example
a
for theus-west-2a
zone. For Local and Wavelength Zones this is a longer string, for examplewl1-sfo-wlz-1
for theus-west-2-wl1-sfo-wlz-1
zone.- Network
Border stringGroup The name of the location from which the address is advertised.
- Opt
In stringStatus For Availability Zones, this always has the value of
opt-in-not-required
. For Local Zones, this is the opt in status. The possible values areopted-in
andnot-opted-in
.- Parent
Zone stringId ID of the zone that handles some of the Local Zone or Wavelength Zone control plane operations, such as API calls.
- Parent
Zone stringName Name of the zone that handles some of the Local Zone or Wavelength Zone control plane operations, such as API calls.
- Region string
Region where the selected availability zone resides. This is always the region selected on the provider, since this data source searches only within that region.
- State string
- Zone
Id string - Zone
Type string Type of zone. Values are
availability-zone
,local-zone
, andwavelength-zone
.- All
Availability boolZones - Filters
List<Get
Availability Zone Filter>
- Group
Name string For Availability Zones, this is the same value as the Region name. For Local Zones, the name of the associated group, for example
us-west-2-lax-1
.- Id string
The provider-assigned unique ID for this managed resource.
- Name string
- Name
Suffix string Part of the AZ name that appears after the region name, uniquely identifying the AZ within its region. For Availability Zones this is usually a single letter, for example
a
for theus-west-2a
zone. For Local and Wavelength Zones this is a longer string, for examplewl1-sfo-wlz-1
for theus-west-2-wl1-sfo-wlz-1
zone.- Network
Border stringGroup The name of the location from which the address is advertised.
- Opt
In stringStatus For Availability Zones, this always has the value of
opt-in-not-required
. For Local Zones, this is the opt in status. The possible values areopted-in
andnot-opted-in
.- Parent
Zone stringId ID of the zone that handles some of the Local Zone or Wavelength Zone control plane operations, such as API calls.
- Parent
Zone stringName Name of the zone that handles some of the Local Zone or Wavelength Zone control plane operations, such as API calls.
- Region string
Region where the selected availability zone resides. This is always the region selected on the provider, since this data source searches only within that region.
- State string
- Zone
Id string - Zone
Type string Type of zone. Values are
availability-zone
,local-zone
, andwavelength-zone
.- All
Availability boolZones - Filters
[]Get
Availability Zone Filter
- group
Name String For Availability Zones, this is the same value as the Region name. For Local Zones, the name of the associated group, for example
us-west-2-lax-1
.- id String
The provider-assigned unique ID for this managed resource.
- name String
- name
Suffix String Part of the AZ name that appears after the region name, uniquely identifying the AZ within its region. For Availability Zones this is usually a single letter, for example
a
for theus-west-2a
zone. For Local and Wavelength Zones this is a longer string, for examplewl1-sfo-wlz-1
for theus-west-2-wl1-sfo-wlz-1
zone.- network
Border StringGroup The name of the location from which the address is advertised.
- opt
In StringStatus For Availability Zones, this always has the value of
opt-in-not-required
. For Local Zones, this is the opt in status. The possible values areopted-in
andnot-opted-in
.- parent
Zone StringId ID of the zone that handles some of the Local Zone or Wavelength Zone control plane operations, such as API calls.
- parent
Zone StringName Name of the zone that handles some of the Local Zone or Wavelength Zone control plane operations, such as API calls.
- region String
Region where the selected availability zone resides. This is always the region selected on the provider, since this data source searches only within that region.
- state String
- zone
Id String - zone
Type String Type of zone. Values are
availability-zone
,local-zone
, andwavelength-zone
.- all
Availability BooleanZones - filters
List<Get
Availability Zone Filter>
- group
Name string For Availability Zones, this is the same value as the Region name. For Local Zones, the name of the associated group, for example
us-west-2-lax-1
.- id string
The provider-assigned unique ID for this managed resource.
- name string
- name
Suffix string Part of the AZ name that appears after the region name, uniquely identifying the AZ within its region. For Availability Zones this is usually a single letter, for example
a
for theus-west-2a
zone. For Local and Wavelength Zones this is a longer string, for examplewl1-sfo-wlz-1
for theus-west-2-wl1-sfo-wlz-1
zone.- network
Border stringGroup The name of the location from which the address is advertised.
- opt
In stringStatus For Availability Zones, this always has the value of
opt-in-not-required
. For Local Zones, this is the opt in status. The possible values areopted-in
andnot-opted-in
.- parent
Zone stringId ID of the zone that handles some of the Local Zone or Wavelength Zone control plane operations, such as API calls.
- parent
Zone stringName Name of the zone that handles some of the Local Zone or Wavelength Zone control plane operations, such as API calls.
- region string
Region where the selected availability zone resides. This is always the region selected on the provider, since this data source searches only within that region.
- state string
- zone
Id string - zone
Type string Type of zone. Values are
availability-zone
,local-zone
, andwavelength-zone
.- all
Availability booleanZones - filters
Get
Availability Zone Filter[]
- group_
name str For Availability Zones, this is the same value as the Region name. For Local Zones, the name of the associated group, for example
us-west-2-lax-1
.- id str
The provider-assigned unique ID for this managed resource.
- name str
- name_
suffix str Part of the AZ name that appears after the region name, uniquely identifying the AZ within its region. For Availability Zones this is usually a single letter, for example
a
for theus-west-2a
zone. For Local and Wavelength Zones this is a longer string, for examplewl1-sfo-wlz-1
for theus-west-2-wl1-sfo-wlz-1
zone.- network_
border_ strgroup The name of the location from which the address is advertised.
- opt_
in_ strstatus For Availability Zones, this always has the value of
opt-in-not-required
. For Local Zones, this is the opt in status. The possible values areopted-in
andnot-opted-in
.- parent_
zone_ strid ID of the zone that handles some of the Local Zone or Wavelength Zone control plane operations, such as API calls.
- parent_
zone_ strname Name of the zone that handles some of the Local Zone or Wavelength Zone control plane operations, such as API calls.
- region str
Region where the selected availability zone resides. This is always the region selected on the provider, since this data source searches only within that region.
- state str
- zone_
id str - zone_
type str Type of zone. Values are
availability-zone
,local-zone
, andwavelength-zone
.- all_
availability_ boolzones - filters
Sequence[Get
Availability Zone Filter]
- group
Name String For Availability Zones, this is the same value as the Region name. For Local Zones, the name of the associated group, for example
us-west-2-lax-1
.- id String
The provider-assigned unique ID for this managed resource.
- name String
- name
Suffix String Part of the AZ name that appears after the region name, uniquely identifying the AZ within its region. For Availability Zones this is usually a single letter, for example
a
for theus-west-2a
zone. For Local and Wavelength Zones this is a longer string, for examplewl1-sfo-wlz-1
for theus-west-2-wl1-sfo-wlz-1
zone.- network
Border StringGroup The name of the location from which the address is advertised.
- opt
In StringStatus For Availability Zones, this always has the value of
opt-in-not-required
. For Local Zones, this is the opt in status. The possible values areopted-in
andnot-opted-in
.- parent
Zone StringId ID of the zone that handles some of the Local Zone or Wavelength Zone control plane operations, such as API calls.
- parent
Zone StringName Name of the zone that handles some of the Local Zone or Wavelength Zone control plane operations, such as API calls.
- region String
Region where the selected availability zone resides. This is always the region selected on the provider, since this data source searches only within that region.
- state String
- zone
Id String - zone
Type String Type of zone. Values are
availability-zone
,local-zone
, andwavelength-zone
.- all
Availability BooleanZones - filters List<Property Map>
Supporting Types
GetAvailabilityZoneFilter
- Name string
Name of the filter field. Valid values can be found in the EC2 DescribeAvailabilityZones API Reference.
- Values List<string>
Set of values that are accepted for the given filter field. Results will be selected if any given value matches.
- Name string
Name of the filter field. Valid values can be found in the EC2 DescribeAvailabilityZones API Reference.
- Values []string
Set of values that are accepted for the given filter field. Results will be selected if any given value matches.
- name String
Name of the filter field. Valid values can be found in the EC2 DescribeAvailabilityZones API Reference.
- values List<String>
Set of values that are accepted for the given filter field. Results will be selected if any given value matches.
- name string
Name of the filter field. Valid values can be found in the EC2 DescribeAvailabilityZones API Reference.
- values string[]
Set of values that are accepted for the given filter field. Results will be selected if any given value matches.
- name str
Name of the filter field. Valid values can be found in the EC2 DescribeAvailabilityZones API Reference.
- values Sequence[str]
Set of values that are accepted for the given filter field. Results will be selected if any given value matches.
- name String
Name of the filter field. Valid values can be found in the EC2 DescribeAvailabilityZones API Reference.
- values List<String>
Set of values that are accepted for the given filter field. Results will be selected if any given value matches.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
aws
Terraform Provider.
Try AWS Native preview for resources not in the classic version.