BackoffFunction
- class aws_cdk.aws_sns.BackoffFunction(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
Algorithms which can be used by SNS to calculate the delays associated with all of the retry attempts between the first and last retries in the backoff phase.
- 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
- ARITHMETIC
Arithmetic, see {@link https://docs.aws.amazon.com/images/sns/latest/dg/images/backoff-graph.png this image} for how this function compares to others.
- EXPONENTIAL
Exponential, see {@link https://docs.aws.amazon.com/images/sns/latest/dg/images/backoff-graph.png this image} for how this function compares to others.
- GEOMETRIC
Geometric, see {@link https://docs.aws.amazon.com/images/sns/latest/dg/images/backoff-graph.png this image} for how this function compares to others.
- LINEAR
Linear, see {@link https://docs.aws.amazon.com/images/sns/latest/dg/images/backoff-graph.png this image} for how this function compares to others.