CfnLambdaHookProps
- class aws_cdk.CfnLambdaHookProps(*, alias, execution_role, failure_mode, hook_status, lambda_function, target_operations, stack_filters=None, target_filters=None)
Bases:
object
Properties for defining a
CfnLambdaHook
.- Parameters:
alias (
str
) – The type name alias for the Hook. This alias must be unique per account and Region. The alias must be in the formName1::Name2::Name3
and must not begin withAWS
. For example,Private::Lambda::MyTestHook
.execution_role (
str
) – The IAM role that the Hook assumes to invoke your Lambda function.failure_mode (
str
) – Specifies how the Hook responds when the Lambda function invoked by the Hook returns aFAILED
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.hook_status (
str
) – Specifies if the Hook isENABLED
orDISABLED
. Default: - “ENABLED”lambda_function (
str
) – 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.target_operations (
Sequence
[str
]) – Specifies which type of operation the Hook is run against. Valid values:STACK
|RESOURCE
|CHANGE_SET
|CLOUD_CONTROL
stack_filters (
Union
[IResolvable
,StackFiltersProperty
,Dict
[str
,Any
],None
]) – Specifies the stack level filters for the Hook.target_filters (
Union
[IResolvable
,TargetFiltersProperty
,Dict
[str
,Any
],None
]) – Specifies the target filters for the Hook.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk as cdk cfn_lambda_hook_props = cdk.CfnLambdaHookProps( alias="alias", execution_role="executionRole", failure_mode="failureMode", hook_status="hookStatus", lambda_function="lambdaFunction", target_operations=["targetOperations"], # the properties below are optional stack_filters=cdk.CfnLambdaHook.StackFiltersProperty( filtering_criteria="filteringCriteria", # the properties below are optional stack_names=cdk.CfnLambdaHook.StackNamesProperty( exclude=["exclude"], include=["include"] ), stack_roles=cdk.CfnLambdaHook.StackRolesProperty( exclude=["exclude"], include=["include"] ) ), target_filters=cdk.CfnLambdaHook.TargetFiltersProperty( actions=["actions"], invocation_points=["invocationPoints"], target_names=["targetNames"] ) )
Attributes
- alias
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 withAWS
. For example,Private::Lambda::MyTestHook
.
- execution_role
The IAM role that the Hook assumes to invoke your Lambda function.
- failure_mode
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.
- hook_status
Specifies if the Hook is
ENABLED
orDISABLED
.
- lambda_function
.
The full Amazon Resource Name (ARN) without a suffix.
A qualified ARN with a version or alias suffix.
- See:
- Type:
Specifies the Lambda function for the Hook. You can use
- stack_filters
Specifies the stack level filters for the Hook.
- target_filters
Specifies the target filters for the Hook.
- target_operations
Specifies which type of operation the Hook is run against.
Valid values:
STACK
|RESOURCE
|CHANGE_SET
|CLOUD_CONTROL