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

DescribeRegions

Description

Describes one or more regions that are currently available to you.

For a list of the regions supported by Amazon EC2, see Regions and Endpoints.

Request Parameters

RegionName.n

One or more region names.

Type: String

Default: Describes all regions available to the account.

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

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.

endpoint

The endpoint of the region (for example, ec2.us-east-1.amazonaws.com).

Type: String

region-name

The name of the region.

Type: String

Response Elements

The following elements are returned in a DescribeRegionsResponse element.

requestId

The ID of the request.

Type: xsd:string

regionInfo

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

Type: RegionItemType

Examples

Example Request

This example displays information about all regions.

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

Example Request

This example displays information about just the specified regions.

https://ec2.amazonaws.com/?Action=DescribeRegions
&RegionName.1=us-east-1
&RegionName.2=eu-west-1
&AUTHPARAMS

Example Response

<DescribeRegionsResponse xmlns="http://ec2.amazonaws.com/doc/2013-02-01/">
   <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId> 
   <regionInfo>
      <item>
         <regionName>us-east-1</regionName>
         <regionEndpoint>ec2.us-east-1.amazonaws.com</regionEndpoint>
      </item>
      <item>
         <regionName>eu-west-1</regionName>
         <regionEndpoint>ec2.eu-west-1.amazonaws.com</regionEndpoint>
      </item>
   </regionInfo>
</DescribeRegionsResponse>

Example Request

This example displays information about all regions that have the string ap in the endpoint.

https://ec2.amazonaws.com/?Action=DescribeRegions
&Filter.1.Name=endpoint
&Filter.1.Value.1=*ap*
&AUTHPARAMS

Example Response

<DescribeRegionsResponse xmlns="http://ec2.amazonaws.com/doc/2013-02-01/">
   <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId> 
   <regionInfo>
      <item>
         <regionName>ap-southeast-1</regionName>
         <regionEndpoint>ec2.ap-southeast-1.amazonaws.com</regionEndpoint>
      </item>
   </regionInfo>
</DescribeRegionsResponse>