imagebuilder / Client / retry_image

retry_image

imagebuilder.Client.retry_image(**kwargs)

Retries a failed or canceled image build without rebuilding the phases that already completed. The image re-runs asynchronously in place: the same build version returns to the test or distribution phase where it failed and continues from there. No new image build version is created. Retry is only supported for AMI-based images.

See also: AWS API Documentation

Request Syntax

response = client.retry_image(
    imageBuildVersionArn='string',
    clientToken='string'
)
Parameters:
  • imageBuildVersionArn (string) –

    [REQUIRED]

    The Amazon Resource Name (ARN) of the image build version that you want to retry. The image must be in the FAILED or CANCELLED state.

  • clientToken (string) –

    [REQUIRED]

    A unique, case-sensitive identifier you provide to ensure that the operation runs no more than one time. If you retry a request with the same client token, Image Builder returns the original response without running the operation again. For more information, see Ensuring idempotency in the Amazon EC2 API Reference.

    This field is autopopulated if not provided.

Return type:

dict

Returns:

Response Syntax

{
    'clientToken': 'string',
    'imageBuildVersionArn': 'string'
}

Response Structure

  • (dict) –

    • clientToken (string) –

      The client token that uniquely identifies the request.

    • imageBuildVersionArn (string) –

      The ARN of the image to be retried.

Exceptions

  • imagebuilder.Client.exceptions.ServiceException

  • imagebuilder.Client.exceptions.ClientException

  • imagebuilder.Client.exceptions.ServiceUnavailableException

  • imagebuilder.Client.exceptions.InvalidRequestException

  • imagebuilder.Client.exceptions.IdempotentParameterMismatchException

  • imagebuilder.Client.exceptions.ForbiddenException

  • imagebuilder.Client.exceptions.CallRateLimitExceededException

  • imagebuilder.Client.exceptions.ResourceInUseException