Skip to main content

container_recipes

Creates, updates, deletes or gets a container_recipe resource or lists container_recipes in a region

Overview

Namecontainer_recipes
TypeResource
DescriptionResource schema for AWS::ImageBuilder::ContainerRecipe
Idaws.imagebuilder.container_recipes

Fields

NameDatatypeDescription
arnstringThe Amazon Resource Name (ARN) of the container recipe.
namestringThe name of the container recipe.
descriptionstringThe description of the container recipe.
versionstringThe semantic version of the container recipe (<major>.<minor>.<patch>).
componentsarrayComponents for build and test that are included in the container recipe.
instance_configurationobjectA group of options that can be used to configure an instance for building and testing container images.
dockerfile_template_datastringDockerfiles are text documents that are used to build Docker containers, and ensure that they contain all of the elements required by the application running inside. The template data consists of contextual variables where Image Builder places build information or scripts, based on your container image recipe.
dockerfile_template_uristringThe S3 URI for the Dockerfile that will be used to build your container image.
platform_overridestringSpecifies the operating system platform when you use a custom source image.
container_typestringSpecifies the type of container, such as Docker.
image_os_version_overridestringSpecifies the operating system version for the source image.
target_repositoryobjectThe destination repository for the container image.
kms_key_idstringIdentifies which KMS key is used to encrypt the container image.
parent_imagestringThe source image for the container recipe.
working_directorystringThe working directory to be used during build and test workflows.
tagsobjectTags that are attached to the container recipe.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTregion
delete_resourceDELETEdata__Identifier, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all container_recipes in a region.

SELECT
region,
arn,
name,
description,
version,
components,
instance_configuration,
dockerfile_template_data,
dockerfile_template_uri,
platform_override,
container_type,
image_os_version_override,
target_repository,
kms_key_id,
parent_image,
working_directory,
tags
FROM aws.imagebuilder.container_recipes
WHERE region = 'us-east-1';

Gets all properties from an individual container_recipe.

SELECT
region,
arn,
name,
description,
version,
components,
instance_configuration,
dockerfile_template_data,
dockerfile_template_uri,
platform_override,
container_type,
image_os_version_override,
target_repository,
kms_key_id,
parent_image,
working_directory,
tags
FROM aws.imagebuilder.container_recipes
WHERE region = 'us-east-1' AND data__Identifier = '<Arn>';

INSERT example

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

/*+ create */
INSERT INTO aws.imagebuilder.container_recipes (
Name,
Description,
Version,
Components,
InstanceConfiguration,
DockerfileTemplateData,
DockerfileTemplateUri,
PlatformOverride,
ContainerType,
ImageOsVersionOverride,
TargetRepository,
KmsKeyId,
ParentImage,
WorkingDirectory,
Tags,
region
)
SELECT
'{{ Name }}',
'{{ Description }}',
'{{ Version }}',
'{{ Components }}',
'{{ InstanceConfiguration }}',
'{{ DockerfileTemplateData }}',
'{{ DockerfileTemplateUri }}',
'{{ PlatformOverride }}',
'{{ ContainerType }}',
'{{ ImageOsVersionOverride }}',
'{{ TargetRepository }}',
'{{ KmsKeyId }}',
'{{ ParentImage }}',
'{{ WorkingDirectory }}',
'{{ Tags }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.imagebuilder.container_recipes
WHERE data__Identifier = '<Arn>'
AND region = 'us-east-1';

Permissions

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

Create

iam:GetRole,
iam:CreateServiceLinkedRole,
imagebuilder:GetComponent,
imagebuilder:TagResource,
imagebuilder:GetContainerRecipe,
imagebuilder:CreateContainerRecipe,
imagebuilder:GetImage,
kms:Encrypt,
kms:Decrypt,
kms:ReEncryptFrom,
kms:ReEncryptTo,
kms:GenerateDataKey*,
s3:GetObject,
s3:ListBucket,
ecr:DescribeRepositories,
ec2:DescribeImages

Read

imagebuilder:GetContainerRecipe

Delete

imagebuilder:UnTagResource,
imagebuilder:GetContainerRecipe,
imagebuilder:DeleteContainerRecipe

List

imagebuilder:ListContainerRecipes