HealthyRetryPolicy
- class aws_cdk.aws_sns.HealthyRetryPolicy(*, backoff_function=None, max_delay_target=None, min_delay_target=None, num_max_delay_retries=None, num_min_delay_retries=None, num_no_delay_retries=None, num_retries=None)
Bases:
object
Options for customising the retry policy of the delivery of SNS messages to HTTP/S endpoints.
- Parameters:
backoff_function (
Optional
[BackoffFunction
]) – The model for backoff between retries. Default: - linearmax_delay_target (
Optional
[Duration
]) – The maximum delay for a retry. Must be at leastminDelayTarget
less than 3,600 seconds, and correspond to a whole number of seconds, Default: - 20 secondsmin_delay_target (
Optional
[Duration
]) – The minimum delay for a retry. Must be at least one second, not exceedmaxDelayTarget
, and correspond to a whole number of seconds. Default: - 20 secondsnum_max_delay_retries (
Union
[int
,float
,None
]) – The number of retries in the post-backoff phase, with the maximum delay between them. Must be zero or greater Default: 0num_min_delay_retries (
Union
[int
,float
,None
]) – The number of retries in the pre-backoff phase, with the specified minimum delay between them. Must be zero or greater Default: 0num_no_delay_retries (
Union
[int
,float
,None
]) – The number of retries to be done immediately, with no delay between them. Must be zero or greater. Default: 0num_retries (
Union
[int
,float
,None
]) – The total number of retries, including immediate, pre-backoff, backoff, and post-backoff retries. Must be greater than or equal to zero and not exceed 100. Default: 3
- ExampleMetadata:
infused
Example:
my_topic = sns.Topic(self, "MyTopic") my_topic.add_subscription( subscriptions.UrlSubscription("https://foobar.com/", delivery_policy=sns.DeliveryPolicy( healthy_retry_policy=sns.HealthyRetryPolicy( min_delay_target=Duration.seconds(5), max_delay_target=Duration.seconds(10), num_retries=6, backoff_function=sns.BackoffFunction.EXPONENTIAL ), throttle_policy=sns.ThrottlePolicy( max_receives_per_second=10 ), request_policy=sns.RequestPolicy( header_content_type="application/json" ) ) ))
Attributes
- backoff_function
The model for backoff between retries.
- Default:
linear
- max_delay_target
The maximum delay for a retry.
Must be at least
minDelayTarget
less than 3,600 seconds, and correspond to a whole number of seconds,- Default:
20 seconds
- min_delay_target
The minimum delay for a retry.
Must be at least one second, not exceed
maxDelayTarget
, and correspond to a whole number of seconds.- Default:
20 seconds
- num_max_delay_retries
The number of retries in the post-backoff phase, with the maximum delay between them.
Must be zero or greater
- Default:
0
- num_min_delay_retries
The number of retries in the pre-backoff phase, with the specified minimum delay between them.
Must be zero or greater
- Default:
0
- num_no_delay_retries
The number of retries to be done immediately, with no delay between them.
Must be zero or greater.
- Default:
0
- num_retries
The total number of retries, including immediate, pre-backoff, backoff, and post-backoff retries.
Must be greater than or equal to zero and not exceed 100.
- Default:
3