interface CfnLambdaHookProps
Language | Type name |
---|---|
![]() | Amazon.CDK.CfnLambdaHookProps |
![]() | github.com/aws/aws-cdk-go/awscdk/v2#CfnLambdaHookProps |
![]() | software.amazon.awscdk.CfnLambdaHookProps |
![]() | aws_cdk.CfnLambdaHookProps |
![]() | aws-cdk-lib » CfnLambdaHookProps |
Properties for defining a CfnLambdaHook
.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
const cfnLambdaHookProps: cdk.CfnLambdaHookProps = {
alias: 'alias',
executionRole: 'executionRole',
failureMode: 'failureMode',
hookStatus: 'hookStatus',
lambdaFunction: 'lambdaFunction',
targetOperations: ['targetOperations'],
// the properties below are optional
stackFilters: {
filteringCriteria: 'filteringCriteria',
// the properties below are optional
stackNames: {
exclude: ['exclude'],
include: ['include'],
},
stackRoles: {
exclude: ['exclude'],
include: ['include'],
},
},
targetFilters: {
actions: ['actions'],
invocationPoints: ['invocationPoints'],
targetNames: ['targetNames'],
},
};
Properties
Name | Type | Description |
---|---|---|
alias | string | The type name alias for the Hook. This alias must be unique per account and Region. |
execution | string | The IAM role that the Hook assumes to invoke your Lambda function. |
failure | string | Specifies how the Hook responds when the Lambda function invoked by the Hook returns a FAILED response. |
hook | string | Specifies if the Hook is ENABLED or DISABLED . |
lambda | string | Specifies the Lambda function for the Hook. You can use:. |
target | string[] | Specifies the list of operations the Hook is run against. |
stack | IResolvable | Stack | Specifies the stack level filters for the Hook. |
target | IResolvable | Target | Specifies the target filters for the Hook. |
alias
Type:
string
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
.
executionRole
Type:
string
The IAM role that the Hook assumes to invoke your Lambda function.
failureMode
Type:
string
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.
hookStatus
Type:
string
Specifies if the Hook is ENABLED
or DISABLED
.
lambdaFunction
Type:
string
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.
targetOperations
Type:
string[]
Specifies the list of operations the Hook is run against.
For more information, see Hook targets in the AWS CloudFormation Hooks User Guide .
Valid values: STACK
| RESOURCE
| CHANGE_SET
| CLOUD_CONTROL
stackFilters?
Type:
IResolvable
|
Stack
(optional)
Specifies the stack level filters for the Hook.
targetFilters?
Type:
IResolvable
|
Target
(optional)
Specifies the target filters for the Hook.