Describes attributes of your Amazon Web Services account. The following are the supported account attributes:
-
default-vpc: The ID of the default VPC for your account, or none.
-
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.
-
max-elastic-ips: The maximum number of Elastic IP addresses that you can allocate.
-
supported-platforms: This attribute is deprecated.
-
vpc-max-elastic-ips: The maximum number of Elastic IP addresses that you can allocate.
-
vpc-max-security-groups-per-interface: The maximum number of security groups that you can assign to a network interface.
The order of the elements in the response, including those within nested structures, might vary. Applications should not assume the elements appear in a particular order.
Parameters:
-
dry_run
(Optional[Boolean], default:
None
)
–
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.
-
attribute_names
(Optional[AccountAttributeNameStringList], default:
None
)
–
The account attribute names.
Raises:
Examples:
To describe a single attribute for your AWS account
This example describes the supported-platforms attribute for your AWS account.
>>> client.describe_account_attributes(attribute_names=['supported-platforms'])
To describe all attributes for your AWS account
This example describes the attributes for your AWS account.
>>> client.describe_account_attributes()
Source code in docs_src/capo_ec2/_services/ec2.py
| def describe_account_attributes(
self,
*,
config_overrides: Optional[EC2ClientConfig] = None,
dry_run: Optional["capo_ec2.types.boolean.Boolean"] = None,
attribute_names: Optional[
"capo_ec2.types.account_attribute_name_string_list.AccountAttributeNameStringList"
] = None,
) -> "capo_ec2.types.describe_account_attributes_result.DescribeAccountAttributesResult":
"""<p>Describes attributes of your Amazon Web Services account. The following are the supported account attributes:</p> <ul> <li> <p> <code>default-vpc</code>: The ID of the default VPC for your account, or <code>none</code>.</p> </li> <li> <p> <code>max-instances</code>: 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 <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-on-demand-instances.html#ec2-on-demand-instances-limits">On-Demand Instance Limits</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p> </li> <li> <p> <code>max-elastic-ips</code>: The maximum number of Elastic IP addresses that you can allocate.</p> </li> <li> <p> <code>supported-platforms</code>: This attribute is deprecated.</p> </li> <li> <p> <code>vpc-max-elastic-ips</code>: The maximum number of Elastic IP addresses that you can allocate.</p> </li> <li> <p> <code>vpc-max-security-groups-per-interface</code>: The maximum number of security groups that you can assign to a network interface.</p> </li> </ul> <note> <p>The order of the elements in the response, including those within nested structures, might vary. Applications should not assume the elements appear in a particular order.</p> </note>
Args:
dry_run: <p>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 <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
attribute_names: <p>The account attribute names.</p>
Raises:
capo_ec2.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
To describe a single attribute for your AWS account
This example describes the supported-platforms attribute for your AWS account.
>>> client.describe_account_attributes(attribute_names=['supported-platforms'])
To describe all attributes for your AWS account
This example describes the attributes for your AWS account.
>>> client.describe_account_attributes()
"""
def _handler(
req: "OperationRequest[capo_ec2.types.describe_account_attributes_request.DescribeAccountAttributesRequest]",
) -> OperationResponse[
"capo_ec2.types.describe_account_attributes_result.DescribeAccountAttributesResult"
]:
import capo_ec2._operations.amazon_ec2.describe_account_attributes
output, http_response = (
capo_ec2._operations.amazon_ec2.describe_account_attributes.describe_account_attributes(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DescribeAccountAttributes")
)
input_: capo_ec2.types.describe_account_attributes_request.DescribeAccountAttributesRequest = {}
if dry_run is not None:
input_["dry_run"] = dry_run
if attribute_names is not None:
input_["attribute_names"] = attribute_names
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|