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
SubscriptionProps() |
Properties
DeadLetterQueue | Queue to be used as dead letter queue. |
Endpoint | The subscription endpoint. |
FilterPolicy | The filter policy. |
FilterPolicyWithMessageBody | The filter policy that is applied on the message body. |
Protocol | What type of subscription to add. |
RawMessageDelivery | true if raw message delivery is enabled for the subscription. |
Region | The region where the topic resides, in the case of cross-region subscriptions. |
SubscriptionRoleArn | 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.
Endpoint
The subscription endpoint.
public string Endpoint { get; set; }
Property Value
System.String
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.Collections.Generic.IDictionary<System.String, SubscriptionFilter>
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.Collections.Generic.IDictionary<System.String, FilterOrPolicy>
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.Nullable<System.Boolean>
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.String
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.String
Remarks
Required for a firehose subscription protocol.
Default: - No subscription role is provided