@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:39.821Z") @Stability(value=Stable) public class CfnImageRecipe extends CfnResource implements IInspectable
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();
| Modifier and Type | Class and Description |
|---|---|
static interface |
CfnImageRecipe.AdditionalInstanceConfigurationProperty
In addition to your infrastructure configuration, these settings provide an extra layer of control over your build instances.
|
static class |
CfnImageRecipe.Builder
A fluent builder for
CfnImageRecipe. |
static interface |
CfnImageRecipe.ComponentConfigurationProperty
Configuration details of the component.
|
static interface |
CfnImageRecipe.ComponentParameterProperty
Contains a key/value pair that sets the named component parameter.
|
static interface |
CfnImageRecipe.EbsInstanceBlockDeviceSpecificationProperty
The image recipe EBS instance block device specification includes the Amazon EBS-specific block device mapping specifications for the image.
|
static interface |
CfnImageRecipe.InstanceBlockDeviceMappingProperty
Defines block device mappings for the instance used to configure your image.
|
static interface |
CfnImageRecipe.SystemsManagerAgentProperty
Contains settings for the Systems Manager agent on your build instance.
|
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$Proxy| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnImageRecipe(software.constructs.Construct scope,
String id,
CfnImageRecipeProps props)
Create a new `AWS::ImageBuilder::ImageRecipe`.
|
protected |
CfnImageRecipe(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnImageRecipe(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
Object |
getAdditionalInstanceConfiguration()
Before you create a new AMI, Image Builder launches temporary Amazon EC2 instances to build and test your image configuration.
|
String |
getAttrArn()
Returns the Amazon Resource Name (ARN) of the image recipe.
|
String |
getAttrName()
The name of the image recipe.
|
Object |
getBlockDeviceMappings()
The block device mappings to apply when creating images from this recipe.
|
protected Map<String,Object> |
getCfnProperties() |
Object |
getComponents()
The components of the image recipe.
|
String |
getDescription()
The description of the image recipe.
|
String |
getName()
The name of the image recipe.
|
String |
getParentImage()
The parent image of the image recipe.
|
TagManager |
getTags()
The tags of the image recipe.
|
String |
getVersion()
The semantic version of the image recipe.
|
String |
getWorkingDirectory()
The working directory to be used during build and test workflows.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setAdditionalInstanceConfiguration(CfnImageRecipe.AdditionalInstanceConfigurationProperty value)
Before you create a new AMI, Image Builder launches temporary Amazon EC2 instances to build and test your image configuration.
|
void |
setAdditionalInstanceConfiguration(IResolvable value)
Before you create a new AMI, Image Builder launches temporary Amazon EC2 instances to build and test your image configuration.
|
void |
setBlockDeviceMappings(IResolvable value)
The block device mappings to apply when creating images from this recipe.
|
void |
setBlockDeviceMappings(List<Object> value)
The block device mappings to apply when creating images from this recipe.
|
void |
setComponents(IResolvable value)
The components of the image recipe.
|
void |
setComponents(List<Object> value)
The components of the image recipe.
|
void |
setDescription(String value)
The description of the image recipe.
|
void |
setName(String value)
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.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnImageRecipe(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnImageRecipe(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnImageRecipe(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
CfnImageRecipeProps 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.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull public String getAttrArn()
For example, arn:aws:imagebuilder:us-east-1:123456789012:image-recipe/mybasicrecipe/2019.12.03 .
@Stability(value=Stable) @NotNull public String getAttrName()
@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public TagManager getTags()
@Stability(value=Stable) @NotNull public Object getComponents()
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.
@Stability(value=Stable)
public void setComponents(@NotNull
IResolvable value)
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.
@Stability(value=Stable)
public void setComponents(@NotNull
List<Object> value)
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.
@Stability(value=Stable) @NotNull public String getName()
@Stability(value=Stable)
public void setName(@NotNull
String value)
@Stability(value=Stable) @NotNull public String getParentImage()
The string must be either an Image ARN or an AMI ID.
@Stability(value=Stable)
public void setParentImage(@NotNull
String value)
The string must be either an Image ARN or an AMI ID.
@Stability(value=Stable) @NotNull public String getVersion()
@Stability(value=Stable)
public void setVersion(@NotNull
String value)
@Stability(value=Stable) @Nullable public Object getAdditionalInstanceConfiguration()
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.
@Stability(value=Stable)
public void setAdditionalInstanceConfiguration(@Nullable
CfnImageRecipe.AdditionalInstanceConfigurationProperty value)
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.
@Stability(value=Stable)
public void setAdditionalInstanceConfiguration(@Nullable
IResolvable value)
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.
@Stability(value=Stable) @Nullable public Object getBlockDeviceMappings()
@Stability(value=Stable)
public void setBlockDeviceMappings(@Nullable
IResolvable value)
@Stability(value=Stable)
public void setBlockDeviceMappings(@Nullable
List<Object> value)
@Stability(value=Stable) @Nullable public String getDescription()
@Stability(value=Stable)
public void setDescription(@Nullable
String value)
@Stability(value=Stable) @Nullable public String getWorkingDirectory()
@Stability(value=Stable)
public void setWorkingDirectory(@Nullable
String value)
Copyright © 2022. All rights reserved.