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
Idawscc.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.

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

Methods

NameResourceAccessible byRequired Params
create_resourcecontainer_recipesINSERTregion
delete_resourcecontainer_recipesDELETEIdentifier, region
update_resourcecontainer_recipesUPDATEIdentifier, PatchDocument, region
list_resourcescontainer_recipes_list_onlySELECTregion
get_resourcecontainer_recipesSELECTIdentifier, region

SELECT examples

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 awscc.imagebuilder.container_recipes
WHERE
region = 'us-east-1' AND
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 awscc.imagebuilder.container_recipes (
Name,
Description,
Version,
Components,
InstanceConfiguration,
DockerfileTemplateData,
DockerfileTemplateUri,
PlatformOverride,
ContainerType,
ImageOsVersionOverride,
TargetRepository,
KmsKeyId,
ParentImage,
WorkingDirectory,
Tags,
region
)
SELECT
'{{ 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 }}',
'{{ region }}';

UPDATE example

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

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

DELETE example

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

Permissions

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

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