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:
-
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/code_build.py
| def list_build_batches(
self,
*,
config_overrides: Optional[CodeBuildClientConfig] = 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.
"""
def _handler(
req: "OperationRequest[capo_codebuild.types.list_build_batches_input.ListBuildBatchesInput]",
) -> OperationResponse[
"capo_codebuild.types.list_build_batches_output.ListBuildBatchesOutput"
]:
import capo_codebuild._operations.code_build_20161006.list_build_batches
output, http_response = (
capo_codebuild._operations.code_build_20161006.list_build_batches.list_build_batches(
req.options, req.input
)
)
return OperationResponse(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 = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|