Class CfnImageRecipe

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, ITaggable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-08T21:35:08.241Z") @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:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String 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

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      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 class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrArn

      @Stability(Stable) @NotNull public String 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

      @Stability(Stable) @NotNull public String getAttrName()
      The name of the image recipe.
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getTags

      @Stability(Stable) @NotNull public TagManager getTags()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getTags in interface ITaggable
    • getComponents

      @Stability(Stable) @NotNull public Object getComponents()
      The components of the image recipe.
    • setComponents

      @Stability(Stable) public void setComponents(@NotNull IResolvable value)
      The components of the image recipe.
    • setComponents

      @Stability(Stable) public void setComponents(@NotNull List<Object> value)
      The components of the image recipe.
    • getName

      @Stability(Stable) @NotNull public String getName()
      The name of the image recipe.
    • setName

      @Stability(Stable) public void setName(@NotNull String value)
      The name of the image recipe.
    • getParentImage

      @Stability(Stable) @NotNull public String getParentImage()
      The parent image of the image recipe.
    • setParentImage

      @Stability(Stable) public void setParentImage(@NotNull String value)
      The parent image of the image recipe.
    • getVersion

      @Stability(Stable) @NotNull public String getVersion()
      The semantic version of the image recipe.
    • setVersion

      @Stability(Stable) public void setVersion(@NotNull String value)
      The semantic version of the image recipe.
    • getAdditionalInstanceConfiguration

      @Stability(Stable) @Nullable public Object getAdditionalInstanceConfiguration()
      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 IResolvable value)
      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

      @Stability(Stable) @Nullable public Object getBlockDeviceMappings()
      The block device mappings to apply when creating images from this recipe.
    • setBlockDeviceMappings

      @Stability(Stable) public void setBlockDeviceMappings(@Nullable IResolvable value)
      The block device mappings to apply when creating images from this recipe.
    • setBlockDeviceMappings

      @Stability(Stable) public void setBlockDeviceMappings(@Nullable List<Object> value)
      The block device mappings to apply when creating images from this recipe.
    • getDescription

      @Stability(Stable) @Nullable public String getDescription()
      The description of the image recipe.
    • setDescription

      @Stability(Stable) public void setDescription(@Nullable String value)
      The description of the image recipe.
    • getTagsRaw

      @Stability(Stable) @Nullable public Map<String,String> getTagsRaw()
      The tags of the image recipe.
    • setTagsRaw

      @Stability(Stable) public void setTagsRaw(@Nullable Map<String,String> value)
      The tags of the image recipe.
    • getWorkingDirectory

      @Stability(Stable) @Nullable public String getWorkingDirectory()
      The working directory to be used during build and test workflows.
    • setWorkingDirectory

      @Stability(Stable) public void setWorkingDirectory(@Nullable String value)
      The working directory to be used during build and test workflows.