@Generated(value="jsii-pacmak/1.73.0 (build 6faeda3)", date="2023-01-25T18:28:57.852Z") public class CfnContainerRecipe extends CfnResource implements IInspectable
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();
Modifier and Type | Class and Description |
---|---|
static class |
CfnContainerRecipe.Builder
A fluent builder for
CfnContainerRecipe . |
static interface |
CfnContainerRecipe.ComponentConfigurationProperty
Configuration details of the component.
|
static interface |
CfnContainerRecipe.ComponentParameterProperty
Contains a key/value pair that sets the named component parameter.
|
static interface |
CfnContainerRecipe.EbsInstanceBlockDeviceSpecificationProperty
Amazon EBS-specific block device mapping specifications.
|
static interface |
CfnContainerRecipe.InstanceBlockDeviceMappingProperty
Defines block device mappings for the instance used to configure your image.
|
static interface |
CfnContainerRecipe.InstanceConfigurationProperty
Defines a custom base AMI and block device mapping configurations of an instance used for building and testing container images.
|
static interface |
CfnContainerRecipe.TargetContainerRepositoryProperty
The container repository where the output container image is stored.
|
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnContainerRecipe(Construct scope,
java.lang.String id,
CfnContainerRecipeProps props)
Create a new `AWS::ImageBuilder::ContainerRecipe`.
|
protected |
CfnContainerRecipe(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnContainerRecipe(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAttrArn()
Returns the Amazon Resource Name (ARN) of the container recipe.
|
java.lang.String |
getAttrName()
Returns the name of the container recipe.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.Object |
getComponents()
Build and test components that are included in the container recipe.
|
java.lang.String |
getContainerType()
Specifies the type of container, such as Docker.
|
java.lang.String |
getDescription()
The description of the container recipe.
|
java.lang.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.
|
java.lang.String |
getDockerfileTemplateUri()
The S3 URI for the Dockerfile that will be used to build your container image.
|
java.lang.String |
getImageOsVersionOverride()
Specifies the operating system version for the base image.
|
java.lang.Object |
getInstanceConfiguration()
A group of options that can be used to configure an instance for building and testing container images.
|
java.lang.String |
getKmsKeyId()
Identifies which KMS key is used to encrypt the container image for distribution to the target Region.
|
java.lang.String |
getName()
The name of the container recipe.
|
java.lang.String |
getParentImage()
The base image for the container recipe.
|
java.lang.String |
getPlatformOverride()
Specifies the operating system platform when you use a custom base image.
|
TagManager |
getTags()
Tags that are attached to the container recipe.
|
java.lang.Object |
getTargetRepository()
The destination repository for the container image.
|
java.lang.String |
getVersion()
The semantic version of the container recipe.
|
java.lang.String |
getWorkingDirectory()
The working directory for use during build and test workflows.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setComponents(IResolvable value)
Build and test components that are included in the container recipe.
|
void |
setComponents(java.util.List<java.lang.Object> value)
Build and test components that are included in the container recipe.
|
void |
setContainerType(java.lang.String value)
Specifies the type of container, such as Docker.
|
void |
setDescription(java.lang.String value)
The description of the container recipe.
|
void |
setDockerfileTemplateData(java.lang.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.
|
void |
setDockerfileTemplateUri(java.lang.String value)
The S3 URI for the Dockerfile that will be used to build your container image.
|
void |
setImageOsVersionOverride(java.lang.String value)
Specifies the operating system version for the base image.
|
void |
setInstanceConfiguration(CfnContainerRecipe.InstanceConfigurationProperty value)
A group of options that can be used to configure an instance for building and testing container images.
|
void |
setInstanceConfiguration(IResolvable value)
A group of options that can be used to configure an instance for building and testing container images.
|
void |
setKmsKeyId(java.lang.String value)
Identifies which KMS key is used to encrypt the container image for distribution to the target Region.
|
void |
setName(java.lang.String value)
The name of the container recipe.
|
void |
setParentImage(java.lang.String value)
The base image for the container recipe.
|
void |
setPlatformOverride(java.lang.String value)
Specifies the operating system platform when you use a custom base image.
|
void |
setTargetRepository(CfnContainerRecipe.TargetContainerRepositoryProperty value)
The destination repository for the container image.
|
void |
setTargetRepository(IResolvable value)
The destination repository for the container image.
|
void |
setVersion(java.lang.String value)
The semantic version of the container recipe.
|
void |
setWorkingDirectory(java.lang.String value)
The working directory for use during build and test workflows.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnContainerRecipe(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnContainerRecipe(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnContainerRecipe(Construct scope, java.lang.String id, CfnContainerRecipeProps props)
scope
- - scope in which this resource is defined. This parameter is required.id
- - scoped id of the resource. This parameter is required.props
- - resource properties. This parameter is required.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.public java.lang.String getAttrArn()
For example, arn:aws:imagebuilder:us-east-1:123456789012:container-recipe/mybasicrecipe/2020.12.17
.
public java.lang.String getAttrName()
protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public TagManager getTags()
public java.lang.Object getComponents()
Recipes require a minimum of one build component, and can have a maximum of 20 build and test components in any combination.
public void setComponents(IResolvable value)
Recipes require a minimum of one build component, and can have a maximum of 20 build and test components in any combination.
public void setComponents(java.util.List<java.lang.Object> value)
Recipes require a minimum of one build component, and can have a maximum of 20 build and test components in any combination.
public java.lang.String getContainerType()
public void setContainerType(java.lang.String value)
public java.lang.String getName()
public void setName(java.lang.String value)
public java.lang.String getParentImage()
public void setParentImage(java.lang.String value)
public java.lang.Object getTargetRepository()
public void setTargetRepository(IResolvable value)
public void setTargetRepository(CfnContainerRecipe.TargetContainerRepositoryProperty value)
public java.lang.String getVersion()
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.
public void setVersion(java.lang.String value)
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.
public java.lang.String getDescription()
public void setDescription(java.lang.String value)
public java.lang.String getDockerfileTemplateData()
The template data consists of contextual variables where Image Builder places build information or scripts, based on your container image recipe.
public void setDockerfileTemplateData(java.lang.String value)
The template data consists of contextual variables where Image Builder places build information or scripts, based on your container image recipe.
public java.lang.String getDockerfileTemplateUri()
public void setDockerfileTemplateUri(java.lang.String value)
public java.lang.String getImageOsVersionOverride()
public void setImageOsVersionOverride(java.lang.String value)
public java.lang.Object getInstanceConfiguration()
public void setInstanceConfiguration(IResolvable value)
public void setInstanceConfiguration(CfnContainerRecipe.InstanceConfigurationProperty value)
public java.lang.String getKmsKeyId()
public void setKmsKeyId(java.lang.String value)
public java.lang.String getPlatformOverride()
public void setPlatformOverride(java.lang.String value)
public java.lang.String getWorkingDirectory()
public void setWorkingDirectory(java.lang.String value)