Skip to content

list_reports

list_reports(
    *,
    config_overrides: Optional[CodeBuildClientConfig] = None,
    sort_order: Optional[SortOrderType] = None,
    next_token: Optional[String] = None,
    max_results: Optional[PageSize] = None,
    filter: Optional[ReportFilter] = None,
) -> ListReportsOutput

Returns a list of ARNs for the reports in the current Amazon Web Services account.

Parameters:

  • sort_order (Optional[SortOrderType], default: None ) –

    Specifies the sort order for the list of returned reports. Valid values are:

    • ASCENDING: return reports in chronological order based on their creation date.

    • DESCENDING: return reports in the reverse chronological order based on their creation date.

  • next_token (Optional[String], default: None ) –

    During a previous call, the maximum number of items that can be returned is the value specified in maxResults. If there more items in the list, then a unique string called a nextToken is returned. To get the next batch of items in the list, call this operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation with each subsequent next token that is returned, until no more next tokens are returned.

  • max_results (Optional[PageSize], default: None ) –

    The maximum number of paginated reports returned per response. Use nextToken to iterate pages in the list of returned Report objects. The default value is 100.

  • filter (Optional[ReportFilter], default: None ) –

    A ReportFilter object used to filter the returned reports.

Raises:

Source code in docs_src/capo_codebuild/_services/code_build.py
def list_reports(
    self,
    *,
    config_overrides: Optional[CodeBuildClientConfig] = None,
    sort_order: Optional[
        "capo_codebuild.types.sort_order_type.SortOrderType"
    ] = None,
    next_token: Optional["capo_codebuild.types.string.String"] = None,
    max_results: Optional["capo_codebuild.types.page_size.PageSize"] = None,
    filter: Optional["capo_codebuild.types.report_filter.ReportFilter"] = None,
) -> "capo_codebuild.types.list_reports_output.ListReportsOutput":
    """<p> Returns a list of ARNs for the reports in the current Amazon Web Services account. </p>

    Args:
        sort_order: <p> Specifies the sort order for the list of returned reports. Valid values are: </p> <ul> <li> <p> <code>ASCENDING</code>: return reports in chronological order based on their creation date. </p> </li> <li> <p> <code>DESCENDING</code>: return reports in the reverse chronological order based on their creation date. </p> </li> </ul>
        next_token: <p> During a previous call, the maximum number of items that can be returned is the value specified in <code>maxResults</code>. If there more items in the list, then a unique string called a <i>nextToken</i> is returned. To get the next batch of items in the list, call this operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation with each subsequent next token that is returned, until no more next tokens are returned. </p>
        max_results: <p> The maximum number of paginated reports returned per response. Use <code>nextToken</code> to iterate pages in the list of returned <code>Report</code> objects. The default value is 100. </p>
        filter: <p> A <code>ReportFilter</code> object used to filter the returned reports. </p>

    Raises:
        capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
        capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_codebuild.types.list_reports_input.ListReportsInput]",
    ) -> OperationResponse[
        "capo_codebuild.types.list_reports_output.ListReportsOutput"
    ]:
        import capo_codebuild._operations.code_build_20161006.list_reports

        output, http_response = (
            capo_codebuild._operations.code_build_20161006.list_reports.list_reports(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListReports")
    )
    input_: capo_codebuild.types.list_reports_input.ListReportsInput = {}
    if sort_order is not None:
        input_["sort_order"] = sort_order
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results
    if filter is not None:
        input_["filter"] = filter

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output