CfnImageRecipePropsMixin
- class aws_cdk.mixins_preview.aws_imagebuilder.mixins.CfnImageRecipePropsMixin(props, *, strategy=None)
Bases:
MixinCreates a new image recipe.
Image recipes define how images are configured, tested, and assessed.
- See:
- CloudformationResource:
AWS::ImageBuilder::ImageRecipe
- Mixin:
true
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview import mixins from aws_cdk.mixins_preview.aws_imagebuilder import mixins as imagebuilder_mixins cfn_image_recipe_props_mixin = imagebuilder_mixins.CfnImageRecipePropsMixin(imagebuilder_mixins.CfnImageRecipeMixinProps( additional_instance_configuration=imagebuilder_mixins.CfnImageRecipePropsMixin.AdditionalInstanceConfigurationProperty( systems_manager_agent=imagebuilder_mixins.CfnImageRecipePropsMixin.SystemsManagerAgentProperty( uninstall_after_build=False ), user_data_override="userDataOverride" ), ami_tags={ "ami_tags_key": "amiTags" }, block_device_mappings=[imagebuilder_mixins.CfnImageRecipePropsMixin.InstanceBlockDeviceMappingProperty( device_name="deviceName", ebs=imagebuilder_mixins.CfnImageRecipePropsMixin.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" )], components=[imagebuilder_mixins.CfnImageRecipePropsMixin.ComponentConfigurationProperty( component_arn="componentArn", parameters=[imagebuilder_mixins.CfnImageRecipePropsMixin.ComponentParameterProperty( name="name", value=["value"] )] )], description="description", name="name", parent_image="parentImage", tags={ "tags_key": "tags" }, version="version", working_directory="workingDirectory" ), strategy=mixins.PropertyMergeStrategy.OVERRIDE )
Create a mixin to apply properties to
AWS::ImageBuilder::ImageRecipe.- Parameters:
props (
Union[CfnImageRecipeMixinProps,Dict[str,Any]]) – L1 properties to apply.strategy (
Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE
Methods
- apply_to(construct)
Apply the mixin properties to the construct.
- Parameters:
construct (
IConstruct)- Return type:
- supports(construct)
Check if this mixin supports the given construct.
- Parameters:
construct (
IConstruct)- Return type:
bool
Attributes
- CFN_PROPERTY_KEYS = ['additionalInstanceConfiguration', 'amiTags', 'blockDeviceMappings', 'components', 'description', 'name', 'parentImage', 'tags', 'version', 'workingDirectory']
Static Methods
- classmethod is_mixin(x)
(experimental) Checks if
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.- Stability:
experimental
AdditionalInstanceConfigurationProperty
- class CfnImageRecipePropsMixin.AdditionalInstanceConfigurationProperty(*, systems_manager_agent=None, user_data_override=None)
Bases:
objectIn 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.
- Parameters:
systems_manager_agent (
Union[IResolvable,SystemsManagerAgentProperty,Dict[str,Any],None]) – Contains settings for the Systems Manager agent on your build instance.user_data_override (
Optional[str]) – Use this property to provide commands or a command script to run when you launch your build instance. The userDataOverride property replaces any commands that Image Builder might have added to ensure that Systems Manager is installed on your Linux build instance. If you override the user data, make sure that you add commands to install Systems Manager, if it is not pre-installed on your base image. .. epigraph:: The user data is always base 64 encoded. For example, the following commands are encoded asIyEvYmluL2Jhc2gKbWtkaXIgLXAgL3Zhci9iYi8KdG91Y2ggL3Zhci$: #!/bin/bash mkdir -p /var/bb/ touch /var
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_imagebuilder import mixins as imagebuilder_mixins additional_instance_configuration_property = imagebuilder_mixins.CfnImageRecipePropsMixin.AdditionalInstanceConfigurationProperty( systems_manager_agent=imagebuilder_mixins.CfnImageRecipePropsMixin.SystemsManagerAgentProperty( uninstall_after_build=False ), user_data_override="userDataOverride" )
Attributes
- systems_manager_agent
Contains settings for the Systems Manager agent on your build instance.
- user_data_override
Use this property to provide commands or a command script to run when you launch your build instance.
The userDataOverride property replaces any commands that Image Builder might have added to ensure that Systems Manager is installed on your Linux build instance. If you override the user data, make sure that you add commands to install Systems Manager, if it is not pre-installed on your base image. .. epigraph:
The user data is always base 64 encoded. For example, the following commands are encoded as ``IyEvYmluL2Jhc2gKbWtkaXIgLXAgL3Zhci9iYi8KdG91Y2ggL3Zhci$`` : *#!/bin/bash* mkdir -p /var/bb/ touch /var
ComponentConfigurationProperty
- class CfnImageRecipePropsMixin.ComponentConfigurationProperty(*, component_arn=None, parameters=None)
Bases:
objectConfiguration details of the component.
- Parameters:
component_arn (
Optional[str]) – The Amazon Resource Name (ARN) of the component.parameters (
Union[IResolvable,Sequence[Union[IResolvable,ComponentParameterProperty,Dict[str,Any]]],None]) – A group of parameter settings that Image Builder uses to configure the component for a specific recipe.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_imagebuilder import mixins as imagebuilder_mixins component_configuration_property = imagebuilder_mixins.CfnImageRecipePropsMixin.ComponentConfigurationProperty( component_arn="componentArn", parameters=[imagebuilder_mixins.CfnImageRecipePropsMixin.ComponentParameterProperty( name="name", value=["value"] )] )
Attributes
- component_arn
The Amazon Resource Name (ARN) of the component.
- parameters
A group of parameter settings that Image Builder uses to configure the component for a specific recipe.
ComponentParameterProperty
- class CfnImageRecipePropsMixin.ComponentParameterProperty(*, name=None, value=None)
Bases:
objectContains a key/value pair that sets the named component parameter.
- Parameters:
name (
Optional[str]) – The name of the component parameter to set.value (
Optional[Sequence[str]]) – Sets the value for the named component parameter.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_imagebuilder import mixins as imagebuilder_mixins component_parameter_property = imagebuilder_mixins.CfnImageRecipePropsMixin.ComponentParameterProperty( name="name", value=["value"] )
Attributes
- name
The name of the component parameter to set.
- value
Sets the value for the named component parameter.
EbsInstanceBlockDeviceSpecificationProperty
- class CfnImageRecipePropsMixin.EbsInstanceBlockDeviceSpecificationProperty(*, delete_on_termination=None, encrypted=None, iops=None, kms_key_id=None, snapshot_id=None, throughput=None, volume_size=None, volume_type=None)
Bases:
objectThe image recipe EBS instance block device specification includes the Amazon EBS-specific block device mapping specifications for the image.
- Parameters:
delete_on_termination (
Union[bool,IResolvable,None]) – Configures delete on termination of the associated device.encrypted (
Union[bool,IResolvable,None]) – Use to configure device encryption.iops (
Union[int,float,None]) – Use to configure device IOPS.kms_key_id (
Optional[str]) – The Amazon Resource Name (ARN) that uniquely identifies the KMS key to use when encrypting the device. This can be either the Key ARN or the Alias ARN. For more information, see Key identifiers (KeyId) in the AWS Key Management Service Developer Guide .snapshot_id (
Optional[str]) – The snapshot that defines the device contents.throughput (
Union[int,float,None]) – For GP3 volumes only – The throughput in MiB/s that the volume supports.volume_size (
Union[int,float,None]) – Overrides the volume size of the device.volume_type (
Optional[str]) – Overrides the volume type of the device.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_imagebuilder import mixins as imagebuilder_mixins ebs_instance_block_device_specification_property = imagebuilder_mixins.CfnImageRecipePropsMixin.EbsInstanceBlockDeviceSpecificationProperty( delete_on_termination=False, encrypted=False, iops=123, kms_key_id="kmsKeyId", snapshot_id="snapshotId", throughput=123, volume_size=123, volume_type="volumeType" )
Attributes
- delete_on_termination
Configures delete on termination of the associated device.
- encrypted
Use to configure device encryption.
- iops
Use to configure device IOPS.
- kms_key_id
The Amazon Resource Name (ARN) that uniquely identifies the KMS key to use when encrypting the device.
This can be either the Key ARN or the Alias ARN. For more information, see Key identifiers (KeyId) in the AWS Key Management Service Developer Guide .
- snapshot_id
The snapshot that defines the device contents.
- throughput
For GP3 volumes only – The throughput in MiB/s that the volume supports.
- volume_size
Overrides the volume size of the device.
- volume_type
Overrides the volume type of the device.
InstanceBlockDeviceMappingProperty
- class CfnImageRecipePropsMixin.InstanceBlockDeviceMappingProperty(*, device_name=None, ebs=None, no_device=None, virtual_name=None)
Bases:
objectDefines block device mappings for the instance used to configure your image.
- Parameters:
device_name (
Optional[str]) – The device to which these mappings apply.ebs (
Union[IResolvable,EbsInstanceBlockDeviceSpecificationProperty,Dict[str,Any],None]) – Use to manage Amazon EBS-specific configuration for this mapping.no_device (
Optional[str]) – Enter an empty string to remove a mapping from the parent image. The following is an example of an empty string value in theNoDevicefield.NoDevice:""virtual_name (
Optional[str]) – Manages the instance ephemeral devices.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_imagebuilder import mixins as imagebuilder_mixins instance_block_device_mapping_property = imagebuilder_mixins.CfnImageRecipePropsMixin.InstanceBlockDeviceMappingProperty( device_name="deviceName", ebs=imagebuilder_mixins.CfnImageRecipePropsMixin.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" )
Attributes
- device_name
The device to which these mappings apply.
- ebs
Use to manage Amazon EBS-specific configuration for this mapping.
- no_device
Enter an empty string to remove a mapping from the parent image.
The following is an example of an empty string value in the
NoDevicefield.NoDevice:""
- virtual_name
Manages the instance ephemeral devices.
LatestVersionProperty
- class CfnImageRecipePropsMixin.LatestVersionProperty(*, arn=None, major=None, minor=None, patch=None)
Bases:
objectThe latest version references of the image recipe.
- Parameters:
arn (
Optional[str]) – The Amazon Resource Name (ARN) of the image recipe.major (
Optional[str]) – The latest version ARN of the created image recipe, with the same major version.minor (
Optional[str]) – The latest version ARN of the created image recipe, with the same minor version.patch (
Optional[str]) – The latest version ARN of the created image recipe, with the same patch version.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_imagebuilder import mixins as imagebuilder_mixins latest_version_property = imagebuilder_mixins.CfnImageRecipePropsMixin.LatestVersionProperty( arn="arn", major="major", minor="minor", patch="patch" )
Attributes
- arn
The Amazon Resource Name (ARN) of the image recipe.
- major
The latest version ARN of the created image recipe, with the same major version.
- minor
The latest version ARN of the created image recipe, with the same minor version.
- patch
The latest version ARN of the created image recipe, with the same patch version.
SystemsManagerAgentProperty
- class CfnImageRecipePropsMixin.SystemsManagerAgentProperty(*, uninstall_after_build=None)
Bases:
objectContains settings for the Systems Manager agent on your build instance.
- Parameters:
uninstall_after_build (
Union[bool,IResolvable,None]) – Controls whether the Systems Manager agent is removed from your final build image, prior to creating the new AMI. If this is set to true, then the agent is removed from the final image. If it’s set to false, then the agent is left in, so that it is included in the new AMI. default value is false. The default behavior of uninstallAfterBuild is to remove the SSM Agent if it was installed by EC2 Image Builder- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_imagebuilder import mixins as imagebuilder_mixins systems_manager_agent_property = imagebuilder_mixins.CfnImageRecipePropsMixin.SystemsManagerAgentProperty( uninstall_after_build=False )
Attributes
- uninstall_after_build
Controls whether the Systems Manager agent is removed from your final build image, prior to creating the new AMI.
If this is set to true, then the agent is removed from the final image. If it’s set to false, then the agent is left in, so that it is included in the new AMI. default value is false.
The default behavior of uninstallAfterBuild is to remove the SSM Agent if it was installed by EC2 Image Builder