aws-cdk-lib 2.168.0__py3-none-any.whl → 2.170.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- aws_cdk/__init__.py +2 -0
- aws_cdk/_jsii/__init__.py +1 -1
- aws_cdk/_jsii/{aws-cdk-lib@2.168.0.jsii.tgz → aws-cdk-lib@2.170.0.jsii.tgz} +0 -0
- aws_cdk/aws_accessanalyzer/__init__.py +244 -13
- aws_cdk/aws_applicationsignals/__init__.py +8 -1
- aws_cdk/aws_autoscaling/__init__.py +310 -9
- aws_cdk/aws_cloudfront/__init__.py +50 -0
- aws_cdk/aws_cloudfront/experimental/__init__.py +5 -0
- aws_cdk/aws_codebuild/__init__.py +2 -2
- aws_cdk/aws_connect/__init__.py +378 -0
- aws_cdk/aws_customerprofiles/__init__.py +44 -0
- aws_cdk/aws_deadline/__init__.py +299 -6
- aws_cdk/aws_dynamodb/__init__.py +47 -25
- aws_cdk/aws_ec2/__init__.py +6 -2
- aws_cdk/aws_ecs/__init__.py +28 -22
- aws_cdk/aws_efs/__init__.py +61 -4
- aws_cdk/aws_eks/__init__.py +116 -0
- aws_cdk/aws_gamelift/__init__.py +385 -251
- aws_cdk/aws_iot/__init__.py +209 -0
- aws_cdk/aws_iotfleetwise/__init__.py +550 -0
- aws_cdk/aws_iotsitewise/__init__.py +6 -3
- aws_cdk/aws_ivs/__init__.py +458 -0
- aws_cdk/aws_kinesisfirehose/__init__.py +90 -33
- aws_cdk/aws_lambda/__init__.py +150 -6
- aws_cdk/aws_lambda_event_sources/__init__.py +298 -1
- aws_cdk/aws_rbin/__init__.py +902 -0
- aws_cdk/aws_rds/__init__.py +115 -0
- aws_cdk/aws_route53resolver/__init__.py +76 -19
- aws_cdk/aws_sagemaker/__init__.py +32 -0
- aws_cdk/aws_sns/__init__.py +593 -8
- aws_cdk/aws_sns_subscriptions/__init__.py +68 -22
- aws_cdk/aws_synthetics/__init__.py +46 -0
- aws_cdk/aws_vpclattice/__init__.py +118 -2
- aws_cdk/aws_wisdom/__init__.py +16 -21
- {aws_cdk_lib-2.168.0.dist-info → aws_cdk_lib-2.170.0.dist-info}/METADATA +1 -1
- {aws_cdk_lib-2.168.0.dist-info → aws_cdk_lib-2.170.0.dist-info}/RECORD +40 -39
- {aws_cdk_lib-2.168.0.dist-info → aws_cdk_lib-2.170.0.dist-info}/LICENSE +0 -0
- {aws_cdk_lib-2.168.0.dist-info → aws_cdk_lib-2.170.0.dist-info}/NOTICE +0 -0
- {aws_cdk_lib-2.168.0.dist-info → aws_cdk_lib-2.170.0.dist-info}/WHEEL +0 -0
- {aws_cdk_lib-2.168.0.dist-info → aws_cdk_lib-2.170.0.dist-info}/top_level.txt +0 -0
aws_cdk/aws_sns/__init__.py
CHANGED
|
@@ -419,6 +419,45 @@ from ..aws_kms import IKey as _IKey_5f11635f
|
|
|
419
419
|
from ..aws_sqs import IQueue as _IQueue_7ed6f679
|
|
420
420
|
|
|
421
421
|
|
|
422
|
+
@jsii.enum(jsii_type="aws-cdk-lib.aws_sns.BackoffFunction")
|
|
423
|
+
class BackoffFunction(enum.Enum):
|
|
424
|
+
'''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.
|
|
425
|
+
|
|
426
|
+
:exampleMetadata: infused
|
|
427
|
+
|
|
428
|
+
Example::
|
|
429
|
+
|
|
430
|
+
my_topic = sns.Topic(self, "MyTopic")
|
|
431
|
+
|
|
432
|
+
my_topic.add_subscription(
|
|
433
|
+
subscriptions.UrlSubscription("https://foobar.com/",
|
|
434
|
+
delivery_policy=sns.DeliveryPolicy(
|
|
435
|
+
healthy_retry_policy=sns.HealthyRetryPolicy(
|
|
436
|
+
min_delay_target=Duration.seconds(5),
|
|
437
|
+
max_delay_target=Duration.seconds(10),
|
|
438
|
+
num_retries=6,
|
|
439
|
+
backoff_function=sns.BackoffFunction.EXPONENTIAL
|
|
440
|
+
),
|
|
441
|
+
throttle_policy=sns.ThrottlePolicy(
|
|
442
|
+
max_receives_per_second=10
|
|
443
|
+
),
|
|
444
|
+
request_policy=sns.RequestPolicy(
|
|
445
|
+
header_content_type="application/json"
|
|
446
|
+
)
|
|
447
|
+
)
|
|
448
|
+
))
|
|
449
|
+
'''
|
|
450
|
+
|
|
451
|
+
ARITHMETIC = "ARITHMETIC"
|
|
452
|
+
'''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.'''
|
|
453
|
+
EXPONENTIAL = "EXPONENTIAL"
|
|
454
|
+
'''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.'''
|
|
455
|
+
GEOMETRIC = "GEOMETRIC"
|
|
456
|
+
'''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.'''
|
|
457
|
+
LINEAR = "LINEAR"
|
|
458
|
+
'''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.'''
|
|
459
|
+
|
|
460
|
+
|
|
422
461
|
@jsii.data_type(
|
|
423
462
|
jsii_type="aws-cdk-lib.aws_sns.BetweenCondition",
|
|
424
463
|
jsii_struct_bases=[],
|
|
@@ -2257,6 +2296,111 @@ class CfnTopicProps:
|
|
|
2257
2296
|
)
|
|
2258
2297
|
|
|
2259
2298
|
|
|
2299
|
+
@jsii.data_type(
|
|
2300
|
+
jsii_type="aws-cdk-lib.aws_sns.DeliveryPolicy",
|
|
2301
|
+
jsii_struct_bases=[],
|
|
2302
|
+
name_mapping={
|
|
2303
|
+
"healthy_retry_policy": "healthyRetryPolicy",
|
|
2304
|
+
"request_policy": "requestPolicy",
|
|
2305
|
+
"throttle_policy": "throttlePolicy",
|
|
2306
|
+
},
|
|
2307
|
+
)
|
|
2308
|
+
class DeliveryPolicy:
|
|
2309
|
+
def __init__(
|
|
2310
|
+
self,
|
|
2311
|
+
*,
|
|
2312
|
+
healthy_retry_policy: typing.Optional[typing.Union["HealthyRetryPolicy", typing.Dict[builtins.str, typing.Any]]] = None,
|
|
2313
|
+
request_policy: typing.Optional[typing.Union["RequestPolicy", typing.Dict[builtins.str, typing.Any]]] = None,
|
|
2314
|
+
throttle_policy: typing.Optional[typing.Union["ThrottlePolicy", typing.Dict[builtins.str, typing.Any]]] = None,
|
|
2315
|
+
) -> None:
|
|
2316
|
+
'''Options for customising the delivery of SNS messages to HTTP/S endpoints.
|
|
2317
|
+
|
|
2318
|
+
:param healthy_retry_policy: 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
|
|
2319
|
+
:param request_policy: The request of the content sent in AWS SNS HTTP/S requests. Default: - The content type is set to 'text/plain; charset=UTF-8'
|
|
2320
|
+
:param throttle_policy: The throttling policy of the delivery of SNS messages to HTTP/S endpoints. Default: - No throttling
|
|
2321
|
+
|
|
2322
|
+
:exampleMetadata: infused
|
|
2323
|
+
|
|
2324
|
+
Example::
|
|
2325
|
+
|
|
2326
|
+
my_topic = sns.Topic(self, "MyTopic")
|
|
2327
|
+
|
|
2328
|
+
my_topic.add_subscription(
|
|
2329
|
+
subscriptions.UrlSubscription("https://foobar.com/",
|
|
2330
|
+
delivery_policy=sns.DeliveryPolicy(
|
|
2331
|
+
healthy_retry_policy=sns.HealthyRetryPolicy(
|
|
2332
|
+
min_delay_target=Duration.seconds(5),
|
|
2333
|
+
max_delay_target=Duration.seconds(10),
|
|
2334
|
+
num_retries=6,
|
|
2335
|
+
backoff_function=sns.BackoffFunction.EXPONENTIAL
|
|
2336
|
+
),
|
|
2337
|
+
throttle_policy=sns.ThrottlePolicy(
|
|
2338
|
+
max_receives_per_second=10
|
|
2339
|
+
),
|
|
2340
|
+
request_policy=sns.RequestPolicy(
|
|
2341
|
+
header_content_type="application/json"
|
|
2342
|
+
)
|
|
2343
|
+
)
|
|
2344
|
+
))
|
|
2345
|
+
'''
|
|
2346
|
+
if isinstance(healthy_retry_policy, dict):
|
|
2347
|
+
healthy_retry_policy = HealthyRetryPolicy(**healthy_retry_policy)
|
|
2348
|
+
if isinstance(request_policy, dict):
|
|
2349
|
+
request_policy = RequestPolicy(**request_policy)
|
|
2350
|
+
if isinstance(throttle_policy, dict):
|
|
2351
|
+
throttle_policy = ThrottlePolicy(**throttle_policy)
|
|
2352
|
+
if __debug__:
|
|
2353
|
+
type_hints = typing.get_type_hints(_typecheckingstub__4b77bc2bacea1b5a536852c018892cbf213e209fa1462f79eed79e56c3588546)
|
|
2354
|
+
check_type(argname="argument healthy_retry_policy", value=healthy_retry_policy, expected_type=type_hints["healthy_retry_policy"])
|
|
2355
|
+
check_type(argname="argument request_policy", value=request_policy, expected_type=type_hints["request_policy"])
|
|
2356
|
+
check_type(argname="argument throttle_policy", value=throttle_policy, expected_type=type_hints["throttle_policy"])
|
|
2357
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {}
|
|
2358
|
+
if healthy_retry_policy is not None:
|
|
2359
|
+
self._values["healthy_retry_policy"] = healthy_retry_policy
|
|
2360
|
+
if request_policy is not None:
|
|
2361
|
+
self._values["request_policy"] = request_policy
|
|
2362
|
+
if throttle_policy is not None:
|
|
2363
|
+
self._values["throttle_policy"] = throttle_policy
|
|
2364
|
+
|
|
2365
|
+
@builtins.property
|
|
2366
|
+
def healthy_retry_policy(self) -> typing.Optional["HealthyRetryPolicy"]:
|
|
2367
|
+
'''The retry policy of the delivery of SNS messages to HTTP/S endpoints.
|
|
2368
|
+
|
|
2369
|
+
:default: - Amazon SNS attempts up to three retries with a delay between failed attempts set at 20 seconds
|
|
2370
|
+
'''
|
|
2371
|
+
result = self._values.get("healthy_retry_policy")
|
|
2372
|
+
return typing.cast(typing.Optional["HealthyRetryPolicy"], result)
|
|
2373
|
+
|
|
2374
|
+
@builtins.property
|
|
2375
|
+
def request_policy(self) -> typing.Optional["RequestPolicy"]:
|
|
2376
|
+
'''The request of the content sent in AWS SNS HTTP/S requests.
|
|
2377
|
+
|
|
2378
|
+
:default: - The content type is set to 'text/plain; charset=UTF-8'
|
|
2379
|
+
'''
|
|
2380
|
+
result = self._values.get("request_policy")
|
|
2381
|
+
return typing.cast(typing.Optional["RequestPolicy"], result)
|
|
2382
|
+
|
|
2383
|
+
@builtins.property
|
|
2384
|
+
def throttle_policy(self) -> typing.Optional["ThrottlePolicy"]:
|
|
2385
|
+
'''The throttling policy of the delivery of SNS messages to HTTP/S endpoints.
|
|
2386
|
+
|
|
2387
|
+
:default: - No throttling
|
|
2388
|
+
'''
|
|
2389
|
+
result = self._values.get("throttle_policy")
|
|
2390
|
+
return typing.cast(typing.Optional["ThrottlePolicy"], result)
|
|
2391
|
+
|
|
2392
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
2393
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
2394
|
+
|
|
2395
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
2396
|
+
return not (rhs == self)
|
|
2397
|
+
|
|
2398
|
+
def __repr__(self) -> str:
|
|
2399
|
+
return "DeliveryPolicy(%s)" % ", ".join(
|
|
2400
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
2401
|
+
)
|
|
2402
|
+
|
|
2403
|
+
|
|
2260
2404
|
class FilterOrPolicy(
|
|
2261
2405
|
metaclass=jsii.JSIIAbstractClass,
|
|
2262
2406
|
jsii_type="aws-cdk-lib.aws_sns.FilterOrPolicy",
|
|
@@ -2352,6 +2496,177 @@ class FilterOrPolicyType(enum.Enum):
|
|
|
2352
2496
|
'''A nested key of the MessageBody.'''
|
|
2353
2497
|
|
|
2354
2498
|
|
|
2499
|
+
@jsii.data_type(
|
|
2500
|
+
jsii_type="aws-cdk-lib.aws_sns.HealthyRetryPolicy",
|
|
2501
|
+
jsii_struct_bases=[],
|
|
2502
|
+
name_mapping={
|
|
2503
|
+
"backoff_function": "backoffFunction",
|
|
2504
|
+
"max_delay_target": "maxDelayTarget",
|
|
2505
|
+
"min_delay_target": "minDelayTarget",
|
|
2506
|
+
"num_max_delay_retries": "numMaxDelayRetries",
|
|
2507
|
+
"num_min_delay_retries": "numMinDelayRetries",
|
|
2508
|
+
"num_no_delay_retries": "numNoDelayRetries",
|
|
2509
|
+
"num_retries": "numRetries",
|
|
2510
|
+
},
|
|
2511
|
+
)
|
|
2512
|
+
class HealthyRetryPolicy:
|
|
2513
|
+
def __init__(
|
|
2514
|
+
self,
|
|
2515
|
+
*,
|
|
2516
|
+
backoff_function: typing.Optional[BackoffFunction] = None,
|
|
2517
|
+
max_delay_target: typing.Optional[_Duration_4839e8c3] = None,
|
|
2518
|
+
min_delay_target: typing.Optional[_Duration_4839e8c3] = None,
|
|
2519
|
+
num_max_delay_retries: typing.Optional[jsii.Number] = None,
|
|
2520
|
+
num_min_delay_retries: typing.Optional[jsii.Number] = None,
|
|
2521
|
+
num_no_delay_retries: typing.Optional[jsii.Number] = None,
|
|
2522
|
+
num_retries: typing.Optional[jsii.Number] = None,
|
|
2523
|
+
) -> None:
|
|
2524
|
+
'''Options for customising the retry policy of the delivery of SNS messages to HTTP/S endpoints.
|
|
2525
|
+
|
|
2526
|
+
:param backoff_function: The model for backoff between retries. Default: - linear
|
|
2527
|
+
:param 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
|
|
2528
|
+
:param 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
|
|
2529
|
+
:param 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
|
|
2530
|
+
:param 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
|
|
2531
|
+
:param num_no_delay_retries: The number of retries to be done immediately, with no delay between them. Must be zero or greater. Default: 0
|
|
2532
|
+
:param 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
|
|
2533
|
+
|
|
2534
|
+
:exampleMetadata: infused
|
|
2535
|
+
|
|
2536
|
+
Example::
|
|
2537
|
+
|
|
2538
|
+
my_topic = sns.Topic(self, "MyTopic")
|
|
2539
|
+
|
|
2540
|
+
my_topic.add_subscription(
|
|
2541
|
+
subscriptions.UrlSubscription("https://foobar.com/",
|
|
2542
|
+
delivery_policy=sns.DeliveryPolicy(
|
|
2543
|
+
healthy_retry_policy=sns.HealthyRetryPolicy(
|
|
2544
|
+
min_delay_target=Duration.seconds(5),
|
|
2545
|
+
max_delay_target=Duration.seconds(10),
|
|
2546
|
+
num_retries=6,
|
|
2547
|
+
backoff_function=sns.BackoffFunction.EXPONENTIAL
|
|
2548
|
+
),
|
|
2549
|
+
throttle_policy=sns.ThrottlePolicy(
|
|
2550
|
+
max_receives_per_second=10
|
|
2551
|
+
),
|
|
2552
|
+
request_policy=sns.RequestPolicy(
|
|
2553
|
+
header_content_type="application/json"
|
|
2554
|
+
)
|
|
2555
|
+
)
|
|
2556
|
+
))
|
|
2557
|
+
'''
|
|
2558
|
+
if __debug__:
|
|
2559
|
+
type_hints = typing.get_type_hints(_typecheckingstub__7048a9fbd5081ad0f7c8324f945c1b50c0d35cd8d4656a13c6ebdbe87c3749c2)
|
|
2560
|
+
check_type(argname="argument backoff_function", value=backoff_function, expected_type=type_hints["backoff_function"])
|
|
2561
|
+
check_type(argname="argument max_delay_target", value=max_delay_target, expected_type=type_hints["max_delay_target"])
|
|
2562
|
+
check_type(argname="argument min_delay_target", value=min_delay_target, expected_type=type_hints["min_delay_target"])
|
|
2563
|
+
check_type(argname="argument num_max_delay_retries", value=num_max_delay_retries, expected_type=type_hints["num_max_delay_retries"])
|
|
2564
|
+
check_type(argname="argument num_min_delay_retries", value=num_min_delay_retries, expected_type=type_hints["num_min_delay_retries"])
|
|
2565
|
+
check_type(argname="argument num_no_delay_retries", value=num_no_delay_retries, expected_type=type_hints["num_no_delay_retries"])
|
|
2566
|
+
check_type(argname="argument num_retries", value=num_retries, expected_type=type_hints["num_retries"])
|
|
2567
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {}
|
|
2568
|
+
if backoff_function is not None:
|
|
2569
|
+
self._values["backoff_function"] = backoff_function
|
|
2570
|
+
if max_delay_target is not None:
|
|
2571
|
+
self._values["max_delay_target"] = max_delay_target
|
|
2572
|
+
if min_delay_target is not None:
|
|
2573
|
+
self._values["min_delay_target"] = min_delay_target
|
|
2574
|
+
if num_max_delay_retries is not None:
|
|
2575
|
+
self._values["num_max_delay_retries"] = num_max_delay_retries
|
|
2576
|
+
if num_min_delay_retries is not None:
|
|
2577
|
+
self._values["num_min_delay_retries"] = num_min_delay_retries
|
|
2578
|
+
if num_no_delay_retries is not None:
|
|
2579
|
+
self._values["num_no_delay_retries"] = num_no_delay_retries
|
|
2580
|
+
if num_retries is not None:
|
|
2581
|
+
self._values["num_retries"] = num_retries
|
|
2582
|
+
|
|
2583
|
+
@builtins.property
|
|
2584
|
+
def backoff_function(self) -> typing.Optional[BackoffFunction]:
|
|
2585
|
+
'''The model for backoff between retries.
|
|
2586
|
+
|
|
2587
|
+
:default: - linear
|
|
2588
|
+
'''
|
|
2589
|
+
result = self._values.get("backoff_function")
|
|
2590
|
+
return typing.cast(typing.Optional[BackoffFunction], result)
|
|
2591
|
+
|
|
2592
|
+
@builtins.property
|
|
2593
|
+
def max_delay_target(self) -> typing.Optional[_Duration_4839e8c3]:
|
|
2594
|
+
'''The maximum delay for a retry.
|
|
2595
|
+
|
|
2596
|
+
Must be at least ``minDelayTarget`` less than 3,600 seconds, and correspond to a whole number of seconds,
|
|
2597
|
+
|
|
2598
|
+
:default: - 20 seconds
|
|
2599
|
+
'''
|
|
2600
|
+
result = self._values.get("max_delay_target")
|
|
2601
|
+
return typing.cast(typing.Optional[_Duration_4839e8c3], result)
|
|
2602
|
+
|
|
2603
|
+
@builtins.property
|
|
2604
|
+
def min_delay_target(self) -> typing.Optional[_Duration_4839e8c3]:
|
|
2605
|
+
'''The minimum delay for a retry.
|
|
2606
|
+
|
|
2607
|
+
Must be at least one second, not exceed ``maxDelayTarget``, and correspond to a whole number of seconds.
|
|
2608
|
+
|
|
2609
|
+
:default: - 20 seconds
|
|
2610
|
+
'''
|
|
2611
|
+
result = self._values.get("min_delay_target")
|
|
2612
|
+
return typing.cast(typing.Optional[_Duration_4839e8c3], result)
|
|
2613
|
+
|
|
2614
|
+
@builtins.property
|
|
2615
|
+
def num_max_delay_retries(self) -> typing.Optional[jsii.Number]:
|
|
2616
|
+
'''The number of retries in the post-backoff phase, with the maximum delay between them.
|
|
2617
|
+
|
|
2618
|
+
Must be zero or greater
|
|
2619
|
+
|
|
2620
|
+
:default: 0
|
|
2621
|
+
'''
|
|
2622
|
+
result = self._values.get("num_max_delay_retries")
|
|
2623
|
+
return typing.cast(typing.Optional[jsii.Number], result)
|
|
2624
|
+
|
|
2625
|
+
@builtins.property
|
|
2626
|
+
def num_min_delay_retries(self) -> typing.Optional[jsii.Number]:
|
|
2627
|
+
'''The number of retries in the pre-backoff phase, with the specified minimum delay between them.
|
|
2628
|
+
|
|
2629
|
+
Must be zero or greater
|
|
2630
|
+
|
|
2631
|
+
:default: 0
|
|
2632
|
+
'''
|
|
2633
|
+
result = self._values.get("num_min_delay_retries")
|
|
2634
|
+
return typing.cast(typing.Optional[jsii.Number], result)
|
|
2635
|
+
|
|
2636
|
+
@builtins.property
|
|
2637
|
+
def num_no_delay_retries(self) -> typing.Optional[jsii.Number]:
|
|
2638
|
+
'''The number of retries to be done immediately, with no delay between them.
|
|
2639
|
+
|
|
2640
|
+
Must be zero or greater.
|
|
2641
|
+
|
|
2642
|
+
:default: 0
|
|
2643
|
+
'''
|
|
2644
|
+
result = self._values.get("num_no_delay_retries")
|
|
2645
|
+
return typing.cast(typing.Optional[jsii.Number], result)
|
|
2646
|
+
|
|
2647
|
+
@builtins.property
|
|
2648
|
+
def num_retries(self) -> typing.Optional[jsii.Number]:
|
|
2649
|
+
'''The total number of retries, including immediate, pre-backoff, backoff, and post-backoff retries.
|
|
2650
|
+
|
|
2651
|
+
Must be greater than or equal to zero and not exceed 100.
|
|
2652
|
+
|
|
2653
|
+
:default: 3
|
|
2654
|
+
'''
|
|
2655
|
+
result = self._values.get("num_retries")
|
|
2656
|
+
return typing.cast(typing.Optional[jsii.Number], result)
|
|
2657
|
+
|
|
2658
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
2659
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
2660
|
+
|
|
2661
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
2662
|
+
return not (rhs == self)
|
|
2663
|
+
|
|
2664
|
+
def __repr__(self) -> str:
|
|
2665
|
+
return "HealthyRetryPolicy(%s)" % ", ".join(
|
|
2666
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
2667
|
+
)
|
|
2668
|
+
|
|
2669
|
+
|
|
2355
2670
|
@jsii.interface(jsii_type="aws-cdk-lib.aws_sns.ITopic")
|
|
2356
2671
|
class ITopic(
|
|
2357
2672
|
_IResource_c80c4260,
|
|
@@ -3604,6 +3919,73 @@ class Policy(
|
|
|
3604
3919
|
return typing.cast(FilterOrPolicyType, jsii.get(self, "type"))
|
|
3605
3920
|
|
|
3606
3921
|
|
|
3922
|
+
@jsii.data_type(
|
|
3923
|
+
jsii_type="aws-cdk-lib.aws_sns.RequestPolicy",
|
|
3924
|
+
jsii_struct_bases=[],
|
|
3925
|
+
name_mapping={"header_content_type": "headerContentType"},
|
|
3926
|
+
)
|
|
3927
|
+
class RequestPolicy:
|
|
3928
|
+
def __init__(
|
|
3929
|
+
self,
|
|
3930
|
+
*,
|
|
3931
|
+
header_content_type: typing.Optional[builtins.str] = None,
|
|
3932
|
+
) -> None:
|
|
3933
|
+
'''Options for customising aspects of the content sent in AWS SNS HTTP/S requests.
|
|
3934
|
+
|
|
3935
|
+
:param header_content_type: The content type of the notification being sent to HTTP/S endpoints. Default: - text/plain; charset=UTF-8
|
|
3936
|
+
|
|
3937
|
+
:exampleMetadata: infused
|
|
3938
|
+
|
|
3939
|
+
Example::
|
|
3940
|
+
|
|
3941
|
+
my_topic = sns.Topic(self, "MyTopic")
|
|
3942
|
+
|
|
3943
|
+
my_topic.add_subscription(
|
|
3944
|
+
subscriptions.UrlSubscription("https://foobar.com/",
|
|
3945
|
+
delivery_policy=sns.DeliveryPolicy(
|
|
3946
|
+
healthy_retry_policy=sns.HealthyRetryPolicy(
|
|
3947
|
+
min_delay_target=Duration.seconds(5),
|
|
3948
|
+
max_delay_target=Duration.seconds(10),
|
|
3949
|
+
num_retries=6,
|
|
3950
|
+
backoff_function=sns.BackoffFunction.EXPONENTIAL
|
|
3951
|
+
),
|
|
3952
|
+
throttle_policy=sns.ThrottlePolicy(
|
|
3953
|
+
max_receives_per_second=10
|
|
3954
|
+
),
|
|
3955
|
+
request_policy=sns.RequestPolicy(
|
|
3956
|
+
header_content_type="application/json"
|
|
3957
|
+
)
|
|
3958
|
+
)
|
|
3959
|
+
))
|
|
3960
|
+
'''
|
|
3961
|
+
if __debug__:
|
|
3962
|
+
type_hints = typing.get_type_hints(_typecheckingstub__86e9fa22eec2ba0cf8286f32e79e7bcd2d6d2dc454a8253571ffcff32c198ecd)
|
|
3963
|
+
check_type(argname="argument header_content_type", value=header_content_type, expected_type=type_hints["header_content_type"])
|
|
3964
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {}
|
|
3965
|
+
if header_content_type is not None:
|
|
3966
|
+
self._values["header_content_type"] = header_content_type
|
|
3967
|
+
|
|
3968
|
+
@builtins.property
|
|
3969
|
+
def header_content_type(self) -> typing.Optional[builtins.str]:
|
|
3970
|
+
'''The content type of the notification being sent to HTTP/S endpoints.
|
|
3971
|
+
|
|
3972
|
+
:default: - text/plain; charset=UTF-8
|
|
3973
|
+
'''
|
|
3974
|
+
result = self._values.get("header_content_type")
|
|
3975
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
3976
|
+
|
|
3977
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
3978
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
3979
|
+
|
|
3980
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
3981
|
+
return not (rhs == self)
|
|
3982
|
+
|
|
3983
|
+
def __repr__(self) -> str:
|
|
3984
|
+
return "RequestPolicy(%s)" % ", ".join(
|
|
3985
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
3986
|
+
)
|
|
3987
|
+
|
|
3988
|
+
|
|
3607
3989
|
@jsii.data_type(
|
|
3608
3990
|
jsii_type="aws-cdk-lib.aws_sns.StringConditions",
|
|
3609
3991
|
jsii_struct_bases=[],
|
|
@@ -3764,6 +4146,7 @@ class Subscription(
|
|
|
3764
4146
|
endpoint: builtins.str,
|
|
3765
4147
|
protocol: "SubscriptionProtocol",
|
|
3766
4148
|
dead_letter_queue: typing.Optional[_IQueue_7ed6f679] = None,
|
|
4149
|
+
delivery_policy: typing.Optional[typing.Union[DeliveryPolicy, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
3767
4150
|
filter_policy: typing.Optional[typing.Mapping[builtins.str, "SubscriptionFilter"]] = None,
|
|
3768
4151
|
filter_policy_with_message_body: typing.Optional[typing.Mapping[builtins.str, FilterOrPolicy]] = None,
|
|
3769
4152
|
raw_message_delivery: typing.Optional[builtins.bool] = None,
|
|
@@ -3777,6 +4160,7 @@ class Subscription(
|
|
|
3777
4160
|
:param endpoint: The subscription endpoint. The meaning of this value depends on the value for 'protocol'.
|
|
3778
4161
|
:param protocol: What type of subscription to add.
|
|
3779
4162
|
:param dead_letter_queue: Queue to be used as dead letter queue. If not passed no dead letter queue is enabled. Default: - No dead letter queue enabled.
|
|
4163
|
+
:param delivery_policy: The delivery policy. Default: - if the initial delivery of the message fails, three retries with a delay between failed attempts set at 20 seconds
|
|
3780
4164
|
:param filter_policy: The filter policy. Default: - all messages are delivered
|
|
3781
4165
|
:param filter_policy_with_message_body: The filter policy that is applied on the message body. To apply a filter policy to the message attributes, use ``filterPolicy``. A maximum of one of ``filterPolicyWithMessageBody`` and ``filterPolicy`` may be used. Default: - all messages are delivered
|
|
3782
4166
|
:param raw_message_delivery: true if raw message delivery is enabled for the subscription. Raw messages are free of JSON formatting and can be sent to HTTP/S and Amazon SQS endpoints. For more information, see GetSubscriptionAttributes in the Amazon Simple Notification Service API Reference. Default: false
|
|
@@ -3792,6 +4176,7 @@ class Subscription(
|
|
|
3792
4176
|
endpoint=endpoint,
|
|
3793
4177
|
protocol=protocol,
|
|
3794
4178
|
dead_letter_queue=dead_letter_queue,
|
|
4179
|
+
delivery_policy=delivery_policy,
|
|
3795
4180
|
filter_policy=filter_policy,
|
|
3796
4181
|
filter_policy_with_message_body=filter_policy_with_message_body,
|
|
3797
4182
|
raw_message_delivery=raw_message_delivery,
|
|
@@ -3941,6 +4326,7 @@ class SubscriptionFilter(
|
|
|
3941
4326
|
"endpoint": "endpoint",
|
|
3942
4327
|
"protocol": "protocol",
|
|
3943
4328
|
"dead_letter_queue": "deadLetterQueue",
|
|
4329
|
+
"delivery_policy": "deliveryPolicy",
|
|
3944
4330
|
"filter_policy": "filterPolicy",
|
|
3945
4331
|
"filter_policy_with_message_body": "filterPolicyWithMessageBody",
|
|
3946
4332
|
"raw_message_delivery": "rawMessageDelivery",
|
|
@@ -3955,6 +4341,7 @@ class SubscriptionOptions:
|
|
|
3955
4341
|
endpoint: builtins.str,
|
|
3956
4342
|
protocol: "SubscriptionProtocol",
|
|
3957
4343
|
dead_letter_queue: typing.Optional[_IQueue_7ed6f679] = None,
|
|
4344
|
+
delivery_policy: typing.Optional[typing.Union[DeliveryPolicy, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
3958
4345
|
filter_policy: typing.Optional[typing.Mapping[builtins.str, SubscriptionFilter]] = None,
|
|
3959
4346
|
filter_policy_with_message_body: typing.Optional[typing.Mapping[builtins.str, FilterOrPolicy]] = None,
|
|
3960
4347
|
raw_message_delivery: typing.Optional[builtins.bool] = None,
|
|
@@ -3966,6 +4353,7 @@ class SubscriptionOptions:
|
|
|
3966
4353
|
:param endpoint: The subscription endpoint. The meaning of this value depends on the value for 'protocol'.
|
|
3967
4354
|
:param protocol: What type of subscription to add.
|
|
3968
4355
|
:param dead_letter_queue: Queue to be used as dead letter queue. If not passed no dead letter queue is enabled. Default: - No dead letter queue enabled.
|
|
4356
|
+
:param delivery_policy: The delivery policy. Default: - if the initial delivery of the message fails, three retries with a delay between failed attempts set at 20 seconds
|
|
3969
4357
|
:param filter_policy: The filter policy. Default: - all messages are delivered
|
|
3970
4358
|
:param filter_policy_with_message_body: The filter policy that is applied on the message body. To apply a filter policy to the message attributes, use ``filterPolicy``. A maximum of one of ``filterPolicyWithMessageBody`` and ``filterPolicy`` may be used. Default: - all messages are delivered
|
|
3971
4359
|
:param raw_message_delivery: true if raw message delivery is enabled for the subscription. Raw messages are free of JSON formatting and can be sent to HTTP/S and Amazon SQS endpoints. For more information, see GetSubscriptionAttributes in the Amazon Simple Notification Service API Reference. Default: false
|
|
@@ -3978,6 +4366,7 @@ class SubscriptionOptions:
|
|
|
3978
4366
|
|
|
3979
4367
|
# The code below shows an example of how to instantiate this type.
|
|
3980
4368
|
# The values are placeholders you should change.
|
|
4369
|
+
import aws_cdk as cdk
|
|
3981
4370
|
from aws_cdk import aws_sns as sns
|
|
3982
4371
|
from aws_cdk import aws_sqs as sqs
|
|
3983
4372
|
|
|
@@ -3991,6 +4380,23 @@ class SubscriptionOptions:
|
|
|
3991
4380
|
|
|
3992
4381
|
# the properties below are optional
|
|
3993
4382
|
dead_letter_queue=queue,
|
|
4383
|
+
delivery_policy=sns.DeliveryPolicy(
|
|
4384
|
+
healthy_retry_policy=sns.HealthyRetryPolicy(
|
|
4385
|
+
backoff_function=sns.BackoffFunction.ARITHMETIC,
|
|
4386
|
+
max_delay_target=cdk.Duration.minutes(30),
|
|
4387
|
+
min_delay_target=cdk.Duration.minutes(30),
|
|
4388
|
+
num_max_delay_retries=123,
|
|
4389
|
+
num_min_delay_retries=123,
|
|
4390
|
+
num_no_delay_retries=123,
|
|
4391
|
+
num_retries=123
|
|
4392
|
+
),
|
|
4393
|
+
request_policy=sns.RequestPolicy(
|
|
4394
|
+
header_content_type="headerContentType"
|
|
4395
|
+
),
|
|
4396
|
+
throttle_policy=sns.ThrottlePolicy(
|
|
4397
|
+
max_receives_per_second=123
|
|
4398
|
+
)
|
|
4399
|
+
),
|
|
3994
4400
|
filter_policy={
|
|
3995
4401
|
"filter_policy_key": subscription_filter
|
|
3996
4402
|
},
|
|
@@ -4002,11 +4408,14 @@ class SubscriptionOptions:
|
|
|
4002
4408
|
subscription_role_arn="subscriptionRoleArn"
|
|
4003
4409
|
)
|
|
4004
4410
|
'''
|
|
4411
|
+
if isinstance(delivery_policy, dict):
|
|
4412
|
+
delivery_policy = DeliveryPolicy(**delivery_policy)
|
|
4005
4413
|
if __debug__:
|
|
4006
4414
|
type_hints = typing.get_type_hints(_typecheckingstub__bce75a2ad593ea78ce07c3bf1cbe6c0262cc48f6f133af363ca95a0cadfb6008)
|
|
4007
4415
|
check_type(argname="argument endpoint", value=endpoint, expected_type=type_hints["endpoint"])
|
|
4008
4416
|
check_type(argname="argument protocol", value=protocol, expected_type=type_hints["protocol"])
|
|
4009
4417
|
check_type(argname="argument dead_letter_queue", value=dead_letter_queue, expected_type=type_hints["dead_letter_queue"])
|
|
4418
|
+
check_type(argname="argument delivery_policy", value=delivery_policy, expected_type=type_hints["delivery_policy"])
|
|
4010
4419
|
check_type(argname="argument filter_policy", value=filter_policy, expected_type=type_hints["filter_policy"])
|
|
4011
4420
|
check_type(argname="argument filter_policy_with_message_body", value=filter_policy_with_message_body, expected_type=type_hints["filter_policy_with_message_body"])
|
|
4012
4421
|
check_type(argname="argument raw_message_delivery", value=raw_message_delivery, expected_type=type_hints["raw_message_delivery"])
|
|
@@ -4018,6 +4427,8 @@ class SubscriptionOptions:
|
|
|
4018
4427
|
}
|
|
4019
4428
|
if dead_letter_queue is not None:
|
|
4020
4429
|
self._values["dead_letter_queue"] = dead_letter_queue
|
|
4430
|
+
if delivery_policy is not None:
|
|
4431
|
+
self._values["delivery_policy"] = delivery_policy
|
|
4021
4432
|
if filter_policy is not None:
|
|
4022
4433
|
self._values["filter_policy"] = filter_policy
|
|
4023
4434
|
if filter_policy_with_message_body is not None:
|
|
@@ -4057,6 +4468,15 @@ class SubscriptionOptions:
|
|
|
4057
4468
|
result = self._values.get("dead_letter_queue")
|
|
4058
4469
|
return typing.cast(typing.Optional[_IQueue_7ed6f679], result)
|
|
4059
4470
|
|
|
4471
|
+
@builtins.property
|
|
4472
|
+
def delivery_policy(self) -> typing.Optional[DeliveryPolicy]:
|
|
4473
|
+
'''The delivery policy.
|
|
4474
|
+
|
|
4475
|
+
:default: - if the initial delivery of the message fails, three retries with a delay between failed attempts set at 20 seconds
|
|
4476
|
+
'''
|
|
4477
|
+
result = self._values.get("delivery_policy")
|
|
4478
|
+
return typing.cast(typing.Optional[DeliveryPolicy], result)
|
|
4479
|
+
|
|
4060
4480
|
@builtins.property
|
|
4061
4481
|
def filter_policy(
|
|
4062
4482
|
self,
|
|
@@ -4135,6 +4555,7 @@ class SubscriptionOptions:
|
|
|
4135
4555
|
"endpoint": "endpoint",
|
|
4136
4556
|
"protocol": "protocol",
|
|
4137
4557
|
"dead_letter_queue": "deadLetterQueue",
|
|
4558
|
+
"delivery_policy": "deliveryPolicy",
|
|
4138
4559
|
"filter_policy": "filterPolicy",
|
|
4139
4560
|
"filter_policy_with_message_body": "filterPolicyWithMessageBody",
|
|
4140
4561
|
"raw_message_delivery": "rawMessageDelivery",
|
|
@@ -4150,6 +4571,7 @@ class SubscriptionProps(SubscriptionOptions):
|
|
|
4150
4571
|
endpoint: builtins.str,
|
|
4151
4572
|
protocol: "SubscriptionProtocol",
|
|
4152
4573
|
dead_letter_queue: typing.Optional[_IQueue_7ed6f679] = None,
|
|
4574
|
+
delivery_policy: typing.Optional[typing.Union[DeliveryPolicy, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
4153
4575
|
filter_policy: typing.Optional[typing.Mapping[builtins.str, SubscriptionFilter]] = None,
|
|
4154
4576
|
filter_policy_with_message_body: typing.Optional[typing.Mapping[builtins.str, FilterOrPolicy]] = None,
|
|
4155
4577
|
raw_message_delivery: typing.Optional[builtins.bool] = None,
|
|
@@ -4162,6 +4584,7 @@ class SubscriptionProps(SubscriptionOptions):
|
|
|
4162
4584
|
:param endpoint: The subscription endpoint. The meaning of this value depends on the value for 'protocol'.
|
|
4163
4585
|
:param protocol: What type of subscription to add.
|
|
4164
4586
|
:param dead_letter_queue: Queue to be used as dead letter queue. If not passed no dead letter queue is enabled. Default: - No dead letter queue enabled.
|
|
4587
|
+
:param delivery_policy: The delivery policy. Default: - if the initial delivery of the message fails, three retries with a delay between failed attempts set at 20 seconds
|
|
4165
4588
|
:param filter_policy: The filter policy. Default: - all messages are delivered
|
|
4166
4589
|
:param filter_policy_with_message_body: The filter policy that is applied on the message body. To apply a filter policy to the message attributes, use ``filterPolicy``. A maximum of one of ``filterPolicyWithMessageBody`` and ``filterPolicy`` may be used. Default: - all messages are delivered
|
|
4167
4590
|
:param raw_message_delivery: true if raw message delivery is enabled for the subscription. Raw messages are free of JSON formatting and can be sent to HTTP/S and Amazon SQS endpoints. For more information, see GetSubscriptionAttributes in the Amazon Simple Notification Service API Reference. Default: false
|
|
@@ -4186,11 +4609,14 @@ class SubscriptionProps(SubscriptionOptions):
|
|
|
4186
4609
|
subscription_role_arn="SAMPLE_ARN"
|
|
4187
4610
|
)
|
|
4188
4611
|
'''
|
|
4612
|
+
if isinstance(delivery_policy, dict):
|
|
4613
|
+
delivery_policy = DeliveryPolicy(**delivery_policy)
|
|
4189
4614
|
if __debug__:
|
|
4190
4615
|
type_hints = typing.get_type_hints(_typecheckingstub__ca027bfed18b17f0f94ff71f11bf24813f4ec24f9b1029e73d8da4ef880e57a4)
|
|
4191
4616
|
check_type(argname="argument endpoint", value=endpoint, expected_type=type_hints["endpoint"])
|
|
4192
4617
|
check_type(argname="argument protocol", value=protocol, expected_type=type_hints["protocol"])
|
|
4193
4618
|
check_type(argname="argument dead_letter_queue", value=dead_letter_queue, expected_type=type_hints["dead_letter_queue"])
|
|
4619
|
+
check_type(argname="argument delivery_policy", value=delivery_policy, expected_type=type_hints["delivery_policy"])
|
|
4194
4620
|
check_type(argname="argument filter_policy", value=filter_policy, expected_type=type_hints["filter_policy"])
|
|
4195
4621
|
check_type(argname="argument filter_policy_with_message_body", value=filter_policy_with_message_body, expected_type=type_hints["filter_policy_with_message_body"])
|
|
4196
4622
|
check_type(argname="argument raw_message_delivery", value=raw_message_delivery, expected_type=type_hints["raw_message_delivery"])
|
|
@@ -4204,6 +4630,8 @@ class SubscriptionProps(SubscriptionOptions):
|
|
|
4204
4630
|
}
|
|
4205
4631
|
if dead_letter_queue is not None:
|
|
4206
4632
|
self._values["dead_letter_queue"] = dead_letter_queue
|
|
4633
|
+
if delivery_policy is not None:
|
|
4634
|
+
self._values["delivery_policy"] = delivery_policy
|
|
4207
4635
|
if filter_policy is not None:
|
|
4208
4636
|
self._values["filter_policy"] = filter_policy
|
|
4209
4637
|
if filter_policy_with_message_body is not None:
|
|
@@ -4243,6 +4671,15 @@ class SubscriptionProps(SubscriptionOptions):
|
|
|
4243
4671
|
result = self._values.get("dead_letter_queue")
|
|
4244
4672
|
return typing.cast(typing.Optional[_IQueue_7ed6f679], result)
|
|
4245
4673
|
|
|
4674
|
+
@builtins.property
|
|
4675
|
+
def delivery_policy(self) -> typing.Optional[DeliveryPolicy]:
|
|
4676
|
+
'''The delivery policy.
|
|
4677
|
+
|
|
4678
|
+
:default: - if the initial delivery of the message fails, three retries with a delay between failed attempts set at 20 seconds
|
|
4679
|
+
'''
|
|
4680
|
+
result = self._values.get("delivery_policy")
|
|
4681
|
+
return typing.cast(typing.Optional[DeliveryPolicy], result)
|
|
4682
|
+
|
|
4246
4683
|
@builtins.property
|
|
4247
4684
|
def filter_policy(
|
|
4248
4685
|
self,
|
|
@@ -4363,6 +4800,73 @@ class SubscriptionProtocol(enum.Enum):
|
|
|
4363
4800
|
'''Notifications put records into a firehose delivery stream.'''
|
|
4364
4801
|
|
|
4365
4802
|
|
|
4803
|
+
@jsii.data_type(
|
|
4804
|
+
jsii_type="aws-cdk-lib.aws_sns.ThrottlePolicy",
|
|
4805
|
+
jsii_struct_bases=[],
|
|
4806
|
+
name_mapping={"max_receives_per_second": "maxReceivesPerSecond"},
|
|
4807
|
+
)
|
|
4808
|
+
class ThrottlePolicy:
|
|
4809
|
+
def __init__(
|
|
4810
|
+
self,
|
|
4811
|
+
*,
|
|
4812
|
+
max_receives_per_second: typing.Optional[jsii.Number] = None,
|
|
4813
|
+
) -> None:
|
|
4814
|
+
'''Options for customising AWS SNS HTTP/S delivery throttling.
|
|
4815
|
+
|
|
4816
|
+
:param max_receives_per_second: The maximum number of deliveries per second, per subscription. Default: - no throttling
|
|
4817
|
+
|
|
4818
|
+
:exampleMetadata: infused
|
|
4819
|
+
|
|
4820
|
+
Example::
|
|
4821
|
+
|
|
4822
|
+
my_topic = sns.Topic(self, "MyTopic")
|
|
4823
|
+
|
|
4824
|
+
my_topic.add_subscription(
|
|
4825
|
+
subscriptions.UrlSubscription("https://foobar.com/",
|
|
4826
|
+
delivery_policy=sns.DeliveryPolicy(
|
|
4827
|
+
healthy_retry_policy=sns.HealthyRetryPolicy(
|
|
4828
|
+
min_delay_target=Duration.seconds(5),
|
|
4829
|
+
max_delay_target=Duration.seconds(10),
|
|
4830
|
+
num_retries=6,
|
|
4831
|
+
backoff_function=sns.BackoffFunction.EXPONENTIAL
|
|
4832
|
+
),
|
|
4833
|
+
throttle_policy=sns.ThrottlePolicy(
|
|
4834
|
+
max_receives_per_second=10
|
|
4835
|
+
),
|
|
4836
|
+
request_policy=sns.RequestPolicy(
|
|
4837
|
+
header_content_type="application/json"
|
|
4838
|
+
)
|
|
4839
|
+
)
|
|
4840
|
+
))
|
|
4841
|
+
'''
|
|
4842
|
+
if __debug__:
|
|
4843
|
+
type_hints = typing.get_type_hints(_typecheckingstub__a26bd7e7a2d13b89f16f82c085347a85549066b76cb0e201a2ac60f8b28f60fb)
|
|
4844
|
+
check_type(argname="argument max_receives_per_second", value=max_receives_per_second, expected_type=type_hints["max_receives_per_second"])
|
|
4845
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {}
|
|
4846
|
+
if max_receives_per_second is not None:
|
|
4847
|
+
self._values["max_receives_per_second"] = max_receives_per_second
|
|
4848
|
+
|
|
4849
|
+
@builtins.property
|
|
4850
|
+
def max_receives_per_second(self) -> typing.Optional[jsii.Number]:
|
|
4851
|
+
'''The maximum number of deliveries per second, per subscription.
|
|
4852
|
+
|
|
4853
|
+
:default: - no throttling
|
|
4854
|
+
'''
|
|
4855
|
+
result = self._values.get("max_receives_per_second")
|
|
4856
|
+
return typing.cast(typing.Optional[jsii.Number], result)
|
|
4857
|
+
|
|
4858
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
4859
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
4860
|
+
|
|
4861
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
4862
|
+
return not (rhs == self)
|
|
4863
|
+
|
|
4864
|
+
def __repr__(self) -> str:
|
|
4865
|
+
return "ThrottlePolicy(%s)" % ", ".join(
|
|
4866
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
4867
|
+
)
|
|
4868
|
+
|
|
4869
|
+
|
|
4366
4870
|
@jsii.data_type(
|
|
4367
4871
|
jsii_type="aws-cdk-lib.aws_sns.TopicAttributes",
|
|
4368
4872
|
jsii_struct_bases=[],
|
|
@@ -5441,6 +5945,7 @@ class TopicProps:
|
|
|
5441
5945
|
"endpoint": "endpoint",
|
|
5442
5946
|
"protocol": "protocol",
|
|
5443
5947
|
"dead_letter_queue": "deadLetterQueue",
|
|
5948
|
+
"delivery_policy": "deliveryPolicy",
|
|
5444
5949
|
"filter_policy": "filterPolicy",
|
|
5445
5950
|
"filter_policy_with_message_body": "filterPolicyWithMessageBody",
|
|
5446
5951
|
"raw_message_delivery": "rawMessageDelivery",
|
|
@@ -5458,6 +5963,7 @@ class TopicSubscriptionConfig(SubscriptionOptions):
|
|
|
5458
5963
|
endpoint: builtins.str,
|
|
5459
5964
|
protocol: SubscriptionProtocol,
|
|
5460
5965
|
dead_letter_queue: typing.Optional[_IQueue_7ed6f679] = None,
|
|
5966
|
+
delivery_policy: typing.Optional[typing.Union[DeliveryPolicy, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
5461
5967
|
filter_policy: typing.Optional[typing.Mapping[builtins.str, SubscriptionFilter]] = None,
|
|
5462
5968
|
filter_policy_with_message_body: typing.Optional[typing.Mapping[builtins.str, FilterOrPolicy]] = None,
|
|
5463
5969
|
raw_message_delivery: typing.Optional[builtins.bool] = None,
|
|
@@ -5472,6 +5978,7 @@ class TopicSubscriptionConfig(SubscriptionOptions):
|
|
|
5472
5978
|
:param endpoint: The subscription endpoint. The meaning of this value depends on the value for 'protocol'.
|
|
5473
5979
|
:param protocol: What type of subscription to add.
|
|
5474
5980
|
:param dead_letter_queue: Queue to be used as dead letter queue. If not passed no dead letter queue is enabled. Default: - No dead letter queue enabled.
|
|
5981
|
+
:param delivery_policy: The delivery policy. Default: - if the initial delivery of the message fails, three retries with a delay between failed attempts set at 20 seconds
|
|
5475
5982
|
:param filter_policy: The filter policy. Default: - all messages are delivered
|
|
5476
5983
|
:param filter_policy_with_message_body: The filter policy that is applied on the message body. To apply a filter policy to the message attributes, use ``filterPolicy``. A maximum of one of ``filterPolicyWithMessageBody`` and ``filterPolicy`` may be used. Default: - all messages are delivered
|
|
5477
5984
|
:param raw_message_delivery: true if raw message delivery is enabled for the subscription. Raw messages are free of JSON formatting and can be sent to HTTP/S and Amazon SQS endpoints. For more information, see GetSubscriptionAttributes in the Amazon Simple Notification Service API Reference. Default: false
|
|
@@ -5487,6 +5994,7 @@ class TopicSubscriptionConfig(SubscriptionOptions):
|
|
|
5487
5994
|
|
|
5488
5995
|
# The code below shows an example of how to instantiate this type.
|
|
5489
5996
|
# The values are placeholders you should change.
|
|
5997
|
+
import aws_cdk as cdk
|
|
5490
5998
|
from aws_cdk import aws_sns as sns
|
|
5491
5999
|
from aws_cdk import aws_sqs as sqs
|
|
5492
6000
|
import constructs as constructs
|
|
@@ -5504,6 +6012,23 @@ class TopicSubscriptionConfig(SubscriptionOptions):
|
|
|
5504
6012
|
|
|
5505
6013
|
# the properties below are optional
|
|
5506
6014
|
dead_letter_queue=queue,
|
|
6015
|
+
delivery_policy=sns.DeliveryPolicy(
|
|
6016
|
+
healthy_retry_policy=sns.HealthyRetryPolicy(
|
|
6017
|
+
backoff_function=sns.BackoffFunction.ARITHMETIC,
|
|
6018
|
+
max_delay_target=cdk.Duration.minutes(30),
|
|
6019
|
+
min_delay_target=cdk.Duration.minutes(30),
|
|
6020
|
+
num_max_delay_retries=123,
|
|
6021
|
+
num_min_delay_retries=123,
|
|
6022
|
+
num_no_delay_retries=123,
|
|
6023
|
+
num_retries=123
|
|
6024
|
+
),
|
|
6025
|
+
request_policy=sns.RequestPolicy(
|
|
6026
|
+
header_content_type="headerContentType"
|
|
6027
|
+
),
|
|
6028
|
+
throttle_policy=sns.ThrottlePolicy(
|
|
6029
|
+
max_receives_per_second=123
|
|
6030
|
+
)
|
|
6031
|
+
),
|
|
5507
6032
|
filter_policy={
|
|
5508
6033
|
"filter_policy_key": subscription_filter
|
|
5509
6034
|
},
|
|
@@ -5517,11 +6042,14 @@ class TopicSubscriptionConfig(SubscriptionOptions):
|
|
|
5517
6042
|
subscription_role_arn="subscriptionRoleArn"
|
|
5518
6043
|
)
|
|
5519
6044
|
'''
|
|
6045
|
+
if isinstance(delivery_policy, dict):
|
|
6046
|
+
delivery_policy = DeliveryPolicy(**delivery_policy)
|
|
5520
6047
|
if __debug__:
|
|
5521
6048
|
type_hints = typing.get_type_hints(_typecheckingstub__bd56ac6d2cb8c4c70278e4ea1ea1a8ca0d0a6de563f2be0fe02916900d9f0d01)
|
|
5522
6049
|
check_type(argname="argument endpoint", value=endpoint, expected_type=type_hints["endpoint"])
|
|
5523
6050
|
check_type(argname="argument protocol", value=protocol, expected_type=type_hints["protocol"])
|
|
5524
6051
|
check_type(argname="argument dead_letter_queue", value=dead_letter_queue, expected_type=type_hints["dead_letter_queue"])
|
|
6052
|
+
check_type(argname="argument delivery_policy", value=delivery_policy, expected_type=type_hints["delivery_policy"])
|
|
5525
6053
|
check_type(argname="argument filter_policy", value=filter_policy, expected_type=type_hints["filter_policy"])
|
|
5526
6054
|
check_type(argname="argument filter_policy_with_message_body", value=filter_policy_with_message_body, expected_type=type_hints["filter_policy_with_message_body"])
|
|
5527
6055
|
check_type(argname="argument raw_message_delivery", value=raw_message_delivery, expected_type=type_hints["raw_message_delivery"])
|
|
@@ -5537,6 +6065,8 @@ class TopicSubscriptionConfig(SubscriptionOptions):
|
|
|
5537
6065
|
}
|
|
5538
6066
|
if dead_letter_queue is not None:
|
|
5539
6067
|
self._values["dead_letter_queue"] = dead_letter_queue
|
|
6068
|
+
if delivery_policy is not None:
|
|
6069
|
+
self._values["delivery_policy"] = delivery_policy
|
|
5540
6070
|
if filter_policy is not None:
|
|
5541
6071
|
self._values["filter_policy"] = filter_policy
|
|
5542
6072
|
if filter_policy_with_message_body is not None:
|
|
@@ -5580,6 +6110,15 @@ class TopicSubscriptionConfig(SubscriptionOptions):
|
|
|
5580
6110
|
result = self._values.get("dead_letter_queue")
|
|
5581
6111
|
return typing.cast(typing.Optional[_IQueue_7ed6f679], result)
|
|
5582
6112
|
|
|
6113
|
+
@builtins.property
|
|
6114
|
+
def delivery_policy(self) -> typing.Optional[DeliveryPolicy]:
|
|
6115
|
+
'''The delivery policy.
|
|
6116
|
+
|
|
6117
|
+
:default: - if the initial delivery of the message fails, three retries with a delay between failed attempts set at 20 seconds
|
|
6118
|
+
'''
|
|
6119
|
+
result = self._values.get("delivery_policy")
|
|
6120
|
+
return typing.cast(typing.Optional[DeliveryPolicy], result)
|
|
6121
|
+
|
|
5583
6122
|
@builtins.property
|
|
5584
6123
|
def filter_policy(
|
|
5585
6124
|
self,
|
|
@@ -5762,17 +6301,18 @@ class Topic(TopicBase, metaclass=jsii.JSIIMeta, jsii_type="aws-cdk-lib.aws_sns.T
|
|
|
5762
6301
|
|
|
5763
6302
|
Example::
|
|
5764
6303
|
|
|
5765
|
-
|
|
5766
|
-
# stream: DeliveryStream
|
|
6304
|
+
import aws_cdk.aws_sns as sns
|
|
5767
6305
|
|
|
5768
6306
|
|
|
5769
|
-
topic = sns.Topic(self, "
|
|
6307
|
+
topic = sns.Topic(self, "MyTopic")
|
|
5770
6308
|
|
|
5771
|
-
|
|
5772
|
-
|
|
5773
|
-
|
|
5774
|
-
|
|
5775
|
-
|
|
6309
|
+
topic_rule = iot.TopicRule(self, "TopicRule",
|
|
6310
|
+
sql=iot.IotSql.from_string_as_ver20160323("SELECT topic(2) as device_id, year, month, day FROM 'device/+/data'"),
|
|
6311
|
+
actions=[
|
|
6312
|
+
actions.SnsTopicAction(topic,
|
|
6313
|
+
message_format=actions.SnsActionMessageFormat.JSON
|
|
6314
|
+
)
|
|
6315
|
+
]
|
|
5776
6316
|
)
|
|
5777
6317
|
'''
|
|
5778
6318
|
|
|
@@ -5937,6 +6477,7 @@ class Topic(TopicBase, metaclass=jsii.JSIIMeta, jsii_type="aws-cdk-lib.aws_sns.T
|
|
|
5937
6477
|
|
|
5938
6478
|
|
|
5939
6479
|
__all__ = [
|
|
6480
|
+
"BackoffFunction",
|
|
5940
6481
|
"BetweenCondition",
|
|
5941
6482
|
"CfnSubscription",
|
|
5942
6483
|
"CfnSubscriptionProps",
|
|
@@ -5946,21 +6487,25 @@ __all__ = [
|
|
|
5946
6487
|
"CfnTopicPolicy",
|
|
5947
6488
|
"CfnTopicPolicyProps",
|
|
5948
6489
|
"CfnTopicProps",
|
|
6490
|
+
"DeliveryPolicy",
|
|
5949
6491
|
"Filter",
|
|
5950
6492
|
"FilterOrPolicy",
|
|
5951
6493
|
"FilterOrPolicyType",
|
|
6494
|
+
"HealthyRetryPolicy",
|
|
5952
6495
|
"ITopic",
|
|
5953
6496
|
"ITopicSubscription",
|
|
5954
6497
|
"LoggingConfig",
|
|
5955
6498
|
"LoggingProtocol",
|
|
5956
6499
|
"NumericConditions",
|
|
5957
6500
|
"Policy",
|
|
6501
|
+
"RequestPolicy",
|
|
5958
6502
|
"StringConditions",
|
|
5959
6503
|
"Subscription",
|
|
5960
6504
|
"SubscriptionFilter",
|
|
5961
6505
|
"SubscriptionOptions",
|
|
5962
6506
|
"SubscriptionProps",
|
|
5963
6507
|
"SubscriptionProtocol",
|
|
6508
|
+
"ThrottlePolicy",
|
|
5964
6509
|
"Topic",
|
|
5965
6510
|
"TopicAttributes",
|
|
5966
6511
|
"TopicBase",
|
|
@@ -6319,6 +6864,15 @@ def _typecheckingstub__39eaeffb1fed865d99c7cf51cdf720d8471aec20b2163161ef50035fb
|
|
|
6319
6864
|
"""Type checking stubs"""
|
|
6320
6865
|
pass
|
|
6321
6866
|
|
|
6867
|
+
def _typecheckingstub__4b77bc2bacea1b5a536852c018892cbf213e209fa1462f79eed79e56c3588546(
|
|
6868
|
+
*,
|
|
6869
|
+
healthy_retry_policy: typing.Optional[typing.Union[HealthyRetryPolicy, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
6870
|
+
request_policy: typing.Optional[typing.Union[RequestPolicy, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
6871
|
+
throttle_policy: typing.Optional[typing.Union[ThrottlePolicy, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
6872
|
+
) -> None:
|
|
6873
|
+
"""Type checking stubs"""
|
|
6874
|
+
pass
|
|
6875
|
+
|
|
6322
6876
|
def _typecheckingstub__48b960a8d07778472d280833dc7671d5e58991a28e7dd556c9d0aaf7509fb28e(
|
|
6323
6877
|
filter: SubscriptionFilter,
|
|
6324
6878
|
) -> None:
|
|
@@ -6331,6 +6885,19 @@ def _typecheckingstub__3bfe2da643ae34d8de4bb104c40157d580fd7cce715aa1fe916f39f19
|
|
|
6331
6885
|
"""Type checking stubs"""
|
|
6332
6886
|
pass
|
|
6333
6887
|
|
|
6888
|
+
def _typecheckingstub__7048a9fbd5081ad0f7c8324f945c1b50c0d35cd8d4656a13c6ebdbe87c3749c2(
|
|
6889
|
+
*,
|
|
6890
|
+
backoff_function: typing.Optional[BackoffFunction] = None,
|
|
6891
|
+
max_delay_target: typing.Optional[_Duration_4839e8c3] = None,
|
|
6892
|
+
min_delay_target: typing.Optional[_Duration_4839e8c3] = None,
|
|
6893
|
+
num_max_delay_retries: typing.Optional[jsii.Number] = None,
|
|
6894
|
+
num_min_delay_retries: typing.Optional[jsii.Number] = None,
|
|
6895
|
+
num_no_delay_retries: typing.Optional[jsii.Number] = None,
|
|
6896
|
+
num_retries: typing.Optional[jsii.Number] = None,
|
|
6897
|
+
) -> None:
|
|
6898
|
+
"""Type checking stubs"""
|
|
6899
|
+
pass
|
|
6900
|
+
|
|
6334
6901
|
def _typecheckingstub__3254ccc49f43f33130f11f9db98dd8a000762fcec4aeed1d0e619180d6590c66(
|
|
6335
6902
|
subscription: ITopicSubscription,
|
|
6336
6903
|
) -> None:
|
|
@@ -6405,6 +6972,13 @@ def _typecheckingstub__83467db20c58c3a233e8e98fe95c435848f7d6f585004282a53542710
|
|
|
6405
6972
|
"""Type checking stubs"""
|
|
6406
6973
|
pass
|
|
6407
6974
|
|
|
6975
|
+
def _typecheckingstub__86e9fa22eec2ba0cf8286f32e79e7bcd2d6d2dc454a8253571ffcff32c198ecd(
|
|
6976
|
+
*,
|
|
6977
|
+
header_content_type: typing.Optional[builtins.str] = None,
|
|
6978
|
+
) -> None:
|
|
6979
|
+
"""Type checking stubs"""
|
|
6980
|
+
pass
|
|
6981
|
+
|
|
6408
6982
|
def _typecheckingstub__608bd3c9ae19b496ea71293f19119c75ba12a13947777e25f50e21d76ee1afa9(
|
|
6409
6983
|
*,
|
|
6410
6984
|
allowlist: typing.Optional[typing.Sequence[builtins.str]] = None,
|
|
@@ -6423,6 +6997,7 @@ def _typecheckingstub__8ba93ce15c8c35d2f3ef25181ab5de6aae90de3adaf596e2b2f2e51f9
|
|
|
6423
6997
|
endpoint: builtins.str,
|
|
6424
6998
|
protocol: SubscriptionProtocol,
|
|
6425
6999
|
dead_letter_queue: typing.Optional[_IQueue_7ed6f679] = None,
|
|
7000
|
+
delivery_policy: typing.Optional[typing.Union[DeliveryPolicy, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
6426
7001
|
filter_policy: typing.Optional[typing.Mapping[builtins.str, SubscriptionFilter]] = None,
|
|
6427
7002
|
filter_policy_with_message_body: typing.Optional[typing.Mapping[builtins.str, FilterOrPolicy]] = None,
|
|
6428
7003
|
raw_message_delivery: typing.Optional[builtins.bool] = None,
|
|
@@ -6443,6 +7018,7 @@ def _typecheckingstub__bce75a2ad593ea78ce07c3bf1cbe6c0262cc48f6f133af363ca95a0ca
|
|
|
6443
7018
|
endpoint: builtins.str,
|
|
6444
7019
|
protocol: SubscriptionProtocol,
|
|
6445
7020
|
dead_letter_queue: typing.Optional[_IQueue_7ed6f679] = None,
|
|
7021
|
+
delivery_policy: typing.Optional[typing.Union[DeliveryPolicy, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
6446
7022
|
filter_policy: typing.Optional[typing.Mapping[builtins.str, SubscriptionFilter]] = None,
|
|
6447
7023
|
filter_policy_with_message_body: typing.Optional[typing.Mapping[builtins.str, FilterOrPolicy]] = None,
|
|
6448
7024
|
raw_message_delivery: typing.Optional[builtins.bool] = None,
|
|
@@ -6457,6 +7033,7 @@ def _typecheckingstub__ca027bfed18b17f0f94ff71f11bf24813f4ec24f9b1029e73d8da4ef8
|
|
|
6457
7033
|
endpoint: builtins.str,
|
|
6458
7034
|
protocol: SubscriptionProtocol,
|
|
6459
7035
|
dead_letter_queue: typing.Optional[_IQueue_7ed6f679] = None,
|
|
7036
|
+
delivery_policy: typing.Optional[typing.Union[DeliveryPolicy, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
6460
7037
|
filter_policy: typing.Optional[typing.Mapping[builtins.str, SubscriptionFilter]] = None,
|
|
6461
7038
|
filter_policy_with_message_body: typing.Optional[typing.Mapping[builtins.str, FilterOrPolicy]] = None,
|
|
6462
7039
|
raw_message_delivery: typing.Optional[builtins.bool] = None,
|
|
@@ -6467,6 +7044,13 @@ def _typecheckingstub__ca027bfed18b17f0f94ff71f11bf24813f4ec24f9b1029e73d8da4ef8
|
|
|
6467
7044
|
"""Type checking stubs"""
|
|
6468
7045
|
pass
|
|
6469
7046
|
|
|
7047
|
+
def _typecheckingstub__a26bd7e7a2d13b89f16f82c085347a85549066b76cb0e201a2ac60f8b28f60fb(
|
|
7048
|
+
*,
|
|
7049
|
+
max_receives_per_second: typing.Optional[jsii.Number] = None,
|
|
7050
|
+
) -> None:
|
|
7051
|
+
"""Type checking stubs"""
|
|
7052
|
+
pass
|
|
7053
|
+
|
|
6470
7054
|
def _typecheckingstub__b8362e16cf38fb93899cf1443c05ea87f926cf385d45c4f25eb95067bff9642a(
|
|
6471
7055
|
*,
|
|
6472
7056
|
topic_arn: builtins.str,
|
|
@@ -6585,6 +7169,7 @@ def _typecheckingstub__bd56ac6d2cb8c4c70278e4ea1ea1a8ca0d0a6de563f2be0fe02916900
|
|
|
6585
7169
|
endpoint: builtins.str,
|
|
6586
7170
|
protocol: SubscriptionProtocol,
|
|
6587
7171
|
dead_letter_queue: typing.Optional[_IQueue_7ed6f679] = None,
|
|
7172
|
+
delivery_policy: typing.Optional[typing.Union[DeliveryPolicy, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
6588
7173
|
filter_policy: typing.Optional[typing.Mapping[builtins.str, SubscriptionFilter]] = None,
|
|
6589
7174
|
filter_policy_with_message_body: typing.Optional[typing.Mapping[builtins.str, FilterOrPolicy]] = None,
|
|
6590
7175
|
raw_message_delivery: typing.Optional[builtins.bool] = None,
|