Availability_Zones_and_Regions_Operations for the Amazon EC2 REST adapter

This topic illustrates the adapter request and response for the Availability Zones and Regions operations.

Describe Availability Zones operation

The Describe Availability Zones operation displays the Availability Zones that are currently available to the account and their states. If you do not specify a value for the <availability-zone-set> element, this operation queries and returns all the available zones. 

The following figure shows a sample <items> XML element for the Describe Availability Zones operation:

Sample <items> XML element for the Describe Availability Zones operation
<items>
    <item>
        <parameters>
            <availability-zone-set>
                <!--Zero or more repetitions:-->
                <item>
                    <zone-name></zone-name>
                </item>
            </availability-zone-set>
        </parameters>
    </item>
</items>

The following table describes the elements for this adapter request:

Adapter request elements for the Describe Availability Zones operation 

Element

Definition

Required

<operation-name>

Contains the name of the operation: describe-availability-zones

Yes

<access-key>

Specifies the Amazon Web Services (AWS) access key

You need to generate the AWS access key by going to the Security Credentials tab in the AWS console.

Conditional;

  • You must specify the Access Key and theSecret Key together in the configuration or the adapter request.
  • If you specify both the keys in the adapter request and in the adapter configuration, the key values in the request override the values in the configuration.
  • If only the Access Key is specified, the adapter ignores the value.
<secret-key>

Specifies the AWS secret access key

You need to generate the AWS secret access key by going to the Security Credentials tab in the AWS console.

Conditional;

  • You must specify the Access Key and theSecret Key together in the configuration or the adapter request.
  • If you specify both the keys in the adapter request and in the adapter configuration, the key values in the request override the values in the configuration.
  • If only the Secret Access Key is specified, the adapter ignores the value.
<region>

Specifies the region with which you want the adapter to communicate

Amazon EC2 is hosted in multiple locations world-wide. You must specify the region in which you want the adapter to perform the actions.

Valid values:

  • us-east-1
  • us-west-2 (default)
  • us-west-1
  • eu-west-1
  • ap-southeast-1
  • ap-northeast-1
  • ap-southeast-2
  • sa-east-1
No

<availability-zone-set>

Specifies the set of zones to query

No

<zone-name>

Specifies the name of the zone to query

No

The following figure shows a sample adapter request for the Describe Availability Zones operation:

 Sample adapter request for the Describe Availability Zones operation

<amazon-ec2-rest-request>
    <operation-name>describe-availability-zones</operation-name>
    <access-key>AKIA************BT2Q</access-key>
    <secret-key>WQisk8Irh********************8AiJx3VQVd</secret-key>
    <region>us-east-1</region>
    <parameters>
        <availability-zone-set>
            <!-Zero or more repetitions:->
            <item>
                <zone-name>us-east-1a</zone-name>
            </item>
            <item>
                <zone-name>us-east-1b</zone-name>
            </item>
        </availability-zone-set>
    </parameters>
</amazon-ec2-rest-request>


The following figure shows a sample adapter response for the Describe Availability Zones operation:

Sample adapter response for the Describe Availability Zones operation

<amazon-ec2-rest-response>
    <metadata>
        <status>success</status>
    </metadata>
    <DescribeAvailabilityZonesResponse>
        <availabilityZonesInfo>
            <item>
                <availabilityZoneName>us-east-1a</availabilityZoneName>
                <regionName>us-east-1</regionName>
                <state>available</state>
                <azMessages />
            </item>
            <item>
                <availabilityZoneName>us-east-1b</availabilityZoneName>
                <regionName>us-east-1</regionName>
                <state>available</state>
                <azMessages />
            </item>
        </availabilityZonesInfo>
    </DescribeAvailabilityZonesResponse>
</amazon-ec2-rest-response>

Describe Regions operation

The Describe Regions operation describes regions that are currently available to the account. If you do not specify an item in region-set, all the available regions are queried and returned. 

The following figure shows a sample <items> XML element for the Describe Regions operation:

Sample <items> XML element for the Describe Regions operation 

<items>
    <item>
        <parameters>
            <region-set>
                <!--Zero or more repetitions:-->
                <item>
                    <region-name></region-name>
                </item>
            </region-set>
        </parameters>
    </item>
</items>

The following table describes the elements for this adapter request:

Adapter request elements for the Describe Regions operation 

Element

Definition

Required

<operation-name>Contains the name of the operation: describe-regions Yes
<access-key>

Specifies the Amazon Web Services (AWS) access key

You need to generate the AWS access key by going to the Security Credentials tab in the AWS console.

Conditional;

  • You must specify the Access Key and theSecret Key together in the configuration or the adapter request.
  • If you specify both the keys in the adapter request and in the adapter configuration, the key values in the request override the values in the configuration.
  • If only the Access Key is specified, the adapter ignores the value.
<secret-key>

Specifies the AWS secret access key

You need to generate the AWS secret access key by going to the Security Credentials tab in the AWS console.

Conditional;

  • You must specify the Access Key and theSecret Key together in the configuration or the adapter request.
  • If you specify both the keys in the adapter request and in the adapter configuration, the key values in the request override the values in the configuration.
  • If only the Secret Access Key is specified, the adapter ignores the value.
<region>

Specifies the region with which you want the adapter to communicate

Amazon EC2 is hosted in multiple locations world-wide. You must specify the region in which you want the adapter to perform the actions.

Valid values:

  • us-east-1
  • us-west-2 (default)
  • us-west-1
  • eu-west-1
  • ap-southeast-1
  • ap-northeast-1
  • ap-southeast-2
  • sa-east-1
No
<region-set>

Specifies the set of regions to query

No

The following figure shows a sample adapter request for the Describe Regions operation:

Sample adapter request for the Describe Regions operation

<amazon-ec2-rest-request>
    <operation-name>describe-regions</operation-name>
    <access-key>AKIA************BT2Q</access-key>
    <secret-key>WQisk8Irh********************8AiJx3VQVd</secret-key>   
    <parameters>
        <region-set>
            <!-Zero or more repetitions:->
            <item>
                <region-name>us-east-1</region-name>
            </item>
            <item>
                <region-name>us-west-1</region-name>
            </item>
        </region-set>
    </parameters>
</amazon-ec2-rest-request>


The following figure shows a sample adapter response for the Describe Regions operation:

Sample adapter response for the Describe Regions operation

<amazon-ec2-rest-response>
    <metadata>
        <status>success</status>
    </metadata>
    <DescribeRegionsResponse>
    <RegionsInfo>
      <item>
        <regionName>us-east-1</regionName>
        <Endpoint>us-east-1</Endpoint>
      </item>
      <item>
        <regionName>us-west-1</regionName>
        <Endpoint>us-west-1</Endpoint>
      </item>
    </RegionsInfo>
  </DescribeRegionsResponse>
</amazon-ec2-rest-response>
Was this page helpful? Yes No Submitting... Thank you

Comments