Class: AWSCDK::AppRunner::CfnAutoScalingConfigurationProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::AppRunner::CfnAutoScalingConfigurationProps
- Defined in:
- app_runner/cfn_auto_scaling_configuration_props.rb
Overview
Properties for defining a CfnAutoScalingConfiguration.
Instance Attribute Summary collapse
-
#auto_scaling_configuration_name ⇒ String?
readonly
The customer-provided auto scaling configuration name.
-
#max_concurrency ⇒ Numeric?
readonly
The maximum number of concurrent requests that an instance processes.
-
#max_size ⇒ Numeric?
readonly
The maximum number of instances that a service scales up to.
-
#min_size ⇒ Numeric?
readonly
The minimum number of instances that App Runner provisions for a service.
-
#tags ⇒ Array<AWSCDK::CfnTag>?
readonly
A list of metadata items that you can associate with your auto scaling configuration resource.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(auto_scaling_configuration_name: nil, max_concurrency: nil, max_size: nil, min_size: nil, tags: nil) ⇒ CfnAutoScalingConfigurationProps
constructor
A new instance of CfnAutoScalingConfigurationProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(auto_scaling_configuration_name: nil, max_concurrency: nil, max_size: nil, min_size: nil, tags: nil) ⇒ CfnAutoScalingConfigurationProps
Returns a new instance of CfnAutoScalingConfigurationProps.
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'app_runner/cfn_auto_scaling_configuration_props.rb', line 14 def initialize(auto_scaling_configuration_name: nil, max_concurrency: nil, max_size: nil, min_size: nil, tags: nil) @auto_scaling_configuration_name = auto_scaling_configuration_name Jsii::Type.check_type(@auto_scaling_configuration_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "autoScalingConfigurationName") unless @auto_scaling_configuration_name.nil? @max_concurrency = max_concurrency Jsii::Type.check_type(@max_concurrency, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxConcurrency") unless @max_concurrency.nil? @max_size = max_size Jsii::Type.check_type(@max_size, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxSize") unless @max_size.nil? @min_size = min_size Jsii::Type.check_type(@min_size, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "minSize") unless @min_size.nil? @tags = .is_a?(Array) ? .map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil? end |
Instance Attribute Details
#auto_scaling_configuration_name ⇒ String? (readonly)
The customer-provided auto scaling configuration name.
It can be used in multiple revisions of a configuration.
33 34 35 |
# File 'app_runner/cfn_auto_scaling_configuration_props.rb', line 33 def auto_scaling_configuration_name @auto_scaling_configuration_name end |
#max_concurrency ⇒ Numeric? (readonly)
The maximum number of concurrent requests that an instance processes.
If the number of concurrent requests exceeds this limit, App Runner scales the service up.
40 41 42 |
# File 'app_runner/cfn_auto_scaling_configuration_props.rb', line 40 def max_concurrency @max_concurrency end |
#max_size ⇒ Numeric? (readonly)
The maximum number of instances that a service scales up to.
At most MaxSize instances actively serve traffic for your service.
47 48 49 |
# File 'app_runner/cfn_auto_scaling_configuration_props.rb', line 47 def max_size @max_size end |
#min_size ⇒ Numeric? (readonly)
The minimum number of instances that App Runner provisions for a service.
The service always has at least MinSize provisioned instances. Some of them actively serve traffic. The rest of them (provisioned and inactive instances) are a cost-effective compute capacity reserve and are ready to be quickly activated. You pay for memory usage of all the provisioned instances. You pay for CPU usage of only the active subset.
App Runner temporarily doubles the number of provisioned instances during deployments, to maintain the same capacity for both old and new code.
56 57 58 |
# File 'app_runner/cfn_auto_scaling_configuration_props.rb', line 56 def min_size @min_size end |
#tags ⇒ Array<AWSCDK::CfnTag>? (readonly)
A list of metadata items that you can associate with your auto scaling configuration resource.
A tag is a key-value pair.
63 64 65 |
# File 'app_runner/cfn_auto_scaling_configuration_props.rb', line 63 def @tags end |
Class Method Details
.jsii_properties ⇒ Object
65 66 67 68 69 70 71 72 73 |
# File 'app_runner/cfn_auto_scaling_configuration_props.rb', line 65 def self.jsii_properties { :auto_scaling_configuration_name => "autoScalingConfigurationName", :max_concurrency => "maxConcurrency", :max_size => "maxSize", :min_size => "minSize", :tags => "tags", } end |
Instance Method Details
#to_jsii ⇒ Object
75 76 77 78 79 80 81 82 83 84 85 |
# File 'app_runner/cfn_auto_scaling_configuration_props.rb', line 75 def to_jsii result = {} result.merge!({ "autoScalingConfigurationName" => @auto_scaling_configuration_name, "maxConcurrency" => @max_concurrency, "maxSize" => @max_size, "minSize" => @min_size, "tags" => @tags, }) result.compact end |