imagebuilder / Client / create_image
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', imageScanningConfiguration={ 'imageScanningEnabled': True|False, 'ecrConfiguration': { 'repositoryName': 'string', 'containerTags': [ '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.
imageScanningConfiguration (dict) –
Contains settings for vulnerability scans.
imageScanningEnabled (boolean) –
A setting that indicates whether Image Builder keeps a snapshot of the vulnerability scans that Amazon Inspector runs against the build instance when you create a new image.
ecrConfiguration (dict) –
Contains Amazon ECR settings for vulnerability scans.
repositoryName (string) –
The name of the container repository that Amazon Inspector scans to identify findings for your container images. The name includes the path for the repository location. If you don’t provide this information, Image Builder creates a repository in your account named
image-builder-image-scanning-repository
for vulnerability scans of your output container images.containerTags (list) –
Tags for Image Builder to apply to the output container image that &INS; scans. Tags can help you identify and manage your scanned images.
(string) –
- 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 this request created.
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