Class QueueHook
Use an SQS queue as a hook target.
Inheritance
System.Object
QueueHook
Implements
Namespace: Amazon.CDK.AWS.AutoScaling.HookTargets
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class QueueHook : DeputyBase, ILifecycleHookTarget
Syntax (vb)
Public Class QueueHook
Inherits DeputyBase
Implements ILifecycleHookTarget
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.AutoScaling.HookTargets;
using Amazon.CDK.AWS.SQS;
Queue queue;
var queueHook = new QueueHook(queue);
Synopsis
Constructors
QueueHook(IQueue) | |
QueueHook(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
QueueHook(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Methods
Bind(Construct, IBindHookTargetOptions) | If an |
Constructors
QueueHook(IQueue)
QueueHook(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected QueueHook(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
QueueHook(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected QueueHook(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Methods
Bind(Construct, IBindHookTargetOptions)
If an IRole
is found in options
, grant it access to send messages.
public virtual ILifecycleHookTargetConfig Bind(Construct scope, IBindHookTargetOptions options)
Parameters
- scope Constructs.Construct
- options IBindHookTargetOptions
Returns
the IRole
with access to send messages and the ARN of the queue it has access to send messages to.
Remarks
Otherwise, create a new IRole
and grant it access to send messages.