Class SnsTopic
Use an SNS topic as a target for Amazon EventBridge rules.
Inheritance
System.Object
SnsTopic
Implements
Namespace: Amazon.CDK.AWS.Events.Targets
Assembly: Amazon.CDK.AWS.Events.Targets.dll
Syntax (csharp)
public class SnsTopic : DeputyBase, IRuleTarget
Syntax (vb)
Public Class SnsTopic
Inherits DeputyBase
Implements IRuleTarget
Examples
// publish to an SNS topic every time code is committed
// to a CodeCommit repository
repository.OnCommit("onCommit", new OnCommitOptions { Target = new SnsTopic(topic) });
Synopsis
Constructors
SnsTopic(ITopic, ISnsTopicProps) | |
SnsTopic(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
SnsTopic(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
Topic |
Methods
Bind(IRule, String) | Returns a RuleTarget that can be used to trigger this SNS topic as a result from an EventBridge event. |
Constructors
SnsTopic(ITopic, ISnsTopicProps)
public SnsTopic(ITopic topic, ISnsTopicProps props = null)
Parameters
- topic ITopic
- props ISnsTopicProps
SnsTopic(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected SnsTopic(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
SnsTopic(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected SnsTopic(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
Topic
Methods
Bind(IRule, String)
Returns a RuleTarget that can be used to trigger this SNS topic as a result from an EventBridge event.
public virtual IRuleTargetConfig Bind(IRule rule, string id = null)
Parameters
- rule IRule
- id System.String
Returns