Skip to main content

images

Creates, updates, deletes or gets an image resource or lists images in a region

Overview

Nameimages
TypeResource
DescriptionResource schema for AWS::ImageBuilder::Image
Idawscc.imagebuilder.images

Fields

NameDatatypeDescription
image_scanning_configurationobjectContains settings for vulnerability scans.
container_recipe_arnstringThe Amazon Resource Name (ARN) of the container recipe that defines how images are configured and tested.
workflowsarrayWorkflows to define the image build process
image_uristringURI for containers created in current Region with default ECR image tag
namestringThe name of the image.
infrastructure_configuration_arnstringThe Amazon Resource Name (ARN) of the infrastructure configuration.
image_recipe_arnstringThe Amazon Resource Name (ARN) of the image recipe that defines how images are configured, tested, and assessed.
distribution_configuration_arnstringThe Amazon Resource Name (ARN) of the distribution configuration.
image_idstringThe AMI ID of the EC2 AMI in current region.
image_tests_configurationobjectThe image tests configuration used when creating this image.
arnstringThe Amazon Resource Name (ARN) of the image.
enhanced_image_metadata_enabledbooleanCollects additional information about the image being created, including the operating system (OS) version and package list.
execution_rolestringThe execution role name/ARN for the image build, if provided
tagsobjectThe tags associated with the image.
regionstringAWS region.

For more information, see AWS::ImageBuilder::Image.

Methods

NameResourceAccessible byRequired Params
create_resourceimagesINSERTregion
delete_resourceimagesDELETEIdentifier, region
update_resourceimagesUPDATEIdentifier, PatchDocument, region
list_resourcesimages_list_onlySELECTregion
get_resourceimagesSELECTIdentifier, region

SELECT examples

Gets all properties from an individual image.

SELECT
region,
image_scanning_configuration,
container_recipe_arn,
workflows,
image_uri,
name,
infrastructure_configuration_arn,
image_recipe_arn,
distribution_configuration_arn,
image_id,
image_tests_configuration,
arn,
enhanced_image_metadata_enabled,
execution_role,
tags
FROM awscc.imagebuilder.images
WHERE
region = 'us-east-1' AND
Identifier = '{{ arn }}';

INSERT example

Use the following StackQL query and manifest file to create a new image resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.imagebuilder.images (
ImageScanningConfiguration,
ContainerRecipeArn,
Workflows,
InfrastructureConfigurationArn,
ImageRecipeArn,
DistributionConfigurationArn,
ImageTestsConfiguration,
EnhancedImageMetadataEnabled,
ExecutionRole,
Tags,
region
)
SELECT
'{{ image_scanning_configuration }}',
'{{ container_recipe_arn }}',
'{{ workflows }}',
'{{ infrastructure_configuration_arn }}',
'{{ image_recipe_arn }}',
'{{ distribution_configuration_arn }}',
'{{ image_tests_configuration }}',
'{{ enhanced_image_metadata_enabled }}',
'{{ execution_role }}',
'{{ tags }}',
'{{ region }}';

UPDATE example

Use the following StackQL query and manifest file to update a image resource, using stack-deploy.

/*+ update */
UPDATE awscc.imagebuilder.images
SET PatchDocument = string('{{ {
"ExecutionRole": execution_role,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}';

DELETE example

/*+ delete */
DELETE FROM awscc.imagebuilder.images
WHERE
Identifier = '{{ arn }}' AND
region = 'us-east-1';

Permissions

To operate on the images resource, the following permissions are required:

imagebuilder:GetImage