aws-cdk-lib 2.127.0__py3-none-any.whl → 2.129.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.
Potentially problematic release.
This version of aws-cdk-lib might be problematic. Click here for more details.
- aws_cdk/__init__.py +6 -10
- aws_cdk/_jsii/__init__.py +1 -1
- aws_cdk/_jsii/{aws-cdk-lib@2.127.0.jsii.tgz → aws-cdk-lib@2.129.0.jsii.tgz} +0 -0
- aws_cdk/aws_amazonmq/__init__.py +6 -24
- aws_cdk/aws_amplify/__init__.py +1 -2
- aws_cdk/aws_appconfig/__init__.py +0 -16
- aws_cdk/aws_applicationautoscaling/__init__.py +55 -22
- aws_cdk/aws_appstream/__init__.py +14 -14
- aws_cdk/aws_appsync/__init__.py +334 -3
- aws_cdk/aws_autoscaling/__init__.py +11 -7
- aws_cdk/aws_batch/__init__.py +137 -16
- aws_cdk/aws_cleanrooms/__init__.py +1 -2
- aws_cdk/aws_cloudformation/__init__.py +2 -10
- aws_cdk/aws_cloudfront/__init__.py +15 -8
- aws_cdk/aws_cloudfront/experimental/__init__.py +22 -0
- aws_cdk/aws_cloudfront_origins/__init__.py +332 -0
- aws_cdk/aws_cloudtrail/__init__.py +12 -2
- aws_cdk/aws_cloudwatch/__init__.py +925 -133
- aws_cdk/aws_codedeploy/__init__.py +69 -0
- aws_cdk/aws_codepipeline/__init__.py +1461 -111
- aws_cdk/aws_codepipeline_actions/__init__.py +40 -34
- aws_cdk/aws_cognito/__init__.py +0 -9
- aws_cdk/aws_config/__init__.py +2 -2
- aws_cdk/aws_connect/__init__.py +6 -1
- aws_cdk/aws_controltower/__init__.py +527 -7
- aws_cdk/aws_datasync/__init__.py +2 -2
- aws_cdk/aws_directoryservice/__init__.py +2 -3
- aws_cdk/aws_dynamodb/__init__.py +7 -0
- aws_cdk/aws_ec2/__init__.py +117 -210
- aws_cdk/aws_ecs/__init__.py +537 -3
- aws_cdk/aws_eks/__init__.py +1 -1
- aws_cdk/aws_elasticache/__init__.py +27 -20
- aws_cdk/aws_elasticloadbalancingv2/__init__.py +3 -4
- aws_cdk/aws_emr/__init__.py +23 -3
- aws_cdk/aws_events_targets/__init__.py +64 -20
- aws_cdk/aws_fis/__init__.py +4 -4
- aws_cdk/aws_frauddetector/__init__.py +3 -3
- aws_cdk/aws_globalaccelerator/__init__.py +2 -6
- aws_cdk/aws_glue/__init__.py +84 -55
- aws_cdk/aws_groundstation/__init__.py +8 -12
- aws_cdk/aws_guardduty/__init__.py +74 -70
- aws_cdk/aws_iam/__init__.py +16 -23
- aws_cdk/aws_imagebuilder/__init__.py +178 -156
- aws_cdk/aws_internetmonitor/__init__.py +12 -10
- aws_cdk/aws_iot/__init__.py +17 -10
- aws_cdk/aws_iotevents/__init__.py +4 -4
- aws_cdk/aws_iotfleetwise/__init__.py +10 -5
- aws_cdk/aws_iottwinmaker/__init__.py +3 -5
- aws_cdk/aws_iotwireless/__init__.py +35 -23
- aws_cdk/aws_kendra/__init__.py +36 -15
- aws_cdk/aws_kinesisfirehose/__init__.py +155 -114
- aws_cdk/aws_lambda/__init__.py +175 -15
- aws_cdk/aws_lambda_nodejs/__init__.py +22 -0
- aws_cdk/aws_lightsail/__init__.py +14 -18
- aws_cdk/aws_logs/__init__.py +15 -15
- aws_cdk/aws_mediaconnect/__init__.py +5 -3
- aws_cdk/aws_medialive/__init__.py +3 -12
- aws_cdk/aws_mediapackagev2/__init__.py +287 -286
- aws_cdk/aws_mediatailor/__init__.py +2 -2
- aws_cdk/aws_memorydb/__init__.py +2 -2
- aws_cdk/aws_msk/__init__.py +6 -3
- aws_cdk/aws_mwaa/__init__.py +10 -5
- aws_cdk/aws_neptunegraph/__init__.py +84 -66
- aws_cdk/aws_networkfirewall/__init__.py +5 -8
- aws_cdk/aws_networkmanager/__init__.py +3 -3
- aws_cdk/aws_nimblestudio/__init__.py +2 -4
- aws_cdk/aws_opensearchservice/__init__.py +6 -7
- aws_cdk/aws_osis/__init__.py +1 -3
- aws_cdk/aws_pinpoint/__init__.py +5 -5
- aws_cdk/aws_pipes/__init__.py +5 -5
- aws_cdk/aws_quicksight/__init__.py +5 -10
- aws_cdk/aws_rds/__init__.py +38 -21
- aws_cdk/aws_redshift/__init__.py +9 -5
- aws_cdk/aws_redshiftserverless/__init__.py +62 -38
- aws_cdk/aws_rolesanywhere/__init__.py +41 -53
- aws_cdk/aws_route53/__init__.py +532 -6
- aws_cdk/aws_route53recoverycontrol/__init__.py +1 -3
- aws_cdk/aws_route53recoveryreadiness/__init__.py +2 -2
- aws_cdk/aws_route53resolver/__init__.py +1 -4
- aws_cdk/aws_s3/__init__.py +12 -6
- aws_cdk/aws_s3_deployment/__init__.py +29 -0
- aws_cdk/aws_s3objectlambda/__init__.py +7 -4
- aws_cdk/aws_s3outposts/__init__.py +1 -1
- aws_cdk/aws_sagemaker/__init__.py +195 -11
- aws_cdk/aws_servicecatalogappregistry/__init__.py +3 -3
- aws_cdk/aws_ses/__init__.py +166 -9
- aws_cdk/aws_sns/__init__.py +185 -38
- aws_cdk/aws_sqs/__init__.py +10 -12
- aws_cdk/aws_ssm/__init__.py +16 -16
- aws_cdk/aws_ssmincidents/__init__.py +1 -1
- aws_cdk/aws_synthetics/__init__.py +94 -21
- aws_cdk/aws_verifiedpermissions/__init__.py +1 -2
- aws_cdk/aws_vpclattice/__init__.py +8 -4
- aws_cdk/aws_wafv2/__init__.py +14 -59
- aws_cdk/aws_workspaces/__init__.py +5 -4
- aws_cdk/aws_workspacesweb/__init__.py +6 -12
- aws_cdk/triggers/__init__.py +22 -0
- {aws_cdk_lib-2.127.0.dist-info → aws_cdk_lib-2.129.0.dist-info}/METADATA +1 -1
- {aws_cdk_lib-2.127.0.dist-info → aws_cdk_lib-2.129.0.dist-info}/RECORD +103 -103
- {aws_cdk_lib-2.127.0.dist-info → aws_cdk_lib-2.129.0.dist-info}/LICENSE +0 -0
- {aws_cdk_lib-2.127.0.dist-info → aws_cdk_lib-2.129.0.dist-info}/NOTICE +0 -0
- {aws_cdk_lib-2.127.0.dist-info → aws_cdk_lib-2.129.0.dist-info}/WHEEL +0 -0
- {aws_cdk_lib-2.127.0.dist-info → aws_cdk_lib-2.129.0.dist-info}/top_level.txt +0 -0
aws_cdk/aws_sns/__init__.py
CHANGED
|
@@ -213,6 +213,44 @@ topic_policy = sns.TopicPolicy(self, "Policy",
|
|
|
213
213
|
)
|
|
214
214
|
```
|
|
215
215
|
|
|
216
|
+
### Enforce encryption of data in transit when publishing to a topic
|
|
217
|
+
|
|
218
|
+
You can enforce SSL when creating a topic policy by setting the `enforceSSL` flag:
|
|
219
|
+
|
|
220
|
+
```python
|
|
221
|
+
topic = sns.Topic(self, "Topic")
|
|
222
|
+
policy_document = iam.PolicyDocument(
|
|
223
|
+
assign_sids=True,
|
|
224
|
+
statements=[
|
|
225
|
+
iam.PolicyStatement(
|
|
226
|
+
actions=["sns:Publish"],
|
|
227
|
+
principals=[iam.ServicePrincipal("s3.amazonaws.com")],
|
|
228
|
+
resources=[topic.topic_arn]
|
|
229
|
+
)
|
|
230
|
+
]
|
|
231
|
+
)
|
|
232
|
+
|
|
233
|
+
topic_policy = sns.TopicPolicy(self, "Policy",
|
|
234
|
+
topics=[topic],
|
|
235
|
+
policy_document=policy_document,
|
|
236
|
+
enforce_sSL=True
|
|
237
|
+
)
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
Similiarly you can enforce SSL by setting the `enforceSSL` flag on the topic:
|
|
241
|
+
|
|
242
|
+
```python
|
|
243
|
+
topic = sns.Topic(self, "TopicAddPolicy",
|
|
244
|
+
enforce_sSL=True
|
|
245
|
+
)
|
|
246
|
+
|
|
247
|
+
topic.add_to_resource_policy(iam.PolicyStatement(
|
|
248
|
+
principals=[iam.ServicePrincipal("s3.amazonaws.com")],
|
|
249
|
+
actions=["sns:Publish"],
|
|
250
|
+
resources=[topic.topic_arn]
|
|
251
|
+
))
|
|
252
|
+
```
|
|
253
|
+
|
|
216
254
|
## Delivery status logging
|
|
217
255
|
|
|
218
256
|
Amazon SNS provides support to log the delivery status of notification messages sent to topics with the following Amazon SNS endpoints:
|
|
@@ -476,7 +514,7 @@ class CfnSubscription(
|
|
|
476
514
|
:param redrive_policy: When specified, sends undeliverable messages to the specified Amazon SQS dead-letter queue. Messages that can't be delivered due to client errors (for example, when the subscribed endpoint is unreachable) or server errors (for example, when the service that powers the subscribed endpoint becomes unavailable) are held in the dead-letter queue for further analysis or reprocessing. For more information about the redrive policy and dead-letter queues, see `Amazon SQS dead-letter queues <https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html>`_ in the *Amazon SQS Developer Guide* .
|
|
477
515
|
:param region: For cross-region subscriptions, the region in which the topic resides. If no region is specified, AWS CloudFormation uses the region of the caller as the default. If you perform an update operation that only updates the ``Region`` property of a ``AWS::SNS::Subscription`` resource, that operation will fail unless you are either: - Updating the ``Region`` from ``NULL`` to the caller region. - Updating the ``Region`` from the caller region to ``NULL`` .
|
|
478
516
|
:param replay_policy:
|
|
479
|
-
:param subscription_role_arn: This property applies only to Amazon
|
|
517
|
+
:param subscription_role_arn: This property applies only to Amazon Data Firehose delivery stream subscriptions. Specify the ARN of the IAM role that has the following: - Permission to write to the Amazon Data Firehose delivery stream - Amazon SNS listed as a trusted entity Specifying a valid ARN for this attribute is required for Firehose delivery stream subscriptions. For more information, see `Fanout to Amazon Data Firehose delivery streams <https://docs.aws.amazon.com/sns/latest/dg/sns-firehose-as-subscriber.html>`_ in the *Amazon SNS Developer Guide.*
|
|
480
518
|
'''
|
|
481
519
|
if __debug__:
|
|
482
520
|
type_hints = typing.get_type_hints(_typecheckingstub__3f3839647e73879ccdb1519ec2afccf78b6168046279d32c5390b3e2543d1fec)
|
|
@@ -678,7 +716,7 @@ class CfnSubscription(
|
|
|
678
716
|
@builtins.property
|
|
679
717
|
@jsii.member(jsii_name="subscriptionRoleArn")
|
|
680
718
|
def subscription_role_arn(self) -> typing.Optional[builtins.str]:
|
|
681
|
-
'''This property applies only to Amazon
|
|
719
|
+
'''This property applies only to Amazon Data Firehose delivery stream subscriptions.'''
|
|
682
720
|
return typing.cast(typing.Optional[builtins.str], jsii.get(self, "subscriptionRoleArn"))
|
|
683
721
|
|
|
684
722
|
@subscription_role_arn.setter
|
|
@@ -734,7 +772,7 @@ class CfnSubscriptionProps:
|
|
|
734
772
|
:param redrive_policy: When specified, sends undeliverable messages to the specified Amazon SQS dead-letter queue. Messages that can't be delivered due to client errors (for example, when the subscribed endpoint is unreachable) or server errors (for example, when the service that powers the subscribed endpoint becomes unavailable) are held in the dead-letter queue for further analysis or reprocessing. For more information about the redrive policy and dead-letter queues, see `Amazon SQS dead-letter queues <https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html>`_ in the *Amazon SQS Developer Guide* .
|
|
735
773
|
:param region: For cross-region subscriptions, the region in which the topic resides. If no region is specified, AWS CloudFormation uses the region of the caller as the default. If you perform an update operation that only updates the ``Region`` property of a ``AWS::SNS::Subscription`` resource, that operation will fail unless you are either: - Updating the ``Region`` from ``NULL`` to the caller region. - Updating the ``Region`` from the caller region to ``NULL`` .
|
|
736
774
|
:param replay_policy:
|
|
737
|
-
:param subscription_role_arn: This property applies only to Amazon
|
|
775
|
+
:param subscription_role_arn: This property applies only to Amazon Data Firehose delivery stream subscriptions. Specify the ARN of the IAM role that has the following: - Permission to write to the Amazon Data Firehose delivery stream - Amazon SNS listed as a trusted entity Specifying a valid ARN for this attribute is required for Firehose delivery stream subscriptions. For more information, see `Fanout to Amazon Data Firehose delivery streams <https://docs.aws.amazon.com/sns/latest/dg/sns-firehose-as-subscriber.html>`_ in the *Amazon SNS Developer Guide.*
|
|
738
776
|
|
|
739
777
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sns-subscription.html
|
|
740
778
|
:exampleMetadata: fixture=_generated
|
|
@@ -921,14 +959,14 @@ class CfnSubscriptionProps:
|
|
|
921
959
|
|
|
922
960
|
@builtins.property
|
|
923
961
|
def subscription_role_arn(self) -> typing.Optional[builtins.str]:
|
|
924
|
-
'''This property applies only to Amazon
|
|
962
|
+
'''This property applies only to Amazon Data Firehose delivery stream subscriptions.
|
|
925
963
|
|
|
926
964
|
Specify the ARN of the IAM role that has the following:
|
|
927
965
|
|
|
928
|
-
- Permission to write to the Amazon
|
|
966
|
+
- Permission to write to the Amazon Data Firehose delivery stream
|
|
929
967
|
- Amazon SNS listed as a trusted entity
|
|
930
968
|
|
|
931
|
-
Specifying a valid ARN for this attribute is required for
|
|
969
|
+
Specifying a valid ARN for this attribute is required for Firehose delivery stream subscriptions. For more information, see `Fanout to Amazon Data Firehose delivery streams <https://docs.aws.amazon.com/sns/latest/dg/sns-firehose-as-subscriber.html>`_ in the *Amazon SNS Developer Guide.*
|
|
932
970
|
|
|
933
971
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sns-subscription.html#cfn-sns-subscription-subscriptionrolearn
|
|
934
972
|
'''
|
|
@@ -2319,7 +2357,7 @@ class ITopic(
|
|
|
2319
2357
|
'''Adds a statement to the IAM resource policy associated with this topic.
|
|
2320
2358
|
|
|
2321
2359
|
If this topic was created in this stack (``new Topic``), a topic policy
|
|
2322
|
-
will be automatically created upon the first call to ``
|
|
2360
|
+
will be automatically created upon the first call to ``addToResourcePolicy``. If
|
|
2323
2361
|
the topic is imported (``Topic.import``), then this is a no-op.
|
|
2324
2362
|
|
|
2325
2363
|
:param statement: -
|
|
@@ -2680,7 +2718,7 @@ class _ITopicProxy(
|
|
|
2680
2718
|
'''Adds a statement to the IAM resource policy associated with this topic.
|
|
2681
2719
|
|
|
2682
2720
|
If this topic was created in this stack (``new Topic``), a topic policy
|
|
2683
|
-
will be automatically created upon the first call to ``
|
|
2721
|
+
will be automatically created upon the first call to ``addToResourcePolicy``. If
|
|
2684
2722
|
the topic is imported (``Topic.import``), then this is a no-op.
|
|
2685
2723
|
|
|
2686
2724
|
:param statement: -
|
|
@@ -4308,7 +4346,7 @@ class TopicBase(
|
|
|
4308
4346
|
'''Adds a statement to the IAM resource policy associated with this topic.
|
|
4309
4347
|
|
|
4310
4348
|
If this topic was created in this stack (``new Topic``), a topic policy
|
|
4311
|
-
will be automatically created upon the first call to ``
|
|
4349
|
+
will be automatically created upon the first call to ``addToResourcePolicy``. If
|
|
4312
4350
|
the topic is imported (``Topic.import``), then this is a no-op.
|
|
4313
4351
|
|
|
4314
4352
|
:param statement: -
|
|
@@ -4332,6 +4370,14 @@ class TopicBase(
|
|
|
4332
4370
|
check_type(argname="argument _scope", value=_scope, expected_type=type_hints["_scope"])
|
|
4333
4371
|
return typing.cast(_NotificationRuleTargetConfig_ea27e095, jsii.invoke(self, "bindAsNotificationRuleTarget", [_scope]))
|
|
4334
4372
|
|
|
4373
|
+
@jsii.member(jsii_name="createSSLPolicyDocument")
|
|
4374
|
+
def _create_ssl_policy_document(self) -> _PolicyStatement_0fe33853:
|
|
4375
|
+
'''Adds a statement to enforce encryption of data in transit when publishing to the topic.
|
|
4376
|
+
|
|
4377
|
+
For more information, see https://docs.aws.amazon.com/sns/latest/dg/sns-security-best-practices.html#enforce-encryption-data-in-transit.
|
|
4378
|
+
'''
|
|
4379
|
+
return typing.cast(_PolicyStatement_0fe33853, jsii.invoke(self, "createSSLPolicyDocument", []))
|
|
4380
|
+
|
|
4335
4381
|
@jsii.member(jsii_name="grantPublish")
|
|
4336
4382
|
def grant_publish(self, grantee: _IGrantable_71c4f5de) -> _Grant_a7ae64f8:
|
|
4337
4383
|
'''Grant topic publishing permissions to the given identity.
|
|
@@ -4777,6 +4823,19 @@ class TopicBase(
|
|
|
4777
4823
|
'''The name of the topic.'''
|
|
4778
4824
|
...
|
|
4779
4825
|
|
|
4826
|
+
@builtins.property
|
|
4827
|
+
@jsii.member(jsii_name="enforceSSL")
|
|
4828
|
+
def _enforce_ssl(self) -> typing.Optional[builtins.bool]:
|
|
4829
|
+
'''Adds a statement to enforce encryption of data in transit when publishing to the topic.'''
|
|
4830
|
+
return typing.cast(typing.Optional[builtins.bool], jsii.get(self, "enforceSSL"))
|
|
4831
|
+
|
|
4832
|
+
@_enforce_ssl.setter
|
|
4833
|
+
def _enforce_ssl(self, value: typing.Optional[builtins.bool]) -> None:
|
|
4834
|
+
if __debug__:
|
|
4835
|
+
type_hints = typing.get_type_hints(_typecheckingstub__41d14f58fd3a68985cc9146f591de9ef04f0766e0e4ab580bec4fe74fde70eee)
|
|
4836
|
+
check_type(argname="argument value", value=value, expected_type=type_hints["value"])
|
|
4837
|
+
jsii.set(self, "enforceSSL", value)
|
|
4838
|
+
|
|
4780
4839
|
|
|
4781
4840
|
class _TopicBaseProxy(
|
|
4782
4841
|
TopicBase,
|
|
@@ -4845,15 +4904,21 @@ class TopicPolicy(
|
|
|
4845
4904
|
Example::
|
|
4846
4905
|
|
|
4847
4906
|
topic = sns.Topic(self, "Topic")
|
|
4848
|
-
|
|
4849
|
-
|
|
4907
|
+
policy_document = iam.PolicyDocument(
|
|
4908
|
+
assign_sids=True,
|
|
4909
|
+
statements=[
|
|
4910
|
+
iam.PolicyStatement(
|
|
4911
|
+
actions=["sns:Subscribe"],
|
|
4912
|
+
principals=[iam.AnyPrincipal()],
|
|
4913
|
+
resources=[topic.topic_arn]
|
|
4914
|
+
)
|
|
4915
|
+
]
|
|
4850
4916
|
)
|
|
4851
4917
|
|
|
4852
|
-
topic_policy.
|
|
4853
|
-
|
|
4854
|
-
|
|
4855
|
-
|
|
4856
|
-
))
|
|
4918
|
+
topic_policy = sns.TopicPolicy(self, "Policy",
|
|
4919
|
+
topics=[topic],
|
|
4920
|
+
policy_document=policy_document
|
|
4921
|
+
)
|
|
4857
4922
|
'''
|
|
4858
4923
|
|
|
4859
4924
|
def __init__(
|
|
@@ -4862,22 +4927,42 @@ class TopicPolicy(
|
|
|
4862
4927
|
id: builtins.str,
|
|
4863
4928
|
*,
|
|
4864
4929
|
topics: typing.Sequence[ITopic],
|
|
4930
|
+
enforce_ssl: typing.Optional[builtins.bool] = None,
|
|
4865
4931
|
policy_document: typing.Optional[_PolicyDocument_3ac34393] = None,
|
|
4866
4932
|
) -> None:
|
|
4867
4933
|
'''
|
|
4868
4934
|
:param scope: -
|
|
4869
4935
|
:param id: -
|
|
4870
4936
|
:param topics: The set of topics this policy applies to.
|
|
4937
|
+
:param enforce_ssl: Adds a statement to enforce encryption of data in transit when publishing to the topic. For more information, see https://docs.aws.amazon.com/sns/latest/dg/sns-security-best-practices.html#enforce-encryption-data-in-transit. Default: false
|
|
4871
4938
|
:param policy_document: IAM policy document to apply to topic(s). Default: empty policy document
|
|
4872
4939
|
'''
|
|
4873
4940
|
if __debug__:
|
|
4874
4941
|
type_hints = typing.get_type_hints(_typecheckingstub__12a056cfcdc8bff96e7fe29bb021bebfb1f092d261da925723087b52a2a52c91)
|
|
4875
4942
|
check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
|
|
4876
4943
|
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
|
4877
|
-
props = TopicPolicyProps(
|
|
4944
|
+
props = TopicPolicyProps(
|
|
4945
|
+
topics=topics, enforce_ssl=enforce_ssl, policy_document=policy_document
|
|
4946
|
+
)
|
|
4878
4947
|
|
|
4879
4948
|
jsii.create(self.__class__, self, [scope, id, props])
|
|
4880
4949
|
|
|
4950
|
+
@jsii.member(jsii_name="createSSLPolicyDocument")
|
|
4951
|
+
def _create_ssl_policy_document(
|
|
4952
|
+
self,
|
|
4953
|
+
topic_arn: builtins.str,
|
|
4954
|
+
) -> _PolicyStatement_0fe33853:
|
|
4955
|
+
'''Adds a statement to enforce encryption of data in transit when publishing to the topic.
|
|
4956
|
+
|
|
4957
|
+
For more information, see https://docs.aws.amazon.com/sns/latest/dg/sns-security-best-practices.html#enforce-encryption-data-in-transit.
|
|
4958
|
+
|
|
4959
|
+
:param topic_arn: -
|
|
4960
|
+
'''
|
|
4961
|
+
if __debug__:
|
|
4962
|
+
type_hints = typing.get_type_hints(_typecheckingstub__68fd01009ddae128e0ad9f5816da32ac0ad127b82df6140a2431cf829c9a7488)
|
|
4963
|
+
check_type(argname="argument topic_arn", value=topic_arn, expected_type=type_hints["topic_arn"])
|
|
4964
|
+
return typing.cast(_PolicyStatement_0fe33853, jsii.invoke(self, "createSSLPolicyDocument", [topic_arn]))
|
|
4965
|
+
|
|
4881
4966
|
@builtins.property
|
|
4882
4967
|
@jsii.member(jsii_name="document")
|
|
4883
4968
|
def document(self) -> _PolicyDocument_3ac34393:
|
|
@@ -4888,18 +4973,24 @@ class TopicPolicy(
|
|
|
4888
4973
|
@jsii.data_type(
|
|
4889
4974
|
jsii_type="aws-cdk-lib.aws_sns.TopicPolicyProps",
|
|
4890
4975
|
jsii_struct_bases=[],
|
|
4891
|
-
name_mapping={
|
|
4976
|
+
name_mapping={
|
|
4977
|
+
"topics": "topics",
|
|
4978
|
+
"enforce_ssl": "enforceSSL",
|
|
4979
|
+
"policy_document": "policyDocument",
|
|
4980
|
+
},
|
|
4892
4981
|
)
|
|
4893
4982
|
class TopicPolicyProps:
|
|
4894
4983
|
def __init__(
|
|
4895
4984
|
self,
|
|
4896
4985
|
*,
|
|
4897
4986
|
topics: typing.Sequence[ITopic],
|
|
4987
|
+
enforce_ssl: typing.Optional[builtins.bool] = None,
|
|
4898
4988
|
policy_document: typing.Optional[_PolicyDocument_3ac34393] = None,
|
|
4899
4989
|
) -> None:
|
|
4900
4990
|
'''Properties to associate SNS topics with a policy.
|
|
4901
4991
|
|
|
4902
4992
|
:param topics: The set of topics this policy applies to.
|
|
4993
|
+
:param enforce_ssl: Adds a statement to enforce encryption of data in transit when publishing to the topic. For more information, see https://docs.aws.amazon.com/sns/latest/dg/sns-security-best-practices.html#enforce-encryption-data-in-transit. Default: false
|
|
4903
4994
|
:param policy_document: IAM policy document to apply to topic(s). Default: empty policy document
|
|
4904
4995
|
|
|
4905
4996
|
:exampleMetadata: infused
|
|
@@ -4907,23 +4998,32 @@ class TopicPolicyProps:
|
|
|
4907
4998
|
Example::
|
|
4908
4999
|
|
|
4909
5000
|
topic = sns.Topic(self, "Topic")
|
|
4910
|
-
|
|
4911
|
-
|
|
5001
|
+
policy_document = iam.PolicyDocument(
|
|
5002
|
+
assign_sids=True,
|
|
5003
|
+
statements=[
|
|
5004
|
+
iam.PolicyStatement(
|
|
5005
|
+
actions=["sns:Subscribe"],
|
|
5006
|
+
principals=[iam.AnyPrincipal()],
|
|
5007
|
+
resources=[topic.topic_arn]
|
|
5008
|
+
)
|
|
5009
|
+
]
|
|
4912
5010
|
)
|
|
4913
5011
|
|
|
4914
|
-
topic_policy.
|
|
4915
|
-
|
|
4916
|
-
|
|
4917
|
-
|
|
4918
|
-
))
|
|
5012
|
+
topic_policy = sns.TopicPolicy(self, "Policy",
|
|
5013
|
+
topics=[topic],
|
|
5014
|
+
policy_document=policy_document
|
|
5015
|
+
)
|
|
4919
5016
|
'''
|
|
4920
5017
|
if __debug__:
|
|
4921
5018
|
type_hints = typing.get_type_hints(_typecheckingstub__4116dddf14d28d4bd4bb7d68b0eda71322f8faeb2468828dde6eca112513ba6b)
|
|
4922
5019
|
check_type(argname="argument topics", value=topics, expected_type=type_hints["topics"])
|
|
5020
|
+
check_type(argname="argument enforce_ssl", value=enforce_ssl, expected_type=type_hints["enforce_ssl"])
|
|
4923
5021
|
check_type(argname="argument policy_document", value=policy_document, expected_type=type_hints["policy_document"])
|
|
4924
5022
|
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
4925
5023
|
"topics": topics,
|
|
4926
5024
|
}
|
|
5025
|
+
if enforce_ssl is not None:
|
|
5026
|
+
self._values["enforce_ssl"] = enforce_ssl
|
|
4927
5027
|
if policy_document is not None:
|
|
4928
5028
|
self._values["policy_document"] = policy_document
|
|
4929
5029
|
|
|
@@ -4934,6 +5034,17 @@ class TopicPolicyProps:
|
|
|
4934
5034
|
assert result is not None, "Required property 'topics' is missing"
|
|
4935
5035
|
return typing.cast(typing.List[ITopic], result)
|
|
4936
5036
|
|
|
5037
|
+
@builtins.property
|
|
5038
|
+
def enforce_ssl(self) -> typing.Optional[builtins.bool]:
|
|
5039
|
+
'''Adds a statement to enforce encryption of data in transit when publishing to the topic.
|
|
5040
|
+
|
|
5041
|
+
For more information, see https://docs.aws.amazon.com/sns/latest/dg/sns-security-best-practices.html#enforce-encryption-data-in-transit.
|
|
5042
|
+
|
|
5043
|
+
:default: false
|
|
5044
|
+
'''
|
|
5045
|
+
result = self._values.get("enforce_ssl")
|
|
5046
|
+
return typing.cast(typing.Optional[builtins.bool], result)
|
|
5047
|
+
|
|
4937
5048
|
@builtins.property
|
|
4938
5049
|
def policy_document(self) -> typing.Optional[_PolicyDocument_3ac34393]:
|
|
4939
5050
|
'''IAM policy document to apply to topic(s).
|
|
@@ -4961,6 +5072,7 @@ class TopicPolicyProps:
|
|
|
4961
5072
|
name_mapping={
|
|
4962
5073
|
"content_based_deduplication": "contentBasedDeduplication",
|
|
4963
5074
|
"display_name": "displayName",
|
|
5075
|
+
"enforce_ssl": "enforceSSL",
|
|
4964
5076
|
"fifo": "fifo",
|
|
4965
5077
|
"logging_configs": "loggingConfigs",
|
|
4966
5078
|
"master_key": "masterKey",
|
|
@@ -4974,6 +5086,7 @@ class TopicProps:
|
|
|
4974
5086
|
*,
|
|
4975
5087
|
content_based_deduplication: typing.Optional[builtins.bool] = None,
|
|
4976
5088
|
display_name: typing.Optional[builtins.str] = None,
|
|
5089
|
+
enforce_ssl: typing.Optional[builtins.bool] = None,
|
|
4977
5090
|
fifo: typing.Optional[builtins.bool] = None,
|
|
4978
5091
|
logging_configs: typing.Optional[typing.Sequence[typing.Union[LoggingConfig, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
4979
5092
|
master_key: typing.Optional[_IKey_5f11635f] = None,
|
|
@@ -4984,6 +5097,7 @@ class TopicProps:
|
|
|
4984
5097
|
|
|
4985
5098
|
:param content_based_deduplication: Enables content-based deduplication for FIFO topics. Default: None
|
|
4986
5099
|
:param display_name: A developer-defined string that can be used to identify this SNS topic. Default: None
|
|
5100
|
+
:param enforce_ssl: Adds a statement to enforce encryption of data in transit when publishing to the topic. For more information, see https://docs.aws.amazon.com/sns/latest/dg/sns-security-best-practices.html#enforce-encryption-data-in-transit. Default: false
|
|
4987
5101
|
:param fifo: Set to true to create a FIFO topic. Default: None
|
|
4988
5102
|
:param logging_configs: The list of delivery status logging configurations for the topic. For more information, see https://docs.aws.amazon.com/sns/latest/dg/sns-topic-attributes.html. Default: None
|
|
4989
5103
|
:param master_key: A KMS Key, either managed by this CDK app, or imported. Default: None
|
|
@@ -4994,17 +5108,17 @@ class TopicProps:
|
|
|
4994
5108
|
|
|
4995
5109
|
Example::
|
|
4996
5110
|
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
fifo=True
|
|
5001
|
-
message_retention_period_in_days=7
|
|
5111
|
+
topic = sns.Topic(self, "Topic",
|
|
5112
|
+
content_based_deduplication=True,
|
|
5113
|
+
display_name="Customer subscription topic",
|
|
5114
|
+
fifo=True
|
|
5002
5115
|
)
|
|
5003
5116
|
'''
|
|
5004
5117
|
if __debug__:
|
|
5005
5118
|
type_hints = typing.get_type_hints(_typecheckingstub__093960c1ab5457cc6797eb4a06c9e8fc74e41d4eaa9d0a17f00fa896dadf9161)
|
|
5006
5119
|
check_type(argname="argument content_based_deduplication", value=content_based_deduplication, expected_type=type_hints["content_based_deduplication"])
|
|
5007
5120
|
check_type(argname="argument display_name", value=display_name, expected_type=type_hints["display_name"])
|
|
5121
|
+
check_type(argname="argument enforce_ssl", value=enforce_ssl, expected_type=type_hints["enforce_ssl"])
|
|
5008
5122
|
check_type(argname="argument fifo", value=fifo, expected_type=type_hints["fifo"])
|
|
5009
5123
|
check_type(argname="argument logging_configs", value=logging_configs, expected_type=type_hints["logging_configs"])
|
|
5010
5124
|
check_type(argname="argument master_key", value=master_key, expected_type=type_hints["master_key"])
|
|
@@ -5015,6 +5129,8 @@ class TopicProps:
|
|
|
5015
5129
|
self._values["content_based_deduplication"] = content_based_deduplication
|
|
5016
5130
|
if display_name is not None:
|
|
5017
5131
|
self._values["display_name"] = display_name
|
|
5132
|
+
if enforce_ssl is not None:
|
|
5133
|
+
self._values["enforce_ssl"] = enforce_ssl
|
|
5018
5134
|
if fifo is not None:
|
|
5019
5135
|
self._values["fifo"] = fifo
|
|
5020
5136
|
if logging_configs is not None:
|
|
@@ -5044,6 +5160,17 @@ class TopicProps:
|
|
|
5044
5160
|
result = self._values.get("display_name")
|
|
5045
5161
|
return typing.cast(typing.Optional[builtins.str], result)
|
|
5046
5162
|
|
|
5163
|
+
@builtins.property
|
|
5164
|
+
def enforce_ssl(self) -> typing.Optional[builtins.bool]:
|
|
5165
|
+
'''Adds a statement to enforce encryption of data in transit when publishing to the topic.
|
|
5166
|
+
|
|
5167
|
+
For more information, see https://docs.aws.amazon.com/sns/latest/dg/sns-security-best-practices.html#enforce-encryption-data-in-transit.
|
|
5168
|
+
|
|
5169
|
+
:default: false
|
|
5170
|
+
'''
|
|
5171
|
+
result = self._values.get("enforce_ssl")
|
|
5172
|
+
return typing.cast(typing.Optional[builtins.bool], result)
|
|
5173
|
+
|
|
5047
5174
|
@builtins.property
|
|
5048
5175
|
def fifo(self) -> typing.Optional[builtins.bool]:
|
|
5049
5176
|
'''Set to true to create a FIFO topic.
|
|
@@ -5420,17 +5547,18 @@ class Topic(TopicBase, metaclass=jsii.JSIIMeta, jsii_type="aws-cdk-lib.aws_sns.T
|
|
|
5420
5547
|
|
|
5421
5548
|
Example::
|
|
5422
5549
|
|
|
5423
|
-
|
|
5424
|
-
# stream: DeliveryStream
|
|
5550
|
+
import aws_cdk.aws_sns as sns
|
|
5425
5551
|
|
|
5426
5552
|
|
|
5427
|
-
topic = sns.Topic(self, "
|
|
5553
|
+
topic = sns.Topic(self, "MyTopic")
|
|
5428
5554
|
|
|
5429
|
-
|
|
5430
|
-
|
|
5431
|
-
|
|
5432
|
-
|
|
5433
|
-
|
|
5555
|
+
topic_rule = iot.TopicRule(self, "TopicRule",
|
|
5556
|
+
sql=iot.IotSql.from_string_as_ver20160323("SELECT topic(2) as device_id, year, month, day FROM 'device/+/data'"),
|
|
5557
|
+
actions=[
|
|
5558
|
+
actions.SnsTopicAction(topic,
|
|
5559
|
+
message_format=actions.SnsActionMessageFormat.JSON
|
|
5560
|
+
)
|
|
5561
|
+
]
|
|
5434
5562
|
)
|
|
5435
5563
|
'''
|
|
5436
5564
|
|
|
@@ -5441,6 +5569,7 @@ class Topic(TopicBase, metaclass=jsii.JSIIMeta, jsii_type="aws-cdk-lib.aws_sns.T
|
|
|
5441
5569
|
*,
|
|
5442
5570
|
content_based_deduplication: typing.Optional[builtins.bool] = None,
|
|
5443
5571
|
display_name: typing.Optional[builtins.str] = None,
|
|
5572
|
+
enforce_ssl: typing.Optional[builtins.bool] = None,
|
|
5444
5573
|
fifo: typing.Optional[builtins.bool] = None,
|
|
5445
5574
|
logging_configs: typing.Optional[typing.Sequence[typing.Union[LoggingConfig, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
5446
5575
|
master_key: typing.Optional[_IKey_5f11635f] = None,
|
|
@@ -5452,6 +5581,7 @@ class Topic(TopicBase, metaclass=jsii.JSIIMeta, jsii_type="aws-cdk-lib.aws_sns.T
|
|
|
5452
5581
|
:param id: -
|
|
5453
5582
|
:param content_based_deduplication: Enables content-based deduplication for FIFO topics. Default: None
|
|
5454
5583
|
:param display_name: A developer-defined string that can be used to identify this SNS topic. Default: None
|
|
5584
|
+
:param enforce_ssl: Adds a statement to enforce encryption of data in transit when publishing to the topic. For more information, see https://docs.aws.amazon.com/sns/latest/dg/sns-security-best-practices.html#enforce-encryption-data-in-transit. Default: false
|
|
5455
5585
|
:param fifo: Set to true to create a FIFO topic. Default: None
|
|
5456
5586
|
:param logging_configs: The list of delivery status logging configurations for the topic. For more information, see https://docs.aws.amazon.com/sns/latest/dg/sns-topic-attributes.html. Default: None
|
|
5457
5587
|
:param master_key: A KMS Key, either managed by this CDK app, or imported. Default: None
|
|
@@ -5465,6 +5595,7 @@ class Topic(TopicBase, metaclass=jsii.JSIIMeta, jsii_type="aws-cdk-lib.aws_sns.T
|
|
|
5465
5595
|
props = TopicProps(
|
|
5466
5596
|
content_based_deduplication=content_based_deduplication,
|
|
5467
5597
|
display_name=display_name,
|
|
5598
|
+
enforce_ssl=enforce_ssl,
|
|
5468
5599
|
fifo=fifo,
|
|
5469
5600
|
logging_configs=logging_configs,
|
|
5470
5601
|
master_key=master_key,
|
|
@@ -6131,19 +6262,33 @@ def _typecheckingstub__b07969d7a2c71869715d0fe87d9b0d9d67f663ddecc9d81d353ba532f
|
|
|
6131
6262
|
"""Type checking stubs"""
|
|
6132
6263
|
pass
|
|
6133
6264
|
|
|
6265
|
+
def _typecheckingstub__41d14f58fd3a68985cc9146f591de9ef04f0766e0e4ab580bec4fe74fde70eee(
|
|
6266
|
+
value: typing.Optional[builtins.bool],
|
|
6267
|
+
) -> None:
|
|
6268
|
+
"""Type checking stubs"""
|
|
6269
|
+
pass
|
|
6270
|
+
|
|
6134
6271
|
def _typecheckingstub__12a056cfcdc8bff96e7fe29bb021bebfb1f092d261da925723087b52a2a52c91(
|
|
6135
6272
|
scope: _constructs_77d1e7e8.Construct,
|
|
6136
6273
|
id: builtins.str,
|
|
6137
6274
|
*,
|
|
6138
6275
|
topics: typing.Sequence[ITopic],
|
|
6276
|
+
enforce_ssl: typing.Optional[builtins.bool] = None,
|
|
6139
6277
|
policy_document: typing.Optional[_PolicyDocument_3ac34393] = None,
|
|
6140
6278
|
) -> None:
|
|
6141
6279
|
"""Type checking stubs"""
|
|
6142
6280
|
pass
|
|
6143
6281
|
|
|
6282
|
+
def _typecheckingstub__68fd01009ddae128e0ad9f5816da32ac0ad127b82df6140a2431cf829c9a7488(
|
|
6283
|
+
topic_arn: builtins.str,
|
|
6284
|
+
) -> None:
|
|
6285
|
+
"""Type checking stubs"""
|
|
6286
|
+
pass
|
|
6287
|
+
|
|
6144
6288
|
def _typecheckingstub__4116dddf14d28d4bd4bb7d68b0eda71322f8faeb2468828dde6eca112513ba6b(
|
|
6145
6289
|
*,
|
|
6146
6290
|
topics: typing.Sequence[ITopic],
|
|
6291
|
+
enforce_ssl: typing.Optional[builtins.bool] = None,
|
|
6147
6292
|
policy_document: typing.Optional[_PolicyDocument_3ac34393] = None,
|
|
6148
6293
|
) -> None:
|
|
6149
6294
|
"""Type checking stubs"""
|
|
@@ -6153,6 +6298,7 @@ def _typecheckingstub__093960c1ab5457cc6797eb4a06c9e8fc74e41d4eaa9d0a17f00fa896d
|
|
|
6153
6298
|
*,
|
|
6154
6299
|
content_based_deduplication: typing.Optional[builtins.bool] = None,
|
|
6155
6300
|
display_name: typing.Optional[builtins.str] = None,
|
|
6301
|
+
enforce_ssl: typing.Optional[builtins.bool] = None,
|
|
6156
6302
|
fifo: typing.Optional[builtins.bool] = None,
|
|
6157
6303
|
logging_configs: typing.Optional[typing.Sequence[typing.Union[LoggingConfig, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
6158
6304
|
master_key: typing.Optional[_IKey_5f11635f] = None,
|
|
@@ -6191,6 +6337,7 @@ def _typecheckingstub__5bf7b7a1001dc600e81a7f1c5015e367dc471dcd727360f62a7eaf6eb
|
|
|
6191
6337
|
*,
|
|
6192
6338
|
content_based_deduplication: typing.Optional[builtins.bool] = None,
|
|
6193
6339
|
display_name: typing.Optional[builtins.str] = None,
|
|
6340
|
+
enforce_ssl: typing.Optional[builtins.bool] = None,
|
|
6194
6341
|
fifo: typing.Optional[builtins.bool] = None,
|
|
6195
6342
|
logging_configs: typing.Optional[typing.Sequence[typing.Union[LoggingConfig, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
6196
6343
|
master_key: typing.Optional[_IKey_5f11635f] = None,
|
aws_cdk/aws_sqs/__init__.py
CHANGED
|
@@ -3811,21 +3811,19 @@ class Queue(QueueBase, metaclass=jsii.JSIIMeta, jsii_type="aws-cdk-lib.aws_sqs.Q
|
|
|
3811
3811
|
|
|
3812
3812
|
Example::
|
|
3813
3813
|
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
fifo=True,
|
|
3818
|
-
content_based_deduplication=True
|
|
3819
|
-
)
|
|
3814
|
+
# source_queue: sqs.Queue
|
|
3815
|
+
# target_queue: sqs.Queue
|
|
3816
|
+
|
|
3820
3817
|
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
|
|
3818
|
+
pipe_target = targets.SqsTarget(target_queue,
|
|
3819
|
+
input_transformation=pipes.InputTransformation.from_object({
|
|
3820
|
+
"SomeKey": pipes.DynamicInput.from_event_path("$.body")
|
|
3821
|
+
})
|
|
3824
3822
|
)
|
|
3825
3823
|
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
target=
|
|
3824
|
+
pipe = pipes.Pipe(self, "Pipe",
|
|
3825
|
+
source=SomeSource(source_queue),
|
|
3826
|
+
target=pipe_target
|
|
3829
3827
|
)
|
|
3830
3828
|
'''
|
|
3831
3829
|
|