@Generated(value="jsii-pacmak/1.73.0 (build 6faeda3)", date="2023-01-31T18:36:46.965Z") 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.
|
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 |
---|---|
|
CfnImageRecipe(Construct scope,
java.lang.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 |
---|---|
java.lang.Object |
getAdditionalInstanceConfiguration()
Before you create a new AMI, Image Builder launches temporary Amazon EC2 instances to build and test your image configuration.
|
java.lang.String |
getAttrArn()
Returns the Amazon Resource Name (ARN) of the image recipe.
|
java.lang.String |
getAttrName()
The name of the image recipe.
|
java.lang.Object |
getBlockDeviceMappings()
The block device mappings to apply when creating images from this recipe.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.Object |
getComponents()
The components of the image recipe.
|
java.lang.String |
getDescription()
The description of the image recipe.
|
java.lang.String |
getName()
The name of the image recipe.
|
java.lang.String |
getParentImage()
The parent image of the image recipe.
|
TagManager |
getTags()
The tags of the image recipe.
|
java.lang.String |
getVersion()
The semantic version of the image recipe.
|
java.lang.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 java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.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(java.util.List<java.lang.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(java.util.List<java.lang.Object> value)
The components of the image recipe.
|
void |
setDescription(java.lang.String value)
The description of the image recipe.
|
void |
setName(java.lang.String value)
The name of the image recipe.
|
void |
setParentImage(java.lang.String value)
The parent image of the image recipe.
|
void |
setVersion(java.lang.String value)
The semantic version of the image recipe.
|
void |
setWorkingDirectory(java.lang.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, 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 CfnImageRecipe(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnImageRecipe(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnImageRecipe(Construct scope, java.lang.String id, 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.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:image-recipe/mybasicrecipe/2019.12.03
.
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()
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.
public void setComponents(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.
public void setComponents(java.util.List<java.lang.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.
public java.lang.String getName()
public void setName(java.lang.String value)
public java.lang.String getParentImage()
The string must be either an Image ARN or an AMI ID.
public void setParentImage(java.lang.String value)
The string must be either an Image ARN or an AMI ID.
public java.lang.String getVersion()
public void setVersion(java.lang.String value)
public java.lang.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.
public void setAdditionalInstanceConfiguration(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.
public void setAdditionalInstanceConfiguration(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.
public java.lang.Object getBlockDeviceMappings()
public void setBlockDeviceMappings(IResolvable value)
public void setBlockDeviceMappings(java.util.List<java.lang.Object> value)
public java.lang.String getDescription()
public void setDescription(java.lang.String value)
public java.lang.String getWorkingDirectory()
public void setWorkingDirectory(java.lang.String value)