Class: AWSCDK::ImageBuilder::CfnContainerRecipeProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
image_builder/cfn_container_recipe_props.rb

Overview

Properties for defining a CfnContainerRecipe.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(container_type:, name:, parent_image:, target_repository:, version:, components: nil, description: nil, dockerfile_template_data: nil, dockerfile_template_uri: nil, image_os_version_override: nil, instance_configuration: nil, kms_key_id: nil, platform_override: nil, tags: nil, working_directory: nil) ⇒ CfnContainerRecipeProps

Returns a new instance of CfnContainerRecipeProps.

Parameters:

  • container_type (String)

    Specifies the type of container, such as Docker.

  • name (String)

    The name of the container recipe.

  • parent_image (String)

    The base image for customizations specified in the container recipe.

  • target_repository (AWSCDK::IResolvable, AWSCDK::ImageBuilder::CfnContainerRecipe::TargetContainerRepositoryProperty)

    The destination repository for the container image.

  • version (String)

    The semantic version of the container recipe. This version follows the semantic version syntax.

  • components (AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::ImageBuilder::CfnContainerRecipe::ComponentConfigurationProperty>, nil) (defaults to: nil)

    Build and test components that are included in the container recipe.

  • description (String, nil) (defaults to: nil)

    The description of the container recipe.

  • dockerfile_template_data (String, nil) (defaults to: nil)

    Dockerfiles are text documents that are used to build Docker containers, and ensure that they contain all of the elements required by the application running inside.

  • dockerfile_template_uri (String, nil) (defaults to: nil)

    The S3 URI for the Dockerfile that will be used to build your container image.

  • image_os_version_override (String, nil) (defaults to: nil)

    Specifies the operating system version for the base image.

  • instance_configuration (AWSCDK::IResolvable, AWSCDK::ImageBuilder::CfnContainerRecipe::InstanceConfigurationProperty, nil) (defaults to: nil)

    A group of options that can be used to configure an instance for building and testing container images.

  • kms_key_id (String, nil) (defaults to: nil)

    The Amazon Resource Name (ARN) that uniquely identifies which KMS key is used to encrypt the container image for distribution to the target Region.

  • platform_override (String, nil) (defaults to: nil)

    Specifies the operating system platform when you use a custom base image.

  • tags (Hash{String => String}, nil) (defaults to: nil)

    Tags that are attached to the container recipe.

  • working_directory (String, nil) (defaults to: nil)

    The working directory for use during build and test workflows.



24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'image_builder/cfn_container_recipe_props.rb', line 24

