Class CfnImageRecipe
- All Implemented Interfaces:
IConstruct
,IDependable
,IInspectable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
AWS::ImageBuilder::ImageRecipe
.
An Image Builder image recipe is a document that defines the base image and the components to be applied to the base image to produce the desired configuration for the output image. You can use an image recipe to duplicate builds. Image Builder image recipes can be shared, branched, and edited using the console wizard, the AWS CLI , or the API. You can use image recipes with your version control software to maintain shareable versioned image recipes.
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.*; CfnImageRecipe cfnImageRecipe = CfnImageRecipe.Builder.create(this, "MyCfnImageRecipe") .components(List.of(ComponentConfigurationProperty.builder() .componentArn("componentArn") .parameters(List.of(ComponentParameterProperty.builder() .name("name") .value(List.of("value")) .build())) .build())) .name("name") .parentImage("parentImage") .version("version") // the properties below are optional .additionalInstanceConfiguration(AdditionalInstanceConfigurationProperty.builder() .systemsManagerAgent(SystemsManagerAgentProperty.builder() .uninstallAfterBuild(false) .build()) .userDataOverride("userDataOverride") .build()) .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())) .description("description") .tags(Map.of( "tagsKey", "tags")) .workingDirectory("workingDirectory") .build();
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
In addition to your infrastructure configuration, these settings provide an extra layer of control over your build instances.static final class
A fluent builder forCfnImageRecipe
.static interface
Configuration details of the component.static interface
Contains a key/value pair that sets the named component parameter.static interface
The image recipe EBS instance block device specification includes the Amazon EBS-specific block device mapping specifications for the image.static interface
Defines block device mappings for the instance used to configure your image.static interface
Contains settings for the Systems Manager agent on your build instance.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ModifierConstructorDescriptionCfnImageRecipe
(Construct scope, String id, CfnImageRecipeProps props) Create a newAWS::ImageBuilder::ImageRecipe
.protected
CfnImageRecipe
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnImageRecipe
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionBefore you create a new AMI, Image Builder launches temporary Amazon EC2 instances to build and test your image configuration.Returns the Amazon Resource Name (ARN) of the image recipe.The name of the image recipe.The block device mappings to apply when creating images from this recipe.The components of the image recipe.The description of the image recipe.getName()
The name of the image recipe.The parent image of the image recipe.getTags()
The tags of the image recipe.The semantic version of the image recipe.The working directory to be used during build and test workflows.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
Before you create a new AMI, Image Builder launches temporary Amazon EC2 instances to build and test your image configuration.void
Before you create a new AMI, Image Builder launches temporary Amazon EC2 instances to build and test your image configuration.void
setBlockDeviceMappings
(List<Object> value) The block device mappings to apply when creating images from this recipe.void
The block device mappings to apply when creating images from this recipe.void
setComponents
(List<Object> value) The components of the image recipe.void
setComponents
(IResolvable value) The components of the image recipe.void
setDescription
(String value) The description of the image recipe.void
The name of the image recipe.void
setParentImage
(String value) The parent image of the image recipe.void
setVersion
(String value) The semantic version of the image recipe.void
setWorkingDirectory
(String value) The working directory to be used during build and test workflows.Methods inherited from class software.amazon.awscdk.core.CfnResource
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.core.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnImageRecipe
protected CfnImageRecipe(software.amazon.jsii.JsiiObjectRef objRef) -
CfnImageRecipe
protected CfnImageRecipe(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnImageRecipe
@Stability(Stable) public CfnImageRecipe(@NotNull Construct scope, @NotNull String id, @NotNull CfnImageRecipeProps props) Create a newAWS::ImageBuilder::ImageRecipe
.- Parameters:
scope
-- scope in which this resource is defined.
id
-- scoped id of the resource.
props
-- resource properties.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- Parameters:
inspector
-- tree inspector to collect and process attributes.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getAttrArn
Returns the Amazon Resource Name (ARN) of the image recipe.For example,
arn:aws:imagebuilder:us-east-1:123456789012:image-recipe/mybasicrecipe/2019.12.03
. -
getAttrName
The name of the image recipe. -
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getTags
The tags of the image recipe. -
getComponents
The components of the image recipe.Components are orchestration documents that define a sequence of steps for downloading, installing, configuring, and testing software packages. They also define validation and security hardening steps. A component is defined using a YAML document format.
-
setComponents
The components of the image recipe.Components are orchestration documents that define a sequence of steps for downloading, installing, configuring, and testing software packages. They also define validation and security hardening steps. A component is defined using a YAML document format.
-
setComponents
The components of the image recipe.Components are orchestration documents that define a sequence of steps for downloading, installing, configuring, and testing software packages. They also define validation and security hardening steps. A component is defined using a YAML document format.
-
getName
The name of the image recipe. -
setName
The name of the image recipe. -
getParentImage
The parent image of the image recipe.The string must be either an Image ARN or an AMI ID.
-
setParentImage
The parent image of the image recipe.The string must be either an Image ARN or an AMI ID.
-
getVersion
The semantic version of the image recipe. -
setVersion
The semantic version of the image recipe. -
getAdditionalInstanceConfiguration
Before you create a new AMI, Image Builder launches temporary Amazon EC2 instances to build and test your image configuration.Instance configuration adds a layer of control over those instances. You can define settings and add scripts to run when an instance is launched from your AMI.
-
setAdditionalInstanceConfiguration
Before you create a new AMI, Image Builder launches temporary Amazon EC2 instances to build and test your image configuration.Instance configuration adds a layer of control over those instances. You can define settings and add scripts to run when an instance is launched from your AMI.
-
setAdditionalInstanceConfiguration
@Stability(Stable) public void setAdditionalInstanceConfiguration(@Nullable CfnImageRecipe.AdditionalInstanceConfigurationProperty value) Before you create a new AMI, Image Builder launches temporary Amazon EC2 instances to build and test your image configuration.Instance configuration adds a layer of control over those instances. You can define settings and add scripts to run when an instance is launched from your AMI.
-
getBlockDeviceMappings
The block device mappings to apply when creating images from this recipe. -
setBlockDeviceMappings
The block device mappings to apply when creating images from this recipe. -
setBlockDeviceMappings
The block device mappings to apply when creating images from this recipe. -
getDescription
The description of the image recipe. -
setDescription
The description of the image recipe. -
getWorkingDirectory
The working directory to be used during build and test workflows. -
setWorkingDirectory
The working directory to be used during build and test workflows.
-