Amazon Elastic Compute Cloud
API Reference (API Version 2014-09-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...

DescribeAccountAttributes

Description

Describes the specified attribute of your AWS account.

The following are the supported account attributes.

supported-platforms

Indicates whether your account can launch instances into EC2-Classic and EC2-VPC, or only into EC2-VPC. For more information, see Supported Platforms.

default-vpc

The ID of the default VPC for your account, or none. For more information, see Your Default VPC and Subnets.

Request Parameters

For information about the common parameters that all actions use, see Common Query Parameters.

AttributeName.n

One or more account attribute names.

Type: String

Valid values: supported-platforms | default-vpc

Response Elements

The following elements are returned in a DescribeAccountAttributesResponse structure.

requestId

The ID of the request.

Type: xsd:string

accountAttributeSet

A list of the names and values of the requested attributes, each one wrapped in an item element.

Type: AccountAttributeSetItemType

Errors

The following are some of the client API errors you might encounter when using this request. For more information about common API errors, see Common Causes of Client Errors. For a summary of API error codes, see Client Error Codes.

Examples

Example Request

This example describes the platforms that are supported by your AWS account.

https://ec2.amazonaws.com/?Action=DescribeAccountAttributes
&AttributeName.1=supported-platforms
&AUTHPARAMS

Example Response 1

The following is an example response for an account that must launch instances into a VPC, such as the default VPC.

<DescribeAccountAttributesResponse xmlns="http://ec2.amazonaws.com/doc/2014-09-01/">
  <requestId>7a62c49f-347e-4fc4-9331-6e8eEXAMPLE</requestId>
  <accountAttributeSet>
    <item>
      <attributeName>supported-platforms</attributeName>
      <attributeValueSet>
        <item>
          <attributeValue>VPC</attributeValue>
        </item>
      </attributeValueSet>
    </item>
  </accountAttributeSet>
</DescribeAccountAttributesResponse>

Example Response 2

The following is an example response for an account that can launch instances into EC2-Classic or into a VPC.

<DescribeAccountAttributesResponse xmlns="http://ec2.amazonaws.com/doc/2014-09-01/">
  <requestId>7a62c49f-347e-4fc4-9331-6e8eEXAMPLE</requestId>
  <accountAttributeSet>
    <item>
      <attributeName>supported-platforms</attributeName>
      <attributeValueSet>
        <item>
          <attributeValue>EC2</attributeValue>
        </item>
        <item>
          <attributeValue>VPC</attributeValue> 
        </item>
      </attributeValueSet>
    </item>
  </accountAttributeSet>
</DescribeAccountAttributesResponse>

Example Request

This example describes the ID of your default VPC.

https://ec2.amazonaws.com/?Action=DescribeAccountAttributes
&AttributeName.1=default-vpc
&AUTHPARAMS

Example Response 1

The following is an example response for an account with a default VPC.

<DescribeAccountAttributesResponse xmlns="http://ec2.amazonaws.com/doc/2014-09-01/">
  <requestId>7a62c49f-347e-4fc4-9331-6e8eEXAMPLE</requestId>
  <accountAttributeSet>
    <item>
      <attributeName>default-vpc</attributeName>
      <attributeValueSet>
        <item>
          <attributeValue>vpc-xxxxxxxx</attributeValue>
        </item>
      </attributeValueSet>
    </item>
  </accountAttributeSet>
</DescribeAccountAttributesResponse>

Example Response 2

The following is an example response for an account without a default VPC.

<DescribeAccountAttributesResponse xmlns="http://ec2.amazonaws.com/doc/2014-09-01/">
  <requestId>7a62c49f-347e-4fc4-9331-6e8eEXAMPLE</requestId>
  <accountAttributeSet>
    <item>
      <attributeName>default-vpc</attributeName>
      <attributeValueSet>
        <item>
          <attributeValue>none</attributeValue> 
        </item>
      </attributeValueSet>
    </item>
  </accountAttributeSet>
</DescribeAccountAttributesResponse>