# BindHookTargetOptions

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

- Source: [`aws-autoscaling/lib/lifecycle-hook-target.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-autoscaling/lib/lifecycle-hook-target.ts#L10)
- Type last changed: v2.2.0 · 15 Dec 2021

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_autoscaling as autoscaling } from 'aws-cdk-lib';
import { aws_iam as iam } from 'aws-cdk-lib';

declare const lifecycleHook: autoscaling.LifecycleHook;
declare const role: iam.Role;
const bindHookTargetOptions: autoscaling.BindHookTargetOptions = {
  lifecycleHook: lifecycleHook,

  // the properties below are optional
  role: role,
};
```

## Properties

- `lifecycleHook`: [LifecycleHook](/cdk/api/v2/docs/aws-cdk-lib.aws_autoscaling.LifecycleHook.html) (required) — The lifecycle hook to attach to.

  [disable-awslint:ref-via-interface]

- `role`: [IRole](/cdk/api/v2/docs/aws-cdk-lib.aws_iam.IRole.html) — The role to use when attaching to the lifecycle hook.

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

  [disable-awslint:ref-via-interface]
