interface SqsSubscriptionProps
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.SNS.Subscriptions.SqsSubscriptionProps |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awssnssubscriptions#SqsSubscriptionProps |
![]() | software.amazon.awscdk.services.sns.subscriptions.SqsSubscriptionProps |
![]() | aws_cdk.aws_sns_subscriptions.SqsSubscriptionProps |
![]() | aws-cdk-lib » aws_sns_subscriptions » SqsSubscriptionProps |
Properties for an SQS subscription.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_sns as sns } from 'aws-cdk-lib';
import { aws_sns_subscriptions as sns_subscriptions } from 'aws-cdk-lib';
import { aws_sqs as sqs } from 'aws-cdk-lib';
declare const filterOrPolicy: sns.FilterOrPolicy;
declare const queue: sqs.Queue;
declare const subscriptionFilter: sns.SubscriptionFilter;
const sqsSubscriptionProps: sns_subscriptions.SqsSubscriptionProps = {
deadLetterQueue: queue,
filterPolicy: {
filterPolicyKey: subscriptionFilter,
},
filterPolicyWithMessageBody: {
filterPolicyWithMessageBodyKey: filterOrPolicy,
},
rawMessageDelivery: false,
};
Properties
Name | Type | Description |
---|---|---|
dead | IQueue | Queue to be used as dead letter queue. |
filter | { [string]: Subscription } | The filter policy. |
filter | { [string]: Filter } | The filter policy that is applied on the message body. |
raw | boolean | The message to the queue is the same as it was sent to the topic. |
deadLetterQueue?
Type:
IQueue
(optional, default: No dead letter queue enabled.)
Queue to be used as dead letter queue.
If not passed no dead letter queue is enabled.
filterPolicy?
Type:
{ [string]:
Subscription
}
(optional, default: all messages are delivered)
The filter policy.
filterPolicyWithMessageBody?
Type:
{ [string]:
Filter
}
(optional, default: all messages are delivered)
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 of filterPolicyWithMessageBody
and filterPolicy
may be used.
rawMessageDelivery?
Type:
boolean
(optional, default: false)
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.