aws-cdk-lib.aws_autoscaling_hooktargets.QueueHook

class QueueHook

LanguageType name
.NETAmazon.CDK.AWS.AutoScaling.HookTargets.QueueHook
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsautoscalinghooktargets#QueueHook
Javasoftware.amazon.awscdk.services.autoscaling.hooktargets.QueueHook
Pythonaws_cdk.aws_autoscaling_hooktargets.QueueHook
TypeScript (source)aws-cdk-lib » aws_autoscaling_hooktargets » QueueHook

Implements ILifecycleHookTarget

Use an SQS queue as a hook target.

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_autoscaling_hooktargets as autoscaling_hooktargets } from 'aws-cdk-lib';
import { aws_sqs as sqs } from 'aws-cdk-lib';

declare const queue: sqs.Queue;
const queueHook = new autoscaling_hooktargets.QueueHook(queue);

Initializer

new QueueHook(queue: IQueue)

Parameters

  • queue IQueue

Methods

NameDescription
bind(_scope, options)If an IRole is found in options, grant it access to send messages.

bind(_scope, options)

public bind(_scope: Construct, options: BindHookTargetOptions): LifecycleHookTargetConfig

Parameters

  • _scope Construct
  • options BindHookTargetOptions

Returns

  • LifecycleHookTargetConfig

If an IRole is found in options, grant it access to send messages.

Otherwise, create a new IRole and grant it access to send messages.