Skip to content

generate_credential_report async

generate_credential_report(
    *, config_overrides: Optional[AsyncIAMClientConfig] = None
) -> GenerateCredentialReportResponse

Generates a credential report for the Amazon Web Services account. For more information about the credential report, see Getting credential reports in the IAM User Guide.

Raises:

  • LimitExceededException –

    The request was rejected because it attempted to create resources beyond the current Amazon Web Services account limits. The error message describes the limit exceeded.

  • ServiceFailureException –

    The request processing has failed because of an unknown error, exception or failure.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_iam/_services/async_iam.py
async def generate_credential_report(
    self, *, config_overrides: Optional[AsyncIAMClientConfig] = None
) -> "capo_iam.types.generate_credential_report_response.GenerateCredentialReportResponse":
    """<p> Generates a credential report for the Amazon Web Services account. For more information about the credential report, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/credential-reports.html">Getting credential reports</a> in the <i>IAM User Guide</i>.</p>

    Raises:
        capo_iam.errors.limit_exceeded_exception.LimitExceededException: <p>The request was rejected because it attempted to create resources beyond the current Amazon Web Services account limits. The error message describes the limit exceeded.</p>
        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.
    """

    async def _handler(
        req: "AsyncOperationRequest[None]",
    ) -> AsyncOperationResponse[
        "capo_iam.types.generate_credential_report_response.GenerateCredentialReportResponse"
    ]:
        import capo_iam._operations.aws_identity_management_v20100508.generate_credential_report

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

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

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