Module: AWSCDK::Lambda::IScalableFunctionAttribute
- Includes:
- Constructs::IConstruct
- Defined in:
- lambda/i_scalable_function_attribute.rb
Overview
Interface for scalable attributes.
Class Method Summary collapse
Instance Method Summary collapse
-
#node ⇒ Constructs::Node
The tree node.
-
#scale_on_schedule(id, actions) ⇒ void
Scale out or in based on schedule.
-
#scale_on_utilization(options) ⇒ void
Scale out or in to keep utilization at a given level.
-
#with(*mixins) ⇒ Constructs::IConstruct
Applies one or more mixins to this construct.
Class Method Details
.jsii_overridable_methods ⇒ Object
55 56 57 58 59 60 61 62 |
# File 'lambda/i_scalable_function_attribute.rb', line 55 def self.jsii_overridable_methods { :node => { kind: :property, name: "node", is_optional: false }, :with => { kind: :method, name: "with", is_optional: false }, :scale_on_schedule => { kind: :method, name: "scaleOnSchedule", is_optional: false }, :scale_on_utilization => { kind: :method, name: "scaleOnUtilization", is_optional: false }, } end |
Instance Method Details
#node ⇒ Constructs::Node
The tree node.
11 12 13 |
# File 'lambda/i_scalable_function_attribute.rb', line 11 def node() jsii_get_property("node") end |
#scale_on_schedule(id, actions) ⇒ void
This method returns an undefined value.
Scale out or in based on schedule.
34 35 36 37 38 39 |
# File 'lambda/i_scalable_function_attribute.rb', line 34 def scale_on_schedule(id, actions) Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") actions = actions.is_a?(Hash) ? ::AWSCDK::ApplicationAutoScaling::ScalingSchedule.new(**actions.transform_keys(&:to_sym)) : actions Jsii::Type.check_type(actions, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwbGljYXRpb25hdXRvc2NhbGluZy5TY2FsaW5nU2NoZWR1bGUifQ==")), "actions") jsii_call_method("scaleOnSchedule", [id, actions]) end |
#scale_on_utilization(options) ⇒ void
This method returns an undefined value.
Scale out or in to keep utilization at a given level.
The utilization is tracked by the LambdaProvisionedConcurrencyUtilization metric, emitted by lambda. See: https://docs.aws.amazon.com/lambda/latest/dg/monitoring-metrics.html#monitoring-metrics-concurrency
49 50 51 52 53 |
# File 'lambda/i_scalable_function_attribute.rb', line 49 def scale_on_utilization() = .is_a?(Hash) ? ::AWSCDK::Lambda::UtilizationScalingOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLlV0aWxpemF0aW9uU2NhbGluZ09wdGlvbnMifQ==")), "options") jsii_call_method("scaleOnUtilization", []) end |
#with(*mixins) ⇒ Constructs::IConstruct
Applies one or more mixins to this construct.
Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited.
22 23 24 25 26 27 |
# File 'lambda/i_scalable_function_attribute.rb', line 22 def with(*mixins) mixins.each_with_index do |item, index| Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLklNaXhpbiJ9")), "mixins[#{index}]") end jsii_call_method("with", [*mixins]) end |