BindHookTargetOptions

class aws_cdk.aws_autoscaling.BindHookTargetOptions(*, lifecycle_hook, role=None)

Bases: object

Options needed to bind a target to a lifecycle hook.

[disable-awslint:ref-via-interface] The lifecycle hook to attach to and an IRole to use

Parameters:
  • lifecycle_hook (LifecycleHook) – The lifecycle hook to attach to. [disable-awslint:ref-via-interface]

  • role (Optional[IRole]) – The role to use when attaching to the lifecycle hook. [disable-awslint:ref-via-interface] Default: : a role is not created unless the target arn is specified

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.aws_autoscaling as autoscaling
import aws_cdk.aws_iam as iam

# lifecycle_hook: autoscaling.LifecycleHook
# role: iam.Role

bind_hook_target_options = autoscaling.BindHookTargetOptions(
    lifecycle_hook=lifecycle_hook,

    # the properties below are optional
    role=role
)

Attributes

lifecycle_hook

The lifecycle hook to attach to.

[disable-awslint:ref-via-interface]

role

The role to use when attaching to the lifecycle hook.

[disable-awslint:ref-via-interface]

Default:

: a role is not created unless the target arn is specified