Class: AWSCDK::ECS::AddAutoScalingGroupCapacityOptions
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ECS::AddAutoScalingGroupCapacityOptions
- Defined in:
- ecs/add_auto_scaling_group_capacity_options.rb
Overview
The properties for adding an AutoScalingGroup.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#machine_image_type ⇒ AWSCDK::ECS::MachineImageType?
readonly
What type of machine image this is.
-
#spot_instance_draining ⇒ Boolean?
readonly
Specify whether to enable Automated Draining for Spot Instances running Amazon ECS Services.
-
#topic_encryption_key ⇒ AWSCDK::KMS::IKey?
readonly
If
AddAutoScalingGroupCapacityOptions.taskDrainTimeis non-zero, then the ECS cluster creates an SNS Topic to as part of a system to drain instances of tasks when the instance is being shut down.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(machine_image_type: nil, spot_instance_draining: nil, topic_encryption_key: nil) ⇒ AddAutoScalingGroupCapacityOptions
constructor
A new instance of AddAutoScalingGroupCapacityOptions.
- #to_jsii ⇒ Object
Constructor Details
#initialize(machine_image_type: nil, spot_instance_draining: nil, topic_encryption_key: nil) ⇒ AddAutoScalingGroupCapacityOptions
Returns a new instance of AddAutoScalingGroupCapacityOptions.
10 11 12 13 14 15 16 17 |
# File 'ecs/add_auto_scaling_group_capacity_options.rb', line 10 def initialize(machine_image_type: nil, spot_instance_draining: nil, topic_encryption_key: nil) @machine_image_type = machine_image_type Jsii::Type.check_type(@machine_image_type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLk1hY2hpbmVJbWFnZVR5cGUifQ==")), "machineImageType") unless @machine_image_type.nil? @spot_instance_draining = spot_instance_draining Jsii::Type.check_type(@spot_instance_draining, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "spotInstanceDraining") unless @spot_instance_draining.nil? @topic_encryption_key = topic_encryption_key Jsii::Type.check_type(@topic_encryption_key, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfa21zLklLZXkifQ==")), "topicEncryptionKey") unless @topic_encryption_key.nil? end |
Instance Attribute Details
#machine_image_type ⇒ AWSCDK::ECS::MachineImageType? (readonly)
Default: - Automatically determined from machineImage, if available, otherwise MachineImageType.AMAZON_LINUX_2.
What type of machine image this is.
Depending on the setting, different UserData will automatically be added
to the AutoScalingGroup to configure it properly for use with ECS.
If you create an AutoScalingGroup yourself and are adding it via
add_auto_scaling_group(), you must specify this value. If you are adding an
auto_scaling_group via add_capacity, this value will be determined
from the machine_image you pass.
31 32 33 |
# File 'ecs/add_auto_scaling_group_capacity_options.rb', line 31 def machine_image_type @machine_image_type end |
#spot_instance_draining ⇒ Boolean? (readonly)
Default: false
Specify whether to enable Automated Draining for Spot Instances running Amazon ECS Services.
For more information, see Using Spot Instances.
38 39 40 |
# File 'ecs/add_auto_scaling_group_capacity_options.rb', line 38 def spot_instance_draining @spot_instance_draining end |
#topic_encryption_key ⇒ AWSCDK::KMS::IKey? (readonly)
Default: The SNS Topic will not be encrypted.
If AddAutoScalingGroupCapacityOptions.taskDrainTime is non-zero, then the ECS cluster creates an SNS Topic to as part of a system to drain instances of tasks when the instance is being shut down. If this property is provided, then this key will be used to encrypt the contents of that SNS Topic. See SNS Data Encryption for more information.
43 44 45 |
# File 'ecs/add_auto_scaling_group_capacity_options.rb', line 43 def topic_encryption_key @topic_encryption_key end |
Class Method Details
.jsii_properties ⇒ Object
45 46 47 48 49 50 51 |
# File 'ecs/add_auto_scaling_group_capacity_options.rb', line 45 def self.jsii_properties { :machine_image_type => "machineImageType", :spot_instance_draining => "spotInstanceDraining", :topic_encryption_key => "topicEncryptionKey", } end |
Instance Method Details
#to_jsii ⇒ Object
53 54 55 56 57 58 59 60 61 |
# File 'ecs/add_auto_scaling_group_capacity_options.rb', line 53 def to_jsii result = {} result.merge!({ "machineImageType" => @machine_image_type, "spotInstanceDraining" => @spot_instance_draining, "topicEncryptionKey" => @topic_encryption_key, }) result.compact end |