Class: AWSCDK::OpsWorks::CfnLayer::LoadBasedAutoScalingProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::OpsWorks::CfnLayer::LoadBasedAutoScalingProperty
- Defined in:
- ops_works/cfn_layer.rb
Overview
Instance Attribute Summary collapse
-
#down_scaling ⇒ AWSCDK::IResolvable, ...
readonly
An
AutoScalingThresholdsobject that describes the downscaling configuration, which defines how and when OpsWorks Stacks reduces the number of instances. -
#enable ⇒ Boolean, ...
readonly
Whether load-based auto scaling is enabled for the layer.
-
#up_scaling ⇒ AWSCDK::IResolvable, ...
readonly
An
AutoScalingThresholdsobject that describes the upscaling configuration, which defines how and when OpsWorks Stacks increases the number of instances.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(down_scaling: nil, enable: nil, up_scaling: nil) ⇒ LoadBasedAutoScalingProperty
constructor
A new instance of LoadBasedAutoScalingProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(down_scaling: nil, enable: nil, up_scaling: nil) ⇒ LoadBasedAutoScalingProperty
Returns a new instance of LoadBasedAutoScalingProperty.
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_scaling ⇒ AWSCDK::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 |
#enable ⇒ Boolean, ... (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_scaling ⇒ AWSCDK::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_properties ⇒ Object
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_jsii ⇒ Object
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 |