Class ImageRecipe
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.imagebuilder.alpha.ImageRecipe
- All Implemented Interfaces:
IEnvironmentAware,IResource,IImageRecipe,IRecipeBase,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.120.0 (build 192dc88)",
date="2025-12-05T22:26:50.063Z")
@Stability(Experimental)
public class ImageRecipe
extends Resource
implements IImageRecipe
(experimental) Represents an EC2 Image Builder Image Recipe.
Example:
IComponent parameterizedComponent = Component.fromComponentName(this, "ParameterizedComponent", "my-parameterized-component");
ImageRecipe imageRecipe = ImageRecipe.Builder.create(this, "ParameterizedImageRecipe")
.baseImage(BaseImage.fromSsmParameterName("/aws/service/ami-amazon-linux-latest/al2023-ami-minimal-kernel-default-x86_64"))
.components(List.of(ComponentConfiguration.builder()
.component(parameterizedComponent)
.parameters(Map.of(
"environment", ComponentParameterValue.fromString("production"),
"version", ComponentParameterValue.fromString("1.0.0")))
.build()))
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class(experimental) A fluent builder forImageRecipe.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.alpha.IImageRecipe
IImageRecipe.Jsii$Default, IImageRecipe.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String(experimental) Uniquely identifies this class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedImageRecipe(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedImageRecipe(software.amazon.jsii.JsiiObjectRef objRef) ImageRecipe(software.constructs.Construct scope, String id, ImageRecipeProps props) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBlockDevice(BlockDevice... blockDevices) (experimental) Adds block devices to attach to the instance used for building the image.static IImageRecipefromImageRecipeArn(software.constructs.Construct scope, String id, String imageRecipeArn) (experimental) Import an existing image recipe given its ARN.static IImageRecipefromImageRecipeAttributes(software.constructs.Construct scope, String id, ImageRecipeAttributes attrs) (experimental) Import an existing image recipe by providing its attributes.static IImageRecipefromImageRecipeName(software.constructs.Construct scope, String id, String imageRecipeName) (experimental) Import the latest version of an existing image recipe given its name.(experimental) The ARN of the image recipe.(experimental) The name of the image recipe.(experimental) The version of the image recipe.grant(IGrantable grantee, String... actions) (experimental) Grant custom actions to the given grantee for the image recipe.grantRead(IGrantable grantee) (experimental) Grant read permissions to the given grantee for the image recipe.static Boolean(experimental) Return whether the given object is an ImageRecipe.Methods inherited from class software.amazon.awscdk.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResourceMethods inherited from class software.constructs.Construct
getNode, isConstruct, toStringMethods 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.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getStackMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
PROPERTY_INJECTION_ID
(experimental) Uniquely identifies this class.
-
-
Constructor Details
-
ImageRecipe
protected ImageRecipe(software.amazon.jsii.JsiiObjectRef objRef) -
ImageRecipe
protected ImageRecipe(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
ImageRecipe
@Stability(Experimental) public ImageRecipe(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull ImageRecipeProps props) - Parameters:
scope- This parameter is required.id- This parameter is required.props- This parameter is required.
-
-
Method Details
-
fromImageRecipeArn
@Stability(Experimental) @NotNull public static IImageRecipe fromImageRecipeArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String imageRecipeArn) (experimental) Import an existing image recipe given its ARN.- Parameters:
scope- This parameter is required.id- This parameter is required.imageRecipeArn- This parameter is required.
-
fromImageRecipeAttributes
@Stability(Experimental) @NotNull public static IImageRecipe fromImageRecipeAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull ImageRecipeAttributes attrs) (experimental) Import an existing image recipe by providing its attributes.If the image recipe name is provided as an attribute, it must be normalized by converting all alphabetical characters to lowercase, and replacing all spaces and underscores with hyphens.
- Parameters:
scope- This parameter is required.id- This parameter is required.attrs- This parameter is required.
-
fromImageRecipeName
@Stability(Experimental) @NotNull public static IImageRecipe fromImageRecipeName(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String imageRecipeName) (experimental) Import the latest version of an existing image recipe given its name.The provided name must be normalized by converting all alphabetical characters to lowercase, and replacing all spaces and underscores with hyphens.
- Parameters:
scope- This parameter is required.id- This parameter is required.imageRecipeName- This parameter is required.
-
isImageRecipe
(experimental) Return whether the given object is an ImageRecipe.- Parameters:
x- This parameter is required.
-
addBlockDevice
(experimental) Adds block devices to attach to the instance used for building the image.- Parameters:
blockDevices- The list of block devices to attach. This parameter is required.
-
grant
@Stability(Experimental) @NotNull public Grant grant(@NotNull IGrantable grantee, @NotNull String... actions) (experimental) Grant custom actions to the given grantee for the image recipe.- Specified by:
grantin interfaceIRecipeBase- Parameters:
grantee- The principal. This parameter is required.actions- The list of actions. This parameter is required.
-
grantRead
(experimental) Grant read permissions to the given grantee for the image recipe.- Specified by:
grantReadin interfaceIRecipeBase- Parameters:
grantee- The principal. This parameter is required.
-
getImageRecipeArn
(experimental) The ARN of the image recipe.- Specified by:
getImageRecipeArnin interfaceIImageRecipe
-
getImageRecipeName
(experimental) The name of the image recipe.- Specified by:
getImageRecipeNamein interfaceIImageRecipe
-
getImageRecipeVersion
(experimental) The version of the image recipe.- Specified by:
getImageRecipeVersionin interfaceIImageRecipe
-