Class: AWSCDK::Lambda::CfnAlias::VersionWeightProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Lambda::CfnAlias::VersionWeightProperty
- Defined in:
- lambda/cfn_alias.rb
Overview
The traffic-shifting configuration of a Lambda function alias.
Instance Attribute Summary collapse
-
#function_version ⇒ String
readonly
The qualifier of the second version.
-
#function_weight ⇒ Numeric
readonly
The percentage of traffic that the alias routes to the second version.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(function_version:, function_weight:) ⇒ VersionWeightProperty
constructor
A new instance of VersionWeightProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(function_version:, function_weight:) ⇒ VersionWeightProperty
Returns a new instance of VersionWeightProperty.
643 644 645 646 647 648 |
# File 'lambda/cfn_alias.rb', line 643 def initialize(function_version:, function_weight:) @function_version = function_version Jsii::Type.check_type(@function_version, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "functionVersion") @function_weight = function_weight Jsii::Type.check_type(@function_weight, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "functionWeight") end |
Instance Attribute Details
#function_version ⇒ String (readonly)
The qualifier of the second version.
654 655 656 |
# File 'lambda/cfn_alias.rb', line 654 def function_version @function_version end |
#function_weight ⇒ Numeric (readonly)
The percentage of traffic that the alias routes to the second version.
659 660 661 |
# File 'lambda/cfn_alias.rb', line 659 def function_weight @function_weight end |
Class Method Details
.jsii_properties ⇒ Object
661 662 663 664 665 666 |
# File 'lambda/cfn_alias.rb', line 661 def self.jsii_properties { :function_version => "functionVersion", :function_weight => "functionWeight", } end |
Instance Method Details
#to_jsii ⇒ Object
668 669 670 671 672 673 674 675 |
# File 'lambda/cfn_alias.rb', line 668 def to_jsii result = {} result.merge!({ "functionVersion" => @function_version, "functionWeight" => @function_weight, }) result.compact end |