container_recipes
Creates, updates, deletes, gets or lists a container_recipes resource.
Overview
| Name | container_recipes |
| Type | Resource |
| Id | aws.imagebuilder.container_recipes |
Fields
The following fields are returned by SELECT queries:
- get_container_recipe
- list_container_recipes
| Name | Datatype | Description |
|---|---|---|
container_recipe | object | The container recipe object that is returned. |
latest_version_references | object | The resource ARNs with different wildcard variations of semantic versioning. |
request_id | string | The request ID that uniquely identifies this request. |
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the container recipe. (pattern: <code>^[-_A-Za-z-0-9][-_A-Za-z0-9 ]{1,126}[-_A-Za-z-0-9]$</code>) |
arn | string | The Amazon Resource Name (ARN) of the container recipe. (pattern: <code>^arn:aws[^:]*:imagebuilder:[^:]+:(?:[0-9]{12}|aws(?:-[a-z-]+)?):(?:image-recipe|container-recipe|infrastructure-configuration|distribution-configuration|component|image|image-pipeline|lifecycle-policy|workflow/(?:build|test|distribution))/[a-z0-9-_]+(?:/(?:(?:x|[0-9]+).(?:x|[0-9]+).(?:x|[0-9]+))(?:/[0-9]+)?)?$</code>) |
container_type | string | Specifies the type of container, such as "Docker". (DOCKER) |
date_created | string | The date when this container recipe was created. |
instance_image | string | The base image for a container build and test instance. This can contain an AMI ID or it can specify an Amazon Web Services Systems Manager (SSM) Parameter Store Parameter, prefixed by ssm:, followed by the parameter name or ARN. If not specified, Image Builder uses the appropriate ECS-optimized AMI as a base image. |
owner | string | The owner of the container recipe. |
parent_image | string | The base image for the container recipe. |
platform | string | The system platform for the container, such as Windows or Linux. (Windows, Linux, macOS) |
tags | object | Tags that are attached to the container recipe. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_container_recipe | select | containerRecipeArn, region | Retrieves a container recipe. | |
list_container_recipes | select | region | Returns a list of container recipes. | |
create_container_recipe | insert | region, containerType, name, semanticVersion, parentImage, targetRepository, clientToken | Creates a new container recipe. Container recipes define how images are configured, tested, and assessed. | |
delete_container_recipe | delete | containerRecipeArn, region | Deletes a container recipe. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
containerRecipeArn | string | The Amazon Resource Name (ARN) of the container recipe to delete. |
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_container_recipe
- list_container_recipes
Retrieves a container recipe.
SELECT
container_recipe,
latest_version_references,
request_id
FROM aws.imagebuilder.container_recipes
WHERE containerRecipeArn = '{{ containerRecipeArn }}' -- required
AND region = '{{ region }}' -- required
;
Returns a list of container recipes.
SELECT
name,
arn,
container_type,
date_created,
instance_image,
owner,
parent_image,
platform,
tags
FROM aws.imagebuilder.container_recipes
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_container_recipe
- Manifest
Creates a new container recipe. Container recipes define how images are configured, tested, and assessed.
INSERT INTO aws.imagebuilder.container_recipes (
containerType,
name,
description,
semanticVersion,
components,
instanceConfiguration,
dockerfileTemplateData,
dockerfileTemplateUri,
platformOverride,
imageOsVersionOverride,
parentImage,
tags,
workingDirectory,
targetRepository,
kmsKeyId,
clientToken,
region
)
SELECT
'{{ containerType }}' /* required */,
'{{ name }}' /* required */,
'{{ description }}',
'{{ semanticVersion }}' /* required */,
'{{ components }}',
'{{ instanceConfiguration }}',
'{{ dockerfileTemplateData }}',
'{{ dockerfileTemplateUri }}',
'{{ platformOverride }}',
'{{ imageOsVersionOverride }}',
'{{ parentImage }}' /* required */,
'{{ tags }}',
'{{ workingDirectory }}',
'{{ targetRepository }}' /* required */,
'{{ kmsKeyId }}',
'{{ clientToken }}' /* required */,
'{{ region }}'
RETURNING
client_token,
container_recipe_arn,
latest_version_references,
request_id
;
# Description fields are for documentation purposes
- name: container_recipes
props:
- name: region
value: "{{ region }}"
description: Required parameter for the container_recipes resource.
- name: containerType
value: "{{ containerType }}"
valid_values: ['DOCKER']
- name: name
value: "{{ name }}"
- name: description
value: "{{ description }}"
- name: semanticVersion
value: "{{ semanticVersion }}"
- name: components
value:
- componentArn: "{{ componentArn }}"
parameters: "{{ parameters }}"
- name: instanceConfiguration
description: |
Defines a custom base AMI and block device mapping configurations of an instance used for building and testing container images.
value:
image: "{{ image }}"
blockDeviceMappings:
- deviceName: "{{ deviceName }}"
ebs:
encrypted: {{ encrypted }}
deleteOnTermination: {{ deleteOnTermination }}
iops: {{ iops }}
kmsKeyId: "{{ kmsKeyId }}"
snapshotId: "{{ snapshotId }}"
volumeSize: {{ volumeSize }}
volumeType: "{{ volumeType }}"
throughput: {{ throughput }}
virtualName: "{{ virtualName }}"
noDevice: "{{ noDevice }}"
- name: dockerfileTemplateData
value: "{{ dockerfileTemplateData }}"
- name: dockerfileTemplateUri
value: "{{ dockerfileTemplateUri }}"
- name: platformOverride
value: "{{ platformOverride }}"
valid_values: ['Windows', 'Linux', 'macOS']
- name: imageOsVersionOverride
value: "{{ imageOsVersionOverride }}"
- name: parentImage
value: "{{ parentImage }}"
- name: tags
value: "{{ tags }}"
- name: workingDirectory
value: "{{ workingDirectory }}"
- name: targetRepository
description: |
The container repository where the output container image is stored.
value:
service: "{{ service }}"
repositoryName: "{{ repositoryName }}"
- name: kmsKeyId
value: "{{ kmsKeyId }}"
- name: clientToken
value: "{{ clientToken }}"
DELETE examples
- delete_container_recipe
Deletes a container recipe.
DELETE FROM aws.imagebuilder.container_recipes
WHERE containerRecipeArn = '{{ containerRecipeArn }}' --required
AND region = '{{ region }}' --required
;