Skip to content

describe_code_coverages

describe_code_coverages(
    report_arn: NonEmptyString,
    *,
    config_overrides: Optional[CodeBuildClientConfig] = None,
    next_token: Optional[String] = None,
    max_results: Optional[PageSize] = None,
    sort_order: Optional[SortOrderType] = None,
    sort_by: Optional[ReportCodeCoverageSortByType] = None,
    min_line_coverage_percentage: Optional[Percentage] = None,
    max_line_coverage_percentage: Optional[Percentage] = None,
) -> DescribeCodeCoveragesOutput

Retrieves one or more code coverage reports.

Parameters:

  • report_arn (NonEmptyString) –

    The ARN of the report for which test cases are returned.

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

    The nextToken value returned from a previous call to DescribeCodeCoverages. This specifies the next item to return. To return the beginning of the list, exclude this parameter.

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

    The maximum number of results to return.

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

    Specifies if the results are sorted in ascending or descending order.

  • sort_by (Optional[ReportCodeCoverageSortByType], default: None ) –

    Specifies how the results are sorted. Possible values are:

    FILE_PATH

    The results are sorted by file path.

    LINE_COVERAGE_PERCENTAGE

    The results are sorted by the percentage of lines that are covered.

  • min_line_coverage_percentage (Optional[Percentage], default: None ) –

    The minimum line coverage percentage to report.

  • max_line_coverage_percentage (Optional[Percentage], default: None ) –

    The maximum line coverage percentage to report.

Raises:

Source code in docs_src/capo_codebuild/_services/code_build.py
def describe_code_coverages(
    self,
    report_arn: "capo_codebuild.types.non_empty_string.NonEmptyString",
    *,
    config_overrides: Optional[CodeBuildClientConfig] = None,
    next_token: Optional["capo_codebuild.types.string.String"] = None,
    max_results: Optional["capo_codebuild.types.page_size.PageSize"] = None,
    sort_order: Optional[
        "capo_codebuild.types.sort_order_type.SortOrderType"
    ] = None,
    sort_by: Optional[
        "capo_codebuild.types.report_code_coverage_sort_by_type.ReportCodeCoverageSortByType"
    ] = None,
    min_line_coverage_percentage: Optional[
        "capo_codebuild.types.percentage.Percentage"
    ] = None,
    max_line_coverage_percentage: Optional[
        "capo_codebuild.types.percentage.Percentage"
    ] = None,
) -> "capo_codebuild.types.describe_code_coverages_output.DescribeCodeCoveragesOutput":
    """<p>Retrieves one or more code coverage reports.</p>

    Args:
        report_arn: <p> The ARN of the report for which test cases are returned. </p>
        next_token: <p>The <code>nextToken</code> value returned from a previous call to <code>DescribeCodeCoverages</code>. This specifies the next item to return. To return the beginning of the list, exclude this parameter.</p>
        max_results: <p>The maximum number of results to return.</p>
        sort_order: <p>Specifies if the results are sorted in ascending or descending order.</p>
        sort_by: <p>Specifies how the results are sorted. Possible values are:</p> <dl> <dt>FILE_PATH</dt> <dd> <p>The results are sorted by file path.</p> </dd> <dt>LINE_COVERAGE_PERCENTAGE</dt> <dd> <p>The results are sorted by the percentage of lines that are covered.</p> </dd> </dl>
        min_line_coverage_percentage: <p>The minimum line coverage percentage to report.</p>
        max_line_coverage_percentage: <p>The maximum line coverage percentage to report.</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.describe_code_coverages_input.DescribeCodeCoveragesInput]",
    ) -> OperationResponse[
        "capo_codebuild.types.describe_code_coverages_output.DescribeCodeCoveragesOutput"
    ]:
        import capo_codebuild._operations.code_build_20161006.describe_code_coverages

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeCodeCoverages")
    )
    input_: capo_codebuild.types.describe_code_coverages_input.DescribeCodeCoveragesInput = {
        "report_arn": report_arn
    }
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results
    if sort_order is not None:
        input_["sort_order"] = sort_order
    if sort_by is not None:
        input_["sort_by"] = sort_by
    if min_line_coverage_percentage is not None:
        input_["min_line_coverage_percentage"] = min_line_coverage_percentage
    if max_line_coverage_percentage is not None:
        input_["max_line_coverage_percentage"] = max_line_coverage_percentage

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