Class: AWSCDK::EKSv2::EKSOptimizedImage
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::EKSv2::EKSOptimizedImage
- Includes:
- AWSCDK::EC2::IMachineImage
- Defined in:
- ek_sv2/eks_optimized_image.rb
Overview
Construct an Amazon Linux 2 image from the latest EKS Optimized AMI published in SSM.
Class Method Summary collapse
Instance Method Summary collapse
-
#get_image(scope) ⇒ AWSCDK::EC2::MachineImageConfig
Return the correct image.
-
#initialize(props = nil) ⇒ EKSOptimizedImage
constructor
Constructs a new instance of the EcsOptimizedAmi class.
Constructor Details
#initialize(props = nil) ⇒ EKSOptimizedImage
Constructs a new instance of the EcsOptimizedAmi class.
12 13 14 15 16 |
# File 'ek_sv2/eks_optimized_image.rb', line 12 def initialize(props = nil) props = props.is_a?(Hash) ? ::AWSCDK::EKSv2::EKSOptimizedImageProps.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzX3YyLkVrc09wdGltaXplZEltYWdlUHJvcHMifQ==")), "props") unless props.nil? Jsii::Object.instance_method(:initialize).bind(self).call(props) end |
Class Method Details
.jsii_overridable_methods ⇒ Object
18 19 20 21 22 |
# File 'ek_sv2/eks_optimized_image.rb', line 18 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 correct image.
28 29 30 31 |
# File 'ek_sv2/eks_optimized_image.rb', line 28 def get_image(scope) Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scope") jsii_call_method("getImage", [scope]) end |