Skip to content
v2.274.0

RequestPolicy Struct ​

Options for customising aspects of the content sent in AWS SNS HTTP/S requests.

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 ​

headerContentTypestringheader_content_typestrheaderContentTypeStringHeaderContentTypestringHeaderContentType*string= text/plain; charset=UTF-8#
The content type of the notification being sent to HTTP/S endpoints.