container_recipes
Creates, updates, deletes or gets a container_recipe
resource or lists container_recipes
in a region
Overview
Name | container_recipes |
Type | Resource |
Description | Resource schema for AWS::ImageBuilder::ContainerRecipe |
Id | aws.imagebuilder.container_recipes |
Fields
Name | Datatype | Description |
---|---|---|
arn | string | The Amazon Resource Name (ARN) of the container recipe. |
name | string | The name of the container recipe. |
description | string | The description of the container recipe. |
version | string | The semantic version of the container recipe (<major>.<minor>.<patch>). |
components | array | Components for build and test that are included in the container recipe. |
instance_configuration | object | A group of options that can be used to configure an instance for building and testing container images. |
dockerfile_template_data | string | Dockerfiles 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_uri | string | The S3 URI for the Dockerfile that will be used to build your container image. |
platform_override | string | Specifies the operating system platform when you use a custom source image. |
container_type | string | Specifies the type of container, such as Docker. |
image_os_version_override | string | Specifies the operating system version for the source image. |
target_repository | object | The destination repository for the container image. |
kms_key_id | string | Identifies which KMS key is used to encrypt the container image. |
parent_image | string | The source image for the container recipe. |
working_directory | string | The working directory to be used during build and test workflows. |
tags | object | Tags that are attached to the container recipe. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | region |
delete_resource | DELETE | data__Identifier, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ 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 }}';
/*+ 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 }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: container_recipe
props:
- name: Name
value: '{{ Name }}'
- name: Description
value: '{{ Description }}'
- name: Version
value: '{{ Version }}'
- name: Components
value:
- ComponentArn: '{{ ComponentArn }}'
Parameters:
- Name: '{{ Name }}'
Value:
- '{{ Value[0] }}'
- name: InstanceConfiguration
value:
Image: '{{ Image }}'
BlockDeviceMappings:
- DeviceName: '{{ DeviceName }}'
VirtualName: '{{ VirtualName }}'
NoDevice: '{{ NoDevice }}'
Ebs:
Encrypted: '{{ Encrypted }}'
DeleteOnTermination: '{{ DeleteOnTermination }}'
Iops: '{{ Iops }}'
KmsKeyId: '{{ KmsKeyId }}'
SnapshotId: '{{ SnapshotId }}'
Throughput: '{{ Throughput }}'
VolumeSize: '{{ VolumeSize }}'
VolumeType: '{{ VolumeType }}'
- name: DockerfileTemplateData
value: '{{ DockerfileTemplateData }}'
- name: DockerfileTemplateUri
value: '{{ DockerfileTemplateUri }}'
- name: PlatformOverride
value: '{{ PlatformOverride }}'
- name: ContainerType
value: '{{ ContainerType }}'
- name: ImageOsVersionOverride
value: '{{ ImageOsVersionOverride }}'
- name: TargetRepository
value:
Service: '{{ Service }}'
RepositoryName: '{{ RepositoryName }}'
- name: KmsKeyId
value: '{{ KmsKeyId }}'
- name: ParentImage
value: '{{ ParentImage }}'
- name: WorkingDirectory
value: '{{ WorkingDirectory }}'
- name: Tags
value: {}
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