Amazon Elastic Compute Cloud
API Reference (API Version 2013-02-01)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Did this page help you?  Yes | No |  Tell us about it...

DescribeAvailabilityZones

Description

Describes one or more of the Availability Zones that are currently available to the account. The results include zones only for the region you're currently using.

Note

Availability Zones are not the same across accounts. The Availability Zone us-east-1a for account A is not necessarily the same as us-east-1a for account B. Zone assignments are mapped independently for each account.

Request Parameters

ZoneName.n

One or more Availability Zones.

Type: String

Default: None

Required: No

Filter.n.Name

The name of a filter. See the Supported Filters section for a list of supported filter names.

Type: String

Default: None

Required: No

Filter.n.Value.m

A value for the filter. See the Supported Filters section for a list of supported values for each filter.

Type: String

Default: None

Required: No

Supported Filters

You can specify filters so that the response includes information for only certain Availability Zones. For example, you can use a filter to specify that you're interested in Availability Zones in the available state. You can specify multiple values for a filter. The response includes information for an Availability Zone only if it matches at least one of the filter values that you specified.

You can specify multiple filters; for example, specify Availability Zones that are in a particular region and are in the available state. The response includes information for an Availability Zone only if it matches all the filters that you specified. If there's no match, no special message is returned, the response is simply empty.

You can use wildcards in a filter value. An asterisk (*) matches zero or more characters, and a question mark (?) matches exactly one character. You can escape special characters using a backslash (\) before the character. For example, a value of \*amazon\?\\ searches for the literal string *amazon?\.

The following are the available filters.

message

Information about the Availability Zone.

Type: String

region-name

The region for the Availability Zone (for example, us-east-1).

Type: String

state

The state of the Availability Zone

Type: String

Valid values: available

zone-name

The name of the zone.

Type: String

Response Elements

The following elements are returned in a DescribeAvailabilityZonesResponse element.

requestId

The ID of the request.

Type: xsd:string

availabilityZoneInfo

A list of Availability Zones, each one wrapped in an item element.

Type: AvailabilityZoneItemType

Examples

Example Request

This example displays information about Availability Zones that are available to the account. The results includes zones only in the region (endpoint) you're currently using.

https://ec2.amazonaws.com/?Action=DescribeAvailabilityZones
&AUTHPARAMS

Example Response

<DescribeAvailabilityZonesResponse xmlns="http://ec2.amazonaws.com/doc/2013-02-01/">
   <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId> 
   <availabilityZoneInfo>
   <item>
      <zoneName>us-east-1a</zoneName>
      <zoneState>available</zoneState>
      <regionName>us-east-1</regionName>
      <messageSet/>
   </item>
   <item>
      <zoneName>us-east-1b</zoneName>
      <zoneState>available</zoneState>
      <regionName>us-east-1</regionName>
      <messageSet/>
   </item>
   <item>
      <zoneName>us-east-1c</zoneName>
      <zoneState>available</zoneState>
      <regionName>us-east-1</regionName>
      <messageSet/>
   </item>
   <item>
      <zoneName>us-east-1d</zoneName>
      <zoneState>available</zoneState>
      <regionName>us-east-1</regionName>
      <messageSet/>
   </item>
   </availabilityZoneInfo>
</DescribeAvailabilityZonesResponse>