Class: AWSCDK::EKSv2::AutoScalingGroupOptions
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EKSv2::AutoScalingGroupOptions
- Defined in:
- ek_sv2/auto_scaling_group_options.rb
Overview
Options for adding an AutoScalingGroup as capacity.
Instance Attribute Summary collapse
-
#bootstrap_enabled ⇒ Boolean?
readonly
Configures the EC2 user-data script for instances in this autoscaling group to bootstrap the node (invoke
/etc/eks/bootstrap.sh) and associate it with the EKS cluster. -
#bootstrap_options ⇒ AWSCDK::EKSv2::BootstrapOptions?
readonly
Allows options for node bootstrapping through EC2 user data.
-
#machine_image_type ⇒ AWSCDK::EKSv2::MachineImageType?
readonly
Allow options to specify different machine image type.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(bootstrap_enabled: nil, bootstrap_options: nil, machine_image_type: nil) ⇒ AutoScalingGroupOptions
constructor
A new instance of AutoScalingGroupOptions.
- #to_jsii ⇒ Object
Constructor Details
#initialize(bootstrap_enabled: nil, bootstrap_options: nil, machine_image_type: nil) ⇒ AutoScalingGroupOptions
Returns a new instance of AutoScalingGroupOptions.
10 11 12 13 14 15 16 17 |
# File 'ek_sv2/auto_scaling_group_options.rb', line 10 def initialize(bootstrap_enabled: nil, bootstrap_options: nil, machine_image_type: nil) @bootstrap_enabled = bootstrap_enabled Jsii::Type.check_type(@bootstrap_enabled, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "bootstrapEnabled") unless @bootstrap_enabled.nil? @bootstrap_options = .is_a?(Hash) ? ::AWSCDK::EKSv2::BootstrapOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(@bootstrap_options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzX3YyLkJvb3RzdHJhcE9wdGlvbnMifQ==")), "bootstrapOptions") unless @bootstrap_options.nil? @machine_image_type = machine_image_type Jsii::Type.check_type(@machine_image_type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzX3YyLk1hY2hpbmVJbWFnZVR5cGUifQ==")), "machineImageType") unless @machine_image_type.nil? end |
Instance Attribute Details
#bootstrap_enabled ⇒ Boolean? (readonly)
Default: true
Configures the EC2 user-data script for instances in this autoscaling group to bootstrap the node (invoke /etc/eks/bootstrap.sh) and associate it with the EKS cluster.
If you wish to provide a custom user data script, set this to false and
manually invoke autoscalingGroup.addUserData().
26 27 28 |
# File 'ek_sv2/auto_scaling_group_options.rb', line 26 def bootstrap_enabled @bootstrap_enabled end |
#bootstrap_options ⇒ AWSCDK::EKSv2::BootstrapOptions? (readonly)
Default: - default options
Allows options for node bootstrapping through EC2 user data.
31 32 33 |
# File 'ek_sv2/auto_scaling_group_options.rb', line 31 def @bootstrap_options end |
#machine_image_type ⇒ AWSCDK::EKSv2::MachineImageType? (readonly)
Default: MachineImageType.AMAZON_LINUX_2
Allow options to specify different machine image type.
36 37 38 |
# File 'ek_sv2/auto_scaling_group_options.rb', line 36 def machine_image_type @machine_image_type end |
Class Method Details
.jsii_properties ⇒ Object
38 39 40 41 42 43 44 |
# File 'ek_sv2/auto_scaling_group_options.rb', line 38 def self.jsii_properties { :bootstrap_enabled => "bootstrapEnabled", :bootstrap_options => "bootstrapOptions", :machine_image_type => "machineImageType", } end |
Instance Method Details
#to_jsii ⇒ Object
46 47 48 49 50 51 52 53 54 |
# File 'ek_sv2/auto_scaling_group_options.rb', line 46 def to_jsii result = {} result.merge!({ "bootstrapEnabled" => @bootstrap_enabled, "bootstrapOptions" => @bootstrap_options, "machineImageType" => @machine_image_type, }) result.compact end |