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
Nested ClassesModifier and TypeClassDescriptionstatic interfaceIn addition to your infrastructure configuration, these settings provide an extra layer of control over your build instances.static final classA fluent builder forCfnImageRecipe.static interfaceConfiguration details of the component.static interfaceContains a key/value pair that sets the named component parameter.static interfaceThe image recipe EBS instance block device specification includes the Amazon EBS-specific block device mapping specifications for the image.static interfaceDefines block device mappings for the instance used to configure your image.static interfaceContains settings for the Systems Manager agent on your build instance.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionCfnImageRecipe(Construct scope, String id, CfnImageRecipeProps props) Create a newAWS::ImageBuilder::ImageRecipe.protectedCfnImageRecipe(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnImageRecipe(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.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidBefore you create a new AMI, Image Builder launches temporary Amazon EC2 instances to build and test your image configuration.voidBefore you create a new AMI, Image Builder launches temporary Amazon EC2 instances to build and test your image configuration.voidsetBlockDeviceMappings(List<Object> value) The block device mappings to apply when creating images from this recipe.voidThe block device mappings to apply when creating images from this recipe.voidsetComponents(List<Object> value) The components of the image recipe.voidsetComponents(IResolvable value) The components of the image recipe.voidsetDescription(String value) The description of the image recipe.voidThe name of the image recipe.voidsetParentImage(String value) The parent image of the image recipe.voidsetVersion(String value) The semantic version of the image recipe.voidsetWorkingDirectory(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, validatePropertiesMethods inherited from class software.amazon.awscdk.core.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validateMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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:
inspectin 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:
renderPropertiesin 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:
getCfnPropertiesin 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.
-