Class: AWSCDK::OpsWorks::CfnLayer::LoadBasedAutoScalingProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ops_works/cfn_layer.rb

Overview

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(down_scaling: nil, enable: nil, up_scaling: nil) ⇒ LoadBasedAutoScalingProperty

Returns a new instance of LoadBasedAutoScalingProperty.

Parameters:



865
866
867
868
869
870
871
872
# File 'ops_works/cfn_layer.rb', line 865

def initialize(down_scaling: nil, enable: nil, up_scaling: nil)
  @down_scaling = down_scaling.is_a?(Hash) ? ::AWSCDK::OpsWorks::CfnLayer::AutoScalingThresholdsProperty.new(**down_scaling.transform_keys(&:to_sym)) : down_scaling
  Jsii::Type.check_type(@down_scaling, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19vcHN3b3Jrcy5DZm5MYXllci5BdXRvU2NhbGluZ1RocmVzaG9sZHNQcm9wZXJ0eSJ9XX19")), "downScaling") unless @down_scaling.nil?
  @enable = enable
  Jsii::Type.check_type(@enable, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "enable") unless @enable.nil?
  @up_scaling = up_scaling.is_a?(Hash) ? ::AWSCDK::OpsWorks::CfnLayer::AutoScalingThresholdsProperty.new(**up_scaling.transform_keys(&:to_sym)) : up_scaling
  Jsii::Type.check_type(@up_scaling, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19vcHN3b3Jrcy5DZm5MYXllci5BdXRvU2NhbGluZ1RocmVzaG9sZHNQcm9wZXJ0eSJ9XX19")), "upScaling") unless @up_scaling.nil?
end

Instance Attribute Details

#down_scalingAWSCDK::IResolvable, ... (readonly)

An AutoScalingThresholds object that describes the downscaling configuration, which defines how and when OpsWorks Stacks reduces the number of instances.



878
879
880
# File 'ops_works/cfn_layer.rb', line 878

def down_scaling
  @down_scaling
end

#enableBoolean, ... (readonly)

Whether load-based auto scaling is enabled for the layer.



883
884
885
# File 'ops_works/cfn_layer.rb', line 883

def enable
  @enable
end

#up_scalingAWSCDK::IResolvable, ... (readonly)

An AutoScalingThresholds object that describes the upscaling configuration, which defines how and when OpsWorks Stacks increases the number of instances.



888
889
890
# File 'ops_works/cfn_layer.rb', line 888

def up_scaling
  @up_scaling
end

Class Method Details

.jsii_propertiesObject



890
891
892
893
894
895
896
# File 'ops_works/cfn_layer.rb', line 890

def self.jsii_properties
  {
    :down_scaling => "downScaling",
    :enable => "enable",
    :up_scaling => "upScaling",
  }
end

Instance Method Details

#to_jsiiObject



898
899
900
901
902
903
904
905
906
# File 'ops_works/cfn_layer.rb', line 898

def to_jsii
  result = {}
  result.merge!({
    "downScaling" => @down_scaling,
    "enable" => @enable,
    "upScaling" => @up_scaling,
  })
  result.compact
end