Skip to content

list_build_batches_for_project

list_build_batches_for_project(
    *,
    config_overrides: Optional[CodeBuildClientConfig] = None,
    project_name: Optional[NonEmptyString] = None,
    filter: Optional[BuildBatchFilter] = None,
    max_results: Optional[PageSize] = None,
    sort_order: Optional[SortOrderType] = None,
    next_token: Optional[String] = None,
) -> ListBuildBatchesForProjectOutput

Retrieves the identifiers of the build batches for a specific project.

Parameters:

  • project_name (Optional[NonEmptyString], default: None ) –

    The name of the project.

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

    A BuildBatchFilter object that specifies the filters for the search.

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

    The maximum number of results to return.

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

    Specifies the sort order of the returned items. Valid values include:

    • ASCENDING: List the batch build identifiers in ascending order by identifier.

    • DESCENDING: List the batch build identifiers in descending order by identifier.

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

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

Raises:

Source code in docs_src/capo_codebuild/_services/code_build.py
def list_build_batches_for_project(
    self,
    *,
    config_overrides: Optional[CodeBuildClientConfig] = None,
    project_name: Optional[
        "capo_codebuild.types.non_empty_string.NonEmptyString"
    ] = None,
    filter: Optional[
        "capo_codebuild.types.build_batch_filter.BuildBatchFilter"
    ] = None,
    max_results: Optional["capo_codebuild.types.page_size.PageSize"] = None,
    sort_order: Optional[
        "capo_codebuild.types.sort_order_type.SortOrderType"
    ] = None,
    next_token: Optional["capo_codebuild.types.string.String"] = None,
) -> "capo_codebuild.types.list_build_batches_for_project_output.ListBuildBatchesForProjectOutput":
    """<p>Retrieves the identifiers of the build batches for a specific project.</p>

    Args:
        project_name: <p>The name of the project.</p>
        filter: <p>A <code>BuildBatchFilter</code> object that specifies the filters for the search.</p>
        max_results: <p>The maximum number of results to return.</p>
        sort_order: <p>Specifies the sort order of the returned items. Valid values include:</p> <ul> <li> <p> <code>ASCENDING</code>: List the batch build identifiers in ascending order by identifier.</p> </li> <li> <p> <code>DESCENDING</code>: List the batch build identifiers in descending order by identifier.</p> </li> </ul>
        next_token: <p>The <code>nextToken</code> value returned from a previous call to <code>ListBuildBatchesForProject</code>. This specifies the next item to return. To return the beginning of the list, exclude this parameter.</p>

    Raises:
        capo_codebuild.errors.invalid_input_exception.InvalidInputException: <p>The input value that was provided is not valid.</p>
        capo_codebuild.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified Amazon Web Services resource cannot be found.</p>
        capo_codebuild.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_codebuild.types.list_build_batches_for_project_input.ListBuildBatchesForProjectInput]",
    ) -> OperationResponse[
        "capo_codebuild.types.list_build_batches_for_project_output.ListBuildBatchesForProjectOutput"
    ]:
        import capo_codebuild._operations.code_build_20161006.list_build_batches_for_project

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

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

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