Class: AWSCDK::CfnLambdaHookProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::CfnLambdaHookProps
- Defined in:
- cfn_lambda_hook_props.rb
Overview
Properties for defining a CfnLambdaHook.
Instance Attribute Summary collapse
-
#_alias ⇒ String
readonly
The type name alias for the Hook.
-
#execution_role ⇒ String
readonly
The IAM role that the Hook assumes to invoke your Lambda function.
-
#failure_mode ⇒ String
readonly
Specifies how the Hook responds when the Lambda function invoked by the Hook returns a
FAILEDresponse. -
#hook_status ⇒ String
readonly
Specifies if the Hook is
ENABLEDorDISABLED. -
#lambda_function ⇒ String
readonly
Specifies the Lambda function for the Hook.
-
#stack_filters ⇒ AWSCDK::IResolvable, ...
readonly
Specifies the stack level filters for the Hook.
-
#target_filters ⇒ AWSCDK::IResolvable, ...
readonly
Specifies the target filters for the Hook.
-
#target_operations ⇒ Array<String>
readonly
Specifies the list of operations the Hook is run against.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(_alias:, execution_role:, failure_mode:, hook_status:, lambda_function:, target_operations:, stack_filters: nil, target_filters: nil) ⇒ CfnLambdaHookProps
constructor
A new instance of CfnLambdaHookProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(_alias:, execution_role:, failure_mode:, hook_status:, lambda_function:, target_operations:, stack_filters: nil, target_filters: nil) ⇒ CfnLambdaHookProps
Returns a new instance of CfnLambdaHookProps.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'cfn_lambda_hook_props.rb', line 17 def initialize(_alias:, execution_role:, failure_mode:, hook_status:, lambda_function:, target_operations:, stack_filters: nil, target_filters: nil) @_alias = _alias Jsii::Type.check_type(@_alias, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "alias") @execution_role = execution_role Jsii::Type.check_type(@execution_role, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "executionRole") @failure_mode = failure_mode Jsii::Type.check_type(@failure_mode, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "failureMode") @hook_status = hook_status Jsii::Type.check_type(@hook_status, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "hookStatus") @lambda_function = lambda_function Jsii::Type.check_type(@lambda_function, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "lambdaFunction") @target_operations = target_operations Jsii::Type.check_type(@target_operations, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "targetOperations") @stack_filters = stack_filters.is_a?(Hash) ? ::AWSCDK::CfnLambdaHook::StackFiltersProperty.new(**stack_filters.transform_keys(&:to_sym)) : stack_filters Jsii::Type.check_type(@stack_filters, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLkNmbkxhbWJkYUhvb2suU3RhY2tGaWx0ZXJzUHJvcGVydHkifV19fQ==")), "stackFilters") unless @stack_filters.nil? @target_filters = target_filters.is_a?(Hash) ? ::AWSCDK::CfnLambdaHook::TargetFiltersProperty.new(**target_filters.transform_keys(&:to_sym)) : target_filters Jsii::Type.check_type(@target_filters, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLkNmbkxhbWJkYUhvb2suVGFyZ2V0RmlsdGVyc1Byb3BlcnR5In1dfX0=")), "targetFilters") unless @target_filters.nil? end |
Instance Attribute Details
#_alias ⇒ String (readonly)
The type name alias for the Hook. This alias must be unique per account and Region.
The alias must be in the form Name1::Name2::Name3 and must not begin with AWS . For example, Private::Lambda::MyTestHook .
42 43 44 |
# File 'cfn_lambda_hook_props.rb', line 42 def _alias @_alias end |
#execution_role ⇒ String (readonly)
The IAM role that the Hook assumes to invoke your Lambda function.
47 48 49 |
# File 'cfn_lambda_hook_props.rb', line 47 def execution_role @execution_role end |
#failure_mode ⇒ String (readonly)
Specifies how the Hook responds when the Lambda function invoked by the Hook returns a FAILED response.
FAIL: Prevents the action from proceeding. This is helpful for enforcing strict compliance or security policies.WARN: Issues warnings to users but allows actions to continue. This is useful for non-critical validations or informational checks.
55 56 57 |
# File 'cfn_lambda_hook_props.rb', line 55 def failure_mode @failure_mode end |
#hook_status ⇒ String (readonly)
Default: - "ENABLED"
Specifies if the Hook is ENABLED or DISABLED .
61 62 63 |
# File 'cfn_lambda_hook_props.rb', line 61 def hook_status @hook_status end |
#lambda_function ⇒ String (readonly)
Specifies the Lambda function for the Hook. You can use:.
- The full Amazon Resource Name (ARN) without a suffix.
- A qualified ARN with a version or alias suffix.
69 70 71 |
# File 'cfn_lambda_hook_props.rb', line 69 def lambda_function @lambda_function end |
#stack_filters ⇒ AWSCDK::IResolvable, ... (readonly)
Specifies the stack level filters for the Hook.
Example stack level filter in JSON:
"StackFilters": {"FilteringCriteria": "ALL", "StackNames": {"Exclude": [ "stack-1", "stack-2"]}}
Example stack level filter in YAML:
StackFilters: FilteringCriteria: ALL StackNames: Exclude: - stack-1 - stack-2
91 92 93 |
# File 'cfn_lambda_hook_props.rb', line 91 def stack_filters @stack_filters end |
#target_filters ⇒ AWSCDK::IResolvable, ... (readonly)
Specifies the target filters for the Hook.
Example target filter in JSON:
"TargetFilters": {"Actions": [ "CREATE", "UPDATE", "DELETE" ]}
Example target filter in YAML:
TargetFilters: Actions: - CREATE - UPDATE - DELETE
104 105 106 |
# File 'cfn_lambda_hook_props.rb', line 104 def target_filters @target_filters end |
#target_operations ⇒ Array<String> (readonly)
Specifies the list of operations the Hook is run against.
For more information, see Hook targets in the CloudFormation Hooks User Guide .
Valid values: STACK | RESOURCE | CHANGE_SET | CLOUD_CONTROL
78 79 80 |
# File 'cfn_lambda_hook_props.rb', line 78 def target_operations @target_operations end |
Class Method Details
.jsii_properties ⇒ Object
106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'cfn_lambda_hook_props.rb', line 106 def self.jsii_properties { :_alias => "alias", :execution_role => "executionRole", :failure_mode => "failureMode", :hook_status => "hookStatus", :lambda_function => "lambdaFunction", :target_operations => "targetOperations", :stack_filters => "stackFilters", :target_filters => "targetFilters", } end |
Instance Method Details
#to_jsii ⇒ Object
119 120 121 122 123 124 125 126 127 128 129 130 131 132 |
# File 'cfn_lambda_hook_props.rb', line 119 def to_jsii result = {} result.merge!({ "alias" => @_alias, "executionRole" => @execution_role, "failureMode" => @failure_mode, "hookStatus" => @hook_status, "lambdaFunction" => @lambda_function, "targetOperations" => @target_operations, "stackFilters" => @stack_filters, "targetFilters" => @target_filters, }) result.compact end |