Class: AWSCDK::ImageBuilder::CfnImageRecipeProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ImageBuilder::CfnImageRecipeProps
- Defined in:
- image_builder/cfn_image_recipe_props.rb
Overview
Properties for defining a CfnImageRecipe.
Instance Attribute Summary collapse
-
#additional_instance_configuration ⇒ AWSCDK::IResolvable, ...
readonly
Before you create a new AMI, Image Builder launches temporary Amazon EC2 instances to build and test your image configuration.
-
#ami_tags ⇒ AWSCDK::IResolvable, ...
readonly
Tags that are applied to the AMI that Image Builder creates during the Build phase prior to image distribution.
-
#block_device_mappings ⇒ AWSCDK::IResolvable, ...
readonly
The block device mappings to apply when creating images from this recipe.
-
#components ⇒ AWSCDK::IResolvable, ...
readonly
The components that are included in the image recipe.
-
#description ⇒ String?
readonly
The description of the image recipe.
-
#name ⇒ String
readonly
The name of the image recipe.
-
#parent_image ⇒ String
readonly
The base image for customizations specified in the image recipe.
-
#tags ⇒ Hash{String => String}?
readonly
The tags of the image recipe.
-
#version ⇒ String
readonly
The semantic version of the image recipe.
-
#working_directory ⇒ String?
readonly
The working directory to be used during build and test workflows.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name:, parent_image:, version:, additional_instance_configuration: nil, ami_tags: nil, block_device_mappings: nil, components: nil, description: nil, tags: nil, working_directory: nil) ⇒ CfnImageRecipeProps
constructor
A new instance of CfnImageRecipeProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(name:, parent_image:, version:, additional_instance_configuration: nil, ami_tags: nil, block_device_mappings: nil, components: nil, description: nil, tags: nil, working_directory: nil) ⇒ CfnImageRecipeProps
Returns a new instance of CfnImageRecipeProps.
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'image_builder/cfn_image_recipe_props.rb', line 19 def initialize(name:, parent_image:, version:, additional_instance_configuration: nil, ami_tags: nil, block_device_mappings: nil, components: nil, description: nil, tags: nil, working_directory: nil) @name = name Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") @parent_image = parent_image Jsii::Type.check_type(@parent_image, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "parentImage") @version = version Jsii::Type.check_type(@version, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "version") @additional_instance_configuration = additional_instance_configuration.is_a?(Hash) ? ::AWSCDK::ImageBuilder::CfnImageRecipe::AdditionalInstanceConfigurationProperty.new(**additional_instance_configuration.transform_keys(&:to_sym)) : additional_instance_configuration Jsii::Type.check_type(@additional_instance_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pbWFnZWJ1aWxkZXIuQ2ZuSW1hZ2VSZWNpcGUuQWRkaXRpb25hbEluc3RhbmNlQ29uZmlndXJhdGlvblByb3BlcnR5In1dfX0=")), "additionalInstanceConfiguration") unless @additional_instance_configuration.nil? @ami_tags = Jsii::Type.check_type(@ami_tags, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsicHJpbWl0aXZlIjoic3RyaW5nIn0sImtpbmQiOiJtYXAifX1dfX0=")), "amiTags") unless @ami_tags.nil? @block_device_mappings = block_device_mappings Jsii::Type.check_type(@block_device_mappings, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaW1hZ2VidWlsZGVyLkNmbkltYWdlUmVjaXBlLkluc3RhbmNlQmxvY2tEZXZpY2VNYXBwaW5nUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "blockDeviceMappings") unless @block_device_mappings.nil? @components = components Jsii::Type.check_type(@components, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaW1hZ2VidWlsZGVyLkNmbkltYWdlUmVjaXBlLkNvbXBvbmVudENvbmZpZ3VyYXRpb25Qcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "components") unless @components.nil? @description = description Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil? @tags = Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "tags") unless @tags.nil? @working_directory = working_directory Jsii::Type.check_type(@working_directory, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "workingDirectory") unless @working_directory.nil? end |
Instance Attribute Details
#additional_instance_configuration ⇒ AWSCDK::IResolvable, ... (readonly)
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.
76 77 78 |
# File 'image_builder/cfn_image_recipe_props.rb', line 76 def additional_instance_configuration @additional_instance_configuration end |
#ami_tags ⇒ AWSCDK::IResolvable, ... (readonly)
Tags that are applied to the AMI that Image Builder creates during the Build phase prior to image distribution.
81 82 83 |
# File 'image_builder/cfn_image_recipe_props.rb', line 81 def @ami_tags end |
#block_device_mappings ⇒ AWSCDK::IResolvable, ... (readonly)
The block device mappings to apply when creating images from this recipe.
86 87 88 |
# File 'image_builder/cfn_image_recipe_props.rb', line 86 def block_device_mappings @block_device_mappings end |
#components ⇒ AWSCDK::IResolvable, ... (readonly)
The components that are included in the image recipe.
Recipes require a minimum of one build component, and can have a maximum of 20 build and test components in any combination.
93 94 95 |
# File 'image_builder/cfn_image_recipe_props.rb', line 93 def components @components end |
#description ⇒ String? (readonly)
The description of the image recipe.
98 99 100 |
# File 'image_builder/cfn_image_recipe_props.rb', line 98 def description @description end |
#name ⇒ String (readonly)
The name of the image recipe.
46 47 48 |
# File 'image_builder/cfn_image_recipe_props.rb', line 46 def name @name end |
#parent_image ⇒ String (readonly)
The base image for customizations specified in the image recipe.
You can specify the parent image using one of the following options:
- AMI ID
- Image Builder image Amazon Resource Name (ARN)
- AWS Systems Manager (SSM) Parameter Store Parameter, prefixed by
ssm:, followed by the parameter name or ARN. - AWS Marketplace product ID
58 59 60 |
# File 'image_builder/cfn_image_recipe_props.rb', line 58 def parent_image @parent_image end |
#tags ⇒ Hash{String => String}? (readonly)
The tags of the image recipe.
103 104 105 |
# File 'image_builder/cfn_image_recipe_props.rb', line 103 def @tags end |
#version ⇒ String (readonly)
The semantic version of the image recipe. This version follows the semantic version syntax.
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.
69 70 71 |
# File 'image_builder/cfn_image_recipe_props.rb', line 69 def version @version end |
#working_directory ⇒ String? (readonly)
The working directory to be used during build and test workflows.
108 109 110 |
# File 'image_builder/cfn_image_recipe_props.rb', line 108 def working_directory @working_directory end |
Class Method Details
.jsii_properties ⇒ Object
110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
# File 'image_builder/cfn_image_recipe_props.rb', line 110 def self.jsii_properties { :name => "name", :parent_image => "parentImage", :version => "version", :additional_instance_configuration => "additionalInstanceConfiguration", :ami_tags => "amiTags", :block_device_mappings => "blockDeviceMappings", :components => "components", :description => "description", :tags => "tags", :working_directory => "workingDirectory", } end |
Instance Method Details
#to_jsii ⇒ Object
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 |
# File 'image_builder/cfn_image_recipe_props.rb', line 125 def to_jsii result = {} result.merge!({ "name" => @name, "parentImage" => @parent_image, "version" => @version, "additionalInstanceConfiguration" => @additional_instance_configuration, "amiTags" => @ami_tags, "blockDeviceMappings" => @block_device_mappings, "components" => @components, "description" => @description, "tags" => @tags, "workingDirectory" => @working_directory, }) result.compact end |