Class: AWSCDK::ECS::CfnCapacityProvider::InfrastructureOptimizationProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ecs/cfn_capacity_provider.rb

Overview

The configuration that controls how Amazon ECS optimizes your infrastructure.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(scale_in_after: nil) ⇒ InfrastructureOptimizationProperty

Returns a new instance of InfrastructureOptimizationProperty.

Parameters:

  • scale_in_after (Numeric, nil) (defaults to: nil)

    This parameter defines the number of seconds Amazon ECS Managed Instances waits before optimizing EC2 instances that have become idle or underutilized.



864
865
866
867
# File 'ecs/cfn_capacity_provider.rb', line 864

def initialize(scale_in_after: nil)
  @scale_in_after = scale_in_after
  Jsii::Type.check_type(@scale_in_after, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "scaleInAfter") unless @scale_in_after.nil?
end

Instance Attribute Details

#scale_in_afterNumeric? (readonly)

This parameter defines the number of seconds Amazon ECS Managed Instances waits before optimizing EC2 instances that have become idle or underutilized.

A longer delay increases the likelihood of placing new tasks on idle or underutilized instances instances, reducing startup time. A shorter delay helps reduce infrastructure costs by optimizing idle or underutilized instances,instances more quickly.

Valid values are:

  • null - Uses the default optimization behavior.
  • -1 - Disables automatic infrastructure optimization.
  • A value between 0 and 3600 (inclusive) - Specifies the number of seconds to wait before optimizing instances.


881
882
883
# File 'ecs/cfn_capacity_provider.rb', line 881

def scale_in_after
  @scale_in_after
end

Class Method Details

.jsii_propertiesObject



883
884
885
886
887
# File 'ecs/cfn_capacity_provider.rb', line 883

def self.jsii_properties
  {
    :scale_in_after => "scaleInAfter",
  }
end

Instance Method Details

#to_jsiiObject



889
890
891
892
893
894
895
# File 'ecs/cfn_capacity_provider.rb', line 889

def to_jsii
  result = {}
  result.merge!({
    "scaleInAfter" => @scale_in_after,
  })
  result.compact
end