Class: AWSCDK::EC2::GenericLinuxImage
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::EC2::GenericLinuxImage
- Includes:
- IMachineImage
- Defined in:
- ec2/generic_linux_image.rb
Overview
Construct a Linux machine image from an AMI map.
Linux images IDs are not published to SSM parameter store yet, so you'll have to manually specify an AMI map.
Class Method Summary collapse
Instance Method Summary collapse
-
#get_image(scope) ⇒ AWSCDK::EC2::MachineImageConfig
Return the image to use in the given context.
-
#initialize(ami_map, props = nil) ⇒ GenericLinuxImage
constructor
A new instance of GenericLinuxImage.
Constructor Details
#initialize(ami_map, props = nil) ⇒ GenericLinuxImage
Returns a new instance of GenericLinuxImage.
14 15 16 17 18 19 |
# File 'ec2/generic_linux_image.rb', line 14 def initialize(ami_map, props = nil) props = props.is_a?(Hash) ? ::AWSCDK::EC2::GenericLinuxImageProps.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(ami_map, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "amiMap") Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLkdlbmVyaWNMaW51eEltYWdlUHJvcHMifQ==")), "props") unless props.nil? Jsii::Object.instance_method(:initialize).bind(self).call(ami_map, props) end |
Class Method Details
.jsii_overridable_methods ⇒ Object
21 22 23 24 25 |
# File 'ec2/generic_linux_image.rb', line 21 def self.jsii_overridable_methods { :get_image => { kind: :method, name: "getImage", is_optional: false }, } end |
Instance Method Details
#get_image(scope) ⇒ AWSCDK::EC2::MachineImageConfig
Return the image to use in the given context.
31 32 33 34 |
# File 'ec2/generic_linux_image.rb', line 31 def get_image(scope) Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scope") jsii_call_method("getImage", [scope]) end |