CfnLambdaHookPropsMixin
- class aws_cdk.mixins_preview.aws_cloudformation.mixins.CfnLambdaHookPropsMixin(props, *, strategy=None)
Bases:
MixinThe
AWS::CloudFormation::LambdaHookresource creates and activates a Lambda Hook.You can use a Lambda Hook to evaluate your resources before allowing stack operations. This resource forwards requests for resource evaluation to a Lambda function.
For more information, see Lambda Hooks in the CloudFormation Hooks User Guide .
- See:
- CloudformationResource:
AWS::CloudFormation::LambdaHook
- Mixin:
true
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview import mixins from aws_cdk.mixins_preview.aws_cloudformation import mixins as cloudformation_mixins cfn_lambda_hook_props_mixin = cloudformation_mixins.CfnLambdaHookPropsMixin(cloudformation_mixins.CfnLambdaHookMixinProps( alias="alias", execution_role="executionRole", failure_mode="failureMode", hook_status="hookStatus", lambda_function="lambdaFunction", stack_filters=cloudformation_mixins.CfnLambdaHookPropsMixin.StackFiltersProperty( filtering_criteria="filteringCriteria", stack_names=cloudformation_mixins.CfnLambdaHookPropsMixin.StackNamesProperty( exclude=["exclude"], include=["include"] ), stack_roles=cloudformation_mixins.CfnLambdaHookPropsMixin.StackRolesProperty( exclude=["exclude"], include=["include"] ) ), target_filters=cloudformation_mixins.CfnLambdaHookPropsMixin.TargetFiltersProperty( actions=["actions"], invocation_points=["invocationPoints"], target_names=["targetNames"], targets=[cloudformation_mixins.CfnLambdaHookPropsMixin.HookTargetProperty( action="action", invocation_point="invocationPoint", target_name="targetName" )] ), target_operations=["targetOperations"] ), strategy=mixins.PropertyMergeStrategy.OVERRIDE )
Create a mixin to apply properties to
AWS::CloudFormation::LambdaHook.- Parameters:
props (
Union[CfnLambdaHookMixinProps,Dict[str,Any]]) – L1 properties to apply.strategy (
Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE
Methods
- apply_to(construct)
Apply the mixin properties to the construct.
- Parameters:
construct (
IConstruct)- Return type:
- supports(construct)
Check if this mixin supports the given construct.
- Parameters:
construct (
IConstruct)- Return type:
bool
Attributes
- CFN_PROPERTY_KEYS = ['alias', 'executionRole', 'failureMode', 'hookStatus', 'lambdaFunction', 'stackFilters', 'targetFilters', 'targetOperations']
Static Methods
- classmethod is_mixin(x)
(experimental) Checks if
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.- Stability:
experimental
HookTargetProperty
- class CfnLambdaHookPropsMixin.HookTargetProperty(*, action=None, invocation_point=None, target_name=None)
Bases:
objectHook targets are the destination where hooks will be invoked against.
- Parameters:
action (
Optional[str]) – Target actions are the type of operation hooks will be executed at.invocation_point (
Optional[str]) – Invocation points are the point in provisioning workflow where hooks will be executed.target_name (
Optional[str]) – Type name of hook target. Hook targets are the destination where hooks will be invoked against.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_cloudformation import mixins as cloudformation_mixins hook_target_property = cloudformation_mixins.CfnLambdaHookPropsMixin.HookTargetProperty( action="action", invocation_point="invocationPoint", target_name="targetName" )
Attributes
- action
Target actions are the type of operation hooks will be executed at.
- invocation_point
Invocation points are the point in provisioning workflow where hooks will be executed.
- target_name
Type name of hook target.
Hook targets are the destination where hooks will be invoked against.
StackFiltersProperty
- class CfnLambdaHookPropsMixin.StackFiltersProperty(*, filtering_criteria=None, stack_names=None, stack_roles=None)
Bases:
objectThe
StackFiltersproperty type specifies stack level filters for a Hook.The
StackNamesorStackRolesproperties are optional. However, you must specify at least one of these properties.For more information, see CloudFormation Hooks stack level filters .
- Parameters:
filtering_criteria (
Optional[str]) – The filtering criteria. - All stack names and stack roles (All): The Hook will only be invoked when all specified filters match. - Any stack names and stack roles (Any): The Hook will be invoked if at least one of the specified filters match. Default: - “ALL”stack_names (
Union[IResolvable,StackNamesProperty,Dict[str,Any],None]) – Includes or excludes specific stacks from Hook invocations.stack_roles (
Union[IResolvable,StackRolesProperty,Dict[str,Any],None]) – Includes or excludes specific stacks from Hook invocations based on their associated IAM roles.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_cloudformation import mixins as cloudformation_mixins stack_filters_property = cloudformation_mixins.CfnLambdaHookPropsMixin.StackFiltersProperty( filtering_criteria="filteringCriteria", stack_names=cloudformation_mixins.CfnLambdaHookPropsMixin.StackNamesProperty( exclude=["exclude"], include=["include"] ), stack_roles=cloudformation_mixins.CfnLambdaHookPropsMixin.StackRolesProperty( exclude=["exclude"], include=["include"] ) )
Attributes
- filtering_criteria
The filtering criteria.
All stack names and stack roles (
All): The Hook will only be invoked when all specified filters match.Any stack names and stack roles (
Any): The Hook will be invoked if at least one of the specified filters match.
- stack_names
Includes or excludes specific stacks from Hook invocations.
- stack_roles
Includes or excludes specific stacks from Hook invocations based on their associated IAM roles.
StackNamesProperty
- class CfnLambdaHookPropsMixin.StackNamesProperty(*, exclude=None, include=None)
Bases:
objectSpecifies the stack names for the
StackFiltersproperty type to include or exclude specific stacks from Hook invocations.For more information, see CloudFormation Hooks stack level filters .
- Parameters:
exclude (
Optional[Sequence[str]]) – The stack names to exclude. All stacks except those listed here will invoke the Hook.include (
Optional[Sequence[str]]) – The stack names to include. Only the stacks specified in this list will invoke 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. from aws_cdk.mixins_preview.aws_cloudformation import mixins as cloudformation_mixins stack_names_property = cloudformation_mixins.CfnLambdaHookPropsMixin.StackNamesProperty( exclude=["exclude"], include=["include"] )
Attributes
- exclude
The stack names to exclude.
All stacks except those listed here will invoke the Hook.
- include
The stack names to include.
Only the stacks specified in this list will invoke the Hook.
StackRolesProperty
- class CfnLambdaHookPropsMixin.StackRolesProperty(*, exclude=None, include=None)
Bases:
objectSpecifies the stack roles for the
StackFiltersproperty type to include or exclude specific stacks from Hook invocations based on their associated IAM roles.For more information, see CloudFormation Hooks stack level filters .
- Parameters:
exclude (
Optional[Sequence[str]]) – The IAM role ARNs for stacks you want to exclude. The Hook will be invoked on all stacks except those initiated by the specified roles.include (
Optional[Sequence[str]]) – The IAM role ARNs to target stacks associated with these roles. Only stack operations initiated by these roles will invoke 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. from aws_cdk.mixins_preview.aws_cloudformation import mixins as cloudformation_mixins stack_roles_property = cloudformation_mixins.CfnLambdaHookPropsMixin.StackRolesProperty( exclude=["exclude"], include=["include"] )
Attributes
- exclude
The IAM role ARNs for stacks you want to exclude.
The Hook will be invoked on all stacks except those initiated by the specified roles.
- include
The IAM role ARNs to target stacks associated with these roles.
Only stack operations initiated by these roles will invoke the Hook.
TargetFiltersProperty
- class CfnLambdaHookPropsMixin.TargetFiltersProperty(*, actions=None, invocation_points=None, target_names=None, targets=None)
Bases:
objectThe
TargetFiltersproperty type specifies the target filters for the Hook.For more information, see CloudFormation Hook target filters .
- Parameters:
actions (
Optional[Sequence[str]]) – List of actions that the hook is going to target.invocation_points (
Optional[Sequence[str]]) – List of invocation points that the hook is going to target.target_names (
Optional[Sequence[str]]) – List of type names that the hook is going to target.targets (
Union[IResolvable,Sequence[Union[IResolvable,HookTargetProperty,Dict[str,Any]]],None]) – List of hook targets.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_cloudformation import mixins as cloudformation_mixins target_filters_property = cloudformation_mixins.CfnLambdaHookPropsMixin.TargetFiltersProperty( actions=["actions"], invocation_points=["invocationPoints"], target_names=["targetNames"], targets=[cloudformation_mixins.CfnLambdaHookPropsMixin.HookTargetProperty( action="action", invocation_point="invocationPoint", target_name="targetName" )] )
Attributes
- actions
List of actions that the hook is going to target.
- invocation_points
List of invocation points that the hook is going to target.
- target_names
List of type names that the hook is going to target.