aws-cdk-lib 2.198.0__py3-none-any.whl → 2.200.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 +22 -24
- aws_cdk/_jsii/__init__.py +1 -1
- aws_cdk/_jsii/{aws-cdk-lib@2.198.0.jsii.tgz → aws-cdk-lib@2.200.0.jsii.tgz} +0 -0
- aws_cdk/aws_acmpca/__init__.py +1 -1
- aws_cdk/aws_apigateway/__init__.py +1 -1
- aws_cdk/aws_appconfig/__init__.py +296 -48
- aws_cdk/aws_applicationautoscaling/__init__.py +4 -4
- aws_cdk/aws_aps/__init__.py +365 -14
- aws_cdk/aws_autoscaling/__init__.py +4 -4
- aws_cdk/aws_bedrock/__init__.py +436 -28
- aws_cdk/aws_cloudformation/__init__.py +17 -23
- aws_cdk/aws_cloudfront_origins/__init__.py +1 -1
- aws_cdk/aws_cloudtrail/__init__.py +4 -4
- aws_cdk/aws_cloudwatch/__init__.py +50 -1
- aws_cdk/aws_codebuild/__init__.py +116 -0
- aws_cdk/aws_datazone/__init__.py +699 -9
- aws_cdk/aws_deadline/__init__.py +38 -10
- aws_cdk/aws_ec2/__init__.py +97 -28
- aws_cdk/aws_ecs_patterns/__init__.py +49 -3
- aws_cdk/aws_eks/__init__.py +40 -9
- aws_cdk/aws_elasticloadbalancingv2/__init__.py +7 -7
- aws_cdk/aws_emr/__init__.py +36 -2
- aws_cdk/aws_events_targets/__init__.py +78 -1
- aws_cdk/aws_fsx/__init__.py +122 -0
- aws_cdk/aws_glue/__init__.py +55 -26
- aws_cdk/aws_iam/__init__.py +376 -2
- aws_cdk/aws_iot/__init__.py +57 -5
- aws_cdk/aws_kinesisfirehose/__init__.py +5 -1
- aws_cdk/aws_lambda/__init__.py +65 -45
- aws_cdk/aws_lex/__init__.py +27 -13
- aws_cdk/aws_lightsail/__init__.py +452 -0
- aws_cdk/aws_medialive/__init__.py +699 -497
- aws_cdk/aws_msk/__init__.py +4 -4
- aws_cdk/aws_networkfirewall/__init__.py +9 -5
- aws_cdk/aws_nimblestudio/__init__.py +208 -400
- aws_cdk/aws_panorama/__init__.py +30 -3
- aws_cdk/aws_pcs/__init__.py +12 -5
- aws_cdk/aws_rds/__init__.py +28 -16
- aws_cdk/aws_s3/__init__.py +367 -6
- aws_cdk/aws_s3express/__init__.py +789 -0
- aws_cdk/aws_ses/__init__.py +549 -32
- aws_cdk/aws_sns_subscriptions/__init__.py +256 -1
- aws_cdk/aws_stepfunctions/__init__.py +55 -17
- aws_cdk/aws_stepfunctions_tasks/__init__.py +1502 -2
- aws_cdk/aws_synthetics/__init__.py +26 -16
- aws_cdk/aws_voiceid/__init__.py +13 -3
- aws_cdk/aws_vpclattice/__init__.py +219 -209
- aws_cdk/cloud_assembly_schema/__init__.py +137 -42
- aws_cdk/cx_api/__init__.py +7 -7
- {aws_cdk_lib-2.198.0.dist-info → aws_cdk_lib-2.200.0.dist-info}/METADATA +2 -2
- {aws_cdk_lib-2.198.0.dist-info → aws_cdk_lib-2.200.0.dist-info}/RECORD +55 -55
- {aws_cdk_lib-2.198.0.dist-info → aws_cdk_lib-2.200.0.dist-info}/LICENSE +0 -0
- {aws_cdk_lib-2.198.0.dist-info → aws_cdk_lib-2.200.0.dist-info}/NOTICE +0 -0
- {aws_cdk_lib-2.198.0.dist-info → aws_cdk_lib-2.200.0.dist-info}/WHEEL +0 -0
- {aws_cdk_lib-2.198.0.dist-info → aws_cdk_lib-2.200.0.dist-info}/top_level.txt +0 -0
|
@@ -13,8 +13,9 @@ Subscriptions can be added to the following endpoints:
|
|
|
13
13
|
* AWS Lambda
|
|
14
14
|
* Email
|
|
15
15
|
* SMS
|
|
16
|
+
* Amazon Data Firehose
|
|
16
17
|
|
|
17
|
-
Subscriptions to Amazon SQS
|
|
18
|
+
Subscriptions to Amazon SQS, AWS Lambda and Amazon Data Firehose can be added on topics across regions.
|
|
18
19
|
|
|
19
20
|
Create an Amazon SNS Topic to add subscriptions.
|
|
20
21
|
|
|
@@ -143,6 +144,34 @@ sms_number = CfnParameter(self, "sms-param")
|
|
|
143
144
|
|
|
144
145
|
my_topic.add_subscription(subscriptions.SmsSubscription(sms_number.value_as_string))
|
|
145
146
|
```
|
|
147
|
+
|
|
148
|
+
### Amazon Data Firehose
|
|
149
|
+
|
|
150
|
+
Subscribe an Amazon Data Firehose delivery stream to your topic:
|
|
151
|
+
|
|
152
|
+
```python
|
|
153
|
+
import aws_cdk.aws_kinesisfirehose as firehose
|
|
154
|
+
# stream: firehose.DeliveryStream
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
my_topic = sns.Topic(self, "Topic")
|
|
158
|
+
|
|
159
|
+
my_topic.add_subscription(subscriptions.FirehoseSubscription(stream))
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
To remove any Amazon SNS metadata from published messages, specify `rawMessageDelivery` to true.
|
|
163
|
+
|
|
164
|
+
```python
|
|
165
|
+
import aws_cdk.aws_kinesisfirehose as firehose
|
|
166
|
+
# stream: firehose.DeliveryStream
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
my_topic = sns.Topic(self, "Topic")
|
|
170
|
+
|
|
171
|
+
my_topic.add_subscription(subscriptions.FirehoseSubscription(stream,
|
|
172
|
+
raw_message_delivery=True
|
|
173
|
+
))
|
|
174
|
+
```
|
|
146
175
|
'''
|
|
147
176
|
from pkgutil import extend_path
|
|
148
177
|
__path__ = extend_path(__path__, __name__)
|
|
@@ -176,6 +205,8 @@ def check_type(argname: str, value: object, expected_type: typing.Any) -> typing
|
|
|
176
205
|
|
|
177
206
|
from .._jsii import *
|
|
178
207
|
|
|
208
|
+
from ..aws_iam import IRole as _IRole_235f5d8e
|
|
209
|
+
from ..aws_kinesisfirehose import IDeliveryStream as _IDeliveryStream_8f118861
|
|
179
210
|
from ..aws_lambda import IFunction as _IFunction_6adb0ab8
|
|
180
211
|
from ..aws_sns import (
|
|
181
212
|
DeliveryPolicy as _DeliveryPolicy_76b14b4e,
|
|
@@ -248,6 +279,70 @@ class EmailSubscription(
|
|
|
248
279
|
return typing.cast(_TopicSubscriptionConfig_3a01016e, jsii.invoke(self, "bind", [_topic]))
|
|
249
280
|
|
|
250
281
|
|
|
282
|
+
@jsii.implements(_ITopicSubscription_363a9426)
|
|
283
|
+
class FirehoseSubscription(
|
|
284
|
+
metaclass=jsii.JSIIMeta,
|
|
285
|
+
jsii_type="aws-cdk-lib.aws_sns_subscriptions.FirehoseSubscription",
|
|
286
|
+
):
|
|
287
|
+
'''Use an Amazon Data Firehose delivery stream as a subscription target.
|
|
288
|
+
|
|
289
|
+
:see: https://docs.aws.amazon.com/sns/latest/dg/sns-firehose-as-subscriber.html
|
|
290
|
+
:exampleMetadata: infused
|
|
291
|
+
|
|
292
|
+
Example::
|
|
293
|
+
|
|
294
|
+
import aws_cdk.aws_kinesisfirehose as firehose
|
|
295
|
+
# stream: firehose.DeliveryStream
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
my_topic = sns.Topic(self, "Topic")
|
|
299
|
+
|
|
300
|
+
my_topic.add_subscription(subscriptions.FirehoseSubscription(stream))
|
|
301
|
+
'''
|
|
302
|
+
|
|
303
|
+
def __init__(
|
|
304
|
+
self,
|
|
305
|
+
delivery_stream: _IDeliveryStream_8f118861,
|
|
306
|
+
*,
|
|
307
|
+
raw_message_delivery: typing.Optional[builtins.bool] = None,
|
|
308
|
+
role: typing.Optional[_IRole_235f5d8e] = None,
|
|
309
|
+
dead_letter_queue: typing.Optional[_IQueue_7ed6f679] = None,
|
|
310
|
+
filter_policy: typing.Optional[typing.Mapping[builtins.str, _SubscriptionFilter_8e774360]] = None,
|
|
311
|
+
filter_policy_with_message_body: typing.Optional[typing.Mapping[builtins.str, _FilterOrPolicy_ad79be59]] = None,
|
|
312
|
+
) -> None:
|
|
313
|
+
'''
|
|
314
|
+
:param delivery_stream: -
|
|
315
|
+
:param raw_message_delivery: Whether to remove any Amazon SNS metadata from published messages. Default: false
|
|
316
|
+
:param role: The role to assume to write messages to the Amazon Data Firehose delivery stream. Default: - A new Role is created
|
|
317
|
+
: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.
|
|
318
|
+
:param filter_policy: The filter policy. Default: - all messages are delivered
|
|
319
|
+
: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
|
|
320
|
+
'''
|
|
321
|
+
if __debug__:
|
|
322
|
+
type_hints = typing.get_type_hints(_typecheckingstub__eb284a753df4f96d68b5336d14cffbd9183054fb6ebd06d8ae9d19e34dadca66)
|
|
323
|
+
check_type(argname="argument delivery_stream", value=delivery_stream, expected_type=type_hints["delivery_stream"])
|
|
324
|
+
props = FirehoseSubscriptionProps(
|
|
325
|
+
raw_message_delivery=raw_message_delivery,
|
|
326
|
+
role=role,
|
|
327
|
+
dead_letter_queue=dead_letter_queue,
|
|
328
|
+
filter_policy=filter_policy,
|
|
329
|
+
filter_policy_with_message_body=filter_policy_with_message_body,
|
|
330
|
+
)
|
|
331
|
+
|
|
332
|
+
jsii.create(self.__class__, self, [delivery_stream, props])
|
|
333
|
+
|
|
334
|
+
@jsii.member(jsii_name="bind")
|
|
335
|
+
def bind(self, topic: _ITopic_9eca4852) -> _TopicSubscriptionConfig_3a01016e:
|
|
336
|
+
'''Returns a configuration for a Lambda function to subscribe to an SNS topic.
|
|
337
|
+
|
|
338
|
+
:param topic: -
|
|
339
|
+
'''
|
|
340
|
+
if __debug__:
|
|
341
|
+
type_hints = typing.get_type_hints(_typecheckingstub__4451ffe60ee55af18e7cd4f32871e3dcb229ecdc56cfab772a77a55ca36a43d2)
|
|
342
|
+
check_type(argname="argument topic", value=topic, expected_type=type_hints["topic"])
|
|
343
|
+
return typing.cast(_TopicSubscriptionConfig_3a01016e, jsii.invoke(self, "bind", [topic]))
|
|
344
|
+
|
|
345
|
+
|
|
251
346
|
@jsii.implements(_ITopicSubscription_363a9426)
|
|
252
347
|
class LambdaSubscription(
|
|
253
348
|
metaclass=jsii.JSIIMeta,
|
|
@@ -884,6 +979,135 @@ class EmailSubscriptionProps(SubscriptionProps):
|
|
|
884
979
|
)
|
|
885
980
|
|
|
886
981
|
|
|
982
|
+
@jsii.data_type(
|
|
983
|
+
jsii_type="aws-cdk-lib.aws_sns_subscriptions.FirehoseSubscriptionProps",
|
|
984
|
+
jsii_struct_bases=[SubscriptionProps],
|
|
985
|
+
name_mapping={
|
|
986
|
+
"dead_letter_queue": "deadLetterQueue",
|
|
987
|
+
"filter_policy": "filterPolicy",
|
|
988
|
+
"filter_policy_with_message_body": "filterPolicyWithMessageBody",
|
|
989
|
+
"raw_message_delivery": "rawMessageDelivery",
|
|
990
|
+
"role": "role",
|
|
991
|
+
},
|
|
992
|
+
)
|
|
993
|
+
class FirehoseSubscriptionProps(SubscriptionProps):
|
|
994
|
+
def __init__(
|
|
995
|
+
self,
|
|
996
|
+
*,
|
|
997
|
+
dead_letter_queue: typing.Optional[_IQueue_7ed6f679] = None,
|
|
998
|
+
filter_policy: typing.Optional[typing.Mapping[builtins.str, _SubscriptionFilter_8e774360]] = None,
|
|
999
|
+
filter_policy_with_message_body: typing.Optional[typing.Mapping[builtins.str, _FilterOrPolicy_ad79be59]] = None,
|
|
1000
|
+
raw_message_delivery: typing.Optional[builtins.bool] = None,
|
|
1001
|
+
role: typing.Optional[_IRole_235f5d8e] = None,
|
|
1002
|
+
) -> None:
|
|
1003
|
+
'''Properties for an Amazon Data Firehose subscription.
|
|
1004
|
+
|
|
1005
|
+
: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.
|
|
1006
|
+
:param filter_policy: The filter policy. Default: - all messages are delivered
|
|
1007
|
+
: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
|
|
1008
|
+
:param raw_message_delivery: Whether to remove any Amazon SNS metadata from published messages. Default: false
|
|
1009
|
+
:param role: The role to assume to write messages to the Amazon Data Firehose delivery stream. Default: - A new Role is created
|
|
1010
|
+
|
|
1011
|
+
:exampleMetadata: infused
|
|
1012
|
+
|
|
1013
|
+
Example::
|
|
1014
|
+
|
|
1015
|
+
import aws_cdk.aws_kinesisfirehose as firehose
|
|
1016
|
+
# stream: firehose.DeliveryStream
|
|
1017
|
+
|
|
1018
|
+
|
|
1019
|
+
my_topic = sns.Topic(self, "Topic")
|
|
1020
|
+
|
|
1021
|
+
my_topic.add_subscription(subscriptions.FirehoseSubscription(stream,
|
|
1022
|
+
raw_message_delivery=True
|
|
1023
|
+
))
|
|
1024
|
+
'''
|
|
1025
|
+
if __debug__:
|
|
1026
|
+
type_hints = typing.get_type_hints(_typecheckingstub__985141d3216aa767af7319f266fa3eda68db2fc5132677f99b8aeb05d240609c)
|
|
1027
|
+
check_type(argname="argument dead_letter_queue", value=dead_letter_queue, expected_type=type_hints["dead_letter_queue"])
|
|
1028
|
+
check_type(argname="argument filter_policy", value=filter_policy, expected_type=type_hints["filter_policy"])
|
|
1029
|
+
check_type(argname="argument filter_policy_with_message_body", value=filter_policy_with_message_body, expected_type=type_hints["filter_policy_with_message_body"])
|
|
1030
|
+
check_type(argname="argument raw_message_delivery", value=raw_message_delivery, expected_type=type_hints["raw_message_delivery"])
|
|
1031
|
+
check_type(argname="argument role", value=role, expected_type=type_hints["role"])
|
|
1032
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {}
|
|
1033
|
+
if dead_letter_queue is not None:
|
|
1034
|
+
self._values["dead_letter_queue"] = dead_letter_queue
|
|
1035
|
+
if filter_policy is not None:
|
|
1036
|
+
self._values["filter_policy"] = filter_policy
|
|
1037
|
+
if filter_policy_with_message_body is not None:
|
|
1038
|
+
self._values["filter_policy_with_message_body"] = filter_policy_with_message_body
|
|
1039
|
+
if raw_message_delivery is not None:
|
|
1040
|
+
self._values["raw_message_delivery"] = raw_message_delivery
|
|
1041
|
+
if role is not None:
|
|
1042
|
+
self._values["role"] = role
|
|
1043
|
+
|
|
1044
|
+
@builtins.property
|
|
1045
|
+
def dead_letter_queue(self) -> typing.Optional[_IQueue_7ed6f679]:
|
|
1046
|
+
'''Queue to be used as dead letter queue.
|
|
1047
|
+
|
|
1048
|
+
If not passed no dead letter queue is enabled.
|
|
1049
|
+
|
|
1050
|
+
:default: - No dead letter queue enabled.
|
|
1051
|
+
'''
|
|
1052
|
+
result = self._values.get("dead_letter_queue")
|
|
1053
|
+
return typing.cast(typing.Optional[_IQueue_7ed6f679], result)
|
|
1054
|
+
|
|
1055
|
+
@builtins.property
|
|
1056
|
+
def filter_policy(
|
|
1057
|
+
self,
|
|
1058
|
+
) -> typing.Optional[typing.Mapping[builtins.str, _SubscriptionFilter_8e774360]]:
|
|
1059
|
+
'''The filter policy.
|
|
1060
|
+
|
|
1061
|
+
:default: - all messages are delivered
|
|
1062
|
+
'''
|
|
1063
|
+
result = self._values.get("filter_policy")
|
|
1064
|
+
return typing.cast(typing.Optional[typing.Mapping[builtins.str, _SubscriptionFilter_8e774360]], result)
|
|
1065
|
+
|
|
1066
|
+
@builtins.property
|
|
1067
|
+
def filter_policy_with_message_body(
|
|
1068
|
+
self,
|
|
1069
|
+
) -> typing.Optional[typing.Mapping[builtins.str, _FilterOrPolicy_ad79be59]]:
|
|
1070
|
+
'''The filter policy that is applied on the message body.
|
|
1071
|
+
|
|
1072
|
+
To apply a filter policy to the message attributes, use ``filterPolicy``. A maximum of one of ``filterPolicyWithMessageBody`` and ``filterPolicy`` may be used.
|
|
1073
|
+
|
|
1074
|
+
:default: - all messages are delivered
|
|
1075
|
+
'''
|
|
1076
|
+
result = self._values.get("filter_policy_with_message_body")
|
|
1077
|
+
return typing.cast(typing.Optional[typing.Mapping[builtins.str, _FilterOrPolicy_ad79be59]], result)
|
|
1078
|
+
|
|
1079
|
+
@builtins.property
|
|
1080
|
+
def raw_message_delivery(self) -> typing.Optional[builtins.bool]:
|
|
1081
|
+
'''Whether to remove any Amazon SNS metadata from published messages.
|
|
1082
|
+
|
|
1083
|
+
:default: false
|
|
1084
|
+
|
|
1085
|
+
:see: https://docs.aws.amazon.com/sns/latest/dg/sns-large-payload-raw-message-delivery.html
|
|
1086
|
+
'''
|
|
1087
|
+
result = self._values.get("raw_message_delivery")
|
|
1088
|
+
return typing.cast(typing.Optional[builtins.bool], result)
|
|
1089
|
+
|
|
1090
|
+
@builtins.property
|
|
1091
|
+
def role(self) -> typing.Optional[_IRole_235f5d8e]:
|
|
1092
|
+
'''The role to assume to write messages to the Amazon Data Firehose delivery stream.
|
|
1093
|
+
|
|
1094
|
+
:default: - A new Role is created
|
|
1095
|
+
'''
|
|
1096
|
+
result = self._values.get("role")
|
|
1097
|
+
return typing.cast(typing.Optional[_IRole_235f5d8e], result)
|
|
1098
|
+
|
|
1099
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
1100
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
1101
|
+
|
|
1102
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
1103
|
+
return not (rhs == self)
|
|
1104
|
+
|
|
1105
|
+
def __repr__(self) -> str:
|
|
1106
|
+
return "FirehoseSubscriptionProps(%s)" % ", ".join(
|
|
1107
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
1108
|
+
)
|
|
1109
|
+
|
|
1110
|
+
|
|
887
1111
|
@jsii.data_type(
|
|
888
1112
|
jsii_type="aws-cdk-lib.aws_sns_subscriptions.LambdaSubscriptionProps",
|
|
889
1113
|
jsii_struct_bases=[SubscriptionProps],
|
|
@@ -1235,6 +1459,8 @@ class SqsSubscriptionProps(SubscriptionProps):
|
|
|
1235
1459
|
__all__ = [
|
|
1236
1460
|
"EmailSubscription",
|
|
1237
1461
|
"EmailSubscriptionProps",
|
|
1462
|
+
"FirehoseSubscription",
|
|
1463
|
+
"FirehoseSubscriptionProps",
|
|
1238
1464
|
"LambdaSubscription",
|
|
1239
1465
|
"LambdaSubscriptionProps",
|
|
1240
1466
|
"SmsSubscription",
|
|
@@ -1265,6 +1491,24 @@ def _typecheckingstub__8196047448e43839102a9b8698847e0dced23efba9bc4c3183517832e
|
|
|
1265
1491
|
"""Type checking stubs"""
|
|
1266
1492
|
pass
|
|
1267
1493
|
|
|
1494
|
+
def _typecheckingstub__eb284a753df4f96d68b5336d14cffbd9183054fb6ebd06d8ae9d19e34dadca66(
|
|
1495
|
+
delivery_stream: _IDeliveryStream_8f118861,
|
|
1496
|
+
*,
|
|
1497
|
+
raw_message_delivery: typing.Optional[builtins.bool] = None,
|
|
1498
|
+
role: typing.Optional[_IRole_235f5d8e] = None,
|
|
1499
|
+
dead_letter_queue: typing.Optional[_IQueue_7ed6f679] = None,
|
|
1500
|
+
filter_policy: typing.Optional[typing.Mapping[builtins.str, _SubscriptionFilter_8e774360]] = None,
|
|
1501
|
+
filter_policy_with_message_body: typing.Optional[typing.Mapping[builtins.str, _FilterOrPolicy_ad79be59]] = None,
|
|
1502
|
+
) -> None:
|
|
1503
|
+
"""Type checking stubs"""
|
|
1504
|
+
pass
|
|
1505
|
+
|
|
1506
|
+
def _typecheckingstub__4451ffe60ee55af18e7cd4f32871e3dcb229ecdc56cfab772a77a55ca36a43d2(
|
|
1507
|
+
topic: _ITopic_9eca4852,
|
|
1508
|
+
) -> None:
|
|
1509
|
+
"""Type checking stubs"""
|
|
1510
|
+
pass
|
|
1511
|
+
|
|
1268
1512
|
def _typecheckingstub__c6c58b72bfa1ffbf274b6dab576c34931fb67721a57d2059607f1e3269d774cc(
|
|
1269
1513
|
fn: _IFunction_6adb0ab8,
|
|
1270
1514
|
*,
|
|
@@ -1364,6 +1608,17 @@ def _typecheckingstub__4a78d2c696d1babec6ccfebac17827b1b6ba6f90d62674866fc5b2df7
|
|
|
1364
1608
|
"""Type checking stubs"""
|
|
1365
1609
|
pass
|
|
1366
1610
|
|
|
1611
|
+
def _typecheckingstub__985141d3216aa767af7319f266fa3eda68db2fc5132677f99b8aeb05d240609c(
|
|
1612
|
+
*,
|
|
1613
|
+
dead_letter_queue: typing.Optional[_IQueue_7ed6f679] = None,
|
|
1614
|
+
filter_policy: typing.Optional[typing.Mapping[builtins.str, _SubscriptionFilter_8e774360]] = None,
|
|
1615
|
+
filter_policy_with_message_body: typing.Optional[typing.Mapping[builtins.str, _FilterOrPolicy_ad79be59]] = None,
|
|
1616
|
+
raw_message_delivery: typing.Optional[builtins.bool] = None,
|
|
1617
|
+
role: typing.Optional[_IRole_235f5d8e] = None,
|
|
1618
|
+
) -> None:
|
|
1619
|
+
"""Type checking stubs"""
|
|
1620
|
+
pass
|
|
1621
|
+
|
|
1367
1622
|
def _typecheckingstub__38ecc690db1f9c84ad1bee66614e7fd336ee231d47fb11fd9782c269149d5b19(
|
|
1368
1623
|
*,
|
|
1369
1624
|
dead_letter_queue: typing.Optional[_IQueue_7ed6f679] = None,
|
|
@@ -1525,6 +1525,7 @@ Any object that implements the `IGrantable` interface (has an associated princip
|
|
|
1525
1525
|
* `stateMachine.grantRead(principal)` - grants the principal read access
|
|
1526
1526
|
* `stateMachine.grantTaskResponse(principal)` - grants the principal the ability to send task tokens to the state machine
|
|
1527
1527
|
* `stateMachine.grantExecution(principal, actions)` - grants the principal execution-level permissions for the IAM actions specified
|
|
1528
|
+
* `stateMachine.grantRedriveExecution(principal)` - grants the principal permission to redrive the executions of the state machine
|
|
1528
1529
|
* `stateMachine.grant(principal, actions)` - grants the principal state-machine-level permissions for the IAM actions specified
|
|
1529
1530
|
|
|
1530
1531
|
### Start Execution Permission
|
|
@@ -1603,6 +1604,25 @@ The following read permissions are provided to a service principal by the `grant
|
|
|
1603
1604
|
|
|
1604
1605
|
Grant execution-level permissions to a state machine by calling the `grantExecution()` API:
|
|
1605
1606
|
|
|
1607
|
+
### Redrive Execution Permission
|
|
1608
|
+
|
|
1609
|
+
Grant the given identity permission to redrive the execution of the state machine:
|
|
1610
|
+
|
|
1611
|
+
```python
|
|
1612
|
+
# definition: sfn.IChainable
|
|
1613
|
+
role = iam.Role(self, "Role",
|
|
1614
|
+
assumed_by=iam.ServicePrincipal("lambda.amazonaws.com")
|
|
1615
|
+
)
|
|
1616
|
+
state_machine = sfn.StateMachine(self, "StateMachine",
|
|
1617
|
+
definition_body=sfn.DefinitionBody.from_chainable(definition)
|
|
1618
|
+
)
|
|
1619
|
+
|
|
1620
|
+
# Give role permission to start execution of state machine
|
|
1621
|
+
state_machine.grant_start_execution(role)
|
|
1622
|
+
# Give role permission to redrive any executions of the state machine
|
|
1623
|
+
state_machine.grant_redrive_execution(role)
|
|
1624
|
+
```
|
|
1625
|
+
|
|
1606
1626
|
```python
|
|
1607
1627
|
# definition: sfn.IChainable
|
|
1608
1628
|
role = iam.Role(self, "Role",
|
|
@@ -11691,25 +11711,23 @@ class StateMachine(
|
|
|
11691
11711
|
|
|
11692
11712
|
Example::
|
|
11693
11713
|
|
|
11694
|
-
|
|
11695
|
-
child = sfn.StateMachine(self, "ChildStateMachine",
|
|
11696
|
-
definition=sfn.Chain.start(sfn.Pass(self, "PassState"))
|
|
11697
|
-
)
|
|
11714
|
+
import aws_cdk.aws_stepfunctions as stepfunctions
|
|
11698
11715
|
|
|
11699
|
-
# Include the state machine in a Task state with callback pattern
|
|
11700
|
-
task = tasks.StepFunctionsStartExecution(self, "ChildTask",
|
|
11701
|
-
state_machine=child,
|
|
11702
|
-
integration_pattern=sfn.IntegrationPattern.WAIT_FOR_TASK_TOKEN,
|
|
11703
|
-
input=sfn.TaskInput.from_object({
|
|
11704
|
-
"token": sfn.JsonPath.task_token,
|
|
11705
|
-
"foo": "bar"
|
|
11706
|
-
}),
|
|
11707
|
-
name="MyExecutionName"
|
|
11708
|
-
)
|
|
11709
11716
|
|
|
11710
|
-
|
|
11711
|
-
|
|
11712
|
-
|
|
11717
|
+
pipeline = codepipeline.Pipeline(self, "MyPipeline")
|
|
11718
|
+
input_artifact = codepipeline.Artifact()
|
|
11719
|
+
start_state = stepfunctions.Pass(self, "StartState")
|
|
11720
|
+
simple_state_machine = stepfunctions.StateMachine(self, "SimpleStateMachine",
|
|
11721
|
+
definition=start_state
|
|
11722
|
+
)
|
|
11723
|
+
step_function_action = codepipeline_actions.StepFunctionInvokeAction(
|
|
11724
|
+
action_name="Invoke",
|
|
11725
|
+
state_machine=simple_state_machine,
|
|
11726
|
+
state_machine_input=codepipeline_actions.StateMachineInput.file_path(input_artifact.at_path("assets/input.json"))
|
|
11727
|
+
)
|
|
11728
|
+
pipeline.add_stage(
|
|
11729
|
+
stage_name="StepFunctions",
|
|
11730
|
+
actions=[step_function_action]
|
|
11713
11731
|
)
|
|
11714
11732
|
'''
|
|
11715
11733
|
|
|
@@ -11869,6 +11887,20 @@ class StateMachine(
|
|
|
11869
11887
|
check_type(argname="argument identity", value=identity, expected_type=type_hints["identity"])
|
|
11870
11888
|
return typing.cast(_Grant_a7ae64f8, jsii.invoke(self, "grantRead", [identity]))
|
|
11871
11889
|
|
|
11890
|
+
@jsii.member(jsii_name="grantRedriveExecution")
|
|
11891
|
+
def grant_redrive_execution(
|
|
11892
|
+
self,
|
|
11893
|
+
identity: _IGrantable_71c4f5de,
|
|
11894
|
+
) -> _Grant_a7ae64f8:
|
|
11895
|
+
'''Grant the given identity permission to redrive the execution of the state machine.
|
|
11896
|
+
|
|
11897
|
+
:param identity: -
|
|
11898
|
+
'''
|
|
11899
|
+
if __debug__:
|
|
11900
|
+
type_hints = typing.get_type_hints(_typecheckingstub__105b46fe8f1d3a0f8f8d86eed1f7f5587ebf18870718ca73c5b57e8281defaf5)
|
|
11901
|
+
check_type(argname="argument identity", value=identity, expected_type=type_hints["identity"])
|
|
11902
|
+
return typing.cast(_Grant_a7ae64f8, jsii.invoke(self, "grantRedriveExecution", [identity]))
|
|
11903
|
+
|
|
11872
11904
|
@jsii.member(jsii_name="grantStartExecution")
|
|
11873
11905
|
def grant_start_execution(self, identity: _IGrantable_71c4f5de) -> _Grant_a7ae64f8:
|
|
11874
11906
|
'''Grant the given identity permissions to start an execution of this state machine.
|
|
@@ -27239,6 +27271,12 @@ def _typecheckingstub__de328dbf28de2be4ba9b61ea81bce4e6d383ec0968b0e914acb7378b6
|
|
|
27239
27271
|
"""Type checking stubs"""
|
|
27240
27272
|
pass
|
|
27241
27273
|
|
|
27274
|
+
def _typecheckingstub__105b46fe8f1d3a0f8f8d86eed1f7f5587ebf18870718ca73c5b57e8281defaf5(
|
|
27275
|
+
identity: _IGrantable_71c4f5de,
|
|
27276
|
+
) -> None:
|
|
27277
|
+
"""Type checking stubs"""
|
|
27278
|
+
pass
|
|
27279
|
+
|
|
27242
27280
|
def _typecheckingstub__efa2d941a46220f1692542e8c26652619270873ffe07f55fc9aa7a063799ed08(
|
|
27243
27281
|
identity: _IGrantable_71c4f5de,
|
|
27244
27282
|
) -> None:
|