SnsTopicProps
- class aws_cdk.aws_events_targets.SnsTopicProps(*, message=None)
Bases:
object
Customize the SNS Topic Event Target.
- Parameters:
message (
Optional
[RuleTargetInput
]) – The message to send to the topic. Default: the entire EventBridge event- ExampleMetadata:
infused
Example:
# on_commit_rule: events.Rule # topic: sns.Topic on_commit_rule.add_target(targets.SnsTopic(topic, message=events.RuleTargetInput.from_text(f"A commit was pushed to the repository {codecommit.ReferenceEvent.repositoryName} on branch {codecommit.ReferenceEvent.referenceName}") ))
Attributes
- message
The message to send to the topic.
- Default:
the entire EventBridge event