# LifecycleHookTargetConfig

Result of binding a lifecycle hook to a target.

Returned by: [ILifecycleHookTarget.bind](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_autoscaling.ILifecycleHookTarget.html#bind)

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

## Example

TypeScript:

```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 role: iam.Role;
const lifecycleHookTargetConfig: autoscaling.LifecycleHookTargetConfig = {
  createdRole: role,
  notificationTargetArn: 'notificationTargetArn',
};
```

Python:

```python
# 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

# role: iam.Role

lifecycle_hook_target_config = autoscaling.LifecycleHookTargetConfig(
    created_role=role,
    notification_target_arn="notificationTargetArn"
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.autoscaling.*;
import software.amazon.awscdk.services.iam.*;

Role role;

LifecycleHookTargetConfig lifecycleHookTargetConfig = LifecycleHookTargetConfig.builder()
        .createdRole(role)
        .notificationTargetArn("notificationTargetArn")
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.AutoScaling;
using Amazon.CDK.AWS.IAM;

Role role;

var lifecycleHookTargetConfig = new LifecycleHookTargetConfig {
    CreatedRole = role,
    NotificationTargetArn = "notificationTargetArn"
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

var role Role

lifecycleHookTargetConfig := &LifecycleHookTargetConfig{
	CreatedRole: role,
	NotificationTargetArn: jsii.String("notificationTargetArn"),
}
```

## Properties

- `createdRole`: [IRole](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iam.IRole.html) (required) — The IRole that was used to bind the lifecycle hook to the target.

- `notificationTargetArn`: string (required) — The targetArn that the lifecycle hook was bound to.
