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
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.109.0 (build c221850)",
date="2025-03-14T03:24:59.553Z")
@Stability(Stable)
public class CfnImageRecipe
extends CfnResource
implements IInspectable, ITaggable
An Image Builder image recipe is a document that defines the base image and the components to be applied to the base image to produce the desired configuration for the output image.
You can use an image recipe to duplicate builds. Image Builder image recipes can be shared, branched, and edited using the console wizard, the AWS CLI , or the API. You can use image recipes with your version control software to maintain shareable versioned image recipes.
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()) .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 interface
In addition to your infrastructure configuration, these settings provide an extra layer of control over your build instances.static final class
A fluent builder forCfnImageRecipe
.static interface
Configuration details of the component.static interface
Contains a key/value pair that sets the named component parameter.static interface
The image recipe EBS instance block device specification includes the Amazon EBS-specific block device mapping specifications for the image.static interface
Defines block device mappings for the instance used to configure your image.static interface
Contains settings for the Systems Manager agent on your build instance.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
CfnImageRecipe
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnImageRecipe
(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.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 of the image recipe.The description of the image recipe.getName()
The name of the image recipe.The parent image of the image recipe.getTags()
Tag Manager which manages the tags for this resource.The tags of the image recipe.The semantic version of the image recipe.The working directory to be used during build and test workflows.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
Before you create a new AMI, Image Builder launches temporary Amazon EC2 instances to build and test your image configuration.void
Before you create a new AMI, Image Builder launches temporary Amazon EC2 instances to build and test your image configuration.void
setBlockDeviceMappings
(List<Object> value) The block device mappings to apply when creating images from this recipe.void
The block device mappings to apply when creating images from this recipe.void
setComponents
(List<Object> value) The components of the image recipe.void
setComponents
(IResolvable value) The components of the image recipe.void
setDescription
(String value) The description of the image recipe.void
The name of the image recipe.void
setParentImage
(String value) The parent image of the image recipe.void
setTagsRaw
(Map<String, String> value) The tags of the image recipe.void
setVersion
(String value) The semantic version of the image recipe.void
setWorkingDirectory
(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, validateProperties
Methods inherited from class software.amazon.awscdk.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.constructs.Construct
getNode, isConstruct
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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:
inspect
in 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:
renderProperties
in 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:
getCfnProperties
in classCfnResource
-
getTags
Tag Manager which manages the tags for this resource. -
getComponents
The components of the image recipe. -
setComponents
The components of the image recipe. -
setComponents
The components of the image recipe. -
getName
The name of the image recipe. -
setName
The name of the image recipe. -
getParentImage
The parent image of the image recipe. -
setParentImage
The parent image of the image recipe. -
getVersion
The semantic version of the image recipe. -
setVersion
The semantic 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. -
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. -
getBlockDeviceMappings
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. -
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.
-