aws-cdk-lib.aws_imagebuilder.CfnContainerRecipeProps

interface CfnContainerRecipeProps

LanguageType name
.NETAmazon.CDK.AWS.ImageBuilder.CfnContainerRecipeProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsimagebuilder#CfnContainerRecipeProps
Javasoftware.amazon.awscdk.services.imagebuilder.CfnContainerRecipeProps
Pythonaws_cdk.aws_imagebuilder.CfnContainerRecipeProps
TypeScript aws-cdk-lib » aws_imagebuilder » CfnContainerRecipeProps

Properties for defining a CfnContainerRecipe.

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_imagebuilder as imagebuilder } from 'aws-cdk-lib';
const cfnContainerRecipeProps: imagebuilder.CfnContainerRecipeProps = {
  components: [{
    componentArn: 'componentArn',
    parameters: [{
      name: 'name',
      value: ['value'],
    }],
  }],
  containerType: 'containerType',
  name: 'name',
  parentImage: 'parentImage',
  targetRepository: {
    repositoryName: 'repositoryName',
    service: 'service',
  },
  version: 'version',

  // the properties below are optional
  description: 'description',
  dockerfileTemplateData: 'dockerfileTemplateData',
  dockerfileTemplateUri: 'dockerfileTemplateUri',
  imageOsVersionOverride: 'imageOsVersionOverride',
  instanceConfiguration: {
    blockDeviceMappings: [{
      deviceName: 'deviceName',
      ebs: {
        deleteOnTermination: false,
        encrypted: false,
        iops: 123,
        kmsKeyId: 'kmsKeyId',
        snapshotId: 'snapshotId',
        throughput: 123,
        volumeSize: 123,
        volumeType: 'volumeType',
      },
      noDevice: 'noDevice',
      virtualName: 'virtualName',
    }],
    image: 'image',
  },
  kmsKeyId: 'kmsKeyId',
  platformOverride: 'platformOverride',
  tags: {
    tagsKey: 'tags',
  },
  workingDirectory: 'workingDirectory',
};

Properties

NameTypeDescription
componentsIResolvable | IResolvable | ComponentConfigurationProperty[]Build and test components that are included in the container recipe.
containerTypestringSpecifies the type of container, such as Docker.
namestringThe name of the container recipe.
parentImagestringThe base image for the container recipe.
targetRepositoryIResolvable | TargetContainerRepositoryPropertyThe destination repository for the container image.
versionstringThe semantic version of the container recipe.
description?stringThe description of the container recipe.
dockerfileTemplateData?stringDockerfiles 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.
dockerfileTemplateUri?stringThe S3 URI for the Dockerfile that will be used to build your container image.
imageOsVersionOverride?stringSpecifies the operating system version for the base image.
instanceConfiguration?IResolvable | InstanceConfigurationPropertyA group of options that can be used to configure an instance for building and testing container images.
kmsKeyId?stringIdentifies which KMS key is used to encrypt the container image for distribution to the target Region.
platformOverride?stringSpecifies the operating system platform when you use a custom base image.
tags?{ [string]: string }Tags that are attached to the container recipe.
workingDirectory?stringThe working directory for use during build and test workflows.

components

Type: IResolvable | IResolvable | ComponentConfigurationProperty[]

Build and test components that are included in the container recipe.

Recipes require a minimum of one build component, and can have a maximum of 20 build and test components in any combination.


containerType

Type: string

Specifies the type of container, such as Docker.


name

Type: string

The name of the container recipe.


parentImage

Type: string

The base image for the container recipe.


targetRepository

Type: IResolvable | TargetContainerRepositoryProperty

The destination repository for the container image.


version

Type: string

The semantic version of the container recipe.

The semantic version has four nodes: ../. You can assign values for the first three, and can filter on all of them.

Assignment: For the first three nodes you can assign any positive integer value, including zero, with an upper limit of 2^30-1, or 1073741823 for each node. Image Builder automatically assigns the build number to the fourth node.

Patterns: You can use any numeric pattern that adheres to the assignment requirements for the nodes that you can assign. For example, you might choose a software version pattern, such as 1.0.0, or a date, such as 2021.01.01.

Filtering: With semantic versioning, you have the flexibility to use wildcards (x) to specify the most recent versions or nodes when selecting the base image or components for your recipe. When you use a wildcard in any node, all nodes to the right of the first wildcard must also be wildcards.


description?

Type: string (optional)

The description of the container recipe.


dockerfileTemplateData?

Type: string (optional)

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.

The template data consists of contextual variables where Image Builder places build information or scripts, based on your container image recipe.


dockerfileTemplateUri?

Type: string (optional)

The S3 URI for the Dockerfile that will be used to build your container image.


imageOsVersionOverride?

Type: string (optional)

Specifies the operating system version for the base image.


instanceConfiguration?

Type: IResolvable | InstanceConfigurationProperty (optional)

A group of options that can be used to configure an instance for building and testing container images.


kmsKeyId?

Type: string (optional)

Identifies which KMS key is used to encrypt the container image for distribution to the target Region.


platformOverride?

Type: string (optional)

Specifies the operating system platform when you use a custom base image.


tags?

Type: { [string]: string } (optional)

Tags that are attached to the container recipe.


workingDirectory?

Type: string (optional)

The working directory for use during build and test workflows.