CfnImageRecipeProps

class aws_cdk.aws_imagebuilder.CfnImageRecipeProps(*, components, name, parent_image, version, additional_instance_configuration=None, block_device_mappings=None, description=None, tags=None, working_directory=None)

Bases: object

Properties for defining a CfnImageRecipe.

Parameters
  • components (Union[IResolvable, Sequence[Union[IResolvable, ComponentConfigurationProperty, Dict[str, Any]]]]) – The components of the image recipe. Components are orchestration documents that define a sequence of steps for downloading, installing, configuring, and testing software packages. They also define validation and security hardening steps. A component is defined using a YAML document format.

  • name (str) – The name of the image recipe.

  • parent_image (str) – The parent image of the image recipe. The string must be either an Image ARN or an AMI ID.

  • version (str) – The semantic version of the image recipe.

  • additional_instance_configuration (Union[IResolvable, AdditionalInstanceConfigurationProperty, Dict[str, Any], None]) – Before you create a new AMI, Image Builder launches temporary Amazon EC2 instances to build and test your image configuration. Instance configuration adds a layer of control over those instances. You can define settings and add scripts to run when an instance is launched from your AMI.

  • block_device_mappings (Union[IResolvable, Sequence[Union[IResolvable, InstanceBlockDeviceMappingProperty, Dict[str, Any]]], None]) – The block device mappings to apply when creating images from this recipe.

  • description (Optional[str]) – The description of the image recipe.

  • tags (Optional[Mapping[str, str]]) – The tags of the image recipe.

  • working_directory (Optional[str]) – The working directory to be used during build and test workflows.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-imagebuilder-imagerecipe.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_imagebuilder as imagebuilder

cfn_image_recipe_props = imagebuilder.CfnImageRecipeProps(
    components=[imagebuilder.CfnImageRecipe.ComponentConfigurationProperty(
        component_arn="componentArn",
        parameters=[imagebuilder.CfnImageRecipe.ComponentParameterProperty(
            name="name",
            value=["value"]
        )]
    )],
    name="name",
    parent_image="parentImage",
    version="version",

    # the properties below are optional
    additional_instance_configuration=imagebuilder.CfnImageRecipe.AdditionalInstanceConfigurationProperty(
        systems_manager_agent=imagebuilder.CfnImageRecipe.SystemsManagerAgentProperty(
            uninstall_after_build=False
        ),
        user_data_override="userDataOverride"
    ),
    block_device_mappings=[imagebuilder.CfnImageRecipe.InstanceBlockDeviceMappingProperty(
        device_name="deviceName",
        ebs=imagebuilder.CfnImageRecipe.EbsInstanceBlockDeviceSpecificationProperty(
            delete_on_termination=False,
            encrypted=False,
            iops=123,
            kms_key_id="kmsKeyId",
            snapshot_id="snapshotId",
            throughput=123,
            volume_size=123,
            volume_type="volumeType"
        ),
        no_device="noDevice",
        virtual_name="virtualName"
    )],
    description="description",
    tags={
        "tags_key": "tags"
    },
    working_directory="workingDirectory"
)

Attributes

additional_instance_configuration

Before you create a new AMI, Image Builder launches temporary Amazon EC2 instances to build and test your image configuration.

Instance configuration adds a layer of control over those instances. You can define settings and add scripts to run when an instance is launched from your AMI.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-imagebuilder-imagerecipe.html#cfn-imagebuilder-imagerecipe-additionalinstanceconfiguration

Return type

Union[IResolvable, AdditionalInstanceConfigurationProperty, None]

block_device_mappings

The block device mappings to apply when creating images from this recipe.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-imagebuilder-imagerecipe.html#cfn-imagebuilder-imagerecipe-blockdevicemappings

Return type

Union[IResolvable, List[Union[IResolvable, InstanceBlockDeviceMappingProperty]], None]

components

The components of the image recipe.

Components are orchestration documents that define a sequence of steps for downloading, installing, configuring, and testing software packages. They also define validation and security hardening steps. A component is defined using a YAML document format.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-imagebuilder-imagerecipe.html#cfn-imagebuilder-imagerecipe-components

Return type

Union[IResolvable, List[Union[IResolvable, ComponentConfigurationProperty]]]

description

The description of the image recipe.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-imagebuilder-imagerecipe.html#cfn-imagebuilder-imagerecipe-description

Return type

Optional[str]

name

The name of the image recipe.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-imagebuilder-imagerecipe.html#cfn-imagebuilder-imagerecipe-name

Return type

str

parent_image

The parent image of the image recipe.

The string must be either an Image ARN or an AMI ID.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-imagebuilder-imagerecipe.html#cfn-imagebuilder-imagerecipe-parentimage

Return type

str

tags

The tags of the image recipe.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-imagebuilder-imagerecipe.html#cfn-imagebuilder-imagerecipe-tags

Return type

Optional[Mapping[str, str]]

version

The semantic version of the image recipe.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-imagebuilder-imagerecipe.html#cfn-imagebuilder-imagerecipe-version

Return type

str

working_directory

The working directory to be used during build and test workflows.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-imagebuilder-imagerecipe.html#cfn-imagebuilder-imagerecipe-workingdirectory

Return type

Optional[str]