Class CfnContainerRecipe

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.104.0 (build e79254c)", date="2024-11-06T23:25:11.088Z") @Stability(Stable) public class CfnContainerRecipe extends CfnResource implements IInspectable, ITaggable
Creates a new container recipe.

Container recipes define how images are configured, tested, and assessed.

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.*;
 CfnContainerRecipe cfnContainerRecipe = CfnContainerRecipe.Builder.create(this, "MyCfnContainerRecipe")
         .components(List.of(ComponentConfigurationProperty.builder()
                 .componentArn("componentArn")
                 .parameters(List.of(ComponentParameterProperty.builder()
                         .name("name")
                         .value(List.of("value"))
                         .build()))
                 .build()))
         .containerType("containerType")
         .name("name")
         .parentImage("parentImage")
         .targetRepository(TargetContainerRepositoryProperty.builder()
                 .repositoryName("repositoryName")
                 .service("service")
                 .build())
         .version("version")
         // the properties below are optional
         .description("description")
         .dockerfileTemplateData("dockerfileTemplateData")
         .dockerfileTemplateUri("dockerfileTemplateUri")
         .imageOsVersionOverride("imageOsVersionOverride")
         .instanceConfiguration(InstanceConfigurationProperty.builder()
                 .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()))
                 .image("image")
                 .build())
         .kmsKeyId("kmsKeyId")
         .platformOverride("platformOverride")
         .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

    • CfnContainerRecipe

      protected CfnContainerRecipe(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnContainerRecipe

      protected CfnContainerRecipe(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnContainerRecipe

      @Stability(Stable) public CfnContainerRecipe(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnContainerRecipeProps 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 container recipe.

      For example, arn:aws:imagebuilder:us-east-1:123456789012:container-recipe/mybasicrecipe/2020.12.17 .

    • getAttrName

      @Stability(Stable) @NotNull public String getAttrName()
      Returns the name of the container 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()
      Build and test components that are included in the container recipe.
    • setComponents

      @Stability(Stable) public void setComponents(@NotNull IResolvable value)
      Build and test components that are included in the container recipe.
    • setComponents

      @Stability(Stable) public void setComponents(@NotNull List<Object> value)
      Build and test components that are included in the container recipe.
    • getContainerType

      @Stability(Stable) @NotNull public String getContainerType()
      Specifies the type of container, such as Docker.
    • setContainerType

      @Stability(Stable) public void setContainerType(@NotNull String value)
      Specifies the type of container, such as Docker.
    • getName

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

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

      @Stability(Stable) @NotNull public String getParentImage()
      The base image for the container recipe.
    • setParentImage

      @Stability(Stable) public void setParentImage(@NotNull String value)
      The base image for the container recipe.
    • getTargetRepository

      @Stability(Stable) @NotNull public Object getTargetRepository()
      The destination repository for the container image.
    • setTargetRepository

      @Stability(Stable) public void setTargetRepository(@NotNull IResolvable value)
      The destination repository for the container image.
    • setTargetRepository

      @Stability(Stable) public void setTargetRepository(@NotNull CfnContainerRecipe.TargetContainerRepositoryProperty value)
      The destination repository for the container image.
    • getVersion

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

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

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

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

      @Stability(Stable) @Nullable public String getDockerfileTemplateData()
      Dockerfiles are text documents that are used to build Docker containers, and ensure that they contain all of the elements required by the application running inside.
    • setDockerfileTemplateData

      @Stability(Stable) public void setDockerfileTemplateData(@Nullable String value)
      Dockerfiles are text documents that are used to build Docker containers, and ensure that they contain all of the elements required by the application running inside.
    • getDockerfileTemplateUri

      @Stability(Stable) @Nullable public String getDockerfileTemplateUri()
      The S3 URI for the Dockerfile that will be used to build your container image.
    • setDockerfileTemplateUri

      @Stability(Stable) public void setDockerfileTemplateUri(@Nullable String value)
      The S3 URI for the Dockerfile that will be used to build your container image.
    • getImageOsVersionOverride

      @Stability(Stable) @Nullable public String getImageOsVersionOverride()
      Specifies the operating system version for the base image.
    • setImageOsVersionOverride

      @Stability(Stable) public void setImageOsVersionOverride(@Nullable String value)
      Specifies the operating system version for the base image.
    • getInstanceConfiguration

      @Stability(Stable) @Nullable public Object getInstanceConfiguration()
      A group of options that can be used to configure an instance for building and testing container images.
    • setInstanceConfiguration

      @Stability(Stable) public void setInstanceConfiguration(@Nullable IResolvable value)
      A group of options that can be used to configure an instance for building and testing container images.
    • setInstanceConfiguration

      @Stability(Stable) public void setInstanceConfiguration(@Nullable CfnContainerRecipe.InstanceConfigurationProperty value)
      A group of options that can be used to configure an instance for building and testing container images.
    • getKmsKeyId

      @Stability(Stable) @Nullable public String getKmsKeyId()
      Identifies which KMS key is used to encrypt the container image for distribution to the target Region.
    • setKmsKeyId

      @Stability(Stable) public void setKmsKeyId(@Nullable String value)
      Identifies which KMS key is used to encrypt the container image for distribution to the target Region.
    • getPlatformOverride

      @Stability(Stable) @Nullable public String getPlatformOverride()
      Specifies the operating system platform when you use a custom base image.
    • setPlatformOverride

      @Stability(Stable) public void setPlatformOverride(@Nullable String value)
      Specifies the operating system platform when you use a custom base image.
    • getTagsRaw

      @Stability(Stable) @Nullable public Map<String,String> getTagsRaw()
      Tags that are attached to the container recipe.
    • setTagsRaw

      @Stability(Stable) public void setTagsRaw(@Nullable Map<String,String> value)
      Tags that are attached to the container recipe.
    • getWorkingDirectory

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

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