Class: AWSCDK::ECS::CfnCapacityProvider::AutoScalingGroupProviderProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ECS::CfnCapacityProvider::AutoScalingGroupProviderProperty
- Defined in:
- ecs/cfn_capacity_provider.rb
Overview
The details of the Auto Scaling group for the capacity provider.
Instance Attribute Summary collapse
-
#auto_scaling_group_arn ⇒ String
readonly
The Amazon Resource Name (ARN) that identifies the Auto Scaling group, or the Auto Scaling group name.
-
#managed_draining ⇒ String?
readonly
The managed draining option for the Auto Scaling group capacity provider.
-
#managed_scaling ⇒ AWSCDK::IResolvable, ...
readonly
The managed scaling settings for the Auto Scaling group capacity provider.
-
#managed_termination_protection ⇒ String?
readonly
The managed termination protection setting to use for the Auto Scaling group capacity provider.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(auto_scaling_group_arn:, managed_draining: nil, managed_scaling: nil, managed_termination_protection: nil) ⇒ AutoScalingGroupProviderProperty
constructor
A new instance of AutoScalingGroupProviderProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(auto_scaling_group_arn:, managed_draining: nil, managed_scaling: nil, managed_termination_protection: nil) ⇒ AutoScalingGroupProviderProperty
Returns a new instance of AutoScalingGroupProviderProperty.
708 709 710 711 712 713 714 715 716 717 |
# File 'ecs/cfn_capacity_provider.rb', line 708 def initialize(auto_scaling_group_arn:, managed_draining: nil, managed_scaling: nil, managed_termination_protection: nil) @auto_scaling_group_arn = auto_scaling_group_arn Jsii::Type.check_type(@auto_scaling_group_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "autoScalingGroupArn") @managed_draining = managed_draining Jsii::Type.check_type(@managed_draining, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "managedDraining") unless @managed_draining.nil? @managed_scaling = managed_scaling.is_a?(Hash) ? ::AWSCDK::ECS::CfnCapacityProvider::ManagedScalingProperty.new(**managed_scaling.transform_keys(&:to_sym)) : managed_scaling Jsii::Type.check_type(@managed_scaling, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lY3MuQ2ZuQ2FwYWNpdHlQcm92aWRlci5NYW5hZ2VkU2NhbGluZ1Byb3BlcnR5In1dfX0=")), "managedScaling") unless @managed_scaling.nil? @managed_termination_protection = managed_termination_protection Jsii::Type.check_type(@managed_termination_protection, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "managedTerminationProtection") unless @managed_termination_protection.nil? end |
Instance Attribute Details
#auto_scaling_group_arn ⇒ String (readonly)
The Amazon Resource Name (ARN) that identifies the Auto Scaling group, or the Auto Scaling group name.
723 724 725 |
# File 'ecs/cfn_capacity_provider.rb', line 723 def auto_scaling_group_arn @auto_scaling_group_arn end |
#managed_draining ⇒ String? (readonly)
The managed draining option for the Auto Scaling group capacity provider.
When you enable this, Amazon ECS manages and gracefully drains the EC2 container instances that are in the Auto Scaling group capacity provider.
730 731 732 |
# File 'ecs/cfn_capacity_provider.rb', line 730 def managed_draining @managed_draining end |
#managed_scaling ⇒ AWSCDK::IResolvable, ... (readonly)
The managed scaling settings for the Auto Scaling group capacity provider.
735 736 737 |
# File 'ecs/cfn_capacity_provider.rb', line 735 def managed_scaling @managed_scaling end |
#managed_termination_protection ⇒ String? (readonly)
The managed termination protection setting to use for the Auto Scaling group capacity provider.
This determines whether the Auto Scaling group has managed termination protection. The default is off.
When using managed termination protection, managed scaling must also be used otherwise managed termination protection doesn't work.
When managed termination protection is on, Amazon ECS prevents the Amazon EC2 instances in an Auto Scaling group that contain tasks from being terminated during a scale-in action. The Auto Scaling group and each instance in the Auto Scaling group must have instance protection from scale-in actions on as well. For more information, see Instance Protection in the AWS Auto Scaling User Guide .
When managed termination protection is off, your Amazon EC2 instances aren't protected from termination when the Auto Scaling group scales in.
748 749 750 |
# File 'ecs/cfn_capacity_provider.rb', line 748 def managed_termination_protection @managed_termination_protection end |
Class Method Details
.jsii_properties ⇒ Object
750 751 752 753 754 755 756 757 |
# File 'ecs/cfn_capacity_provider.rb', line 750 def self.jsii_properties { :auto_scaling_group_arn => "autoScalingGroupArn", :managed_draining => "managedDraining", :managed_scaling => "managedScaling", :managed_termination_protection => "managedTerminationProtection", } end |
Instance Method Details
#to_jsii ⇒ Object
759 760 761 762 763 764 765 766 767 768 |
# File 'ecs/cfn_capacity_provider.rb', line 759 def to_jsii result = {} result.merge!({ "autoScalingGroupArn" => @auto_scaling_group_arn, "managedDraining" => @managed_draining, "managedScaling" => @managed_scaling, "managedTerminationProtection" => @managed_termination_protection, }) result.compact end |