Class SnsTopic
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.events.targets.SnsTopic
- All Implemented Interfaces:
IRuleTarget
,software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-11-22T02:24:02.075Z")
@Stability(Stable)
public class SnsTopic
extends software.amazon.jsii.JsiiObject
implements IRuleTarget
Use an SNS topic as a target for Amazon EventBridge rules.
If the topic is imported the required permissions to publish to that topic need to be set manually.
Example:
// publish to an SNS topic every time code is committed // to a CodeCommit repository repository.onCommit("onCommit", OnCommitOptions.builder().target(new SnsTopic(topic)).build());
-
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.events.IRuleTarget
IRuleTarget.Jsii$Default, IRuleTarget.Jsii$Proxy
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns a RuleTarget that can be used to trigger this SNS topic as a result from an EventBridge event.Returns a RuleTarget that can be used to trigger this SNS topic as a result from an EventBridge event.getTopic()
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
-
SnsTopic
protected SnsTopic(software.amazon.jsii.JsiiObjectRef objRef) -
SnsTopic
protected SnsTopic(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
SnsTopic
- Parameters:
topic
- This parameter is required.props
-
-
SnsTopic
- Parameters:
topic
- This parameter is required.
-
-
Method Details
-
bind
@Stability(Stable) @NotNull public RuleTargetConfig bind(@NotNull IRule _rule, @Nullable String _id) Returns a RuleTarget that can be used to trigger this SNS topic as a result from an EventBridge event.- Specified by:
bind
in interfaceIRuleTarget
- Parameters:
_rule
- This parameter is required._id
-- See Also:
-
bind
Returns a RuleTarget that can be used to trigger this SNS topic as a result from an EventBridge event.- Specified by:
bind
in interfaceIRuleTarget
- Parameters:
_rule
- This parameter is required.- See Also:
-
getTopic
-