Skip to content

get_account_summary async

get_account_summary(
    *, config_overrides: Optional[AsyncIAMClientConfig] = None
) -> GetAccountSummaryResponse

Retrieves information about IAM entity usage and IAM quotas in the Amazon Web Services account.

For information about IAM quotas, see IAM and STS quotas in the IAM User Guide.

Raises:

Examples:

To get information about IAM entity quotas and usage in the current account The following command returns information about the IAM entity quotas and usage in the current AWS account.

>>> await client.get_account_summary()
Source code in docs_src/capo_iam/_services/async_iam.py
async def get_account_summary(
    self, *, config_overrides: Optional[AsyncIAMClientConfig] = None
) -> "capo_iam.types.get_account_summary_response.GetAccountSummaryResponse":
    """<p>Retrieves information about IAM entity usage and IAM quotas in the Amazon Web Services account.</p> <p> For information about IAM quotas, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html">IAM and STS quotas</a> in the <i>IAM User Guide</i>.</p>

    Raises:
        capo_iam.errors.service_failure_exception.ServiceFailureException: <p>The request processing has failed because of an unknown error, exception or failure.</p>
        capo_iam.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        To get information about IAM entity quotas and usage in the current account
        The following command returns information about the IAM entity quotas and usage in the current AWS account.

        >>> await client.get_account_summary()
    """

    async def _handler(
        req: "AsyncOperationRequest[None]",
    ) -> AsyncOperationResponse[
        "capo_iam.types.get_account_summary_response.GetAccountSummaryResponse"
    ]:
        import capo_iam._operations.aws_identity_management_v20100508.get_account_summary

        (
            output,
            http_response,
        ) = await capo_iam._operations.aws_identity_management_v20100508.get_account_summary.async_get_account_summary(
            req.options
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetAccountSummary")
    )

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=None, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output