DescribeAccountAttributes
Describes attributes of your Amazon Web Services 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, ornone
. -
max-instances
: This attribute is no longer supported. The returned value does not reflect your actual vCPU limit for running On-Demand Instances. For more information, see On-Demand Instance Limits in the Amazon Elastic Compute Cloud User Guide. -
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.
We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon EC2 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.
- AttributeName.N
-
The 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 isUnauthorizedOperation
.Type: Boolean
Required: No
Response Elements
The following elements are returned by the service.
- accountAttributeSet
-
Information about the 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 error codes.
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>
See Also
For more information about using this API in one of the language-specific Amazon SDKs, see the following: