Class TopicHook
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.autoscaling.hooktargets.TopicHook
- All Implemented Interfaces:
ILifecycleHookTarget
,software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:46.211Z")
@Stability(Stable)
public class TopicHook
extends software.amazon.jsii.JsiiObject
implements ILifecycleHookTarget
Use an SNS topic 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.sns.*; Topic topic; TopicHook topicHook = new TopicHook(topic);
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.autoscaling.ILifecycleHookTarget
ILifecycleHookTarget.Jsii$Default, ILifecycleHookTarget.Jsii$Proxy
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbind
(software.constructs.Construct _scope, BindHookTargetOptions options) If anIRole
is found inoptions
, grant it topic publishing permissions.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
TopicHook
protected TopicHook(software.amazon.jsii.JsiiObjectRef objRef) -
TopicHook
protected TopicHook(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
TopicHook
- Parameters:
topic
- This parameter is required.
-
-
Method Details
-
bind
@Stability(Stable) @NotNull public LifecycleHookTargetConfig bind(@NotNull software.constructs.Construct _scope, @NotNull BindHookTargetOptions options) If anIRole
is found inoptions
, grant it topic publishing permissions.Otherwise, create a new
IRole
and grant it topic publishing permissions.- Specified by:
bind
in interfaceILifecycleHookTarget
- Parameters:
_scope
- This parameter is required.options
- This parameter is required.- Returns:
- the
IRole
with topic publishing permissions and the ARN of the topic it has publishing permission to.
-