LifecycleHookTargetConfig Struct
Result of binding a lifecycle hook to a target.
| Source | aws-autoscaling/lib/lifecycle-hook-target.ts |
|---|---|
| Type last changed |
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 role: iam.Role;
const lifecycleHookTargetConfig: autoscaling.LifecycleHookTargetConfig = {
createdRole: role,
notificationTargetArn: 'notificationTargetArn',
};
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
// 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();
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"
};
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
The IRole that was used to bind the lifecycle hook to the target.
notificationTargetArnstringnotification_target_arnstrnotificationTargetArnStringNotificationTargetArnstringNotificationTargetArn*string required #The targetArn that the lifecycle hook was bound to.