Skip to content

list_reports async

list_reports(
    *,
    config_overrides: Optional[AsyncArtifactClientConfig] = None,
    max_results: Optional[MaxResultsAttribute] = None,
    next_token: Optional[NextTokenAttribute] = None,
) -> ListReportsResponse

List available reports.

Parameters:

Raises:

Examples:

Invoke ListReports operation The ListReports operation returns a collection of report resources.

>>> await client.list_reports()
Source code in docs_src/capo_artifact/_services/async_artifact.py
async def list_reports(
    self,
    *,
    config_overrides: Optional[AsyncArtifactClientConfig] = None,
    max_results: Optional[
        "capo_artifact.types.max_results_attribute.MaxResultsAttribute"
    ] = None,
    next_token: Optional[
        "capo_artifact.types.next_token_attribute.NextTokenAttribute"
    ] = None,
) -> "capo_artifact.types.list_reports_response.ListReportsResponse":
    """<p>List available reports.</p>

    Args:
        max_results: <p>Maximum number of resources to return in the paginated response.</p>
        next_token: <p>Pagination token to request the next page of resources.</p>

    Raises:
        capo_artifact.errors.access_denied_exception.AccessDeniedException: <p>User does not have sufficient access to perform this action.</p>
        capo_artifact.errors.internal_server_exception.InternalServerException: <p>An unknown server exception has occurred.</p>
        capo_artifact.errors.resource_not_found_exception.ResourceNotFoundException: <p>Request references a resource which does not exist.</p>
        capo_artifact.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>Request would cause a service quota to be exceeded.</p>
        capo_artifact.errors.throttling_exception.ThrottlingException: <p>Request was denied due to request throttling.</p>
        capo_artifact.errors.validation_exception.ValidationException: <p>Request fails to satisfy the constraints specified by an AWS service.</p>
        capo_artifact.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        Invoke ListReports operation
        The ListReports operation returns a collection of report resources.

        >>> await client.list_reports()
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_artifact.types.list_reports_request.ListReportsRequest]",
    ) -> AsyncOperationResponse[
        "capo_artifact.types.list_reports_response.ListReportsResponse"
    ]:
        import capo_artifact._operations.artifact.list_reports

        (
            output,
            http_response,
        ) = await capo_artifact._operations.artifact.list_reports.async_list_reports(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListReports")
    )
    input_: capo_artifact.types.list_reports_request.ListReportsRequest = {}
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

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