1. Packages
  2. AWS Classic
  3. API Docs
  4. getAvailabilityZone

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.13.2 published on Thursday, Dec 7, 2023 by Pulumi

aws.getAvailabilityZone

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.13.2 published on Thursday, Dec 7, 2023 by Pulumi

    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:

    AllAvailabilityZones bool

    Set to true to include all Availability Zones and Local Zones regardless of your opt in status.

    Filters List<GetAvailabilityZoneFilter>

    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".

    ZoneId string

    Zone ID of the availability zone to select.

    AllAvailabilityZones bool

    Set to true to include all Availability Zones and Local Zones regardless of your opt in status.

    Filters []GetAvailabilityZoneFilter

    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".

    ZoneId string

    Zone ID of the availability zone to select.

    allAvailabilityZones Boolean

    Set to true to include all Availability Zones and Local Zones regardless of your opt in status.

    filters List<GetAvailabilityZoneFilter>

    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".

    zoneId String

    Zone ID of the availability zone to select.

    allAvailabilityZones boolean

    Set to true to include all Availability Zones and Local Zones regardless of your opt in status.

    filters GetAvailabilityZoneFilter[]

    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".

    zoneId string

    Zone ID of the availability zone to select.

    all_availability_zones bool

    Set to true to include all Availability Zones and Local Zones regardless of your opt in status.

    filters Sequence[GetAvailabilityZoneFilter]

    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.

    allAvailabilityZones Boolean

    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".

    zoneId String

    Zone ID of the availability zone to select.

    getAvailabilityZone Result

    The following output properties are available:

    GroupName 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
    NameSuffix 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 the us-west-2a zone. For Local and Wavelength Zones this is a longer string, for example wl1-sfo-wlz-1 for the us-west-2-wl1-sfo-wlz-1 zone.

    NetworkBorderGroup string

    The name of the location from which the address is advertised.

    OptInStatus string

    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 are opted-in and not-opted-in.

    ParentZoneId string

    ID of the zone that handles some of the Local Zone or Wavelength Zone control plane operations, such as API calls.

    ParentZoneName string

    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
    ZoneId string
    ZoneType string

    Type of zone. Values are availability-zone, local-zone, and wavelength-zone.

    AllAvailabilityZones bool
    Filters List<GetAvailabilityZoneFilter>
    GroupName 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
    NameSuffix 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 the us-west-2a zone. For Local and Wavelength Zones this is a longer string, for example wl1-sfo-wlz-1 for the us-west-2-wl1-sfo-wlz-1 zone.

    NetworkBorderGroup string

    The name of the location from which the address is advertised.

    OptInStatus string

    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 are opted-in and not-opted-in.

    ParentZoneId string

    ID of the zone that handles some of the Local Zone or Wavelength Zone control plane operations, such as API calls.

    ParentZoneName string

    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
    ZoneId string
    ZoneType string

    Type of zone. Values are availability-zone, local-zone, and wavelength-zone.

    AllAvailabilityZones bool
    Filters []GetAvailabilityZoneFilter
    groupName 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
    nameSuffix 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 the us-west-2a zone. For Local and Wavelength Zones this is a longer string, for example wl1-sfo-wlz-1 for the us-west-2-wl1-sfo-wlz-1 zone.

    networkBorderGroup String

    The name of the location from which the address is advertised.

    optInStatus String

    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 are opted-in and not-opted-in.

    parentZoneId String

    ID of the zone that handles some of the Local Zone or Wavelength Zone control plane operations, such as API calls.

    parentZoneName String

    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
    zoneId String
    zoneType String

    Type of zone. Values are availability-zone, local-zone, and wavelength-zone.

    allAvailabilityZones Boolean
    filters List<GetAvailabilityZoneFilter>
    groupName 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
    nameSuffix 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 the us-west-2a zone. For Local and Wavelength Zones this is a longer string, for example wl1-sfo-wlz-1 for the us-west-2-wl1-sfo-wlz-1 zone.

    networkBorderGroup string

    The name of the location from which the address is advertised.

    optInStatus string

    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 are opted-in and not-opted-in.

    parentZoneId string

    ID of the zone that handles some of the Local Zone or Wavelength Zone control plane operations, such as API calls.

    parentZoneName string

    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
    zoneId string
    zoneType string

    Type of zone. Values are availability-zone, local-zone, and wavelength-zone.

    allAvailabilityZones boolean
    filters GetAvailabilityZoneFilter[]
    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 the us-west-2a zone. For Local and Wavelength Zones this is a longer string, for example wl1-sfo-wlz-1 for the us-west-2-wl1-sfo-wlz-1 zone.

    network_border_group str

    The name of the location from which the address is advertised.

    opt_in_status str

    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 are opted-in and not-opted-in.

    parent_zone_id str

    ID of the zone that handles some of the Local Zone or Wavelength Zone control plane operations, such as API calls.

    parent_zone_name str

    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, and wavelength-zone.

    all_availability_zones bool
    filters Sequence[GetAvailabilityZoneFilter]
    groupName 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
    nameSuffix 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 the us-west-2a zone. For Local and Wavelength Zones this is a longer string, for example wl1-sfo-wlz-1 for the us-west-2-wl1-sfo-wlz-1 zone.

    networkBorderGroup String

    The name of the location from which the address is advertised.

    optInStatus String

    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 are opted-in and not-opted-in.

    parentZoneId String

    ID of the zone that handles some of the Local Zone or Wavelength Zone control plane operations, such as API calls.

    parentZoneName String

    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
    zoneId String
    zoneType String

    Type of zone. Values are availability-zone, local-zone, and wavelength-zone.

    allAvailabilityZones Boolean
    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.

    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.13.2 published on Thursday, Dec 7, 2023 by Pulumi