Class: AWSCDK::Batch::EKSMachineImage
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Batch::EKSMachineImage
- Defined in:
- batch/eks_machine_image.rb
Overview
A Batch MachineImage that is compatible with EKS.
Instance Attribute Summary collapse
-
#image ⇒ AWSCDK::EC2::IMachineImage?
readonly
The machine image to use.
-
#image_type ⇒ AWSCDK::Batch::EKSMachineImageType?
readonly
Tells Batch which instance type to launch this image on.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(image: nil, image_type: nil) ⇒ EKSMachineImage
constructor
A new instance of EKSMachineImage.
- #to_jsii ⇒ Object
Constructor Details
#initialize(image: nil, image_type: nil) ⇒ EKSMachineImage
Returns a new instance of EKSMachineImage.
9 10 11 12 13 14 |
# File 'batch/eks_machine_image.rb', line 9 def initialize(image: nil, image_type: nil) @image = image Jsii::Type.check_type(@image, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLklNYWNoaW5lSW1hZ2UifQ==")), "image") unless @image.nil? @image_type = image_type Jsii::Type.check_type(@image_type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmF0Y2guRWtzTWFjaGluZUltYWdlVHlwZSJ9")), "imageType") unless @image_type.nil? end |
Instance Attribute Details
#image ⇒ AWSCDK::EC2::IMachineImage? (readonly)
Note:
Default: - chosen by batch
The machine image to use.
20 21 22 |
# File 'batch/eks_machine_image.rb', line 20 def image @image end |
#image_type ⇒ AWSCDK::Batch::EKSMachineImageType? (readonly)
Note:
Default: - 'EKS_AL2' for non-gpu instances, 'EKS_AL2_NVIDIA' for gpu instances. If the '@aws-cdk/aws-batch:defaultToAL2023' feature flag is set, 'EKS_AL2023' will be used instead of 'EKS_AL2'.
Tells Batch which instance type to launch this image on.
25 26 27 |
# File 'batch/eks_machine_image.rb', line 25 def image_type @image_type end |
Class Method Details
.jsii_properties ⇒ Object
27 28 29 30 31 32 |
# File 'batch/eks_machine_image.rb', line 27 def self.jsii_properties { :image => "image", :image_type => "imageType", } end |
Instance Method Details
#to_jsii ⇒ Object
34 35 36 37 38 39 40 41 |
# File 'batch/eks_machine_image.rb', line 34 def to_jsii result = {} result.merge!({ "image" => @image, "imageType" => @image_type, }) result.compact end |