Show / Hide Table of Contents

Class SubscriptionProps

Properties for creating a new subscription.

Inheritance
object
SubscriptionProps
Implements
ISubscriptionProps
ISubscriptionOptions
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Amazon.CDK.AWS.SNS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class SubscriptionProps : ISubscriptionProps, ISubscriptionOptions
Syntax (vb)
Public Class SubscriptionProps Implements ISubscriptionProps, ISubscriptionOptions
Remarks

ExampleMetadata: infused

Examples
using Amazon.CDK.AWS.KinesisFirehose;
            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 for creating a new subscription.

Properties

DeadLetterQueue

Queue to be used as dead letter queue.

DeliveryPolicy

The delivery policy.

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()

Properties for creating a new subscription.

public SubscriptionProps()
Remarks

ExampleMetadata: infused

Examples
using Amazon.CDK.AWS.KinesisFirehose;
            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"
            });

Properties

DeadLetterQueue

Queue to be used as dead letter queue.

public IQueue? DeadLetterQueue { get; set; }
Property Value

IQueue

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

IDeliveryPolicy

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

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

IDictionary<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

IDictionary<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

SubscriptionProtocol

Remarks

ExampleMetadata: infused

RawMessageDelivery

true if raw message delivery is enabled for the subscription.

public bool? RawMessageDelivery { get; set; }
Property Value

bool?

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

string

Remarks

Default: - the region where the CloudFormation stack is being deployed.

Link: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sns-subscription.html#cfn-sns-subscription-region

SubscriptionRoleArn

Arn of role allowing access to firehose delivery stream.

public string? SubscriptionRoleArn { get; set; }
Property Value

string

Remarks

Required for a firehose subscription protocol.

Default: - No subscription role is provided

Topic

The topic to subscribe to.

public ITopic Topic { get; set; }
Property Value

ITopic

Remarks

ExampleMetadata: infused

Implements

ISubscriptionProps
ISubscriptionOptions
Back to top Generated by DocFX