Class: AWSCDK::Lambda::CfnAlias::VersionWeightProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
lambda/cfn_alias.rb

Overview

The traffic-shifting configuration of a Lambda function alias.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(function_version:, function_weight:) ⇒ VersionWeightProperty

Returns a new instance of VersionWeightProperty.

Parameters:

  • function_version (String)

    The qualifier of the second version.

  • function_weight (Numeric)

    The percentage of traffic that the alias routes to the second version.



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_versionString (readonly)

The qualifier of the second version.



654
655
656
# File 'lambda/cfn_alias.rb', line 654

def function_version
  @function_version
end

#function_weightNumeric (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_propertiesObject



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_jsiiObject



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