BaseImage

class aws_cdk.aws_imagebuilder_alpha.BaseImage(image)

Bases: object

(experimental) Represents a base image that is used to start from in EC2 Image Builder image builds.

Stability:

experimental

ExampleMetadata:

infused

Example:

parameterized_component = imagebuilder.Component.from_component_name(self, "ParameterizedComponent", "my-parameterized-component")

image_recipe = imagebuilder.ImageRecipe(self, "ParameterizedImageRecipe",
    base_image=imagebuilder.BaseImage.from_ssm_parameter_name("/aws/service/ami-amazon-linux-latest/al2023-ami-minimal-kernel-default-x86_64"),
    components=[imagebuilder.ComponentConfiguration(
        component=parameterized_component,
        parameters={
            "environment": imagebuilder.ComponentParameterValue.from_string("production"),
            "version": imagebuilder.ComponentParameterValue.from_string("1.0.0")
        }
    )
    ]
)
Parameters:

image (str)

Stability:

experimental

Attributes

image

(experimental) The rendered base image to use.

Stability:

experimental

Static Methods

classmethod from_ami_id(ami_id)

(experimental) The AMI ID to use as a base image in an image recipe.

Parameters:

ami_id (str) – The AMI ID to use as the base image.

Stability:

experimental

Return type:

BaseImage

classmethod from_image(image)

(experimental) The EC2 Image Builder image to use as a base image in an image recipe.

Parameters:

image (IImage) – The EC2 Image Builder image to use as a base image.

Stability:

experimental

Return type:

BaseImage

classmethod from_marketplace_product_id(product_id)

(experimental) The marketplace product ID for an AMI product to use as the base image in an image recipe.

Parameters:

product_id (str) – The Marketplace AMI product ID to use as the base image.

Stability:

experimental

Return type:

BaseImage

classmethod from_ssm_parameter(parameter)

(experimental) The SSM parameter to use as the base image in an image recipe.

Parameters:

parameter (IParameter) – The SSM parameter to use as the base image.

Stability:

experimental

Return type:

BaseImage

classmethod from_ssm_parameter_name(parameter_name)

(experimental) The parameter name for the SSM parameter to use as the base image in an image recipe.

Parameters:

parameter_name (str) – The name of the SSM parameter to use as the base image.

Stability:

experimental

Return type:

BaseImage

classmethod from_string(base_image_string)

(experimental) The direct string value of the base image to use in an image recipe.

This can be an EC2 Image Builder image ARN, an SSM parameter, an AWS Marketplace product ID, or an AMI ID.

Parameters:

base_image_string (str) – The base image as a direct string value.

Stability:

experimental

Return type:

BaseImage