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

DescribeAccountAttributes

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

  • default-vpc: The ID of the default VPC for your account, or none.

  • max-instances: The maximum number of On-Demand instances that you can run.

  • vpc-max-security-groups-per-interface: The maximum number of security groups that you can assign to a network interface.

  • max-elastic-ips: The maximum number of Elastic IP addresses that you can allocate for use with EC2-Classic.

  • vpc-max-elastic-ips: The maximum number of Elastic IP addresses that you can allocate for use with EC2-VPC.

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.

AttributeName.N

One or more account attribute names.

Type: array of Strings

Valid Values: supported-platforms | default-vpc

Required: No

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

Response Elements

The following elements are returned by the service.

accountAttributeSet

Information about one or more account attributes.

Type: array of AccountAttribute 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.

Examples

Example

This example describes your account attributes. The response is for an account that supports EC2-Classic and EC2-VPC.

Sample Request

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

Sample Response

<DescribeAccountAttributesResponse xmlns="http://ec2.amazonaws.com/doc/2016-11-15/">
  <requestId>7a62c49f-347e-4fc4-9331-6e8eEXAMPLE</requestId>
  <accountAttributeSet>
        <item>
            <attributeName>vpc-max-security-groups-per-interface</attributeName>
            <attributeValueSet>
                <item>
                    <attributeValue>5</attributeValue>
                </item>
            </attributeValueSet>
        </item>
        <item>
            <attributeName>max-instances</attributeName>
            <attributeValueSet>
                <item>
                    <attributeValue>20</attributeValue>
                </item>
            </attributeValueSet>
        </item>
        <item>
            <attributeName>supported-platforms</attributeName>
            <attributeValueSet>
                <item>
                    <attributeValue>EC2</attributeValue>
                </item>
                <item>
                    <attributeValue>VPC</attributeValue>
                </item>
            </attributeValueSet>
        </item>
        <item>
            <attributeName>default-vpc</attributeName>
            <attributeValueSet>
                <item>
                    <attributeValue>none</attributeValue>
                </item>
            </attributeValueSet>
        </item>
        <item>
            <attributeName>max-elastic-ips</attributeName>
            <attributeValueSet>
                <item>
                    <attributeValue>5</attributeValue>
                </item>
            </attributeValueSet>
        </item>
        <item>
            <attributeName>vpc-max-elastic-ips</attributeName>
            <attributeValueSet>
                <item>
                    <attributeValue>5</attributeValue>
                </item>
            </attributeValueSet>
        </item>
    </accountAttributeSet>
</DescribeAccountAttributesResponse>

Example 2

This example describes the ID of your default VPC. The first response is for an account that supports only EC2-VPC. The second response if for an account that supports both EC2-Classic and EC2-VPC.

Sample Request

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

Sample Response

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