Interface ISubscriptionOptions
Options for creating a new subscription.
Namespace: Amazon.CDK.AWS.SNS
Assembly: Amazon.CDK.AWS.SNS.dll
Syntax (csharp)
public interface ISubscriptionOptions
Syntax (vb)
Public Interface ISubscriptionOptions
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.SNS;
using Amazon.CDK.AWS.SQS;
Queue queue;
SubscriptionFilter subscriptionFilter;
var subscriptionOptions = new SubscriptionOptions {
Endpoint = "endpoint",
Protocol = SubscriptionProtocol.HTTP,
// the properties below are optional
DeadLetterQueue = queue,
FilterPolicy = new Dictionary<string, SubscriptionFilter> {
{ "filterPolicyKey", subscriptionFilter }
},
RawMessageDelivery = false,
Region = "region",
SubscriptionRoleArn = "subscriptionRoleArn"
};
Synopsis
Properties
DeadLetterQueue | Queue to be used as dead letter queue. |
Endpoint | The subscription endpoint. |
FilterPolicy | The filter policy. |
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. |
Properties
DeadLetterQueue
Queue to be used as dead letter queue.
virtual IQueue DeadLetterQueue { get; }
Property Value
Remarks
If not passed no dead letter queue is enabled.
Default: - No dead letter queue enabled.
Endpoint
The subscription endpoint.
string Endpoint { get; }
Property Value
System.String
Remarks
The meaning of this value depends on the value for 'protocol'.
FilterPolicy
The filter policy.
virtual IDictionary<string, SubscriptionFilter> FilterPolicy { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, SubscriptionFilter>
Remarks
Default: - all messages are delivered
Protocol
What type of subscription to add.
SubscriptionProtocol Protocol { get; }
Property Value
RawMessageDelivery
true if raw message delivery is enabled for the subscription.
virtual Nullable<bool> RawMessageDelivery { get; }
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.
virtual string Region { get; }
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.
virtual string SubscriptionRoleArn { get; }
Property Value
System.String
Remarks
Required for a firehose subscription protocol.
Default: - No subscription role is provided