Skip to content
v2.275.0

DeliveryPolicy Struct ​

Options for customising the delivery of SNS messages to HTTP/S endpoints.

Example ​

ts
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 ​

healthyRetryPolicyoptionalHealthyRetryPolicyhealthy_retry_policyoptionalHealthyRetryPolicyhealthyRetryPolicyoptionalHealthyRetryPolicyHealthyRetryPolicyoptionalHealthyRetryPolicyHealthyRetryPolicyoptionalHealthyRetryPolicy#
The retry policy of the delivery of SNS messages to HTTP/S endpoints.

Default: Amazon SNS attempts up to three retries with a delay between failed attempts set at 20 seconds

requestPolicyoptionalRequestPolicyrequest_policyoptionalRequestPolicyrequestPolicyoptionalRequestPolicyRequestPolicyoptionalRequestPolicyRequestPolicyoptionalRequestPolicy#
The request of the content sent in AWS SNS HTTP/S requests.

Default: The content type is set to 'text/plain; charset=UTF-8'

throttlePolicyoptionalThrottlePolicythrottle_policyoptionalThrottlePolicythrottlePolicyoptionalThrottlePolicyThrottlePolicyoptionalThrottlePolicyThrottlePolicyoptionalThrottlePolicy#
The throttling policy of the delivery of SNS messages to HTTP/S endpoints.

Default: No throttling