software.amazon.awscdk.services.autoscaling.hooktargets.QueueHook Maven / Gradle / Ivy
Show all versions of autoscaling-hooktargets Show documentation
package software.amazon.awscdk.services.autoscaling.hooktargets;
/**
* 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 software.amazon.awscdk.services.autoscaling.hooktargets.*;
* import software.amazon.awscdk.services.sqs.*;
* Queue queue;
* QueueHook queueHook = new QueueHook(queue);
*
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.60.0 (build ebcefe6)", date = "2022-07-09T01:30:47.331Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.autoscaling.hooktargets.$Module.class, fqn = "@aws-cdk/aws-autoscaling-hooktargets.QueueHook")
public class QueueHook extends software.amazon.jsii.JsiiObject implements software.amazon.awscdk.services.autoscaling.ILifecycleHookTarget {
protected QueueHook(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected QueueHook(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
/**
* @param queue This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public QueueHook(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.sqs.IQueue queue) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(queue, "queue is required") });
}
/**
* 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.
*
* @return the `IRole` with access to send messages and the ARN of the queue it has access to send messages to.
* @param _scope This parameter is required.
* @param options This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.autoscaling.LifecycleHookTargetConfig bind(final @org.jetbrains.annotations.NotNull software.constructs.Construct _scope, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.autoscaling.BindHookTargetOptions options) {
return software.amazon.jsii.Kernel.call(this, "bind", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.autoscaling.LifecycleHookTargetConfig.class), new Object[] { java.util.Objects.requireNonNull(_scope, "_scope is required"), java.util.Objects.requireNonNull(options, "options is required") });
}
}