aws-cdk-lib 2.162.1__py3-none-any.whl → 2.163.1__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.

Files changed (59) hide show
  1. aws_cdk/__init__.py +5 -7
  2. aws_cdk/_jsii/__init__.py +1 -1
  3. aws_cdk/_jsii/{aws-cdk-lib@2.162.1.jsii.tgz → aws-cdk-lib@2.163.1.jsii.tgz} +0 -0
  4. aws_cdk/aws_apigatewayv2/__init__.py +7 -7
  5. aws_cdk/aws_appflow/__init__.py +30 -16
  6. aws_cdk/aws_appsync/__init__.py +11 -21
  7. aws_cdk/aws_autoscaling/__init__.py +123 -0
  8. aws_cdk/aws_b2bi/__init__.py +83 -57
  9. aws_cdk/aws_cloudformation/__init__.py +5 -7
  10. aws_cdk/aws_codebuild/__init__.py +19 -40
  11. aws_cdk/aws_codepipeline/__init__.py +88 -7
  12. aws_cdk/aws_cognito/__init__.py +282 -168
  13. aws_cdk/aws_dms/__init__.py +1076 -117
  14. aws_cdk/aws_docdb/__init__.py +19 -13
  15. aws_cdk/aws_dynamodb/__init__.py +43 -22
  16. aws_cdk/aws_ec2/__init__.py +1213 -38
  17. aws_cdk/aws_ecs/__init__.py +187 -18
  18. aws_cdk/aws_ecs_patterns/__init__.py +189 -27
  19. aws_cdk/aws_efs/__init__.py +56 -37
  20. aws_cdk/aws_eks/__init__.py +6 -2
  21. aws_cdk/aws_elasticache/__init__.py +118 -118
  22. aws_cdk/aws_elasticloadbalancingv2/__init__.py +21 -1
  23. aws_cdk/aws_emr/__init__.py +124 -57
  24. aws_cdk/aws_events/__init__.py +40 -0
  25. aws_cdk/aws_fms/__init__.py +757 -8
  26. aws_cdk/aws_fsx/__init__.py +245 -10
  27. aws_cdk/aws_gamelift/__init__.py +121 -0
  28. aws_cdk/aws_glue/__init__.py +344 -61
  29. aws_cdk/aws_iam/__init__.py +44 -0
  30. aws_cdk/aws_identitystore/__init__.py +4 -2
  31. aws_cdk/aws_iot/__init__.py +40 -12
  32. aws_cdk/aws_kinesis/__init__.py +239 -0
  33. aws_cdk/aws_kms/__init__.py +92 -3
  34. aws_cdk/aws_lambda/__init__.py +2 -2
  35. aws_cdk/aws_mediapackagev2/__init__.py +26 -10
  36. aws_cdk/aws_memorydb/__init__.py +7 -7
  37. aws_cdk/aws_networkfirewall/__init__.py +89 -0
  38. aws_cdk/aws_qbusiness/__init__.py +51 -7
  39. aws_cdk/aws_quicksight/__init__.py +221 -87
  40. aws_cdk/aws_rds/__init__.py +376 -75
  41. aws_cdk/aws_redshift/__init__.py +493 -13
  42. aws_cdk/aws_route53profiles/__init__.py +4 -2
  43. aws_cdk/aws_route53resolver/__init__.py +26 -60
  44. aws_cdk/aws_s3/__init__.py +104 -4
  45. aws_cdk/aws_s3express/__init__.py +73 -13
  46. aws_cdk/aws_s3outposts/__init__.py +21 -12
  47. aws_cdk/aws_sagemaker/__init__.py +4 -44
  48. aws_cdk/aws_ssmquicksetup/__init__.py +2 -2
  49. aws_cdk/aws_stepfunctions/__init__.py +529 -156
  50. aws_cdk/aws_transfer/__init__.py +15 -4
  51. aws_cdk/aws_waf/__init__.py +11 -11
  52. aws_cdk/aws_wafregional/__init__.py +12 -12
  53. aws_cdk/aws_wisdom/__init__.py +710 -5
  54. {aws_cdk_lib-2.162.1.dist-info → aws_cdk_lib-2.163.1.dist-info}/METADATA +1 -1
  55. {aws_cdk_lib-2.162.1.dist-info → aws_cdk_lib-2.163.1.dist-info}/RECORD +59 -59
  56. {aws_cdk_lib-2.162.1.dist-info → aws_cdk_lib-2.163.1.dist-info}/LICENSE +0 -0
  57. {aws_cdk_lib-2.162.1.dist-info → aws_cdk_lib-2.163.1.dist-info}/NOTICE +0 -0
  58. {aws_cdk_lib-2.162.1.dist-info → aws_cdk_lib-2.163.1.dist-info}/WHEEL +0 -0
  59. {aws_cdk_lib-2.162.1.dist-info → aws_cdk_lib-2.163.1.dist-info}/top_level.txt +0 -0
