Skip to content

list_build_batches async

list_build_batches(
    *,
    config_overrides: Optional[AsyncCodeBuildClientConfig] = None,
    filter: Optional[BuildBatchFilter] = None,
    max_results: Optional[PageSize] = None,
    sort_order: Optional[SortOrderType] = None,
    next_token: Optional[String] = None,
) -> ListBuildBatchesOutput

Retrieves the identifiers of your build batches in the current region.

Parameters:

  • 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 ListBuildBatches. 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/async_code_build.py
async def list_build_batches(
    self,
    *,
    config_overrides: Optional[AsyncCodeBuildClientConfig] = 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_output.ListBuildBatchesOutput":
    """<p>Retrieves the identifiers of your build batches in the current region.</p>

    Args:
        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>ListBuildBatches</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.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_codebuild.types.list_build_batches_input.ListBuildBatchesInput]",
    ) -> AsyncOperationResponse[
        "capo_codebuild.types.list_build_batches_output.ListBuildBatchesOutput"
    ]:
        import capo_codebuild._operations.code_build_20161006.list_build_batches

        (
            output,
            http_response,
        ) = await capo_codebuild._operations.code_build_20161006.list_build_batches.async_list_build_batches(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListBuildBatches")
    )
    input_: capo_codebuild.types.list_build_batches_input.ListBuildBatchesInput = {}
    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 = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output