Class CfnImageRecipe

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

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:29:57.436Z") @Stability(Stable) public class CfnImageRecipe extends CfnResource implements IInspectable
A CloudFormation AWS::ImageBuilder::ImageRecipe.

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();
 
  • 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 Construct scope, @NotNull String id, @NotNull CfnImageRecipeProps props)
      Create a new AWS::ImageBuilder::ImageRecipe.

      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      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()
      The tags of the image recipe.
    • getComponents

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

      Components are orchestration documents that define a sequence of steps for downloading, installing, configuring, and testing software packages. They also define validation and security hardening steps. A component is defined using a YAML document format.

    • setComponents

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

      Components are orchestration documents that define a sequence of steps for downloading, installing, configuring, and testing software packages. They also define validation and security hardening steps. A component is defined using a YAML document format.

    • setComponents

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

      Components are orchestration documents that define a sequence of steps for downloading, installing, configuring, and testing software packages. They also define validation and security hardening steps. A component is defined using a YAML document format.

    • 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.

      The string must be either an Image ARN or an AMI ID.

    • setParentImage

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

      The string must be either an Image ARN or an AMI ID.

    • 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.

      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.

    • 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.

      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.

    • 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.

      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.

    • 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.
    • 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.