UrlSubscriptionProps

class aws_cdk.aws_sns_subscriptions.UrlSubscriptionProps(*, dead_letter_queue=None, filter_policy=None, protocol=None, raw_message_delivery=None)

Bases: SubscriptionProps

Options for URL subscriptions.

Parameters:
  • 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

  • protocol (Optional[SubscriptionProtocol]) – The subscription’s protocol. Default: - Protocol is derived from url

  • raw_message_delivery (Optional[bool]) – The message to the queue is the same as it was sent to the topic. If false, the message will be wrapped in an SNS envelope. Default: false

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_sns as sns
import aws_cdk.aws_sns_subscriptions as sns_subscriptions
import aws_cdk.aws_sqs as sqs

# queue: sqs.Queue
# subscription_filter: sns.SubscriptionFilter

url_subscription_props = sns_subscriptions.UrlSubscriptionProps(
    dead_letter_queue=queue,
    filter_policy={
        "filter_policy_key": subscription_filter
    },
    protocol=sns.SubscriptionProtocol.HTTP,
    raw_message_delivery=False
)

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.

filter_policy

The filter policy.

Default:
  • all messages are delivered

protocol

The subscription’s protocol.

Default:
  • Protocol is derived from url

raw_message_delivery

The message to the queue is the same as it was sent to the topic.

If false, the message will be wrapped in an SNS envelope.

Default:

false