CfnImageRecipeProps Struct
Properties for defining a CfnImageRecipe.
| Source | |
|---|---|
| Type last changed |
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_imagebuilder as imagebuilder } from 'aws-cdk-lib';
const cfnImageRecipeProps: imagebuilder.CfnImageRecipeProps = {
name: 'name',
parentImage: 'parentImage',
version: 'version',
// the properties below are optional
additionalInstanceConfiguration: {
systemsManagerAgent: {
uninstallAfterBuild: false,
},
userDataOverride: 'userDataOverride',
},
amiTags: {
amiTagsKey: 'amiTags',
},
amiWatermarks: ['amiWatermarks'],
blockDeviceMappings: [{
deviceName: 'deviceName',
ebs: {
deleteOnTermination: false,
encrypted: false,
iops: 123,
kmsKeyId: 'kmsKeyId',
snapshotId: 'snapshotId',
throughput: 123,
volumeSize: 123,
volumeType: 'volumeType',
},
noDevice: 'noDevice',
virtualName: 'virtualName',
}],
components: [{
componentArn: 'componentArn',
parameters: [{
name: 'name',
value: ['value'],
}],
}],
description: 'description',
tags: {
tagsKey: 'tags',
},
workingDirectory: 'workingDirectory',
};
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_imagebuilder as imagebuilder
cfn_image_recipe_props = imagebuilder.CfnImageRecipeProps(
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"
),
ami_tags={
"ami_tags_key": "amiTags"
},
ami_watermarks=["amiWatermarks"],
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"
)],
components=[imagebuilder.CfnImageRecipe.ComponentConfigurationProperty(
component_arn="componentArn",
parameters=[imagebuilder.CfnImageRecipe.ComponentParameterProperty(
name="name",
value=["value"]
)]
)],
description="description",
tags={
"tags_key": "tags"
},
working_directory="workingDirectory"
)
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.imagebuilder.*;
CfnImageRecipeProps cfnImageRecipeProps = CfnImageRecipeProps.builder()
.name("name")
.parentImage("parentImage")
.version("version")
// the properties below are optional
.additionalInstanceConfiguration(AdditionalInstanceConfigurationProperty.builder()
.systemsManagerAgent(SystemsManagerAgentProperty.builder()
.uninstallAfterBuild(false)
.build())
.userDataOverride("userDataOverride")
.build())
.amiTags(Map.of(
"amiTagsKey", "amiTags"))
.amiWatermarks(List.of("amiWatermarks"))
.blockDeviceMappings(List.of(InstanceBlockDeviceMappingProperty.builder()
.deviceName("deviceName")
.ebs(EbsInstanceBlockDeviceSpecificationProperty.builder()
.deleteOnTermination(false)
.encrypted(false)
.iops(123)
.kmsKeyId("kmsKeyId")
.snapshotId("snapshotId")
.throughput(123)
.volumeSize(123)
.volumeType("volumeType")
.build())
.noDevice("noDevice")
.virtualName("virtualName")
.build()))
.components(List.of(ComponentConfigurationProperty.builder()
.componentArn("componentArn")
.parameters(List.of(ComponentParameterProperty.builder()
.name("name")
.value(List.of("value"))
.build()))
.build()))
.description("description")
.tags(Map.of(
"tagsKey", "tags"))
.workingDirectory("workingDirectory")
.build();
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.ImageBuilder;
var cfnImageRecipeProps = new CfnImageRecipeProps {
Name = "name",
ParentImage = "parentImage",
Version = "version",
// the properties below are optional
AdditionalInstanceConfiguration = new AdditionalInstanceConfigurationProperty {
SystemsManagerAgent = new SystemsManagerAgentProperty {
UninstallAfterBuild = false
},
UserDataOverride = "userDataOverride"
},
AmiTags = new Dictionary<string, string> {
{ "amiTagsKey", "amiTags" }
},
AmiWatermarks = new [] { "amiWatermarks" },
BlockDeviceMappings = new [] { new InstanceBlockDeviceMappingProperty {
DeviceName = "deviceName",
Ebs = new EbsInstanceBlockDeviceSpecificationProperty {
DeleteOnTermination = false,
Encrypted = false,
Iops = 123,
KmsKeyId = "kmsKeyId",
SnapshotId = "snapshotId",
Throughput = 123,
VolumeSize = 123,
VolumeType = "volumeType"
},
NoDevice = "noDevice",
VirtualName = "virtualName"
} },
Components = new [] { new ComponentConfigurationProperty {
ComponentArn = "componentArn",
Parameters = new [] { new ComponentParameterProperty {
Name = "name",
Value = new [] { "value" }
} }
} },
Description = "description",
Tags = new Dictionary<string, string> {
{ "tagsKey", "tags" }
},
WorkingDirectory = "workingDirectory"
};
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
cfnImageRecipeProps := &CfnImageRecipeProps{
Name: jsii.String("name"),
ParentImage: jsii.String("parentImage"),
Version: jsii.String("version"),
// the properties below are optional
AdditionalInstanceConfiguration: &AdditionalInstanceConfigurationProperty{
SystemsManagerAgent: &SystemsManagerAgentProperty{
UninstallAfterBuild: jsii.Boolean(false),
},
UserDataOverride: jsii.String("userDataOverride"),
},
AmiTags: map[string]*string{
"amiTagsKey": jsii.String("amiTags"),
},
AmiWatermarks: []*string{
jsii.String("amiWatermarks"),
},
BlockDeviceMappings: []interface{}{
&InstanceBlockDeviceMappingProperty{
DeviceName: jsii.String("deviceName"),
Ebs: &EbsInstanceBlockDeviceSpecificationProperty{
DeleteOnTermination: jsii.Boolean(false),
Encrypted: jsii.Boolean(false),
Iops: jsii.Number(123),
KmsKeyId: jsii.String("kmsKeyId"),
SnapshotId: jsii.String("snapshotId"),
Throughput: jsii.Number(123),
VolumeSize: jsii.Number(123),
VolumeType: jsii.String("volumeType"),
},
NoDevice: jsii.String("noDevice"),
VirtualName: jsii.String("virtualName"),
},
},
Components: []interface{}{
&ComponentConfigurationProperty{
ComponentArn: jsii.String("componentArn"),
Parameters: []interface{}{
&ComponentParameterProperty{
Name: jsii.String("name"),
Value: []*string{
jsii.String("value"),
},
},
},
},
},
Description: jsii.String("description"),
Tags: map[string]*string{
"tagsKey": jsii.String("tags"),
},
WorkingDirectory: jsii.String("workingDirectory"),
}
Properties
additionalInstanceConfigurationoptionalIResolvable | CfnImageRecipe.additional_instance_configurationoptionaltyping.Union[IResolvable, AdditionalInstanceConfigurationProperty]additionalInstanceConfigurationoptionalIResolvableAdditionalInstanceConfigurationoptionalIResolvableAdditionalInstanceConfigurationoptionalinterface{} #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.
amiTagsoptionalIResolvable | { [key: string]: string }ami_tagsoptionaltyping.Union[IResolvable, typing.Mapping[str, str]]amiTagsoptionalIResolvableAmiTagsoptionalIResolvableAmiTagsoptionalinterface{} #amiWatermarksoptionalstring[]ami_watermarksoptionaltyping.List[str]amiWatermarksoptionalList<String>AmiWatermarksoptionalstring[]AmiWatermarksoptional*[]*string #AMI watermarks are lineage markers that automatically propagate to derivative AMIs when the source AMI is copied or distributed.
blockDeviceMappingsoptionalIResolvable | IResolvable | CfnImageRecipe.block_device_mappingsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, InstanceBlockDeviceMappingProperty]]]blockDeviceMappingsoptionalIResolvableBlockDeviceMappingsoptionalIResolvableBlockDeviceMappingsoptionalinterface{} #componentsoptionalIResolvable | IResolvable | CfnImageRecipe.componentsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, ComponentConfigurationProperty]]]componentsoptionalIResolvableComponentsoptionalIResolvableComponentsoptionalinterface{} #Recipes require a minimum of one build component, and can have a maximum of 20 build and test components in any combination.
descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string #notes
You can specify the parent image using one of the following options:
- AMI ID
- Image Builder image Amazon Resource Name (ARN)
- AWS Systems Manager (SSM) Parameter Store Parameter, prefixed by
ssm:, followed by the parameter name or ARN. - AWS Marketplace product ID
tagsoptional{ [key: string]: string }tagsoptionaltyping.Mapping[str, str]tagsoptionalMap<String, String>TagsoptionalIDictionary<string, string>Tagsoptional*map[string]*string #notes
The semantic version has four nodes: <major>.<minor>.<patch>/<build>. You can assign values for the first three, and can filter on all of them.
Assignment: For the first three nodes you can assign any positive integer value, including zero, with an upper limit of 2^30-1, or 1073741823 for each node. Image Builder automatically assigns the build number to the fourth node.
Patterns: You can use any numeric pattern that adheres to the assignment requirements for the nodes that you can assign. For example, you might choose a software version pattern, such as 1.0.0, or a date, such as 2021.01.01.
workingDirectoryoptionalstringworking_directoryoptionalstrworkingDirectoryoptionalStringWorkingDirectoryoptionalstringWorkingDirectoryoptional*string #