interface DeliveryPolicy
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.SNS.DeliveryPolicy |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awssns#DeliveryPolicy |
![]() | software.amazon.awscdk.services.sns.DeliveryPolicy |
![]() | aws_cdk.aws_sns.DeliveryPolicy |
![]() | aws-cdk-lib » aws_sns » DeliveryPolicy |
Options for customising the delivery of SNS messages to HTTP/S endpoints.
Example
const myTopic = new sns.Topic(this, 'MyTopic');
myTopic.addSubscription(
new subscriptions.UrlSubscription(
'https://foobar.com/',
{
deliveryPolicy: {
healthyRetryPolicy: {
minDelayTarget: Duration.seconds(5),
maxDelayTarget: Duration.seconds(10),
numRetries: 6,
backoffFunction: sns.BackoffFunction.EXPONENTIAL,
},
throttlePolicy: {
maxReceivesPerSecond: 10,
},
requestPolicy: {
headerContentType: 'application/json',
},
},
},
),
);
Properties
Name | Type | Description |
---|---|---|
healthy | Healthy | The retry policy of the delivery of SNS messages to HTTP/S endpoints. |
request | Request | The request of the content sent in AWS SNS HTTP/S requests. |
throttle | Throttle | The throttling policy of the delivery of SNS messages to HTTP/S endpoints. |
healthyRetryPolicy?
Type:
Healthy
(optional, default: Amazon SNS attempts up to three retries with a delay between failed attempts set at 20 seconds)
The retry policy of the delivery of SNS messages to HTTP/S endpoints.
requestPolicy?
Type:
Request
(optional, default: The content type is set to 'text/plain; charset=UTF-8')
The request of the content sent in AWS SNS HTTP/S requests.
throttlePolicy?
Type:
Throttle
(optional, default: No throttling)
The throttling policy of the delivery of SNS messages to HTTP/S endpoints.