Class CfnImageRecipe
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.imagebuilder.CfnImageRecipe
- All Implemented Interfaces:
IInspectable,ITaggable,IImageRecipeRef,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.116.0 (build 0eddcff)",
date="2025-10-24T13:34:39.943Z")
@Stability(Stable)
public class CfnImageRecipe
extends CfnResource
implements IInspectable, IImageRecipeRef, ITaggable
Creates a new image recipe.
Image recipes define how images are configured, tested, and assessed.
Example:
// 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.*;
CfnImageRecipe cfnImageRecipe = CfnImageRecipe.Builder.create(this, "MyCfnImageRecipe")
.components(List.of(ComponentConfigurationProperty.builder()
.componentArn("componentArn")
.parameters(List.of(ComponentParameterProperty.builder()
.name("name")
.value(List.of("value"))
.build()))
.build()))
.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"))
.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()))
.description("description")
.tags(Map.of(
"tagsKey", "tags"))
.workingDirectory("workingDirectory")
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceIn addition to your infrastructure configuration, these settings provide an extra layer of control over your build instances.static final classA fluent builder forCfnImageRecipe.static interfaceConfiguration details of the component.static interfaceContains a key/value pair that sets the named component parameter.static interfaceThe image recipe EBS instance block device specification includes the Amazon EBS-specific block device mapping specifications for the image.static interfaceDefines block device mappings for the instance used to configure your image.static interfaceContains settings for the Systems Manager agent on your build instance.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.imagebuilder.IImageRecipeRef
IImageRecipeRef.Jsii$Default, IImageRecipeRef.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnImageRecipe(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnImageRecipe(software.amazon.jsii.JsiiObjectRef objRef) CfnImageRecipe(software.constructs.Construct scope, String id, CfnImageRecipeProps props) -
Method Summary
Modifier and TypeMethodDescriptionBefore you create a new AMI, Image Builder launches temporary Amazon EC2 instances to build and test your image configuration.Tags that are applied to the AMI that Image Builder creates during the Build phase prior to image distribution.Returns the Amazon Resource Name (ARN) of the image recipe.The name of the image recipe.The block device mappings to apply when creating images from this recipe.The components that are included in the image recipe.The description of the image recipe.A reference to a ImageRecipe resource.getName()The name of the image recipe.The base image for customizations specified in the image recipe.getTags()Tag Manager which manages the tags for this resource.The tags of the image recipe.The version of the image recipe.The working directory to be used during build and test workflows.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidBefore you create a new AMI, Image Builder launches temporary Amazon EC2 instances to build and test your image configuration.voidBefore you create a new AMI, Image Builder launches temporary Amazon EC2 instances to build and test your image configuration.voidsetAmiTags(Map<String, String> value) Tags that are applied to the AMI that Image Builder creates during the Build phase prior to image distribution.voidsetAmiTags(IResolvable value) Tags that are applied to the AMI that Image Builder creates during the Build phase prior to image distribution.voidsetBlockDeviceMappings(List<Object> value) The block device mappings to apply when creating images from this recipe.voidThe block device mappings to apply when creating images from this recipe.voidsetComponents(List<Object> value) The components that are included in the image recipe.voidsetComponents(IResolvable value) The components that are included in the image recipe.voidsetDescription(String value) The description of the image recipe.voidThe name of the image recipe.voidsetParentImage(String value) The base image for customizations specified in the image recipe.voidsetTagsRaw(Map<String, String> value) The tags of the image recipe.voidsetVersion(String value) The version of the image recipe.voidsetWorkingDirectory(String value) The working directory to be used during build and test workflows.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnImageRecipe
protected CfnImageRecipe(software.amazon.jsii.JsiiObjectRef objRef) -
CfnImageRecipe
protected CfnImageRecipe(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnImageRecipe
@Stability(Stable) public CfnImageRecipe(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnImageRecipeProps props) - Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.props- Resource properties. This parameter is required.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrArn
Returns the Amazon Resource Name (ARN) of the image recipe.For example,
arn:aws:imagebuilder:us-east-1:123456789012:image-recipe/mybasicrecipe/2019.12.03. -
getAttrName
The name of the image recipe. -
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getImageRecipeRef
A reference to a ImageRecipe resource.- Specified by:
getImageRecipeRefin interfaceIImageRecipeRef
-
getTags
Tag Manager which manages the tags for this resource. -
getComponents
The components that are included in the image recipe.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnImageRecipe.ComponentConfigurationProperty> -
setComponents
The components that are included in the image recipe. -
setComponents
The components that are included in the image recipe. -
getName
The name of the image recipe. -
setName
The name of the image recipe. -
getParentImage
The base image for customizations specified in the image recipe. -
setParentImage
The base image for customizations specified in the image recipe. -
getVersion
The version of the image recipe. -
setVersion
The version of the image recipe. -
getAdditionalInstanceConfiguration
Before you create a new AMI, Image Builder launches temporary Amazon EC2 instances to build and test your image configuration.Returns union: either
IResolvableorCfnImageRecipe.AdditionalInstanceConfigurationProperty -
setAdditionalInstanceConfiguration
Before you create a new AMI, Image Builder launches temporary Amazon EC2 instances to build and test your image configuration. -
setAdditionalInstanceConfiguration
@Stability(Stable) public void setAdditionalInstanceConfiguration(@Nullable CfnImageRecipe.AdditionalInstanceConfigurationProperty value) Before you create a new AMI, Image Builder launches temporary Amazon EC2 instances to build and test your image configuration. -
getAmiTags
Tags that are applied to the AMI that Image Builder creates during the Build phase prior to image distribution.Returns union: either Mapinvalid input: '<'String,
String> orIResolvable -
setAmiTags
Tags that are applied to the AMI that Image Builder creates during the Build phase prior to image distribution. -
setAmiTags
Tags that are applied to the AMI that Image Builder creates during the Build phase prior to image distribution. -
getBlockDeviceMappings
The block device mappings to apply when creating images from this recipe.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnImageRecipe.InstanceBlockDeviceMappingProperty> -
setBlockDeviceMappings
The block device mappings to apply when creating images from this recipe. -
setBlockDeviceMappings
The block device mappings to apply when creating images from this recipe. -
getDescription
The description of the image recipe. -
setDescription
The description of the image recipe. -
getTagsRaw
The tags of the image recipe. -
setTagsRaw
The tags of the image recipe. -
getWorkingDirectory
The working directory to be used during build and test workflows. -
setWorkingDirectory
The working directory to be used during build and test workflows.
-