image_recipes
Creates, updates, deletes, gets or lists an image_recipes resource.
Overview
| Name | image_recipes |
| Type | Resource |
| Id | aws.imagebuilder.image_recipes |
Fields
The following fields are returned by SELECT queries:
- get_image_recipe
- list_image_recipes
| Name | Datatype | Description |
|---|---|---|
image_recipe | object | The image recipe object. |
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 image 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 image 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>) |
date_created | string | The date on which this image recipe was created. |
owner | string | The owner of the image recipe. |
parent_image | string | The base image of the image recipe. |
platform | string | The platform of the image recipe. (Windows, Linux, macOS) |
tags | object | The tags of the image recipe. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_image_recipe | select | imageRecipeArn, region | Gets an image recipe. | |
list_image_recipes | select | region | Returns a list of image recipes. | |
create_image_recipe | insert | region, name, semanticVersion, parentImage, clientToken | Creates a new image recipe. Image recipes define how images are configured, tested, and assessed. | |
delete_image_recipe | delete | imageRecipeArn, region | Deletes an image 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 |
|---|---|---|
imageRecipeArn | string | The Amazon Resource Name (ARN) of the image recipe to delete. |
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_image_recipe
- list_image_recipes
Gets an image recipe.
SELECT
image_recipe,
latest_version_references,
request_id
FROM aws.imagebuilder.image_recipes
WHERE imageRecipeArn = '{{ imageRecipeArn }}' -- required
AND region = '{{ region }}' -- required
;
Returns a list of image recipes.
SELECT
name,
arn,
date_created,
owner,
parent_image,
platform,
tags
FROM aws.imagebuilder.image_recipes
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_image_recipe
- Manifest
Creates a new image recipe. Image recipes define how images are configured, tested, and assessed.
INSERT INTO aws.imagebuilder.image_recipes (
name,
description,
semanticVersion,
components,
parentImage,
blockDeviceMappings,
tags,
workingDirectory,
additionalInstanceConfiguration,
amiTags,
amiWatermarks,
clientToken,
region
)
SELECT
'{{ name }}' /* required */,
'{{ description }}',
'{{ semanticVersion }}' /* required */,
'{{ components }}',
'{{ parentImage }}' /* required */,
'{{ blockDeviceMappings }}',
'{{ tags }}',
'{{ workingDirectory }}',
'{{ additionalInstanceConfiguration }}',
'{{ amiTags }}',
'{{ amiWatermarks }}',
'{{ clientToken }}' /* required */,
'{{ region }}'
RETURNING
client_token,
image_recipe_arn,
latest_version_references,
request_id
;
# Description fields are for documentation purposes
- name: image_recipes
props:
- name: region
value: "{{ region }}"
description: Required parameter for the image_recipes resource.
- name: name
value: "{{ name }}"
- name: description
value: "{{ description }}"
- name: semanticVersion
value: "{{ semanticVersion }}"
- name: components
value:
- componentArn: "{{ componentArn }}"
parameters: "{{ parameters }}"
- name: parentImage
value: "{{ parentImage }}"
- name: blockDeviceMappings
value:
- deviceName: "{{ deviceName }}"
ebs:
encrypted: {{ encrypted }}
deleteOnTermination: {{ deleteOnTermination }}
iops: {{ iops }}
kmsKeyId: "{{ kmsKeyId }}"
snapshotId: "{{ snapshotId }}"
volumeSize: {{ volumeSize }}
volumeType: "{{ volumeType }}"
throughput: {{ throughput }}
virtualName: "{{ virtualName }}"
noDevice: "{{ noDevice }}"
- name: tags
value: "{{ tags }}"
- name: workingDirectory
value: "{{ workingDirectory }}"
- name: additionalInstanceConfiguration
description: |
In addition to your infrastructure configuration, these settings provide an extra layer of control over your build instances. You can also specify commands to run on launch for all of your build instances. Image Builder does not automatically install the Systems Manager agent on Windows instances. If your base image includes the Systems Manager agent, then the AMI that you create will also include the agent. For Linux instances, if the base image does not already include the Systems Manager agent, Image Builder installs it. For Linux instances where Image Builder installs the Systems Manager agent, you can choose whether to keep it for the AMI that you create.
value:
systemsManagerAgent:
uninstallAfterBuild: {{ uninstallAfterBuild }}
userDataOverride: "{{ userDataOverride }}"
- name: amiTags
value: "{{ amiTags }}"
- name: amiWatermarks
value:
- "{{ amiWatermarks }}"
description: |
A list of AMI watermark names to attach to the output AMI. Names are case-sensitive. The recipe does not allow duplicate names.
- name: clientToken
value: "{{ clientToken }}"
DELETE examples
- delete_image_recipe
Deletes an image recipe.
DELETE FROM aws.imagebuilder.image_recipes
WHERE imageRecipeArn = '{{ imageRecipeArn }}' --required
AND region = '{{ region }}' --required
;