Amazon Elastic Compute Cloud
API Reference (API Version 2011-12-15)
Print this pageEmail this pageGo to the ForumsView the PDFShare this page on TwitterShare this page on FacebookBookmark this page on DeliciousSubmit this page to RedditSubmit this page to DiggDid this page help you?  Yes  No   Tell us about it...

DescribeAvailabilityZones

Description

Displays Availability Zones that are currently available to the account. The results include zones only for the Region you're currently using.

[Note]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.

You can filter the results to return information only about zones that match criteria you specify. For example, you could filter the results to return only the zones whose state is available. You can specify multiple filters (e.g., the zone is in a particular Region, and the state is available). The result includes information for a particular zone only if it matches all your filters. If there's no match, no special message is returned; the response is simply empty.

You can use wildcards with the filter values: * matches zero or more characters, and ? 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 table shows the available filters.

Filter Name Description

message

Message giving information about the Availability Zone.

Type: String

region-name

Region the Availablity Zone is in (e.g., us-east-1).

Type: String

state

State of the Availability Zone

Type: String

Valid Values: available

zone-name

Name of the zone.

Type: String

Request Parameters

NameDescriptionRequired

ZoneName.n

One or more Availability Zones.

Type: String

Default: None

No

Filter.n.Name

Name of a filter. See the preceding table for a list of allowed filter names.

Type: String

Default: None

No

Filter.n.Value.m

A value for the filter. See the preceding table for a list of allowed values for each filter.

Type: String

Default: None

No

Response Elements

The elements in the following table are wrapped in a DescribeAvailabilityZonesResponse structure.

NameDescription

requestId

The ID of the request.

Type: xsd:string

availabilityZoneInfo

A list of Availability Zones. Each zone's information is 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/2011-12-15/">
   <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>