SmsSubscriptionProps
- class aws_cdk.aws_sns_subscriptions.SmsSubscriptionProps(*, dead_letter_queue=None, filter_policy=None, filter_policy_with_message_body=None)
Bases:
SubscriptionProps
Options for SMS 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 deliveredfilter_policy_with_message_body (
Optional
[Mapping
[str
,FilterOrPolicy
]]) – The filter policy that is applied on the message body. To apply a filter policy to the message attributes, usefilterPolicy
. A maximum of one offilterPolicyWithMessageBody
andfilterPolicy
may be used. Default: - all messages are delivered
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_sns as sns from aws_cdk import aws_sns_subscriptions as sns_subscriptions from aws_cdk import aws_sqs as sqs # filter_or_policy: sns.FilterOrPolicy # queue: sqs.Queue # subscription_filter: sns.SubscriptionFilter sms_subscription_props = sns_subscriptions.SmsSubscriptionProps( dead_letter_queue=queue, filter_policy={ "filter_policy_key": subscription_filter }, filter_policy_with_message_body={ "filter_policy_with_message_body_key": filter_or_policy } )
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
- filter_policy_with_message_body
The filter policy that is applied on the message body.
To apply a filter policy to the message attributes, use
filterPolicy
. A maximum of one offilterPolicyWithMessageBody
andfilterPolicy
may be used.- Default:
all messages are delivered