create_image

imagebuilder.Client.create_image(**kwargs)

Creates a new image. This request will create a new image along with all of the configured output resources defined in the distribution configuration. You must specify exactly one recipe for your image, using either a ContainerRecipeArn or an ImageRecipeArn.

See also: AWS API Documentation

Request Syntax

response = client.create_image(
    imageRecipeArn='string',
    containerRecipeArn='string',
    distributionConfigurationArn='string',
    infrastructureConfigurationArn='string',
    imageTestsConfiguration={
        'imageTestsEnabled': True|False,
        'timeoutMinutes': 123
    },
    enhancedImageMetadataEnabled=True|False,
    tags={
        'string': 'string'
    },
    clientToken='string'
)
Parameters
  • imageRecipeArn (string) -- The Amazon Resource Name (ARN) of the image recipe that defines how images are configured, tested, and assessed.
  • containerRecipeArn (string) -- The Amazon Resource Name (ARN) of the container recipe that defines how images are configured and tested.
  • distributionConfigurationArn (string) -- The Amazon Resource Name (ARN) of the distribution configuration that defines and configures the outputs of your pipeline.
  • infrastructureConfigurationArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the infrastructure configuration that defines the environment in which your image will be built and tested.

  • imageTestsConfiguration (dict) --

    The image tests configuration of the image.

    • imageTestsEnabled (boolean) --

      Determines if tests should run after building the image. Image Builder defaults to enable tests to run following the image build, before image distribution.

    • timeoutMinutes (integer) --

      The maximum time in minutes that tests are permitted to run.

      Note

      The timeoutMinutes attribute is not currently active. This value is ignored.

  • enhancedImageMetadataEnabled (boolean) -- Collects additional information about the image being created, including the operating system (OS) version and package list. This information is used to enhance the overall experience of using EC2 Image Builder. Enabled by default.
  • tags (dict) --

    The tags of the image.

    • (string) --
      • (string) --
  • clientToken (string) --

    [REQUIRED]

    The idempotency token used to make this request idempotent.

    This field is autopopulated if not provided.

Return type

dict

Returns

Response Syntax

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

Response Structure

  • (dict) --

    • requestId (string) --

      The request ID that uniquely identifies this request.

    • clientToken (string) --

      The idempotency token used to make this request idempotent.

    • imageBuildVersionArn (string) --

      The Amazon Resource Name (ARN) of the image that was created by this request.

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
  • imagebuilder.Client.exceptions.ServiceQuotaExceededException