Interface ICfnContainerRecipeProps
Properties for defining a CfnContainerRecipe.
Namespace: Amazon.CDK.AWS.ImageBuilder
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface ICfnContainerRecipeProps
Syntax (vb)
Public Interface ICfnContainerRecipeProps
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.ImageBuilder;
var cfnContainerRecipeProps = new CfnContainerRecipeProps {
Components = new [] { new ComponentConfigurationProperty {
ComponentArn = "componentArn",
Parameters = new [] { new ComponentParameterProperty {
Name = "name",
Value = new [] { "value" }
} }
} },
ContainerType = "containerType",
Name = "name",
ParentImage = "parentImage",
TargetRepository = new TargetContainerRepositoryProperty {
RepositoryName = "repositoryName",
Service = "service"
},
Version = "version",
// the properties below are optional
Description = "description",
DockerfileTemplateData = "dockerfileTemplateData",
DockerfileTemplateUri = "dockerfileTemplateUri",
ImageOsVersionOverride = "imageOsVersionOverride",
InstanceConfiguration = new InstanceConfigurationProperty {
BlockDeviceMappings = new [] { new InstanceBlockDeviceMappingProperty {
DeviceName = "deviceName",
Ebs = new EbsInstanceBlockDeviceSpecificationProperty {
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 = new Dictionary<string, string> {
{ "tagsKey", "tags" }
},
WorkingDirectory = "workingDirectory"
};
Synopsis
Properties
| Components | Build and test components that are included in the container recipe. |
| ContainerType | Specifies the type of container, such as Docker. |
| Description | The description of the container recipe. |
| DockerfileTemplateData | 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. |
| DockerfileTemplateUri | The S3 URI for the Dockerfile that will be used to build your container image. |
| ImageOsVersionOverride | Specifies the operating system version for the base image. |
| InstanceConfiguration | A group of options that can be used to configure an instance for building and testing container images. |
| KmsKeyId | The Amazon Resource Name (ARN) that uniquely identifies which KMS key is used to encrypt the container image for distribution to the target Region. |
| Name | The name of the container recipe. |
| ParentImage | The base image for customizations specified in the container recipe. |
| PlatformOverride | Specifies the operating system platform when you use a custom base image. |
| Tags | Tags that are attached to the container recipe. |
| TargetRepository | The destination repository for the container image. |
| Version | The semantic version of the container recipe. |
| WorkingDirectory | The working directory for use during build and test workflows. |
Properties
Components
Build and test components that are included in the container recipe.
object Components { get; }
Property Value
Remarks
Recipes require a minimum of one build component, and can have a maximum of 20 build and test components in any combination.
Type union: either IResolvable or (either IResolvable or CfnContainerRecipe.IComponentConfigurationProperty)[]
ContainerType
Specifies the type of container, such as Docker.
string ContainerType { get; }
Property Value
Remarks
Description
The description of the container recipe.
string? Description { get; }
Property Value
Remarks
DockerfileTemplateData
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.
string? DockerfileTemplateData { get; }
Property Value
Remarks
The template data consists of contextual variables where Image Builder places build information or scripts, based on your container image recipe.
DockerfileTemplateUri
The S3 URI for the Dockerfile that will be used to build your container image.
string? DockerfileTemplateUri { get; }
Property Value
Remarks
ImageOsVersionOverride
Specifies the operating system version for the base image.
string? ImageOsVersionOverride { get; }
Property Value
Remarks
InstanceConfiguration
A group of options that can be used to configure an instance for building and testing container images.
object? InstanceConfiguration { get; }
Property Value
Remarks
KmsKeyId
The Amazon Resource Name (ARN) that uniquely identifies which KMS key is used to encrypt the container image for distribution to the target Region.
string? KmsKeyId { get; }
Property Value
Remarks
This can be either the Key ARN or the Alias ARN. For more information, see Key identifiers (KeyId) in the AWS Key Management Service Developer Guide .
Name
The name of the container recipe.
string Name { get; }
Property Value
Remarks
ParentImage
The base image for customizations specified in the container recipe.
string ParentImage { get; }
Property Value
Remarks
This can contain an Image Builder image resource ARN or a container image URI, for example amazonlinux:latest .
PlatformOverride
Specifies the operating system platform when you use a custom base image.
string? PlatformOverride { get; }
Property Value
Remarks
Tags
Tags that are attached to the container recipe.
IDictionary<string, string>? Tags { get; }
Property Value
Remarks
TargetRepository
The destination repository for the container image.
object TargetRepository { get; }
Property Value
Remarks
Version
The semantic version of the container recipe.
string Version { get; }
Property Value
Remarks
The semantic version has four nodes: <major>.<minor>.<patch>/<build>. 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.
WorkingDirectory
The working directory for use during build and test workflows.
string? WorkingDirectory { get; }