Skip to content

retry_build_batch async

retry_build_batch(
    *,
    config_overrides: Optional[AsyncCodeBuildClientConfig] = None,
    id: Optional[NonEmptyString] = None,
    idempotency_token: Optional[String] = None,
    retry_type: Optional[RetryBuildBatchType] = None,
) -> RetryBuildBatchOutput

Restarts a failed batch build. Only batch builds that have failed can be retried.

Parameters:

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

    Specifies the identifier of the batch build to restart.

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

    A unique, case sensitive identifier you provide to ensure the idempotency of the RetryBuildBatch request. The token is included in the RetryBuildBatch request and is valid for five minutes. If you repeat the RetryBuildBatch request with the same token, but change a parameter, CodeBuild returns a parameter mismatch error.

  • retry_type (Optional[RetryBuildBatchType], default: None ) –

    Specifies the type of retry to perform.

Raises:

Source code in docs_src/capo_codebuild/_services/async_code_build.py
async def retry_build_batch(
    self,
    *,
    config_overrides: Optional[AsyncCodeBuildClientConfig] = None,
    id: Optional["capo_codebuild.types.non_empty_string.NonEmptyString"] = None,
    idempotency_token: Optional["capo_codebuild.types.string.String"] = None,
    retry_type: Optional[
        "capo_codebuild.types.retry_build_batch_type.RetryBuildBatchType"
    ] = None,
) -> "capo_codebuild.types.retry_build_batch_output.RetryBuildBatchOutput":
    """<p>Restarts a failed batch build. Only batch builds that have failed can be retried.</p>

    Args:
        id: <p>Specifies the identifier of the batch build to restart.</p>
        idempotency_token: <p>A unique, case sensitive identifier you provide to ensure the idempotency of the <code>RetryBuildBatch</code> request. The token is included in the <code>RetryBuildBatch</code> request and is valid for five minutes. If you repeat the <code>RetryBuildBatch</code> request with the same token, but change a parameter, CodeBuild returns a parameter mismatch error.</p>
        retry_type: <p>Specifies the type of retry to perform.</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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_codebuild.types.retry_build_batch_input.RetryBuildBatchInput]",
    ) -> AsyncOperationResponse[
        "capo_codebuild.types.retry_build_batch_output.RetryBuildBatchOutput"
    ]:
        import capo_codebuild._operations.code_build_20161006.retry_build_batch

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("RetryBuildBatch")
    )
    input_: capo_codebuild.types.retry_build_batch_input.RetryBuildBatchInput = {}
    if id is not None:
        input_["id"] = id
    if idempotency_token is not None:
        input_["idempotency_token"] = idempotency_token
    if retry_type is not None:
        input_["retry_type"] = retry_type

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output