Interface SnsTopicProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable,TargetBaseProps
- All Known Implementing Classes:
SnsTopicProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.119.0 (build 1634eac)",
date="2025-12-01T16:02:21.282Z")
@Stability(Stable)
public interface SnsTopicProps
extends software.amazon.jsii.JsiiSerializable, TargetBaseProps
Customize the SNS Topic Event Target.
Example:
Rule onCommitRule;
Topic topic;
onCommitRule.addTarget(SnsTopic.Builder.create(topic)
.message(RuleTargetInput.fromObject(Map.of(
"DataType", String.format("custom_%s", EventField.fromPath("$.detail-type")))))
.build());
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forSnsTopicPropsstatic final classAn implementation forSnsTopicProps -
Method Summary
Modifier and TypeMethodDescriptionstatic SnsTopicProps.Builderbuilder()default BooleanSpecifies whether an IAM role should be used to publish to the topic.default RuleTargetInputThe message to send to the topic.default IRolegetRole()The IAM role to be used to publish to the topic.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJsonMethods inherited from interface software.amazon.awscdk.services.events.targets.TargetBaseProps
getDeadLetterQueue, getMaxEventAge, getRetryAttempts
-
Method Details
-
getAuthorizeUsingRole
Specifies whether an IAM role should be used to publish to the topic.Default: - true if `role` is provided, false otherwise
-
getMessage
The message to send to the topic.Default: the entire EventBridge event
-
getRole
The IAM role to be used to publish to the topic.Default: - a new role will be created if `authorizeUsingRole` is true
-
builder
- Returns:
- a
SnsTopicProps.BuilderofSnsTopicProps
-