AWS::ImageBuilder::Image
An image build version. An image is a customized, secure, and up-to-date “golden” server image that is pre-installed and pre-configured with software and settings to meet specific IT standards.
Syntax
To declare this entity in your Amazon CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::ImageBuilder::Image", "Properties" : { "ContainerRecipeArn" :String, "DistributionConfigurationArn" :String, "EnhancedImageMetadataEnabled" :Boolean, "ImageRecipeArn" :String, "ImageScanningConfiguration" :ImageScanningConfiguration, "ImageTestsConfiguration" :ImageTestsConfiguration, "InfrastructureConfigurationArn" :String, "Tags" :{} }Key:Value, ...}
YAML
Type: AWS::ImageBuilder::Image Properties: ContainerRecipeArn:StringDistributionConfigurationArn:StringEnhancedImageMetadataEnabled:BooleanImageRecipeArn:StringImageScanningConfiguration:ImageScanningConfigurationImageTestsConfiguration:ImageTestsConfigurationInfrastructureConfigurationArn:StringTags:Key:Value
Properties
ContainerRecipeArn-
The Amazon Resource Name (ARN) of the container recipe that is used for this pipeline.
Required: No
Type: String
Update requires: Replacement
DistributionConfigurationArn-
The Amazon Resource Name (ARN) of the distribution configuration.
Required: No
Type: String
Pattern:
^arn:aws[^:]*:imagebuilder:[^:]+:(?:[0-9]{12}|aws):(?:image-recipe|container-recipe|infrastructure-configuration|distribution-configuration|component|image|image-pipeline|workflow\/(?:build|test|distribution))/[a-z0-9-_]+(?:/(?:(?:x|[0-9]+)\.(?:x|[0-9]+)\.(?:x|[0-9]+))(?:/[0-9]+)?)?$Update requires: Replacement
EnhancedImageMetadataEnabled-
Indicates whether Image Builder collects additional information about the image, such as the operating system (OS) version and package list.
Required: No
Type: Boolean
Update requires: Replacement
ImageRecipeArn-
The Amazon Resource Name (ARN) of the image recipe.
Required: No
Type: String
Pattern:
^arn:aws[^:]*:imagebuilder:[^:]+:(?:[0-9]{12}|aws):(?:image-recipe|container-recipe|infrastructure-configuration|distribution-configuration|component|image|image-pipeline|workflow\/(?:build|test|distribution))/[a-z0-9-_]+(?:/(?:(?:x|[0-9]+)\.(?:x|[0-9]+)\.(?:x|[0-9]+))(?:/[0-9]+)?)?$Update requires: Replacement
ImageScanningConfigurationProperty description not available.
Required: No
Type: ImageScanningConfiguration
Update requires: Replacement
ImageTestsConfiguration-
The configuration settings for your image test components, which includes a toggle that allows you to turn off tests, and a timeout setting.
Required: No
Type: ImageTestsConfiguration
Update requires: Replacement
InfrastructureConfigurationArn-
The Amazon Resource Name (ARN) of the infrastructure configuration associated with this image pipeline.
Required: Yes
Type: String
Update requires: Replacement
Tags-
The tags of the image.
Required: No
Type: Map of String
Update requires: Replacement
Return values
Ref
When you pass the logical ID of this resource to the intrinsic Reffunction, Refreturns the resource ARN, such as
arn:aws:imagebuilder:us-west-2:123456789012:image/my-example-image.
For more information about using the Reffunction, see Ref.
Fn::GetAtt
The Fn::GetAttintrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.
For more information about using the Fn::GetAttintrinsic function, see Fn::GetAtt.
Arn-
Returns the Amazon Resource Name (ARN) of the image. For example,
arn:aws:imagebuilder:us-west-2:123456789012:image/mybasicrecipe/2019.12.03/1. ImageId-
Returns the AMI ID of the Amazon EC2 AMI in the Region in which you are using Image Builder. Values are returned only for AMIs, and not for container images.
ImageUri-
Returns a list of URIs for container images created in the context Region. Values are returned only for container images, and not for AMIs.
Name-
Returns the name of the image.
Examples
Create an image
The following example shows the schema for all of the parameters of the Image resource document in both YAML and JSON format.
YAML
Resources: ImageAllParameters: Type: 'AWS::ImageBuilder::Image' Properties: ImageRecipeArn: !Ref ImageRecipeArn InfrastructureConfigurationArn: !Ref InfrastructureConfigurationArn DistributionConfigurationArn: !Ref DistributionConfigurationArn ImageTestsConfiguration: ImageTestsEnabled: false TimeoutMinutes: 60 Tags: CustomerImageTagKey1: 'CustomerImageTagValue1' CustomerImageTagKey2: 'CustomerImageTagValue2'
JSON
{ "Resources": { "ImageAllParameters": { "Type": "AWS::ImageBuilder::Image", "Properties": { "ImageRecipeArn": { "Ref": "ImageRecipeArn" }, "InfrastructureConfigurationArn": { "Ref": "InfrastructureConfigurationArn" }, "DistributionConfigurationArn": { "Ref": "DistributionConfigurationArn" }, "ImageTestsConfiguration": { "ImageTestsEnabled": false, "TimeoutMinutes": 60 }, "Tags": { "CustomerImageTagKey1": "CustomerImageTagValue1", "CustomerImageTagKey2": "CustomerImageTagValue2" } } } } }