Class SnsTopicProps
Customize the SNS Topic Event Target.
Inheritance
Namespace: Amazon.CDK.AWS.Events.Targets
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class SnsTopicProps : Object, ISnsTopicProps, ITargetBaseProps
Syntax (vb)
Public Class SnsTopicProps
Inherits Object
Implements ISnsTopicProps, ITargetBaseProps
Remarks
ExampleMetadata: infused
Examples
Rule onCommitRule;
Topic topic;
onCommitRule.AddTarget(new SnsTopic(topic, new SnsTopicProps {
Message = RuleTargetInput.FromText($"A commit was pushed to the repository {codecommit.ReferenceEvent.repositoryName} on branch {codecommit.ReferenceEvent.referenceName}")
}));
Synopsis
Constructors
SnsTopicProps() |
Properties
DeadLetterQueue | The SQS queue to be used as deadLetterQueue. Check out the considerations for using a dead-letter queue. |
MaxEventAge | The maximum age of a request that Lambda sends to a function for processing. |
Message | The message to send to the topic. |
RetryAttempts | The maximum number of times to retry when the function returns an error. |
Constructors
SnsTopicProps()
public SnsTopicProps()
Properties
DeadLetterQueue
The SQS queue to be used as deadLetterQueue. Check out the considerations for using a dead-letter queue.
public IQueue DeadLetterQueue { get; set; }
Property Value
Remarks
The events not successfully delivered are automatically retried for a specified period of time, depending on the retry policy of the target. If an event is not delivered before all retry attempts are exhausted, it will be sent to the dead letter queue.
Default: - no dead-letter queue
MaxEventAge
The maximum age of a request that Lambda sends to a function for processing.
public Duration MaxEventAge { get; set; }
Property Value
Remarks
Minimum value of 60. Maximum value of 86400.
Default: Duration.hours(24)
Message
The message to send to the topic.
public RuleTargetInput Message { get; set; }
Property Value
Remarks
Default: the entire EventBridge event
RetryAttempts
The maximum number of times to retry when the function returns an error.
public Nullable<double> RetryAttempts { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
Minimum value of 0. Maximum value of 185.
Default: 185