def initialize(container_type:, name:, parent_image:, target_repository:, version:, components: nil, description: nil, dockerfile_template_data: nil, dockerfile_template_uri: nil, image_os_version_override: nil, instance_configuration: nil, kms_key_id: nil, platform_override: nil, tags: nil, working_directory: nil)
  @container_type = container_type
  Jsii::Type.check_type(@container_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "containerType")
  @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")
  @target_repository = target_repository.is_a?(Hash) ? ::AWSCDK::ImageBuilder::CfnContainerRecipe::TargetContainerRepositoryProperty.new(**target_repository.transform_keys(&:to_sym)) : target_repository
  Jsii::Type.check_type(@target_repository, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pbWFnZWJ1aWxkZXIuQ2ZuQ29udGFpbmVyUmVjaXBlLlRhcmdldENvbnRhaW5lclJlcG9zaXRvcnlQcm9wZXJ0eSJ9XX19")), "targetRepository")
  @version = version
  Jsii::Type.check_type(@version, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "version")
  @components = components
  Jsii::Type.check_type(@components, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaW1hZ2VidWlsZGVyLkNmbkNvbnRhaW5lclJlY2lwZS5Db21wb25lbnRDb25maWd1cmF0aW9uUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "components") unless @components.nil?
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @dockerfile_template_data = dockerfile_template_data
  Jsii::Type.check_type(@dockerfile_template_data, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "dockerfileTemplateData") unless @dockerfile_template_data.nil?
  @dockerfile_template_uri = dockerfile_template_uri
  Jsii::Type.check_type(@dockerfile_template_uri, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "dockerfileTemplateUri") unless @dockerfile_template_uri.nil?
  @image_os_version_override = image_os_version_override
  Jsii::Type.check_type(@image_os_version_override, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "imageOsVersionOverride") unless @image_os_version_override.nil?
  @instance_configuration = instance_configuration.is_a?(Hash) ? ::AWSCDK::ImageBuilder::CfnContainerRecipe::InstanceConfigurationProperty.new(**instance_configuration.transform_keys(&:to_sym)) : instance_configuration
  Jsii::Type.check_type(@instance_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pbWFnZWJ1aWxkZXIuQ2ZuQ29udGFpbmVyUmVjaXBlLkluc3RhbmNlQ29uZmlndXJhdGlvblByb3BlcnR5In1dfX0=")), "instanceConfiguration") unless @instance_configuration.nil?
  @kms_key_id = kms_key_id
  Jsii::Type.check_type(@kms_key_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "kmsKeyId") unless @kms_key_id.nil?
  @platform_override = platform_override
  Jsii::Type.check_type(@platform_override, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "platformOverride") unless @platform_override.nil?
  @tags = 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

#componentsAWSCDK::IResolvable, ... (readonly)

Build and test components that are included in the container recipe.

Recipes require a minimum of one build component, and can have a maximum of 20 build and test components in any combination.



96
97
98
# File 'image_builder/cfn_container_recipe_props.rb', line 96

def components
  @components
end

#container_typeString (readonly)

Specifies the type of container, such as Docker.



61
62
63
# File 'image_builder/cfn_container_recipe_props.rb', line 61

def container_type
  @container_type
end

#descriptionString? (readonly)

The description of the container recipe.



101
102
103
# File 'image_builder/cfn_container_recipe_props.rb', line 101

def description
  @description
end

#dockerfile_template_dataString? (readonly)

Dockerfiles are text documents that are used to build Docker containers, and ensure that they contain all of the elements required by the application running inside.

The template data consists of contextual variables where Image Builder places build information or scripts, based on your container image recipe.



108
109
110
# File 'image_builder/cfn_container_recipe_props.rb', line 108

def dockerfile_template_data
  @dockerfile_template_data
end

#dockerfile_template_uriString? (readonly)

The S3 URI for the Dockerfile that will be used to build your container image.



113
114
115
# File 'image_builder/cfn_container_recipe_props.rb', line 113

def dockerfile_template_uri
  @dockerfile_template_uri
end

#image_os_version_overrideString? (readonly)

Specifies the operating system version for the base image.



118
119
120
# File 'image_builder/cfn_container_recipe_props.rb', line 118

def image_os_version_override
  @image_os_version_override
end

#instance_configurationAWSCDK::IResolvable, ... (readonly)

A group of options that can be used to configure an instance for building and testing container images.



123
124
125
# File 'image_builder/cfn_container_recipe_props.rb', line 123

def instance_configuration
  @instance_configuration
end

#kms_key_idString? (readonly)

The Amazon Resource Name (ARN) that uniquely identifies which KMS key is used to encrypt the container image for distribution to the target Region.

This can be either the Key ARN or the Alias ARN. For more information, see Key identifiers (KeyId) in the AWS Key Management Service Developer Guide .



130
131
132
# File 'image_builder/cfn_container_recipe_props.rb', line 130

def kms_key_id
  @kms_key_id
end

#nameString (readonly)

The name of the container recipe.



66
67
68
# File 'image_builder/cfn_container_recipe_props.rb', line 66

def name
  @name
end

#parent_imageString (readonly)

The base image for customizations specified in the container recipe.

This can contain an Image Builder image resource ARN or a container image URI, for example amazonlinux:latest .



73
74
75
# File 'image_builder/cfn_container_recipe_props.rb', line 73

def parent_image
  @parent_image
end

#platform_overrideString? (readonly)

Specifies the operating system platform when you use a custom base image.



135
136
137
# File 'image_builder/cfn_container_recipe_props.rb', line 135

def platform_override
  @platform_override
end

#tagsHash{String => String}? (readonly)

Tags that are attached to the container recipe.



140
141
142
# File 'image_builder/cfn_container_recipe_props.rb', line 140

def tags
  @tags
end

#target_repositoryAWSCDK::IResolvable, AWSCDK::ImageBuilder::CfnContainerRecipe::TargetContainerRepositoryProperty (readonly)

The destination repository for the container image.



78
79
80
# File 'image_builder/cfn_container_recipe_props.rb', line 78

def target_repository
  @target_repository
end

#versionString (readonly)

The semantic version of the container 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.



89
90
91
# File 'image_builder/cfn_container_recipe_props.rb', line 89

def version
  @version
end

#working_directoryString? (readonly)

The working directory for use during build and test workflows.



145
146
147
# File 'image_builder/cfn_container_recipe_props.rb', line 145

def working_directory
  @working_directory
end

Class Method Details

.jsii_propertiesObject



147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
# File 'image_builder/cfn_container_recipe_props.rb', line 147

def self.jsii_properties
  {
    :container_type => "containerType",
    :name => "name",
    :parent_image => "parentImage",
    :target_repository => "targetRepository",
    :version => "version",
    :components => "components",
    :description => "description",
    :dockerfile_template_data => "dockerfileTemplateData",
    :dockerfile_template_uri => "dockerfileTemplateUri",
    :image_os_version_override => "imageOsVersionOverride",
    :instance_configuration => "instanceConfiguration",
    :kms_key_id => "kmsKeyId",
    :platform_override => "platformOverride",
    :tags => "tags",
    :working_directory => "workingDirectory",
  }
end

Instance Method Details

#to_jsiiObject



167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
# File 'image_builder/cfn_container_recipe_props.rb', line 167

def to_jsii
  result = {}
  result.merge!({
    "containerType" => @container_type,
    "name" => @name,
    "parentImage" => @parent_image,
    "targetRepository" => @target_repository,
    "version" => @version,
    "components" => @components,
    "description" => @description,
    "dockerfileTemplateData" => @dockerfile_template_data,
    "dockerfileTemplateUri" => @dockerfile_template_uri,
    "imageOsVersionOverride" => @image_os_version_override,
    "instanceConfiguration" => @instance_configuration,
    "kmsKeyId" => @kms_key_id,
    "platformOverride" => @platform_override,
    "tags" => @tags,
    "workingDirectory" => @working_directory,
  })
  result.compact
end