Skip to main content

image_recipes

Creates, updates, deletes or gets an image_recipe resource or lists image_recipes in a region

Overview

Nameimage_recipes
TypeResource
DescriptionResource schema for AWS::ImageBuilder::ImageRecipe
Idawscc.imagebuilder.image_recipes

Fields

NameDatatypeDescription
arnstringThe Amazon Resource Name (ARN) of the image recipe.
namestringThe name of the image recipe.
descriptionstringThe description of the image recipe.
versionstringThe version of the image recipe.
componentsarrayThe components of the image recipe.
block_device_mappingsarrayThe block device mappings to apply when creating images from this recipe.
parent_imagestringThe parent image of the image recipe.
working_directorystringThe working directory to be used during build and test workflows.
additional_instance_configurationobjectSpecify additional settings and launch scripts for your build instances.
tagsobjectThe tags of the image recipe.
regionstringAWS region.

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

Methods

NameResourceAccessible byRequired Params
create_resourceimage_recipesINSERTName, Version, Components, ParentImage, region
delete_resourceimage_recipesDELETEIdentifier, region
update_resourceimage_recipesUPDATEIdentifier, PatchDocument, region
list_resourcesimage_recipes_list_onlySELECTregion
get_resourceimage_recipesSELECTIdentifier, region

SELECT examples

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 awscc.imagebuilder.image_recipes
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}';

INSERT example

Use the following StackQL query and manifest file to create a new image_recipe resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.imagebuilder.image_recipes (
Name,
Version,
Components,
ParentImage,
region
)
SELECT
'{{ name }}',
'{{ version }}',
'{{ components }}',
'{{ parent_image }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

UPDATE example

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

/*+ update */
UPDATE awscc.imagebuilder.image_recipes
SET PatchDocument = string('{{ {
"AdditionalInstanceConfiguration": additional_instance_configuration,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.imagebuilder.image_recipes
WHERE
Identifier = '{{ arn }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

Permissions

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

iam:GetRole,
iam:CreateServiceLinkedRole,
imagebuilder:GetComponent,
imagebuilder:GetImage,
imagebuilder:TagResource,
imagebuilder:GetImageRecipe,
imagebuilder:CreateImageRecipe,
ec2:DescribeImages