Class SubscriptionProps
Properties for creating a new subscription.
Inheritance
Namespace: Amazon.CDK.AWS.SNS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class SubscriptionProps : Object, ISubscriptionProps, ISubscriptionOptions
Syntax (vb)
Public Class SubscriptionProps
Inherits Object
Implements ISubscriptionProps, ISubscriptionOptions
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.KinesisFirehose.Alpha;
DeliveryStream stream;
var topic = new Topic(this, "Topic");
new Subscription(this, "Subscription", new SubscriptionProps {
Topic = topic,
Endpoint = stream.DeliveryStreamArn,
Protocol = SubscriptionProtocol.FIREHOSE,
SubscriptionRoleArn = "SAMPLE_ARN"
});
Synopsis
Constructors
Subscription |
Properties
Dead |
Queue to be used as dead letter queue. |
Delivery |
The delivery policy. |
Endpoint | The subscription endpoint. |
Filter |
The filter policy. |
Filter |
The filter policy that is applied on the message body. |
Protocol | What type of subscription to add. |
Raw |
true if raw message delivery is enabled for the subscription. |
Region | The region where the topic resides, in the case of cross-region subscriptions. |
Subscription |
Arn of role allowing access to firehose delivery stream. |
Topic | The topic to subscribe to. |
Constructors
SubscriptionProps()
public SubscriptionProps()
Properties
DeadLetterQueue
Queue to be used as dead letter queue.
public IQueue DeadLetterQueue { get; set; }
Property Value
Remarks
If not passed no dead letter queue is enabled.
Default: - No dead letter queue enabled.
DeliveryPolicy
The delivery policy.
public IDeliveryPolicy DeliveryPolicy { get; set; }
Property Value
Remarks
Default: - if the initial delivery of the message fails, three retries with a delay between failed attempts set at 20 seconds
Endpoint
The subscription endpoint.
public string Endpoint { get; set; }
Property Value
System.
Remarks
The meaning of this value depends on the value for 'protocol'.
FilterPolicy
The filter policy.
public IDictionary<string, SubscriptionFilter> FilterPolicy { get; set; }
Property Value
System.
Remarks
Default: - all messages are delivered
FilterPolicyWithMessageBody
The filter policy that is applied on the message body.
public IDictionary<string, FilterOrPolicy> FilterPolicyWithMessageBody { get; set; }
Property Value
System.
Remarks
To apply a filter policy to the message attributes, use filterPolicy
. A maximum of one of filterPolicyWithMessageBody
and filterPolicy
may be used.
Default: - all messages are delivered
Protocol
What type of subscription to add.
public SubscriptionProtocol Protocol { get; set; }
Property Value
RawMessageDelivery
true if raw message delivery is enabled for the subscription.
public Nullable<bool> RawMessageDelivery { get; set; }
Property Value
System.
Remarks
Raw messages are free of JSON formatting and can be sent to HTTP/S and Amazon SQS endpoints. For more information, see GetSubscriptionAttributes in the Amazon Simple Notification Service API Reference.
Default: false
Region
The region where the topic resides, in the case of cross-region subscriptions.
public string Region { get; set; }
Property Value
System.
Remarks
Default: - the region where the CloudFormation stack is being deployed.
SubscriptionRoleArn
Arn of role allowing access to firehose delivery stream.
public string SubscriptionRoleArn { get; set; }
Property Value
System.
Remarks
Required for a firehose subscription protocol.
Default: - No subscription role is provided