CfnLifecycleHookPropsMixin

class aws_cdk.mixins_preview.aws_autoscaling.mixins.CfnLifecycleHookPropsMixin(props, *, strategy=None)

Bases: Mixin

The AWS::AutoScaling::LifecycleHook resource specifies lifecycle hooks for an Auto Scaling group.

These hooks let you create solutions that are aware of events in the Auto Scaling instance lifecycle, and then perform a custom action on instances when the corresponding lifecycle event occurs. A lifecycle hook provides a specified amount of time (one hour by default) to wait for the action to complete before the instance transitions to the next state.

Use lifecycle hooks to prepare new instances for use or to delay them from being registered behind a load balancer before their configuration has been applied completely. You can also use lifecycle hooks to prepare running instances to be terminated by, for example, downloading logs or other data.

For more information, see Amazon EC2 Auto Scaling lifecycle hooks in the Amazon EC2 Auto Scaling User Guide .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-lifecyclehook.html

CloudformationResource:

AWS::AutoScaling::LifecycleHook

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_autoscaling import mixins as autoscaling_mixins

cfn_lifecycle_hook_props_mixin = autoscaling_mixins.CfnLifecycleHookPropsMixin(autoscaling_mixins.CfnLifecycleHookMixinProps(
    auto_scaling_group_name="autoScalingGroupName",
    default_result="defaultResult",
    heartbeat_timeout=123,
    lifecycle_hook_name="lifecycleHookName",
    lifecycle_transition="lifecycleTransition",
    notification_metadata="notificationMetadata",
    notification_target_arn="notificationTargetArn",
    role_arn="roleArn"
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

Create a mixin to apply properties to AWS::AutoScaling::LifecycleHook.

Parameters:

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

IConstruct

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['autoScalingGroupName', 'defaultResult', 'heartbeatTimeout', 'lifecycleHookName', 'lifecycleTransition', 'notificationMetadata', 'notificationTargetArn', 'roleArn']

Static Methods

classmethod is_mixin(x)

(experimental) Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

Stability:

experimental