@@ -560,16 +560,150 @@ distributed_map = sfn.DistributedMap(self, "Distributed Map State",
560
560
  distributed_map.item_processor(sfn.Pass(self, "Pass State"))
561
561
  ```
562
562
 
563
- Map states in Distributed mode support multiple sources for an array to iterate:
564
-
565
- * JSON array from the state input payload
566
- * objects in an S3 bucket and optional prefix
563
+ `DistributedMap` supports various input source types to determine a list of objects to iterate over:
564
+
565
+ * JSON array from the JSON state input
566
+
567
+ * By default, `DistributedMap` assumes whole JSON state input is an JSON array and iterates over it:
568
+
569
+ ```python
570
+ #
571
+ # JSON state input:
572
+ # [
573
+ # "item1",
574
+ # "item2"
575
+ # ]
576
+ #
577
+ distributed_map = sfn.DistributedMap(self, "DistributedMap")
578
+ distributed_map.item_processor(sfn.Pass(self, "Pass"))
579
+ ```
580
+
581
+ * When input source is present at a specific path in JSON state input, then `itemsPath` can be utilised to configure the iterator source.
582
+
583
+ ```python
584
+ #
585
+ # JSON state input:
586
+ # {
587
+ # "distributedMapItemList": [
588
+ # "item1",
589
+ # "item2"
590
+ # ]
591
+ # }
592
+ #
593
+ distributed_map = sfn.DistributedMap(self, "DistributedMap",
594
+ items_path="$.distributedMapItemList"
595
+ )
596
+ distributed_map.item_processor(sfn.Pass(self, "Pass"))
597
+ ```
598
+ * Objects in a S3 bucket with an optional prefix.
599
+
600
+ * When `DistributedMap` is required to iterate over objects stored in a S3 bucket, then an object of `S3ObjectsItemReader` can be passed to `itemReader` to configure the iterator source as follows:
601
+
602
+ ```python
603
+ import aws_cdk.aws_s3 as s3
604
+
605
+
606
+ #
607
+ # Tree view of bucket:
608
+ # my-bucket
609
+ # |
610
+ # +--item1
611
+ # |
612
+ # +--otherItem
613
+ # |
614
+ # +--item2
615
+ # |
616
+ # ...
617
+ #
618
+ bucket = s3.Bucket(self, "Bucket",
619
+ bucket_name="my-bucket"
620
+ )
621
+
622
+ distributed_map = sfn.DistributedMap(self, "DistributedMap",
623
+ item_reader=sfn.S3ObjectsItemReader(
624
+ bucket=bucket,
625
+ prefix="item"
626
+ )
627
+ )
628
+ distributed_map.item_processor(sfn.Pass(self, "Pass"))
629
+ ```
630
+
631
+ * If information about `bucket` is only known while starting execution of `StateMachine` (dynamically or at run-time) via JSON state input:
632
+
633
+ ```python
634
+ #
635
+ # JSON state input:
636
+ # {
637
+ # "bucketName": "my-bucket",
638
+ # "prefix": "item"
639
+ # }
640
+ #
641
+ distributed_map = sfn.DistributedMap(self, "DistributedMap",
642
+ item_reader=sfn.S3ObjectsItemReader(
643
+ bucket_name_path=sfn.JsonPath.string_at("$.bucketName"),
644
+ prefix=sfn.JsonPath.string_at("$.prefix")
645
+ )
646
+ )
647
+ distributed_map.item_processor(sfn.Pass(self, "Pass"))
648
+ ```
649
+
650
+ * Both `bucket` and `bucketNamePath` are mutually exclusive.
567
651
  * JSON array in a JSON file stored in S3
652
+
653
+ * When `DistributedMap` is required to iterate over a JSON array stored in a JSON file in a S3 bucket, then an object of `S3JsonItemReader` can be passed to `itemReader` to configure the iterator source as follows:
654
+
655
+ ```python
656
+ import aws_cdk.aws_s3 as s3
657
+
658
+
659
+ #
660
+ # Tree view of bucket:
661
+ # my-bucket
662
+ # |
663
+ # +--input.json
664
+ # |
665
+ # ...
666
+ #
667
+ # File content of input.json:
668
+ # [
669
+ # "item1",
670
+ # "item2"
671
+ # ]
672
+ #
673
+ bucket = s3.Bucket(self, "Bucket",
674
+ bucket_name="my-bucket"
675
+ )
676
+
677
+ distributed_map = sfn.DistributedMap(self, "DistributedMap",
678
+ item_reader=sfn.S3JsonItemReader(
679
+ bucket=bucket,
680
+ key="input.json"
681
+ )
682
+ )
683
+ distributed_map.item_processor(sfn.Pass(self, "Pass"))
684
+ ```
685
+
686
+ * If information about `bucket` is only known while starting execution of `StateMachine` (dynamically or at run-time) via state input:
687
+
688
+ ```python
689
+ #
690
+ # JSON state input:
691
+ # {
692
+ # "bucketName": "my-bucket",
693
+ # "key": "input.json"
694
+ # }
695
+ #
696
+ distributed_map = sfn.DistributedMap(self, "DistributedMap",
697
+ item_reader=sfn.S3JsonItemReader(
698
+ bucket_name_path=sfn.JsonPath.string_at("$.bucketName"),
699
+ key=sfn.JsonPath.string_at("$.key")
700
+ )
701
+ )
702
+ distributed_map.item_processor(sfn.Pass(self, "Pass"))
703
+ ```
568
704
  * CSV file stored in S3
569
705
  * S3 inventory manifest stored in S3
570
706
 
571
- There are multiple classes that implement `IItemReader` that can be used to configure the iterator source. These can be provided via the optional `itemReader` property. The default behavior if `itemReader` is omitted is to use the input payload.
572
-
573
707
  Map states in Distributed mode also support writing results of the iterator to an S3 bucket and optional prefix. Use a `ResultWriter` object provided via the optional `resultWriter` property to configure which S3 location iterator results will be written. The default behavior id `resultWriter` is omitted is to use the state output payload. However, if the iterator results are larger than the 256 kb limit for Step Functions payloads then the State Machine will fail.
574
708
 
575
709
  ```python
@@ -580,10 +714,6 @@ import aws_cdk.aws_s3 as s3
580
714
  bucket = s3.Bucket(self, "Bucket")
581
715
 
582
716
  distributed_map = sfn.DistributedMap(self, "Distributed Map State",
583
- item_reader=sfn.S3JsonItemReader(
584
- bucket=bucket,
585
- key="my-key.json"
586
- ),
587
717
  result_writer=sfn.ResultWriter(
588
718
  bucket=bucket,
589
719
  prefix="my-prefix"
@@ -6043,6 +6173,12 @@ class IItemReader(typing_extensions.Protocol):
6043
6173
  '''The Amazon S3 API action that Step Functions must invoke depending on the specified dataset.'''
6044
6174
  ...
6045
6175
 
6176
+ @builtins.property
6177
+ @jsii.member(jsii_name="bucketNamePath")
6178
+ def bucket_name_path(self) -> typing.Optional[builtins.str]:
6179
+ '''S3 bucket name containing objects to iterate over or a file with a list to iterate over, as JsonPath.'''
6180
+ ...
6181
+
6046
6182
  @builtins.property
6047
6183
  @jsii.member(jsii_name="maxItems")
6048
6184
  def max_items(self) -> typing.Optional[jsii.Number]:
@@ -6062,6 +6198,14 @@ class IItemReader(typing_extensions.Protocol):
6062
6198
  '''Render the ItemReader as JSON object.'''
6063
6199
  ...
6064
6200
 
6201
+ @jsii.member(jsii_name="validateItemReader")
6202
+ def validate_item_reader(self) -> typing.List[builtins.str]:
6203
+ '''Validate that ItemReader contains exactly either.
6204
+
6205
+ :see: bucketNamePath
6206
+ '''
6207
+ ...
6208
+
6065
6209
 
6066
6210
  class _IItemReaderProxy:
6067
6211
  '''Base interface for Item Reader configurations.'''
@@ -6080,6 +6224,12 @@ class _IItemReaderProxy:
6080
6224
  '''The Amazon S3 API action that Step Functions must invoke depending on the specified dataset.'''
6081
6225
  return typing.cast(builtins.str, jsii.get(self, "resource"))
6082
6226
 
6227
+ @builtins.property
6228
+ @jsii.member(jsii_name="bucketNamePath")
6229
+ def bucket_name_path(self) -> typing.Optional[builtins.str]:
6230
+ '''S3 bucket name containing objects to iterate over or a file with a list to iterate over, as JsonPath.'''
6231
+ return typing.cast(typing.Optional[builtins.str], jsii.get(self, "bucketNamePath"))
6232
+
6083
6233
  @builtins.property
6084
6234
  @jsii.member(jsii_name="maxItems")
6085
6235
  def max_items(self) -> typing.Optional[jsii.Number]:
@@ -6099,6 +6249,14 @@ class _IItemReaderProxy:
6099
6249
  '''Render the ItemReader as JSON object.'''
6100
6250
  return typing.cast(typing.Any, jsii.invoke(self, "render", []))
6101
6251
 
6252
+ @jsii.member(jsii_name="validateItemReader")
6253
+ def validate_item_reader(self) -> typing.List[builtins.str]:
6254
+ '''Validate that ItemReader contains exactly either.
6255
+
6256
+ :see: bucketNamePath
6257
+ '''
6258
+ return typing.cast(typing.List[builtins.str], jsii.invoke(self, "validateItemReader", []))
6259
+
6102
6260
  # Adding a "__jsii_proxy_class__(): typing.Type" function to the interface
6103
6261
  typing.cast(typing.Any, IItemReader).__jsii_proxy_class__ = lambda : _IItemReaderProxy
6104
6262
 
@@ -7157,18 +7315,24 @@ class ItemBatcherProps:
7157
7315
  @jsii.data_type(
7158
7316
  jsii_type="aws-cdk-lib.aws_stepfunctions.ItemReaderProps",
7159
7317
  jsii_struct_bases=[],
7160
- name_mapping={"bucket": "bucket", "max_items": "maxItems"},
7318
+ name_mapping={
7319
+ "bucket": "bucket",
7320
+ "bucket_name_path": "bucketNamePath",
7321
+ "max_items": "maxItems",
7322
+ },
7161
7323
  )
7162
7324
  class ItemReaderProps:
7163
7325
  def __init__(
7164
7326
  self,
7165
7327
  *,
7166
- bucket: _IBucket_42e086fd,
7328
+ bucket: typing.Optional[_IBucket_42e086fd] = None,
7329
+ bucket_name_path: typing.Optional[builtins.str] = None,
7167
7330
  max_items: typing.Optional[jsii.Number] = None,
7168
7331
  ) -> None:
7169
7332
  '''Base interface for Item Reader configuration properties.
7170
7333
 
7171
- :param bucket: S3 Bucket containing objects to iterate over or a file with a list to iterate over.
7334
+ :param bucket: S3 Bucket containing objects to iterate over or a file with a list to iterate over. Default: - S3 bucket will be determined from
7335
+ :param bucket_name_path: S3 bucket name containing objects to iterate over or a file with a list to iterate over, as JsonPath. Default: - S3 bucket will be determined from
7172
7336
  :param max_items: Limits the number of items passed to the Distributed Map state. Default: - Distributed Map state will iterate over all items provided by the ItemReader
7173
7337
 
7174
7338
  :exampleMetadata: fixture=_generated
@@ -7184,27 +7348,44 @@ class ItemReaderProps:
7184
7348
 
7185
7349
  item_reader_props = stepfunctions.ItemReaderProps(
7186
7350
  bucket=bucket,
7187
-
7188
- # the properties below are optional
7351
+ bucket_name_path="bucketNamePath",
7189
7352
  max_items=123
7190
7353
  )
7191
7354
  '''
7192
7355
  if __debug__:
7193
7356
  type_hints = typing.get_type_hints(_typecheckingstub__e8df53cde2f82ea6228f0c9a5a5ba0a4dd36c18fba9835f9f3150547f7cee754)
7194
7357
  check_type(argname="argument bucket", value=bucket, expected_type=type_hints["bucket"])
7358
+ check_type(argname="argument bucket_name_path", value=bucket_name_path, expected_type=type_hints["bucket_name_path"])
7195
7359
  check_type(argname="argument max_items", value=max_items, expected_type=type_hints["max_items"])
7196
- self._values: typing.Dict[builtins.str, typing.Any] = {
7197
- "bucket": bucket,
7198
- }
7360
+ self._values: typing.Dict[builtins.str, typing.Any] = {}
7361
+ if bucket is not None:
7362
+ self._values["bucket"] = bucket
7363
+ if bucket_name_path is not None:
7364
+ self._values["bucket_name_path"] = bucket_name_path
7199
7365
  if max_items is not None:
7200
7366
  self._values["max_items"] = max_items
7201
7367
 
7202
7368
  @builtins.property
7203
- def bucket(self) -> _IBucket_42e086fd:
7204
- '''S3 Bucket containing objects to iterate over or a file with a list to iterate over.'''
7369
+ def bucket(self) -> typing.Optional[_IBucket_42e086fd]:
7370
+ '''S3 Bucket containing objects to iterate over or a file with a list to iterate over.
7371
+
7372
+ :default: - S3 bucket will be determined from
7373
+
7374
+ :see: bucketNamePath
7375
+ '''
7205
7376
  result = self._values.get("bucket")
7206
- assert result is not None, "Required property 'bucket' is missing"
7207
- return typing.cast(_IBucket_42e086fd, result)
7377
+ return typing.cast(typing.Optional[_IBucket_42e086fd], result)
7378
+
7379
+ @builtins.property
7380
+ def bucket_name_path(self) -> typing.Optional[builtins.str]:
7381
+ '''S3 bucket name containing objects to iterate over or a file with a list to iterate over, as JsonPath.
7382
+
7383
+ :default: - S3 bucket will be determined from
7384
+
7385
+ :see: bucket
7386
+ '''
7387
+ result = self._values.get("bucket_name_path")
7388
+ return typing.cast(typing.Optional[builtins.str], result)
7208
7389
 
7209
7390
  @builtins.property
7210
7391
  def max_items(self) -> typing.Optional[jsii.Number]:
@@ -7278,19 +7459,20 @@ class JsonPath(
7278
7459
 
7279
7460
  Example::
7280
7461
 
7281
- submit_job_activity = sfn.Activity(self, "SubmitJob")
7282
-
7283
- tasks.StepFunctionsInvokeActivity(self, "Submit Job",
7284
- activity=submit_job_activity,
7285
- parameters={
7286
- "comment": "Selecting what I care about.",
7287
- "MyDetails": {
7288
- "size": sfn.JsonPath.string_at("$.product.details.size"),
7289
- "exists": sfn.JsonPath.string_at("$.product.availability"),
7290
- "StaticValue": "foo"
7291
- }
7292
- }
7462
+ #
7463
+ # JSON state input:
7464
+ # {
7465
+ # "bucketName": "my-bucket",
7466
+ # "prefix": "item"
7467
+ # }
7468
+ #
7469
+ distributed_map = sfn.DistributedMap(self, "DistributedMap",
7470
+ item_reader=sfn.S3ObjectsItemReader(
7471
+ bucket_name_path=sfn.JsonPath.string_at("$.bucketName"),
7472
+ prefix=sfn.JsonPath.string_at("$.prefix")
7473
+ )
7293
7474
  )
7475
+ distributed_map.item_processor(sfn.Pass(self, "Pass"))
7294
7476
  '''
7295
7477
 
7296
7478
  @jsii.member(jsii_name="array")
@@ -8983,10 +9165,6 @@ class ResultWriter(
8983
9165
  bucket = s3.Bucket(self, "Bucket")
8984
9166
 
8985
9167
  distributed_map = sfn.DistributedMap(self, "Distributed Map State",
8986
- item_reader=sfn.S3JsonItemReader(
8987
- bucket=bucket,
8988
- key="my-key.json"
8989
- ),
8990
9168
  result_writer=sfn.ResultWriter(
8991
9169
  bucket=bucket,
8992
9170
  prefix="my-prefix"
@@ -9063,10 +9241,6 @@ class ResultWriterProps:
9063
9241
  bucket = s3.Bucket(self, "Bucket")
9064
9242
 
9065
9243
  distributed_map = sfn.DistributedMap(self, "Distributed Map State",
9066
- item_reader=sfn.S3JsonItemReader(
9067
- bucket=bucket,
9068
- key="my-key.json"
9069
- ),
9070
9244
  result_writer=sfn.ResultWriter(
9071
9245
  bucket=bucket,
9072
9246
  prefix="my-prefix"
@@ -9287,10 +9461,11 @@ class S3CsvItemReader(
9287
9461
  # csv_headers: stepfunctions.CsvHeaders
9288
9462
 
9289
9463
  s3_csv_item_reader = stepfunctions.S3CsvItemReader(
9290
- bucket=bucket,
9291
9464
  key="key",
9292
9465
 
9293
9466
  # the properties below are optional
9467
+ bucket=bucket,
9468
+ bucket_name_path="bucketNamePath",
9294
9469
  csv_headers=csv_headers,
9295
9470
  max_items=123
9296
9471
  )
@@ -9301,17 +9476,23 @@ class S3CsvItemReader(
9301
9476
  *,
9302
9477
  csv_headers: typing.Optional[CsvHeaders] = None,
9303
9478
  key: builtins.str,
9304
- bucket: _IBucket_42e086fd,
9479
+ bucket: typing.Optional[_IBucket_42e086fd] = None,
9480
+ bucket_name_path: typing.Optional[builtins.str] = None,
9305
9481
  max_items: typing.Optional[jsii.Number] = None,
9306
9482
  ) -> None:
9307
9483
  '''
9308
9484
  :param csv_headers: CSV file header configuration. Default: - CsvHeaders with CsvHeadersLocation.FIRST_ROW
9309
9485
  :param key: Key of file stored in S3 bucket containing an array to iterate over.
9310
- :param bucket: S3 Bucket containing objects to iterate over or a file with a list to iterate over.
9486
+ :param bucket: S3 Bucket containing objects to iterate over or a file with a list to iterate over. Default: - S3 bucket will be determined from
9487
+ :param bucket_name_path: S3 bucket name containing objects to iterate over or a file with a list to iterate over, as JsonPath. Default: - S3 bucket will be determined from
9311
9488
  :param max_items: Limits the number of items passed to the Distributed Map state. Default: - Distributed Map state will iterate over all items provided by the ItemReader
9312
9489
  '''
9313
9490
  props = S3CsvItemReaderProps(
9314
- csv_headers=csv_headers, key=key, bucket=bucket, max_items=max_items
9491
+ csv_headers=csv_headers,
9492
+ key=key,
9493
+ bucket=bucket,
9494
+ bucket_name_path=bucket_name_path,
9495
+ max_items=max_items,
9315
9496
  )
9316
9497
 
9317
9498
  jsii.create(self.__class__, self, [props])
@@ -9326,6 +9507,14 @@ class S3CsvItemReader(
9326
9507
  '''Renders the ItemReader configuration as JSON object.'''
9327
9508
  return typing.cast(typing.Any, jsii.invoke(self, "render", []))
9328
9509
 
9510
+ @jsii.member(jsii_name="validateItemReader")
9511
+ def validate_item_reader(self) -> typing.List[builtins.str]:
9512
+ '''Validate that ItemReader contains exactly either.
9513
+
9514
+ :see: bucketNamePath
9515
+ '''
9516
+ return typing.cast(typing.List[builtins.str], jsii.invoke(self, "validateItemReader", []))
9517
+
9329
9518
  @builtins.property
9330
9519
  @jsii.member(jsii_name="bucket")
9331
9520
  def bucket(self) -> _IBucket_42e086fd:
@@ -9355,6 +9544,12 @@ class S3CsvItemReader(
9355
9544
  '''ARN for the ``getObject`` method of the S3 API This API method is used to iterate all objects in the S3 bucket/prefix.'''
9356
9545
  return typing.cast(builtins.str, jsii.get(self, "resource"))
9357
9546
 
9547
+ @builtins.property
9548
+ @jsii.member(jsii_name="bucketNamePath")
9549
+ def bucket_name_path(self) -> typing.Optional[builtins.str]:
9550
+ '''S3 bucket name containing objects to iterate over or a file with a list to iterate over, as JsonPath.'''
9551
+ return typing.cast(typing.Optional[builtins.str], jsii.get(self, "bucketNamePath"))
9552
+
9358
9553
  @builtins.property
9359
9554
  @jsii.member(jsii_name="maxItems")
9360
9555
  def max_items(self) -> typing.Optional[jsii.Number]:
@@ -9368,19 +9563,26 @@ class S3CsvItemReader(
9368
9563
  @jsii.data_type(
9369
9564
  jsii_type="aws-cdk-lib.aws_stepfunctions.S3FileItemReaderProps",
9370
9565
  jsii_struct_bases=[ItemReaderProps],
9371
- name_mapping={"bucket": "bucket", "max_items": "maxItems", "key": "key"},
9566
+ name_mapping={
9567
+ "bucket": "bucket",
9568
+ "bucket_name_path": "bucketNamePath",
9569
+ "max_items": "maxItems",
9570
+ "key": "key",
9571
+ },
9372
9572
  )
9373
9573
  class S3FileItemReaderProps(ItemReaderProps):
9374
9574
  def __init__(
9375
9575
  self,
9376
9576
  *,
9377
- bucket: _IBucket_42e086fd,
9577
+ bucket: typing.Optional[_IBucket_42e086fd] = None,
9578
+ bucket_name_path: typing.Optional[builtins.str] = None,
9378
9579
  max_items: typing.Optional[jsii.Number] = None,
9379
9580
  key: builtins.str,
9380
9581
  ) -> None:
9381
9582
  '''Base interface for Item Reader configuration properties the iterate over entries in a S3 file.
9382
9583
 
9383
- :param bucket: S3 Bucket containing objects to iterate over or a file with a list to iterate over.
9584
+ :param bucket: S3 Bucket containing objects to iterate over or a file with a list to iterate over. Default: - S3 bucket will be determined from
9585
+ :param bucket_name_path: S3 bucket name containing objects to iterate over or a file with a list to iterate over, as JsonPath. Default: - S3 bucket will be determined from
9384
9586
  :param max_items: Limits the number of items passed to the Distributed Map state. Default: - Distributed Map state will iterate over all items provided by the ItemReader
9385
9587
  :param key: Key of file stored in S3 bucket containing an array to iterate over.
9386
9588
 
@@ -9391,39 +9593,69 @@ class S3FileItemReaderProps(ItemReaderProps):
9391
9593
  import aws_cdk.aws_s3 as s3
9392
9594
 
9393
9595
 
9394
- # create a bucket
9395
- bucket = s3.Bucket(self, "Bucket")
9596
+ #
9597
+ # Tree view of bucket:
9598
+ # my-bucket
9599
+ # |
9600
+ # +--input.json
9601
+ # |
9602
+ # ...
9603
+ #
9604
+ # File content of input.json:
9605
+ # [
9606
+ # "item1",
9607
+ # "item2"
9608
+ # ]
9609
+ #
9610
+ bucket = s3.Bucket(self, "Bucket",
9611
+ bucket_name="my-bucket"
9612
+ )
9396
9613
 
9397
- distributed_map = sfn.DistributedMap(self, "Distributed Map State",
9614
+ distributed_map = sfn.DistributedMap(self, "DistributedMap",
9398
9615
  item_reader=sfn.S3JsonItemReader(
9399
9616
  bucket=bucket,
9400
- key="my-key.json"
9401
- ),
9402
- result_writer=sfn.ResultWriter(
9403
- bucket=bucket,
9404
- prefix="my-prefix"
9617
+ key="input.json"
9405
9618
  )
9406
9619
  )
9407
- distributed_map.item_processor(sfn.Pass(self, "Pass State"))
9620
+ distributed_map.item_processor(sfn.Pass(self, "Pass"))
9408
9621
  '''
9409
9622
  if __debug__:
9410
9623
  type_hints = typing.get_type_hints(_typecheckingstub__fc17fd96c577f0b5f18e9d0043337043a5db7cf7c35fdc1b09e959cf7f58221c)
9411
9624
  check_type(argname="argument bucket", value=bucket, expected_type=type_hints["bucket"])
9625
+ check_type(argname="argument bucket_name_path", value=bucket_name_path, expected_type=type_hints["bucket_name_path"])
9412
9626
  check_type(argname="argument max_items", value=max_items, expected_type=type_hints["max_items"])
9413
9627
  check_type(argname="argument key", value=key, expected_type=type_hints["key"])
9414
9628
  self._values: typing.Dict[builtins.str, typing.Any] = {
9415
- "bucket": bucket,
9416
9629
  "key": key,
9417
9630
  }
9631
+ if bucket is not None:
9632
+ self._values["bucket"] = bucket
9633
+ if bucket_name_path is not None:
9634
+ self._values["bucket_name_path"] = bucket_name_path
9418
9635
  if max_items is not None:
9419
9636
  self._values["max_items"] = max_items
9420
9637
 
9421
9638
  @builtins.property
9422
- def bucket(self) -> _IBucket_42e086fd:
9423
- '''S3 Bucket containing objects to iterate over or a file with a list to iterate over.'''
9639
+ def bucket(self) -> typing.Optional[_IBucket_42e086fd]:
9640
+ '''S3 Bucket containing objects to iterate over or a file with a list to iterate over.
9641
+
9642
+ :default: - S3 bucket will be determined from
9643
+
9644
+ :see: bucketNamePath
9645
+ '''
9424
9646
  result = self._values.get("bucket")
9425
- assert result is not None, "Required property 'bucket' is missing"
9426
- return typing.cast(_IBucket_42e086fd, result)
9647
+ return typing.cast(typing.Optional[_IBucket_42e086fd], result)
9648
+
9649
+ @builtins.property
9650
+ def bucket_name_path(self) -> typing.Optional[builtins.str]:
9651
+ '''S3 bucket name containing objects to iterate over or a file with a list to iterate over, as JsonPath.
9652
+
9653
+ :default: - S3 bucket will be determined from
9654
+
9655
+ :see: bucket
9656
+ '''
9657
+ result = self._values.get("bucket_name_path")
9658
+ return typing.cast(typing.Optional[builtins.str], result)
9427
9659
 
9428
9660
  @builtins.property
9429
9661
  def max_items(self) -> typing.Optional[jsii.Number]:
@@ -9467,35 +9699,53 @@ class S3JsonItemReader(
9467
9699
  import aws_cdk.aws_s3 as s3
9468
9700
 
9469
9701
 
9470
- # create a bucket
9471
- bucket = s3.Bucket(self, "Bucket")
9702
+ #
9703
+ # Tree view of bucket:
9704
+ # my-bucket
9705
+ # |
9706
+ # +--input.json
9707
+ # |
9708
+ # ...
9709
+ #
9710
+ # File content of input.json:
9711
+ # [
9712
+ # "item1",
9713
+ # "item2"
9714
+ # ]
9715
+ #
9716
+ bucket = s3.Bucket(self, "Bucket",
9717
+ bucket_name="my-bucket"
9718
+ )
9472
9719
 
9473
- distributed_map = sfn.DistributedMap(self, "Distributed Map State",
9720
+ distributed_map = sfn.DistributedMap(self, "DistributedMap",
9474
9721
  item_reader=sfn.S3JsonItemReader(
9475
9722
  bucket=bucket,
9476
- key="my-key.json"
9477
- ),
9478
- result_writer=sfn.ResultWriter(
9479
- bucket=bucket,
9480
- prefix="my-prefix"
9723
+ key="input.json"
9481
9724
  )
9482
9725
  )
9483
- distributed_map.item_processor(sfn.Pass(self, "Pass State"))
9726
+ distributed_map.item_processor(sfn.Pass(self, "Pass"))
9484
9727
  '''
9485
9728
 
9486
9729
  def __init__(
9487
9730
  self,
9488
9731
  *,
9489
9732
  key: builtins.str,
9490
- bucket: _IBucket_42e086fd,
9733
+ bucket: typing.Optional[_IBucket_42e086fd] = None,
9734
+ bucket_name_path: typing.Optional[builtins.str] = None,
9491
9735
  max_items: typing.Optional[jsii.Number] = None,
9492
9736
  ) -> None:
9493
9737
  '''
9494
9738
  :param key: Key of file stored in S3 bucket containing an array to iterate over.
9495
- :param bucket: S3 Bucket containing objects to iterate over or a file with a list to iterate over.
9739
+ :param bucket: S3 Bucket containing objects to iterate over or a file with a list to iterate over. Default: - S3 bucket will be determined from
9740
+ :param bucket_name_path: S3 bucket name containing objects to iterate over or a file with a list to iterate over, as JsonPath. Default: - S3 bucket will be determined from
9496
9741
  :param max_items: Limits the number of items passed to the Distributed Map state. Default: - Distributed Map state will iterate over all items provided by the ItemReader
9497
9742
  '''
9498
- props = S3FileItemReaderProps(key=key, bucket=bucket, max_items=max_items)
9743
+ props = S3FileItemReaderProps(
9744
+ key=key,
9745
+ bucket=bucket,
9746
+ bucket_name_path=bucket_name_path,
9747
+ max_items=max_items,
9748
+ )
9499
9749
 
9500
9750
  jsii.create(self.__class__, self, [props])
9501
9751
 
@@ -9512,6 +9762,14 @@ class S3JsonItemReader(
9512
9762
  '''
9513
9763
  return typing.cast(typing.Any, jsii.invoke(self, "render", []))
9514
9764
 
9765
+ @jsii.member(jsii_name="validateItemReader")
9766
+ def validate_item_reader(self) -> typing.List[builtins.str]:
9767
+ '''Validate that ItemReader contains exactly either.
9768
+
9769
+ :see: bucketNamePath
9770
+ '''
9771
+ return typing.cast(typing.List[builtins.str], jsii.invoke(self, "validateItemReader", []))
9772
+
9515
9773
  @builtins.property
9516
9774
  @jsii.member(jsii_name="bucket")
9517
9775
  def bucket(self) -> _IBucket_42e086fd:
@@ -9535,6 +9793,12 @@ class S3JsonItemReader(
9535
9793
  '''ARN for the ``getObject`` method of the S3 API This API method is used to iterate all objects in the S3 bucket/prefix.'''
9536
9794
  return typing.cast(builtins.str, jsii.get(self, "resource"))
9537
9795
 
9796
+ @builtins.property
9797
+ @jsii.member(jsii_name="bucketNamePath")
9798
+ def bucket_name_path(self) -> typing.Optional[builtins.str]:
9799
+ '''S3 bucket name containing objects to iterate over or a file with a list to iterate over, as JsonPath.'''
9800
+ return typing.cast(typing.Optional[builtins.str], jsii.get(self, "bucketNamePath"))
9801
+
9538
9802
  @builtins.property
9539
9803
  @jsii.member(jsii_name="maxItems")
9540
9804
  def max_items(self) -> typing.Optional[jsii.Number]:
@@ -9564,10 +9828,11 @@ class S3ManifestItemReader(
9564
9828
  # bucket: s3.Bucket
9565
9829
 
9566
9830
  s3_manifest_item_reader = stepfunctions.S3ManifestItemReader(
9567
- bucket=bucket,
9568
9831
  key="key",
9569
9832
 
9570
9833
  # the properties below are optional
9834
+ bucket=bucket,
9835
+ bucket_name_path="bucketNamePath",
9571
9836
  max_items=123
9572
9837
  )
9573
9838
  '''
@@ -9576,15 +9841,22 @@ class S3ManifestItemReader(
9576
9841
  self,
9577
9842
  *,
9578
9843
  key: builtins.str,
9579
- bucket: _IBucket_42e086fd,
9844
+ bucket: typing.Optional[_IBucket_42e086fd] = None,
9845
+ bucket_name_path: typing.Optional[builtins.str] = None,
9580
9846
  max_items: typing.Optional[jsii.Number] = None,
9581
9847
  ) -> None:
9582
9848
  '''
9583
9849
  :param key: Key of file stored in S3 bucket containing an array to iterate over.
9584
- :param bucket: S3 Bucket containing objects to iterate over or a file with a list to iterate over.
9850
+ :param bucket: S3 Bucket containing objects to iterate over or a file with a list to iterate over. Default: - S3 bucket will be determined from
9851
+ :param bucket_name_path: S3 bucket name containing objects to iterate over or a file with a list to iterate over, as JsonPath. Default: - S3 bucket will be determined from
9585
9852
  :param max_items: Limits the number of items passed to the Distributed Map state. Default: - Distributed Map state will iterate over all items provided by the ItemReader
9586
9853
  '''
9587
- props = S3FileItemReaderProps(key=key, bucket=bucket, max_items=max_items)
9854
+ props = S3FileItemReaderProps(
9855
+ key=key,
9856
+ bucket=bucket,
9857
+ bucket_name_path=bucket_name_path,
9858
+ max_items=max_items,
9859
+ )
9588
9860
 
9589
9861
  jsii.create(self.__class__, self, [props])
9590
9862
 
@@ -9601,6 +9873,14 @@ class S3ManifestItemReader(
9601
9873
  '''
9602
9874
  return typing.cast(typing.Any, jsii.invoke(self, "render", []))
9603
9875
 
9876
+ @jsii.member(jsii_name="validateItemReader")
9877
+ def validate_item_reader(self) -> typing.List[builtins.str]:
9878
+ '''Validate that ItemReader contains exactly either.
9879
+
9880
+ :see: bucketNamePath
9881
+ '''
9882
+ return typing.cast(typing.List[builtins.str], jsii.invoke(self, "validateItemReader", []))
9883
+
9604
9884
  @builtins.property
9605
9885
  @jsii.member(jsii_name="bucket")
9606
9886
  def bucket(self) -> _IBucket_42e086fd:
@@ -9624,6 +9904,12 @@ class S3ManifestItemReader(
9624
9904
  '''ARN for the ``getObject`` method of the S3 API This API method is used to iterate all objects in the S3 bucket/prefix.'''
9625
9905
  return typing.cast(builtins.str, jsii.get(self, "resource"))
9626
9906
 
9907
+ @builtins.property
9908
+ @jsii.member(jsii_name="bucketNamePath")
9909
+ def bucket_name_path(self) -> typing.Optional[builtins.str]:
9910
+ '''S3 bucket name containing objects to iterate over or a file with a list to iterate over, as JsonPath.'''
9911
+ return typing.cast(typing.Optional[builtins.str], jsii.get(self, "bucketNamePath"))
9912
+
9627
9913
  @builtins.property
9628
9914
  @jsii.member(jsii_name="maxItems")
9629
9915
  def max_items(self) -> typing.Optional[jsii.Number]:
@@ -9641,40 +9927,57 @@ class S3ObjectsItemReader(
9641
9927
  ):
9642
9928
  '''Item Reader configuration for iterating over objects in an S3 bucket.
9643
9929
 
9644
- :exampleMetadata: fixture=_generated
9930
+ :exampleMetadata: infused
9645
9931
 
9646
9932
  Example::
9647
9933
 
9648
- # The code below shows an example of how to instantiate this type.
9649
- # The values are placeholders you should change.
9650
- from aws_cdk import aws_s3 as s3
9651
- from aws_cdk import aws_stepfunctions as stepfunctions
9934
+ import aws_cdk.aws_s3 as s3
9652
9935
 
9653
- # bucket: s3.Bucket
9654
9936
 
9655
- s3_objects_item_reader = stepfunctions.S3ObjectsItemReader(
9656
- bucket=bucket,
9937
+ #
9938
+ # Tree view of bucket:
9939
+ # my-bucket
9940
+ # |
9941
+ # +--item1
9942
+ # |
9943
+ # +--otherItem
9944
+ # |
9945
+ # +--item2
9946
+ # |
9947
+ # ...
9948
+ #
9949
+ bucket = s3.Bucket(self, "Bucket",
9950
+ bucket_name="my-bucket"
9951
+ )
9657
9952
 
9658
- # the properties below are optional
9659
- max_items=123,
9660
- prefix="prefix"
9953
+ distributed_map = sfn.DistributedMap(self, "DistributedMap",
9954
+ item_reader=sfn.S3ObjectsItemReader(
9955
+ bucket=bucket,
9956
+ prefix="item"
9957
+ )
9661
9958
  )
9959
+ distributed_map.item_processor(sfn.Pass(self, "Pass"))
9662
9960
  '''
9663
9961
 
9664
9962
  def __init__(
9665
9963
  self,
9666
9964
  *,
9667
9965
  prefix: typing.Optional[builtins.str] = None,
9668
- bucket: _IBucket_42e086fd,
9966
+ bucket: typing.Optional[_IBucket_42e086fd] = None,
9967
+ bucket_name_path: typing.Optional[builtins.str] = None,
9669
9968
  max_items: typing.Optional[jsii.Number] = None,
9670
9969
  ) -> None:
9671
9970
  '''
9672
9971
  :param prefix: S3 prefix used to limit objects to iterate over. Default: - No prefix
9673
- :param bucket: S3 Bucket containing objects to iterate over or a file with a list to iterate over.
9972
+ :param bucket: S3 Bucket containing objects to iterate over or a file with a list to iterate over. Default: - S3 bucket will be determined from
9973
+ :param bucket_name_path: S3 bucket name containing objects to iterate over or a file with a list to iterate over, as JsonPath. Default: - S3 bucket will be determined from
9674
9974
  :param max_items: Limits the number of items passed to the Distributed Map state. Default: - Distributed Map state will iterate over all items provided by the ItemReader
9675
9975
  '''
9676
9976
  props = S3ObjectsItemReaderProps(
9677
- prefix=prefix, bucket=bucket, max_items=max_items
9977
+ prefix=prefix,
9978
+ bucket=bucket,
9979
+ bucket_name_path=bucket_name_path,
9980
+ max_items=max_items,
9678
9981
  )
9679
9982
 
9680
9983
  jsii.create(self.__class__, self, [props])
@@ -9692,6 +9995,14 @@ class S3ObjectsItemReader(
9692
9995
  '''
9693
9996
  return typing.cast(typing.Any, jsii.invoke(self, "render", []))
9694
9997
 
9998
+ @jsii.member(jsii_name="validateItemReader")
9999
+ def validate_item_reader(self) -> typing.List[builtins.str]:
10000
+ '''Validate that ItemReader contains exactly either.
10001
+
10002
+ :see: bucketNamePath
10003
+ '''
10004
+ return typing.cast(typing.List[builtins.str], jsii.invoke(self, "validateItemReader", []))
10005
+
9695
10006
  @builtins.property
9696
10007
  @jsii.member(jsii_name="bucket")
9697
10008
  def bucket(self) -> _IBucket_42e086fd:
@@ -9704,6 +10015,12 @@ class S3ObjectsItemReader(
9704
10015
  '''ARN for the ``listObjectsV2`` method of the S3 API This API method is used to iterate all objects in the S3 bucket/prefix.'''
9705
10016
  return typing.cast(builtins.str, jsii.get(self, "resource"))
9706
10017
 
10018
+ @builtins.property
10019
+ @jsii.member(jsii_name="bucketNamePath")
10020
+ def bucket_name_path(self) -> typing.Optional[builtins.str]:
10021
+ '''S3 bucket name containing objects to iterate over or a file with a list to iterate over, as JsonPath.'''
10022
+ return typing.cast(typing.Optional[builtins.str], jsii.get(self, "bucketNamePath"))
10023
+
9707
10024
  @builtins.property
9708
10025
  @jsii.member(jsii_name="maxItems")
9709
10026
  def max_items(self) -> typing.Optional[jsii.Number]:
@@ -9726,60 +10043,97 @@ class S3ObjectsItemReader(
9726
10043
  @jsii.data_type(
9727
10044
  jsii_type="aws-cdk-lib.aws_stepfunctions.S3ObjectsItemReaderProps",
9728
10045
  jsii_struct_bases=[ItemReaderProps],
9729
- name_mapping={"bucket": "bucket", "max_items": "maxItems", "prefix": "prefix"},
10046
+ name_mapping={
10047
+ "bucket": "bucket",
10048
+ "bucket_name_path": "bucketNamePath",
10049
+ "max_items": "maxItems",
10050
+ "prefix": "prefix",
10051
+ },
9730
10052
  )
9731
10053
  class S3ObjectsItemReaderProps(ItemReaderProps):
9732
10054
  def __init__(
9733
10055
  self,
9734
10056
  *,
9735
- bucket: _IBucket_42e086fd,
10057
+ bucket: typing.Optional[_IBucket_42e086fd] = None,
10058
+ bucket_name_path: typing.Optional[builtins.str] = None,
9736
10059
  max_items: typing.Optional[jsii.Number] = None,
9737
10060
  prefix: typing.Optional[builtins.str] = None,
9738
10061
  ) -> None:
9739
10062
  '''Properties for configuring an Item Reader that iterates over objects in an S3 bucket.
9740
10063
 
9741
- :param bucket: S3 Bucket containing objects to iterate over or a file with a list to iterate over.
10064
+ :param bucket: S3 Bucket containing objects to iterate over or a file with a list to iterate over. Default: - S3 bucket will be determined from
10065
+ :param bucket_name_path: S3 bucket name containing objects to iterate over or a file with a list to iterate over, as JsonPath. Default: - S3 bucket will be determined from
9742
10066
  :param max_items: Limits the number of items passed to the Distributed Map state. Default: - Distributed Map state will iterate over all items provided by the ItemReader
9743
10067
  :param prefix: S3 prefix used to limit objects to iterate over. Default: - No prefix
9744
10068
 
9745
- :exampleMetadata: fixture=_generated
10069
+ :exampleMetadata: infused
9746
10070
 
9747
10071
  Example::
9748
10072
 
9749
- # The code below shows an example of how to instantiate this type.
9750
- # The values are placeholders you should change.
9751
- from aws_cdk import aws_s3 as s3
9752
- from aws_cdk import aws_stepfunctions as stepfunctions
10073
+ import aws_cdk.aws_s3 as s3
9753
10074
 
9754
- # bucket: s3.Bucket
9755
10075
 
9756
- s3_objects_item_reader_props = stepfunctions.S3ObjectsItemReaderProps(
9757
- bucket=bucket,
10076
+ #
10077
+ # Tree view of bucket:
10078
+ # my-bucket
10079
+ # |
10080
+ # +--item1
10081
+ # |
10082
+ # +--otherItem
10083
+ # |
10084
+ # +--item2
10085
+ # |
10086
+ # ...
10087
+ #
10088
+ bucket = s3.Bucket(self, "Bucket",
10089
+ bucket_name="my-bucket"
10090
+ )
9758
10091
 
9759
- # the properties below are optional
9760
- max_items=123,
9761
- prefix="prefix"
10092
+ distributed_map = sfn.DistributedMap(self, "DistributedMap",
10093
+ item_reader=sfn.S3ObjectsItemReader(
10094
+ bucket=bucket,
10095
+ prefix="item"
10096
+ )
9762
10097
  )
10098
+ distributed_map.item_processor(sfn.Pass(self, "Pass"))
9763
10099
  '''
9764
10100
  if __debug__:
9765
10101
  type_hints = typing.get_type_hints(_typecheckingstub__0839027a57f578b6a339286602923b0024b1f5e10dc2fb3ce8ac185f643a3bbc)
9766
10102
  check_type(argname="argument bucket", value=bucket, expected_type=type_hints["bucket"])
10103
+ check_type(argname="argument bucket_name_path", value=bucket_name_path, expected_type=type_hints["bucket_name_path"])
9767
10104
  check_type(argname="argument max_items", value=max_items, expected_type=type_hints["max_items"])
9768
10105
  check_type(argname="argument prefix", value=prefix, expected_type=type_hints["prefix"])
9769
- self._values: typing.Dict[builtins.str, typing.Any] = {
9770
- "bucket": bucket,
9771
- }
10106
+ self._values: typing.Dict[builtins.str, typing.Any] = {}
10107
+ if bucket is not None:
10108
+ self._values["bucket"] = bucket
10109
+ if bucket_name_path is not None:
10110
+ self._values["bucket_name_path"] = bucket_name_path
9772
10111
  if max_items is not None:
9773
10112
  self._values["max_items"] = max_items
9774
10113
  if prefix is not None:
9775
10114
  self._values["prefix"] = prefix
9776
10115
 
9777
10116
  @builtins.property
9778
- def bucket(self) -> _IBucket_42e086fd:
9779
- '''S3 Bucket containing objects to iterate over or a file with a list to iterate over.'''
10117
+ def bucket(self) -> typing.Optional[_IBucket_42e086fd]:
10118
+ '''S3 Bucket containing objects to iterate over or a file with a list to iterate over.
10119
+
10120
+ :default: - S3 bucket will be determined from
10121
+
10122
+ :see: bucketNamePath
10123
+ '''
9780
10124
  result = self._values.get("bucket")
9781
- assert result is not None, "Required property 'bucket' is missing"
9782
- return typing.cast(_IBucket_42e086fd, result)
10125
+ return typing.cast(typing.Optional[_IBucket_42e086fd], result)
10126
+
10127
+ @builtins.property
10128
+ def bucket_name_path(self) -> typing.Optional[builtins.str]:
10129
+ '''S3 bucket name containing objects to iterate over or a file with a list to iterate over, as JsonPath.
10130
+
10131
+ :default: - S3 bucket will be determined from
10132
+
10133
+ :see: bucket
10134
+ '''
10135
+ result = self._values.get("bucket_name_path")
10136
+ return typing.cast(typing.Optional[builtins.str], result)
9783
10137
 
9784
10138
  @builtins.property
9785
10139
  def max_items(self) -> typing.Optional[jsii.Number]:
@@ -14961,14 +15315,20 @@ class DistributedMapProps(MapBaseProps):
14961
15315
 
14962
15316
  Example::
14963
15317
 
15318
+ #
15319
+ # JSON state input:
15320
+ # {
15321
+ # "bucketName": "my-bucket",
15322
+ # "prefix": "item"
15323
+ # }
15324
+ #
14964
15325
  distributed_map = sfn.DistributedMap(self, "DistributedMap",
14965
- map_execution_type=sfn.StateMachineType.EXPRESS
14966
- )
14967
-
14968
- distributed_map.item_processor(sfn.Pass(self, "Pass"),
14969
- mode=sfn.ProcessorMode.DISTRIBUTED,
14970
- execution_type=sfn.ProcessorType.STANDARD
15326
+ item_reader=sfn.S3ObjectsItemReader(
15327
+ bucket_name_path=sfn.JsonPath.string_at("$.bucketName"),
15328
+ prefix=sfn.JsonPath.string_at("$.prefix")
15329
+ )
14971
15330
  )
15331
+ distributed_map.item_processor(sfn.Pass(self, "Pass"))
14972
15332
  '''
14973
15333
  if __debug__:
14974
15334
  type_hints = typing.get_type_hints(_typecheckingstub__e484af477b46c0e70f635ed9610c7183f70c2184fd7a48f091a5477df9ee3d5d)
@@ -15650,26 +16010,15 @@ class Pass(
15650
16010
 
15651
16011
  Example::
15652
16012
 
15653
- # Define a state machine with one Pass state
15654
- child = sfn.StateMachine(self, "ChildStateMachine",
15655
- definition=sfn.Chain.start(sfn.Pass(self, "PassState"))
16013
+ state_machine = stepfunctions.StateMachine(self, "MyStateMachine",
16014
+ state_machine_type=stepfunctions.StateMachineType.EXPRESS,
16015
+ definition=stepfunctions.Chain.start(stepfunctions.Pass(self, "Pass"))
15656
16016
  )
15657
16017
 
15658
- # Include the state machine in a Task state with callback pattern
15659
- task = tasks.StepFunctionsStartExecution(self, "ChildTask",
15660
- state_machine=child,
15661
- integration_pattern=sfn.IntegrationPattern.WAIT_FOR_TASK_TOKEN,
15662
- input=sfn.TaskInput.from_object({
15663
- "token": sfn.JsonPath.task_token,
15664
- "foo": "bar"
15665
- }),
15666
- name="MyExecutionName"
15667
- )
15668
-
15669
- # Define a second state machine with the Task state above
15670
- sfn.StateMachine(self, "ParentStateMachine",
15671
- definition=task
16018
+ api = apigateway.RestApi(self, "Api",
16019
+ rest_api_name="MyApi"
15672
16020
  )
16021
+ api.root.add_method("GET", apigateway.StepFunctionsIntegration.start_execution(state_machine))
15673
16022
  '''
15674
16023
 
15675
16024
  def __init__(
@@ -15740,6 +16089,7 @@ class Pass(
15740
16089
  jsii_struct_bases=[S3FileItemReaderProps],
15741
16090
  name_mapping={
15742
16091
  "bucket": "bucket",
16092
+ "bucket_name_path": "bucketNamePath",
15743
16093
  "max_items": "maxItems",
15744
16094
  "key": "key",
15745
16095
  "csv_headers": "csvHeaders",
@@ -15749,14 +16099,16 @@ class S3CsvItemReaderProps(S3FileItemReaderProps):
15749
16099
  def __init__(
15750
16100
  self,
15751
16101
  *,
15752
- bucket: _IBucket_42e086fd,
16102
+ bucket: typing.Optional[_IBucket_42e086fd] = None,
16103
+ bucket_name_path: typing.Optional[builtins.str] = None,
15753
16104
  max_items: typing.Optional[jsii.Number] = None,
15754
16105
  key: builtins.str,
15755
16106
  csv_headers: typing.Optional[CsvHeaders] = None,
15756
16107
  ) -> None:
15757
16108
  '''Properties for configuring an Item Reader that iterates over items in a CSV file in S3.
15758
16109
 
15759
- :param bucket: S3 Bucket containing objects to iterate over or a file with a list to iterate over.
16110
+ :param bucket: S3 Bucket containing objects to iterate over or a file with a list to iterate over. Default: - S3 bucket will be determined from
16111
+ :param bucket_name_path: S3 bucket name containing objects to iterate over or a file with a list to iterate over, as JsonPath. Default: - S3 bucket will be determined from
15760
16112
  :param max_items: Limits the number of items passed to the Distributed Map state. Default: - Distributed Map state will iterate over all items provided by the ItemReader
15761
16113
  :param key: Key of file stored in S3 bucket containing an array to iterate over.
15762
16114
  :param csv_headers: CSV file header configuration. Default: - CsvHeaders with CsvHeadersLocation.FIRST_ROW
@@ -15774,10 +16126,11 @@ class S3CsvItemReaderProps(S3FileItemReaderProps):
15774
16126
  # csv_headers: stepfunctions.CsvHeaders
15775
16127
 
15776
16128
  s3_csv_item_reader_props = stepfunctions.S3CsvItemReaderProps(
15777
- bucket=bucket,
15778
16129
  key="key",
15779
16130
 
15780
16131
  # the properties below are optional
16132
+ bucket=bucket,
16133
+ bucket_name_path="bucketNamePath",
15781
16134
  csv_headers=csv_headers,
15782
16135
  max_items=123
15783
16136
  )
@@ -15785,24 +16138,43 @@ class S3CsvItemReaderProps(S3FileItemReaderProps):
15785
16138
  if __debug__:
15786
16139
  type_hints = typing.get_type_hints(_typecheckingstub__fd148cd8282abe643b20452cf3c099e0d66560a90ddb7ec54f83740859fe615d)
15787
16140
  check_type(argname="argument bucket", value=bucket, expected_type=type_hints["bucket"])
16141
+ check_type(argname="argument bucket_name_path", value=bucket_name_path, expected_type=type_hints["bucket_name_path"])
15788
16142
  check_type(argname="argument max_items", value=max_items, expected_type=type_hints["max_items"])
15789
16143
  check_type(argname="argument key", value=key, expected_type=type_hints["key"])
15790
16144
  check_type(argname="argument csv_headers", value=csv_headers, expected_type=type_hints["csv_headers"])
15791
16145
  self._values: typing.Dict[builtins.str, typing.Any] = {
15792
- "bucket": bucket,
15793
16146
  "key": key,
15794
16147
  }
16148
+ if bucket is not None:
16149
+ self._values["bucket"] = bucket
16150
+ if bucket_name_path is not None:
16151
+ self._values["bucket_name_path"] = bucket_name_path
15795
16152
  if max_items is not None:
15796
16153
  self._values["max_items"] = max_items
15797
16154
  if csv_headers is not None:
15798
16155
  self._values["csv_headers"] = csv_headers
15799
16156
 
15800
16157
  @builtins.property
15801
- def bucket(self) -> _IBucket_42e086fd:
15802
- '''S3 Bucket containing objects to iterate over or a file with a list to iterate over.'''
16158
+ def bucket(self) -> typing.Optional[_IBucket_42e086fd]:
16159
+ '''S3 Bucket containing objects to iterate over or a file with a list to iterate over.
16160
+
16161
+ :default: - S3 bucket will be determined from
16162
+
16163
+ :see: bucketNamePath
16164
+ '''
15803
16165
  result = self._values.get("bucket")
15804
- assert result is not None, "Required property 'bucket' is missing"
15805
- return typing.cast(_IBucket_42e086fd, result)
16166
+ return typing.cast(typing.Optional[_IBucket_42e086fd], result)
16167
+
16168
+ @builtins.property
16169
+ def bucket_name_path(self) -> typing.Optional[builtins.str]:
16170
+ '''S3 bucket name containing objects to iterate over or a file with a list to iterate over, as JsonPath.
16171
+
16172
+ :default: - S3 bucket will be determined from
16173
+
16174
+ :see: bucket
16175
+ '''
16176
+ result = self._values.get("bucket_name_path")
16177
+ return typing.cast(typing.Optional[builtins.str], result)
15806
16178
 
15807
16179
  @builtins.property
15808
16180
  def max_items(self) -> typing.Optional[jsii.Number]:
@@ -15863,14 +16235,11 @@ class DistributedMap(
15863
16235
 
15864
16236
  Example::
15865
16237
 
15866
- distributed_map = sfn.DistributedMap(self, "DistributedMap",
15867
- map_execution_type=sfn.StateMachineType.EXPRESS
15868
- )
15869
-
15870
- distributed_map.item_processor(sfn.Pass(self, "Pass"),
15871
- mode=sfn.ProcessorMode.DISTRIBUTED,
15872
- execution_type=sfn.ProcessorType.STANDARD
16238
+ distributed_map = sfn.DistributedMap(self, "Distributed Map State",
16239
+ max_concurrency=1,
16240
+ items_path=sfn.JsonPath.string_at("$.inputForMap")
15873
16241
  )
16242
+ distributed_map.item_processor(sfn.Pass(self, "Pass State"))
15874
16243
  '''
15875
16244
 
15876
16245
  def __init__(
@@ -17303,7 +17672,8 @@ def _typecheckingstub__28b90617c58a85778754752511df05551643031e0ec1d9e5687a61bed
17303
17672
 
17304
17673
  def _typecheckingstub__e8df53cde2f82ea6228f0c9a5a5ba0a4dd36c18fba9835f9f3150547f7cee754(
17305
17674
  *,
17306
- bucket: _IBucket_42e086fd,
17675
+ bucket: typing.Optional[_IBucket_42e086fd] = None,
17676
+ bucket_name_path: typing.Optional[builtins.str] = None,
17307
17677
  max_items: typing.Optional[jsii.Number] = None,
17308
17678
  ) -> None:
17309
17679
  """Type checking stubs"""
@@ -17585,7 +17955,8 @@ def _typecheckingstub__984afa5a2055f0c35fc8c3cf6882093d3a32a8b56c725bd4e3c643f69
17585
17955
 
17586
17956
  def _typecheckingstub__fc17fd96c577f0b5f18e9d0043337043a5db7cf7c35fdc1b09e959cf7f58221c(
17587
17957
  *,
17588
- bucket: _IBucket_42e086fd,
17958
+ bucket: typing.Optional[_IBucket_42e086fd] = None,
17959
+ bucket_name_path: typing.Optional[builtins.str] = None,
17589
17960
  max_items: typing.Optional[jsii.Number] = None,
17590
17961
  key: builtins.str,
17591
17962
  ) -> None:
@@ -17594,7 +17965,8 @@ def _typecheckingstub__fc17fd96c577f0b5f18e9d0043337043a5db7cf7c35fdc1b09e959cf7
17594
17965
 
17595
17966
  def _typecheckingstub__0839027a57f578b6a339286602923b0024b1f5e10dc2fb3ce8ac185f643a3bbc(
17596
17967
  *,
17597
- bucket: _IBucket_42e086fd,
17968
+ bucket: typing.Optional[_IBucket_42e086fd] = None,
17969
+ bucket_name_path: typing.Optional[builtins.str] = None,
17598
17970
  max_items: typing.Optional[jsii.Number] = None,
17599
17971
  prefix: typing.Optional[builtins.str] = None,
17600
17972
  ) -> None:
@@ -18446,7 +18818,8 @@ def _typecheckingstub__f4f3a4b985638e018cf9da160ea401084953cf6a22e9ff97cb9b82310
18446
18818
 
18447
18819
  def _typecheckingstub__fd148cd8282abe643b20452cf3c099e0d66560a90ddb7ec54f83740859fe615d(
18448
18820
  *,
18449
- bucket: _IBucket_42e086fd,
18821
+ bucket: typing.Optional[_IBucket_42e086fd] = None,
18822
+ bucket_name_path: typing.Optional[builtins.str] = None,
18450
18823
  max_items: typing.Optional[jsii.Number] = None,
18451
18824
  key: builtins.str,
18452
18825
  csv_headers: typing.Optional[CsvHeaders] = None,