Class SubscriptionOptions
Options for creating a new subscription.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.SNS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class SubscriptionOptions : Object, ISubscriptionOptions
Syntax (vb)
Public Class SubscriptionOptions
Inherits Object
Implements 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;
FilterOrPolicy filterOrPolicy;
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 }
},
FilterPolicyWithMessageBody = new Dictionary<string, FilterOrPolicy> {
{ "filterPolicyWithMessageBodyKey", filterOrPolicy }
},
RawMessageDelivery = false,
Region = "region",
SubscriptionRoleArn = "subscriptionRoleArn"
};
Synopsis
Constructors
SubscriptionOptions() |
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. |
Constructors
SubscriptionOptions()
public SubscriptionOptions()
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