Menu
Amazon Elastic Compute Cloud
API Reference (API Version 2016-11-15)

DescribeAvailabilityZones

Describes one or more of the Availability Zones that are available to you. The results include zones only for the region you're currently using. If there is an event impacting an Availability Zone, you can use this request to view the state and any provided message for that Availability Zone.

For more information, see Regions and Availability Zones in the Amazon Elastic Compute Cloud User Guide.

Request Parameters

The following parameters are for this specific action. For more information about required and optional parameters that are common to all actions, see Common Query Parameters.

DryRun

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.

Type: Boolean

Required: No

Filter.N

One or more filters.

  • message - Information about the Availability Zone.

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

  • state - The state of the Availability Zone (available | information | impaired | unavailable).

  • zone-name - The name of the Availability Zone (for example, us-east-1a).

Type: Array of Filter objects

Required: No

ZoneName.N

The names of one or more Availability Zones.

Type: Array of strings

Required: No

Response Elements

The following elements are returned by the service.

availabilityZoneInfo

Information about one or more Availability Zones.

Type: Array of AvailabilityZone objects

requestId

The ID of the request.

Type: String

Errors

For information about the errors that are common to all actions, see Common Client Errors.

Example

Example

This example request describes the Availability Zones that are available to you. The response includes Availability Zones only for the current region.

Sample Request

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

Sample Response

<DescribeAvailabilityZonesResponse xmlns="http://ec2.amazonaws.com/doc/2016-11-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>

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: