Class ImageRecipe


  • public class ImageRecipe
    extends com.pulumi.resources.CustomResource
    Manages an Image Builder Image Recipe. ## Example Usage
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.imagebuilder.ImageRecipe;
     import com.pulumi.aws.imagebuilder.ImageRecipeArgs;
     import com.pulumi.aws.imagebuilder.inputs.ImageRecipeBlockDeviceMappingArgs;
     import com.pulumi.aws.imagebuilder.inputs.ImageRecipeBlockDeviceMappingEbsArgs;
     import com.pulumi.aws.imagebuilder.inputs.ImageRecipeComponentArgs;
     import com.pulumi.aws.imagebuilder.inputs.ImageRecipeComponentParameterArgs;
     import java.util.ArrayList;
     import java.util.Arrays;
     import java.util.Map;
     import java.io.File;
     import java.nio.file.Files;
     import java.nio.file.Paths;
     
     public class App {
         public static void main(String[] args) {
             Pulumi.run(App::stack);
         }
     
         public static void stack(Context ctx) {
             var example = new ImageRecipe("example", ImageRecipeArgs.builder()
                 .blockDeviceMappings(ImageRecipeBlockDeviceMappingArgs.builder()
                     .ebs(ImageRecipeBlockDeviceMappingEbsArgs.builder()
                         .deleteOnTermination("true")
                         .volumeSize(100)
                         .volumeType("gp2")
                         .build())
                     .deviceName("/dev/xvdb")
                     .build())
                 .components(ImageRecipeComponentArgs.builder()
                     .parameters(                
                         ImageRecipeComponentParameterArgs.builder()
                             .name("Parameter1")
                             .value("Value1")
                             .build(),
                         ImageRecipeComponentParameterArgs.builder()
                             .name("Parameter2")
                             .value("Value2")
                             .build())
                     .componentArn(exampleAwsImagebuilderComponent.arn())
                     .build())
                 .name("example")
                 .parentImage(String.format("arn:%s:imagebuilder:%s:aws:image/amazon-linux-2-x86/x.x.x", current.partition(),currentAwsRegion.region()))
                 .version("1.0.0")
                 .build());
     
         }
     }
     
     
    ## Import ### Identity Schema #### Required - `arn` (String) ARN of the Image Builder image recipe. Using `pulumi import`, import `aws.imagebuilder.ImageRecipe` resources using the ARN. For example: ```sh $ pulumi import aws:imagebuilder/imageRecipe:ImageRecipe example arn:aws:imagebuilder:us-east-1:123456789012:image-recipe/example/1.0.0 ```
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.pulumi.resources.CustomResource

        com.pulumi.resources.CustomResource.CustomResourceInternal
      • Nested classes/interfaces inherited from class com.pulumi.resources.Resource

        com.pulumi.resources.Resource.LazyField<T extends java.lang.Object>, com.pulumi.resources.Resource.LazyFields, com.pulumi.resources.Resource.ResourceInternal
    • Field Summary

      • Fields inherited from class com.pulumi.resources.Resource

        childResources, remote
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>>> amiTags()  
      com.pulumi.core.Output<java.lang.String> arn()  
      com.pulumi.core.Output<java.util.Optional<java.util.List<ImageRecipeBlockDeviceMapping>>> blockDeviceMappings()  
      com.pulumi.core.Output<java.util.List<ImageRecipeComponent>> components()  
      com.pulumi.core.Output<java.lang.String> dateCreated()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> description()  
      static ImageRecipe get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, ImageRecipeState state, com.pulumi.resources.CustomResourceOptions options)
      Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
      com.pulumi.core.Output<java.lang.String> name()  
      com.pulumi.core.Output<java.lang.String> owner()  
      com.pulumi.core.Output<java.lang.String> parentImage()  
      com.pulumi.core.Output<java.lang.String> platform()  
      com.pulumi.core.Output<java.lang.String> region()  
      com.pulumi.core.Output<ImageRecipeSystemsManagerAgent> systemsManagerAgent()  
      com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>>> tags()  
      com.pulumi.core.Output<java.util.Map<java.lang.String,​java.lang.String>> tagsAll()  
      com.pulumi.core.Output<java.lang.String> userDataBase64()  
      com.pulumi.core.Output<java.lang.String> version()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> workingDirectory()  
      • Methods inherited from class com.pulumi.resources.CustomResource

        getId, id, idFuture
      • Methods inherited from class com.pulumi.resources.Resource

        getChildResources, getResourceName, getResourceType, getUrn, pulumiChildResources, pulumiResourceName, pulumiResourceType, urn
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ImageRecipe

        public ImageRecipe​(java.lang.String name)
        Parameters:
        name - The _unique_ name of the resulting resource.
      • ImageRecipe

        public ImageRecipe​(java.lang.String name,
                           ImageRecipeArgs args)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
      • ImageRecipe

        public ImageRecipe​(java.lang.String name,
                           ImageRecipeArgs args,
                           @Nullable
                           com.pulumi.resources.CustomResourceOptions options)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
        options - A bag of options that control this resource's behavior.
    • Method Detail

      • amiTags

        public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>>> amiTags()
        Returns:
        Tags that are applied to the AMI that Image Builder creates during the Build phase prior to image distribution. Maximum of 50 tags.
      • arn

        public com.pulumi.core.Output<java.lang.String> arn()
        Returns:
        ARN of the image recipe.
      • blockDeviceMappings

        public com.pulumi.core.Output<java.util.Optional<java.util.List<ImageRecipeBlockDeviceMapping>>> blockDeviceMappings()
        Returns:
        Configuration block(s) with block device mappings for the image recipe. Detailed below.
      • components

        public com.pulumi.core.Output<java.util.List<ImageRecipeComponent>> components()
        Returns:
        Ordered configuration block(s) with components for the image recipe. Detailed below.
      • dateCreated

        public com.pulumi.core.Output<java.lang.String> dateCreated()
        Returns:
        Date the image recipe was created.
      • description

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> description()
        Returns:
        Description of the image recipe.
      • name

        public com.pulumi.core.Output<java.lang.String> name()
        Returns:
        Name of the image recipe.
      • owner

        public com.pulumi.core.Output<java.lang.String> owner()
        Returns:
        Owner of the image recipe.
      • parentImage

        public com.pulumi.core.Output<java.lang.String> parentImage()
        Returns:
        The image recipe uses this image as a base from which to build your customized image. The value can be the base image ARN, an AMI ID, or an SSM Parameter referencing the AMI. For an SSM Parameter, enter the prefix `ssm:`, followed by the parameter name or ARN.
      • platform

        public com.pulumi.core.Output<java.lang.String> platform()
        Returns:
        Platform of the image recipe.
      • region

        public com.pulumi.core.Output<java.lang.String> region()
        Returns:
        Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
      • systemsManagerAgent

        public com.pulumi.core.Output<ImageRecipeSystemsManagerAgent> systemsManagerAgent()
        Returns:
        Configuration block for the Systems Manager Agent installed by default by Image Builder. Detailed below.
      • tags

        public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>>> tags()
        Returns:
        Key-value map of resource tags for the image recipe. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
      • tagsAll

        public com.pulumi.core.Output<java.util.Map<java.lang.String,​java.lang.String>> tagsAll()
        Returns:
        A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
      • userDataBase64

        public com.pulumi.core.Output<java.lang.String> userDataBase64()
        Returns:
        Base64 encoded user data. Use this to provide commands or a command script to run when you launch your build instance.
      • version

        public com.pulumi.core.Output<java.lang.String> version()
        Returns:
        The semantic version of the image recipe, which specifies the version in the following format, with numeric values in each position to indicate a specific version: major.minor.patch. For example: 1.0.0. The following arguments are optional:
      • workingDirectory

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> workingDirectory()
        Returns:
        The working directory to be used during build and test workflows.
      • get

        public static ImageRecipe get​(java.lang.String name,
                                      com.pulumi.core.Output<java.lang.String> id,
                                      @Nullable
                                      ImageRecipeState state,
                                      @Nullable
                                      com.pulumi.resources.CustomResourceOptions options)
        Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
        Parameters:
        name - The _unique_ name of the resulting resource.
        id - The _unique_ provider ID of the resource to lookup.
        state -
        options - Optional settings to control the behavior of the CustomResource.