SubscriptionProps

class aws_cdk.aws_sns.SubscriptionProps(*, endpoint, protocol, dead_letter_queue=None, filter_policy=None, raw_message_delivery=None, region=None, topic)

Bases: aws_cdk.aws_sns.SubscriptionOptions

Properties for creating a new subscription.

Parameters
  • endpoint (str) – The subscription endpoint. The meaning of this value depends on the value for ‘protocol’.

  • protocol (SubscriptionProtocol) – What type of subscription to add.

  • dead_letter_queue (Optional[IQueue]) – Queue to be used as dead letter queue. If not passed no dead letter queue is enabled. Default: - No dead letter queue enabled.

  • filter_policy (Optional[Mapping[str, SubscriptionFilter]]) – The filter policy. Default: - all messages are delivered

  • raw_message_delivery (Optional[bool]) – true if raw message delivery is enabled for the subscription. 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 (Optional[str]) – The region where the topic resides, in the case of cross-region subscriptions. Default: - the region where the CloudFormation stack is being deployed.

  • topic (ITopic) – The topic to subscribe to.

Attributes

dead_letter_queue

Queue to be used as dead letter queue.

If not passed no dead letter queue is enabled.

Default
  • No dead letter queue enabled.

Return type

Optional[IQueue]

endpoint

The subscription endpoint.

The meaning of this value depends on the value for ‘protocol’.

Return type

str

filter_policy

The filter policy.

Default
  • all messages are delivered

Return type

Optional[Mapping[str, SubscriptionFilter]]

protocol

What type of subscription to add.

Return type

SubscriptionProtocol

raw_message_delivery

true if raw message delivery is enabled for the subscription.

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

Return type

Optional[bool]

region

The region where the topic resides, in the case of cross-region subscriptions.

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

Return type

Optional[str]

topic

The topic to subscribe to.

Return type

ITopic