Class: AWSCDK::Lambda::CfnVersion::RuntimePolicyProperty

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

Overview

Sets the runtime management configuration for a function's version.

For more information, see Runtime updates .

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(update_runtime_on:, runtime_version_arn: nil) ⇒ RuntimePolicyProperty

Returns a new instance of RuntimePolicyProperty.

Parameters:

  • update_runtime_on (String)

    Specify the runtime update mode.

  • runtime_version_arn (String, nil) (defaults to: nil)

    The ARN of the runtime version you want the function to use.



655
656
657
658
659
660
# File 'lambda/cfn_version.rb', line 655

def initialize(update_runtime_on:, runtime_version_arn: nil)
  @update_runtime_on = update_runtime_on
  Jsii::Type.check_type(@update_runtime_on, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "updateRuntimeOn")
  @runtime_version_arn = runtime_version_arn
  Jsii::Type.check_type(@runtime_version_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "runtimeVersionArn") unless @runtime_version_arn.nil?
end

Instance Attribute Details

#runtime_version_arnString? (readonly)

The ARN of the runtime version you want the function to use.

This is only required if you're using the Manual runtime update mode.



679
680
681
# File 'lambda/cfn_version.rb', line 679

def runtime_version_arn
  @runtime_version_arn
end

#update_runtime_onString (readonly)

Specify the runtime update mode.

  • Auto (default) - Automatically update to the most recent and secure runtime version using a Two-phase runtime version rollout . This is the best choice for most customers to ensure they always benefit from runtime updates.
  • FunctionUpdate - Lambda updates the runtime of you function to the most recent and secure runtime version when you update your function. This approach synchronizes runtime updates with function deployments, giving you control over when runtime updates are applied and allowing you to detect and mitigate rare runtime update incompatibilities early. When using this setting, you need to regularly update your functions to keep their runtime up-to-date.
  • Manual - You specify a runtime version in your function configuration. The function will use this runtime version indefinitely. In the rare case where a new runtime version is incompatible with an existing function, this allows you to roll back your function to an earlier runtime version. For more information, see Roll back a runtime version .

Valid Values : Auto | FunctionUpdate | Manual



672
673
674
# File 'lambda/cfn_version.rb', line 672

def update_runtime_on
  @update_runtime_on
end

Class Method Details

.jsii_propertiesObject



681
682
683
684
685
686
# File 'lambda/cfn_version.rb', line 681

def self.jsii_properties
  {
    :update_runtime_on => "updateRuntimeOn",
    :runtime_version_arn => "runtimeVersionArn",
  }
end

Instance Method Details

#to_jsiiObject



688
689
690
691
692
693
694
695
# File 'lambda/cfn_version.rb', line 688

def to_jsii
  result = {}
  result.merge!({
    "updateRuntimeOn" => @update_runtime_on,
    "runtimeVersionArn" => @runtime_version_arn,
  })
  result.compact
end