Class CfnLambdaHook.Builder
java.lang.Object
software.amazon.awscdk.services.cloudformation.CfnLambdaHook.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnLambdaHook>
- Enclosing class:
CfnLambdaHook
@Stability(Stable)
public static final class CfnLambdaHook.Builder
extends Object
implements software.amazon.jsii.Builder<CfnLambdaHook>
A fluent builder for
CfnLambdaHook.-
Method Summary
Modifier and TypeMethodDescriptionThe type name alias for the Hook.build()static CfnLambdaHook.BuilderexecutionRole(String executionRole) The IAM role that the Hook assumes to invoke your Lambda function.failureMode(String failureMode) Specifies how the Hook responds when the Lambda function invoked by the Hook returns aFAILEDresponse.hookStatus(String hookStatus) Specifies if the Hook isENABLEDorDISABLED.lambdaFunction(String lambdaFunction) Specifies the Lambda function for the Hook.stackFilters(IResolvable stackFilters) Specifies the stack level filters for the Hook.stackFilters(CfnLambdaHook.StackFiltersProperty stackFilters) Specifies the stack level filters for the Hook.targetFilters(IResolvable targetFilters) Specifies the target filters for the Hook.targetFilters(CfnLambdaHook.TargetFiltersProperty targetFilters) Specifies the target filters for the Hook.targetOperations(List<String> targetOperations) Specifies which type of operation the Hook is run against.
-
Method Details
-
create
@Stability(Stable) public static CfnLambdaHook.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.- Returns:
- a new instance of
CfnLambdaHook.Builder.
-
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::Name3and must not begin withAWS. For example,Private::Lambda::MyTestHook.- Parameters:
alias- The type name alias for the Hook. This alias must be unique per account and Region. This parameter is required.- Returns:
this- See Also:
-
executionRole
The IAM role that the Hook assumes to invoke your Lambda function.- Parameters:
executionRole- The IAM role that the Hook assumes to invoke your Lambda function. This parameter is required.- Returns:
this- See Also:
-
failureMode
Specifies how the Hook responds when the Lambda function invoked by the Hook returns aFAILEDresponse.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.
- Parameters:
failureMode- Specifies how the Hook responds when the Lambda function invoked by the Hook returns aFAILEDresponse. This parameter is required.- Returns:
this- See Also:
-
hookStatus
Specifies if the Hook isENABLEDorDISABLED.Default: - "ENABLED"
- Parameters:
hookStatus- Specifies if the Hook isENABLEDorDISABLED. This parameter is required.- Returns:
this- See Also:
-
lambdaFunction
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.
- Parameters:
lambdaFunction- Specifies the Lambda function for the Hook. You can use:. This parameter is required.- Returns:
this- See Also:
-
targetOperations
Specifies which type of operation the Hook is run against.Valid values:
STACK|RESOURCE|CHANGE_SET|CLOUD_CONTROL- Parameters:
targetOperations- Specifies which type of operation the Hook is run against. This parameter is required.- Returns:
this- See Also:
-
stackFilters
Specifies the stack level filters for the Hook.- Parameters:
stackFilters- Specifies the stack level filters for the Hook. This parameter is required.- Returns:
this- See Also:
-
stackFilters
@Stability(Stable) public CfnLambdaHook.Builder stackFilters(CfnLambdaHook.StackFiltersProperty stackFilters) Specifies the stack level filters for the Hook.- Parameters:
stackFilters- Specifies the stack level filters for the Hook. This parameter is required.- Returns:
this- See Also:
-
targetFilters
Specifies the target filters for the Hook.- Parameters:
targetFilters- Specifies the target filters for the Hook. This parameter is required.- Returns:
this- See Also:
-
targetFilters
@Stability(Stable) public CfnLambdaHook.Builder targetFilters(CfnLambdaHook.TargetFiltersProperty targetFilters) Specifies the target filters for the Hook.- Parameters:
targetFilters- Specifies the target filters for the Hook. This parameter is required.- Returns:
this- See Also:
-
build
- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnLambdaHook>- Returns:
- a newly built instance of
CfnLambdaHook.
-