image_recipes
Creates, updates, deletes or gets an image_recipe
resource or lists image_recipes
in a region
Overview
Name | image_recipes |
Type | Resource |
Description | Resource schema for AWS::ImageBuilder::ImageRecipe |
Id | aws.imagebuilder.image_recipes |
Fields
Name | Datatype | Description |
---|---|---|
arn | string | The Amazon Resource Name (ARN) of the image recipe. |
name | string | The name of the image recipe. |
description | string | The description of the image recipe. |
version | string | The version of the image recipe. |
components | array | The components of the image recipe. |
block_device_mappings | array | The block device mappings to apply when creating images from this recipe. |
parent_image | string | The parent image of the image recipe. |
working_directory | string | The working directory to be used during build and test workflows. |
additional_instance_configuration | object | Specify additional settings and launch scripts for your build instances. |
tags | object | The tags of the image recipe. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Name, Version, Components, ParentImage, region |
delete_resource | DELETE | data__Identifier, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all image_recipes
in a region.
SELECT
region,
arn,
name,
description,
version,
components,
block_device_mappings,
parent_image,
working_directory,
additional_instance_configuration,
tags
FROM aws.imagebuilder.image_recipes
WHERE region = 'us-east-1';
Gets all properties from an individual image_recipe
.
SELECT
region,
arn,
name,
description,
version,
components,
block_device_mappings,
parent_image,
working_directory,
additional_instance_configuration,
tags
FROM aws.imagebuilder.image_recipes
WHERE region = 'us-east-1' AND data__Identifier = '<Arn>';
INSERT
example
Use the following StackQL query and manifest file to create a new image_recipe
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.imagebuilder.image_recipes (
Name,
Version,
Components,
ParentImage,
region
)
SELECT
'{{ Name }}',
'{{ Version }}',
'{{ Components }}',
'{{ ParentImage }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.imagebuilder.image_recipes (
Name,
Description,
Version,
Components,
BlockDeviceMappings,
ParentImage,
WorkingDirectory,
AdditionalInstanceConfiguration,
Tags,
region
)
SELECT
'{{ Name }}',
'{{ Description }}',
'{{ Version }}',
'{{ Components }}',
'{{ BlockDeviceMappings }}',
'{{ ParentImage }}',
'{{ WorkingDirectory }}',
'{{ AdditionalInstanceConfiguration }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: image_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: BlockDeviceMappings
value:
- DeviceName: '{{ DeviceName }}'
VirtualName: '{{ VirtualName }}'
NoDevice: '{{ NoDevice }}'
Ebs:
Encrypted: '{{ Encrypted }}'
DeleteOnTermination: '{{ DeleteOnTermination }}'
Iops: '{{ Iops }}'
KmsKeyId: '{{ KmsKeyId }}'
SnapshotId: '{{ SnapshotId }}'
Throughput: '{{ Throughput }}'
VolumeSize: '{{ VolumeSize }}'
VolumeType: '{{ VolumeType }}'
- name: ParentImage
value: '{{ ParentImage }}'
- name: WorkingDirectory
value: '{{ WorkingDirectory }}'
- name: AdditionalInstanceConfiguration
value:
SystemsManagerAgent:
UninstallAfterBuild: '{{ UninstallAfterBuild }}'
UserDataOverride: '{{ UserDataOverride }}'
- name: Tags
value: {}
DELETE
example
/*+ delete */
DELETE FROM aws.imagebuilder.image_recipes
WHERE data__Identifier = '<Arn>'
AND region = 'us-east-1';
Permissions
To operate on the image_recipes
resource, the following permissions are required:
Create
iam:GetRole,
iam:CreateServiceLinkedRole,
imagebuilder:GetComponent,
imagebuilder:GetImage,
imagebuilder:TagResource,
imagebuilder:GetImageRecipe,
imagebuilder:CreateImageRecipe,
ec2:DescribeImages
Read
imagebuilder:GetImageRecipe
Delete
imagebuilder:UnTagResource,
imagebuilder:GetImageRecipe,
imagebuilder:DeleteImageRecipe
List
imagebuilder:ListImageRecipes