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