Class ContainerRecipe


  • public class ContainerRecipe
    extends com.pulumi.resources.CustomResource
    Manages an Image Builder Container Recipe. ## Example Usage <!--Start PulumiCodeChooser --> ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.imagebuilder.ContainerRecipe; import com.pulumi.aws.imagebuilder.ContainerRecipeArgs; import com.pulumi.aws.imagebuilder.inputs.ContainerRecipeTargetRepositoryArgs; import com.pulumi.aws.imagebuilder.inputs.ContainerRecipeComponentArgs; import java.util.List; import java.util.ArrayList; 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 ContainerRecipe("example", ContainerRecipeArgs.builder() .name("example") .version("1.0.0") .containerType("DOCKER") .parentImage("arn:aws:imagebuilder:eu-central-1:aws:image/amazon-linux-x86-latest/x.x.x") .targetRepository(ContainerRecipeTargetRepositoryArgs.builder() .repositoryName(exampleAwsEcrRepository.name()) .service("ECR") .build()) .components(ContainerRecipeComponentArgs.builder() .componentArn(exampleAwsImagebuilderComponent.arn()) .parameters( ContainerRecipeComponentParameterArgs.builder() .name("Parameter1") .value("Value1") .build(), ContainerRecipeComponentParameterArgs.builder() .name("Parameter2") .value("Value2") .build()) .build()) .dockerfileTemplateData(""" FROM {{{ imagebuilder:parentImage }}} {{{ imagebuilder:environments }}} {{{ imagebuilder:components }}} """) .build()); } } ``` <!--End PulumiCodeChooser --> ## Import Using `pulumi import`, import `aws_imagebuilder_container_recipe` resources using the Amazon Resource Name (ARN). For example: ```sh $ pulumi import aws:imagebuilder/containerRecipe:ContainerRecipe example arn:aws:imagebuilder:us-east-1:123456789012:container-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.lang.String> arn()  
      com.pulumi.core.Output<java.util.List<ContainerRecipeComponent>> components()  
      com.pulumi.core.Output<java.lang.String> containerType()  
      com.pulumi.core.Output<java.lang.String> dateCreated()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> description()  
      com.pulumi.core.Output<java.lang.String> dockerfileTemplateData()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> dockerfileTemplateUri()  
      com.pulumi.core.Output<java.lang.Boolean> encrypted()  
      static ContainerRecipe get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, ContainerRecipeState 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.util.Optional<ContainerRecipeInstanceConfiguration>> instanceConfiguration()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> kmsKeyId()  
      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.util.Optional<java.lang.String>> platformOverride()  
      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<ContainerRecipeTargetRepository> targetRepository()  
      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

      • ContainerRecipe

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

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

        public ContainerRecipe​(java.lang.String name,
                               ContainerRecipeArgs 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

      • arn

        public com.pulumi.core.Output<java.lang.String> arn()
        Returns:
        (Required) Amazon Resource Name (ARN) of the container recipe.
      • components

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

        public com.pulumi.core.Output<java.lang.String> containerType()
        Returns:
        The type of the container to create. Valid values: `DOCKER`.
      • dateCreated

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

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> description()
        Returns:
        The description of the container recipe.
      • dockerfileTemplateData

        public com.pulumi.core.Output<java.lang.String> dockerfileTemplateData()
        Returns:
        The Dockerfile template used to build the image as an inline data blob.
      • dockerfileTemplateUri

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> dockerfileTemplateUri()
        Returns:
        The Amazon S3 URI for the Dockerfile that will be used to build the container image.
      • encrypted

        public com.pulumi.core.Output<java.lang.Boolean> encrypted()
        Returns:
        Whether to encrypt the volume. Defaults to unset, which is the value inherited from the parent image.
      • instanceConfiguration

        public com.pulumi.core.Output<java.util.Optional<ContainerRecipeInstanceConfiguration>> instanceConfiguration()
        Returns:
        Configuration block used to configure an instance for building and testing container images. Detailed below.
      • kmsKeyId

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> kmsKeyId()
        Returns:
        The KMS key used to encrypt the container image.
      • name

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

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

        public com.pulumi.core.Output<java.lang.String> parentImage()
        Returns:
        The base image for the container recipe.
      • platform

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

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> platformOverride()
        Returns:
        Specifies the operating system platform when you use a custom base image.
      • 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 container recipe. If configured with a provider `default_tags` 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 `default_tags` configuration block.
      • targetRepository

        public com.pulumi.core.Output<ContainerRecipeTargetRepository> targetRepository()
        Returns:
        The destination repository for the container image. Detailed below.
      • version

        public com.pulumi.core.Output<java.lang.String> version()
        Returns:
        Version of the container recipe. The following attributes 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 ContainerRecipe get​(java.lang.String name,
                                          com.pulumi.core.Output<java.lang.String> id,
                                          @Nullable
                                          ContainerRecipeState 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.