aws-cdk-lib 2.115.0__py3-none-any.whl → 2.116.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.
- aws_cdk/__init__.py +801 -356
- aws_cdk/_jsii/__init__.py +1 -1
- aws_cdk/_jsii/{aws-cdk-lib@2.115.0.jsii.tgz → aws-cdk-lib@2.116.1.jsii.tgz} +0 -0
- aws_cdk/aws_apigateway/__init__.py +3 -1
- aws_cdk/aws_apigatewayv2/__init__.py +595 -222
- aws_cdk/aws_apigatewayv2_integrations/__init__.py +4 -5
- aws_cdk/aws_applicationautoscaling/__init__.py +51 -15
- aws_cdk/aws_appsync/__init__.py +14 -3
- aws_cdk/aws_autoscaling/__init__.py +6 -0
- aws_cdk/aws_b2bi/__init__.py +2445 -0
- aws_cdk/aws_cloud9/__init__.py +63 -63
- aws_cdk/aws_cloudfront/__init__.py +394 -0
- aws_cdk/aws_cloudfront/experimental/__init__.py +5 -2
- aws_cdk/aws_cloudtrail/__init__.py +90 -11
- aws_cdk/aws_cloudwatch/__init__.py +6 -6
- aws_cdk/aws_codedeploy/__init__.py +88 -15
- aws_cdk/aws_codepipeline/__init__.py +645 -0
- aws_cdk/aws_cognito/__init__.py +13 -26
- aws_cdk/aws_config/__init__.py +315 -1
- aws_cdk/aws_connect/__init__.py +532 -37
- aws_cdk/aws_controltower/__init__.py +4 -4
- aws_cdk/aws_datasync/__init__.py +6 -4
- aws_cdk/aws_dms/__init__.py +241 -131
- aws_cdk/aws_dynamodb/__init__.py +8 -0
- aws_cdk/aws_ec2/__init__.py +1030 -45
- aws_cdk/aws_ecr/__init__.py +78 -10
- aws_cdk/aws_ecs/__init__.py +210 -2
- aws_cdk/aws_ecs_patterns/__init__.py +77 -62
- aws_cdk/aws_eks/__init__.py +8 -1
- aws_cdk/aws_elasticache/__init__.py +136 -10
- aws_cdk/aws_elasticloadbalancingv2/__init__.py +10 -13
- aws_cdk/aws_emr/__init__.py +234 -17
- aws_cdk/aws_eventschemas/__init__.py +15 -13
- aws_cdk/aws_fis/__init__.py +33 -13
- aws_cdk/aws_gamelift/__init__.py +47 -0
- aws_cdk/aws_imagebuilder/__init__.py +922 -84
- aws_cdk/aws_internetmonitor/__init__.py +12 -10
- aws_cdk/aws_iot/__init__.py +26 -46
- aws_cdk/aws_iottwinmaker/__init__.py +36 -34
- aws_cdk/aws_lambda/__init__.py +19 -15
- aws_cdk/aws_lambda_nodejs/__init__.py +5 -2
- aws_cdk/aws_logs/__init__.py +6 -6
- aws_cdk/aws_opensearchservice/__init__.py +5 -3
- aws_cdk/aws_organizations/__init__.py +3 -3
- aws_cdk/aws_osis/__init__.py +17 -13
- aws_cdk/aws_rds/__init__.py +6 -0
- aws_cdk/aws_s3/__init__.py +4 -2
- aws_cdk/aws_s3outposts/__init__.py +8 -8
- aws_cdk/aws_sagemaker/__init__.py +17 -94
- aws_cdk/aws_secretsmanager/__init__.py +9 -7
- aws_cdk/aws_securityhub/__init__.py +18 -0
- aws_cdk/aws_servicecatalogappregistry/__init__.py +31 -0
- aws_cdk/aws_ses/__init__.py +58 -11
- aws_cdk/aws_sns/__init__.py +309 -10
- aws_cdk/aws_ssm/__init__.py +3 -5
- aws_cdk/aws_stepfunctions/__init__.py +335 -19
- aws_cdk/aws_stepfunctions_tasks/__init__.py +388 -38
- aws_cdk/aws_transfer/__init__.py +37 -10
- aws_cdk/custom_resources/__init__.py +443 -1
- aws_cdk/triggers/__init__.py +5 -2
- {aws_cdk_lib-2.115.0.dist-info → aws_cdk_lib-2.116.1.dist-info}/METADATA +1 -1
- {aws_cdk_lib-2.115.0.dist-info → aws_cdk_lib-2.116.1.dist-info}/RECORD +66 -65
- {aws_cdk_lib-2.115.0.dist-info → aws_cdk_lib-2.116.1.dist-info}/LICENSE +0 -0
- {aws_cdk_lib-2.115.0.dist-info → aws_cdk_lib-2.116.1.dist-info}/NOTICE +0 -0
- {aws_cdk_lib-2.115.0.dist-info → aws_cdk_lib-2.116.1.dist-info}/WHEEL +0 -0
- {aws_cdk_lib-2.115.0.dist-info → aws_cdk_lib-2.116.1.dist-info}/top_level.txt +0 -0
|
@@ -504,9 +504,30 @@ finish = sfn.Pass(self, "Finish")
|
|
|
504
504
|
|
|
505
505
|
definition = choice.when(condition1, step1).otherwise(step2).afterwards().next(finish)
|
|
506
506
|
|
|
507
|
-
map.
|
|
507
|
+
map.item_processor(definition)
|
|
508
508
|
```
|
|
509
509
|
|
|
510
|
+
To define a distributed `Map` state set `itemProcessors` mode to `ProcessorMode.DISTRIBUTED`.
|
|
511
|
+
An `executionType` must be specified for the distributed `Map` workflow.
|
|
512
|
+
|
|
513
|
+
```python
|
|
514
|
+
map = sfn.Map(self, "Map State",
|
|
515
|
+
max_concurrency=1,
|
|
516
|
+
items_path=sfn.JsonPath.string_at("$.inputForMap"),
|
|
517
|
+
parameters={
|
|
518
|
+
"item": sfn.JsonPath.string_at("$.Map.Item.Value")
|
|
519
|
+
},
|
|
520
|
+
result_path="$.mapOutput"
|
|
521
|
+
)
|
|
522
|
+
|
|
523
|
+
map.item_processor(sfn.Pass(self, "Pass State"),
|
|
524
|
+
mode=sfn.ProcessorMode.DISTRIBUTED,
|
|
525
|
+
execution_type=sfn.ProcessorType.STANDARD
|
|
526
|
+
)
|
|
527
|
+
```
|
|
528
|
+
|
|
529
|
+
> Visit [Using Map state in Distributed mode to orchestrate large-scale parallel workloads](https://docs.aws.amazon.com/step-functions/latest/dg/use-dist-map-orchestrate-large-scale-parallel-workloads.html) for more details.
|
|
530
|
+
|
|
510
531
|
### Custom State
|
|
511
532
|
|
|
512
533
|
It's possible that the high-level constructs for the states or `stepfunctions-tasks` do not have
|
|
@@ -564,6 +585,10 @@ custom = sfn.CustomState(self, "my custom task",
|
|
|
564
585
|
state_json=state_json
|
|
565
586
|
)
|
|
566
587
|
|
|
588
|
+
# catch errors with addCatch
|
|
589
|
+
error_handler = sfn.Pass(self, "handle failure")
|
|
590
|
+
custom.add_catch(error_handler)
|
|
591
|
+
|
|
567
592
|
chain = sfn.Chain.start(custom).next(final_status)
|
|
568
593
|
|
|
569
594
|
sm = sfn.StateMachine(self, "StateMachine",
|
|
@@ -3554,7 +3579,7 @@ class Condition(
|
|
|
3554
3579
|
|
|
3555
3580
|
definition = choice.when(condition1, step1).otherwise(step2).afterwards().next(finish)
|
|
3556
3581
|
|
|
3557
|
-
map.
|
|
3582
|
+
map.item_processor(definition)
|
|
3558
3583
|
'''
|
|
3559
3584
|
|
|
3560
3585
|
def __init__(self) -> None:
|
|
@@ -4448,6 +4473,10 @@ class CustomStateProps:
|
|
|
4448
4473
|
state_json=state_json
|
|
4449
4474
|
)
|
|
4450
4475
|
|
|
4476
|
+
# catch errors with addCatch
|
|
4477
|
+
error_handler = sfn.Pass(self, "handle failure")
|
|
4478
|
+
custom.add_catch(error_handler)
|
|
4479
|
+
|
|
4451
4480
|
chain = sfn.Chain.start(custom).next(final_status)
|
|
4452
4481
|
|
|
4453
4482
|
sm = sfn.StateMachine(self, "StateMachine",
|
|
@@ -6180,18 +6209,13 @@ class JsonPath(
|
|
|
6180
6209
|
|
|
6181
6210
|
Example::
|
|
6182
6211
|
|
|
6183
|
-
|
|
6184
|
-
|
|
6185
|
-
|
|
6186
|
-
|
|
6187
|
-
|
|
6188
|
-
"
|
|
6189
|
-
|
|
6190
|
-
"size": sfn.JsonPath.string_at("$.product.details.size"),
|
|
6191
|
-
"exists": sfn.JsonPath.string_at("$.product.availability"),
|
|
6192
|
-
"StaticValue": "foo"
|
|
6193
|
-
}
|
|
6194
|
-
}
|
|
6212
|
+
tasks.SageMakerCreateModel(self, "Sagemaker",
|
|
6213
|
+
model_name="MyModel",
|
|
6214
|
+
primary_container=tasks.ContainerDefinition(
|
|
6215
|
+
image=tasks.DockerImage.from_json_expression(sfn.JsonPath.string_at("$.Model.imageName")),
|
|
6216
|
+
mode=tasks.Mode.SINGLE_MODEL,
|
|
6217
|
+
model_s3_location=tasks.S3Location.from_json_expression("$.TrainingJob.ModelArtifacts.S3ModelArtifacts")
|
|
6218
|
+
)
|
|
6195
6219
|
)
|
|
6196
6220
|
'''
|
|
6197
6221
|
|
|
@@ -6889,7 +6913,7 @@ class MapProps:
|
|
|
6889
6913
|
|
|
6890
6914
|
definition = choice.when(condition1, step1).otherwise(step2).afterwards().next(finish)
|
|
6891
6915
|
|
|
6892
|
-
map.
|
|
6916
|
+
map.item_processor(definition)
|
|
6893
6917
|
'''
|
|
6894
6918
|
if __debug__:
|
|
6895
6919
|
type_hints = typing.get_type_hints(_typecheckingstub__841961f24272e2df479ccf3f591259c5dbc7bf471c2a6e11c7c7d61bf0e153ec)
|
|
@@ -7352,6 +7376,141 @@ class PassProps:
|
|
|
7352
7376
|
)
|
|
7353
7377
|
|
|
7354
7378
|
|
|
7379
|
+
@jsii.data_type(
|
|
7380
|
+
jsii_type="aws-cdk-lib.aws_stepfunctions.ProcessorConfig",
|
|
7381
|
+
jsii_struct_bases=[],
|
|
7382
|
+
name_mapping={"execution_type": "executionType", "mode": "mode"},
|
|
7383
|
+
)
|
|
7384
|
+
class ProcessorConfig:
|
|
7385
|
+
def __init__(
|
|
7386
|
+
self,
|
|
7387
|
+
*,
|
|
7388
|
+
execution_type: typing.Optional["ProcessorType"] = None,
|
|
7389
|
+
mode: typing.Optional["ProcessorMode"] = None,
|
|
7390
|
+
) -> None:
|
|
7391
|
+
'''Specifies the configuration for the processor Map state.
|
|
7392
|
+
|
|
7393
|
+
:param execution_type: Specifies the execution type for the Map workflow. You must provide this field if you specified ``DISTRIBUTED`` for the ``mode`` sub-field. Default: - no execution type
|
|
7394
|
+
:param mode: Specifies the execution mode for the Map workflow. Default: - ProcessorMode.INLINE
|
|
7395
|
+
|
|
7396
|
+
:exampleMetadata: infused
|
|
7397
|
+
|
|
7398
|
+
Example::
|
|
7399
|
+
|
|
7400
|
+
map = sfn.Map(self, "Map State",
|
|
7401
|
+
max_concurrency=1,
|
|
7402
|
+
items_path=sfn.JsonPath.string_at("$.inputForMap"),
|
|
7403
|
+
parameters={
|
|
7404
|
+
"item": sfn.JsonPath.string_at("$.Map.Item.Value")
|
|
7405
|
+
},
|
|
7406
|
+
result_path="$.mapOutput"
|
|
7407
|
+
)
|
|
7408
|
+
|
|
7409
|
+
map.item_processor(sfn.Pass(self, "Pass State"),
|
|
7410
|
+
mode=sfn.ProcessorMode.DISTRIBUTED,
|
|
7411
|
+
execution_type=sfn.ProcessorType.STANDARD
|
|
7412
|
+
)
|
|
7413
|
+
'''
|
|
7414
|
+
if __debug__:
|
|
7415
|
+
type_hints = typing.get_type_hints(_typecheckingstub__d31ff219914b0d650a3cc1eb8631c77a0fd4affa44a5d994dc200757166b4959)
|
|
7416
|
+
check_type(argname="argument execution_type", value=execution_type, expected_type=type_hints["execution_type"])
|
|
7417
|
+
check_type(argname="argument mode", value=mode, expected_type=type_hints["mode"])
|
|
7418
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {}
|
|
7419
|
+
if execution_type is not None:
|
|
7420
|
+
self._values["execution_type"] = execution_type
|
|
7421
|
+
if mode is not None:
|
|
7422
|
+
self._values["mode"] = mode
|
|
7423
|
+
|
|
7424
|
+
@builtins.property
|
|
7425
|
+
def execution_type(self) -> typing.Optional["ProcessorType"]:
|
|
7426
|
+
'''Specifies the execution type for the Map workflow.
|
|
7427
|
+
|
|
7428
|
+
You must provide this field if you specified ``DISTRIBUTED`` for the ``mode`` sub-field.
|
|
7429
|
+
|
|
7430
|
+
:default: - no execution type
|
|
7431
|
+
'''
|
|
7432
|
+
result = self._values.get("execution_type")
|
|
7433
|
+
return typing.cast(typing.Optional["ProcessorType"], result)
|
|
7434
|
+
|
|
7435
|
+
@builtins.property
|
|
7436
|
+
def mode(self) -> typing.Optional["ProcessorMode"]:
|
|
7437
|
+
'''Specifies the execution mode for the Map workflow.
|
|
7438
|
+
|
|
7439
|
+
:default: - ProcessorMode.INLINE
|
|
7440
|
+
'''
|
|
7441
|
+
result = self._values.get("mode")
|
|
7442
|
+
return typing.cast(typing.Optional["ProcessorMode"], result)
|
|
7443
|
+
|
|
7444
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
7445
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
7446
|
+
|
|
7447
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
7448
|
+
return not (rhs == self)
|
|
7449
|
+
|
|
7450
|
+
def __repr__(self) -> str:
|
|
7451
|
+
return "ProcessorConfig(%s)" % ", ".join(
|
|
7452
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
7453
|
+
)
|
|
7454
|
+
|
|
7455
|
+
|
|
7456
|
+
@jsii.enum(jsii_type="aws-cdk-lib.aws_stepfunctions.ProcessorMode")
|
|
7457
|
+
class ProcessorMode(enum.Enum):
|
|
7458
|
+
'''Mode of the Map workflow.
|
|
7459
|
+
|
|
7460
|
+
:exampleMetadata: infused
|
|
7461
|
+
|
|
7462
|
+
Example::
|
|
7463
|
+
|
|
7464
|
+
map = sfn.Map(self, "Map State",
|
|
7465
|
+
max_concurrency=1,
|
|
7466
|
+
items_path=sfn.JsonPath.string_at("$.inputForMap"),
|
|
7467
|
+
parameters={
|
|
7468
|
+
"item": sfn.JsonPath.string_at("$.Map.Item.Value")
|
|
7469
|
+
},
|
|
7470
|
+
result_path="$.mapOutput"
|
|
7471
|
+
)
|
|
7472
|
+
|
|
7473
|
+
map.item_processor(sfn.Pass(self, "Pass State"),
|
|
7474
|
+
mode=sfn.ProcessorMode.DISTRIBUTED,
|
|
7475
|
+
execution_type=sfn.ProcessorType.STANDARD
|
|
7476
|
+
)
|
|
7477
|
+
'''
|
|
7478
|
+
|
|
7479
|
+
INLINE = "INLINE"
|
|
7480
|
+
'''Inline Map mode.'''
|
|
7481
|
+
DISTRIBUTED = "DISTRIBUTED"
|
|
7482
|
+
'''Distributed Map mode.'''
|
|
7483
|
+
|
|
7484
|
+
|
|
7485
|
+
@jsii.enum(jsii_type="aws-cdk-lib.aws_stepfunctions.ProcessorType")
|
|
7486
|
+
class ProcessorType(enum.Enum):
|
|
7487
|
+
'''Execution type for the Map workflow.
|
|
7488
|
+
|
|
7489
|
+
:exampleMetadata: infused
|
|
7490
|
+
|
|
7491
|
+
Example::
|
|
7492
|
+
|
|
7493
|
+
map = sfn.Map(self, "Map State",
|
|
7494
|
+
max_concurrency=1,
|
|
7495
|
+
items_path=sfn.JsonPath.string_at("$.inputForMap"),
|
|
7496
|
+
parameters={
|
|
7497
|
+
"item": sfn.JsonPath.string_at("$.Map.Item.Value")
|
|
7498
|
+
},
|
|
7499
|
+
result_path="$.mapOutput"
|
|
7500
|
+
)
|
|
7501
|
+
|
|
7502
|
+
map.item_processor(sfn.Pass(self, "Pass State"),
|
|
7503
|
+
mode=sfn.ProcessorMode.DISTRIBUTED,
|
|
7504
|
+
execution_type=sfn.ProcessorType.STANDARD
|
|
7505
|
+
)
|
|
7506
|
+
'''
|
|
7507
|
+
|
|
7508
|
+
STANDARD = "STANDARD"
|
|
7509
|
+
'''Standard execution type.'''
|
|
7510
|
+
EXPRESS = "EXPRESS"
|
|
7511
|
+
'''Express execution type.'''
|
|
7512
|
+
|
|
7513
|
+
|
|
7355
7514
|
class Result(metaclass=jsii.JSIIMeta, jsii_type="aws-cdk-lib.aws_stepfunctions.Result"):
|
|
7356
7515
|
'''The result of a Pass operation.
|
|
7357
7516
|
|
|
@@ -7967,6 +8126,27 @@ class State(
|
|
|
7967
8126
|
|
|
7968
8127
|
return typing.cast(None, jsii.invoke(self, "addChoice", [condition, next, options]))
|
|
7969
8128
|
|
|
8129
|
+
@jsii.member(jsii_name="addItemProcessor")
|
|
8130
|
+
def _add_item_processor(
|
|
8131
|
+
self,
|
|
8132
|
+
processor: "StateGraph",
|
|
8133
|
+
*,
|
|
8134
|
+
execution_type: typing.Optional[ProcessorType] = None,
|
|
8135
|
+
mode: typing.Optional[ProcessorMode] = None,
|
|
8136
|
+
) -> None:
|
|
8137
|
+
'''Add a item processor to this state.
|
|
8138
|
+
|
|
8139
|
+
:param processor: -
|
|
8140
|
+
:param execution_type: Specifies the execution type for the Map workflow. You must provide this field if you specified ``DISTRIBUTED`` for the ``mode`` sub-field. Default: - no execution type
|
|
8141
|
+
:param mode: Specifies the execution mode for the Map workflow. Default: - ProcessorMode.INLINE
|
|
8142
|
+
'''
|
|
8143
|
+
if __debug__:
|
|
8144
|
+
type_hints = typing.get_type_hints(_typecheckingstub__5de90784fdeaa0fa9de5d18b85a161ebed718ee0e26df2989a66073001fcb12d)
|
|
8145
|
+
check_type(argname="argument processor", value=processor, expected_type=type_hints["processor"])
|
|
8146
|
+
config = ProcessorConfig(execution_type=execution_type, mode=mode)
|
|
8147
|
+
|
|
8148
|
+
return typing.cast(None, jsii.invoke(self, "addItemProcessor", [processor, config]))
|
|
8149
|
+
|
|
7970
8150
|
@jsii.member(jsii_name="addIterator")
|
|
7971
8151
|
def _add_iterator(self, iteration: "StateGraph") -> None:
|
|
7972
8152
|
'''Add a map iterator to this state.
|
|
@@ -8040,6 +8220,11 @@ class State(
|
|
|
8040
8220
|
'''Render InputPath/Parameters/OutputPath in ASL JSON format.'''
|
|
8041
8221
|
return typing.cast(typing.Any, jsii.invoke(self, "renderInputOutput", []))
|
|
8042
8222
|
|
|
8223
|
+
@jsii.member(jsii_name="renderItemProcessor")
|
|
8224
|
+
def _render_item_processor(self) -> typing.Any:
|
|
8225
|
+
'''Render ItemProcessor in ASL JSON format.'''
|
|
8226
|
+
return typing.cast(typing.Any, jsii.invoke(self, "renderItemProcessor", []))
|
|
8227
|
+
|
|
8043
8228
|
@jsii.member(jsii_name="renderIterator")
|
|
8044
8229
|
def _render_iterator(self) -> typing.Any:
|
|
8045
8230
|
'''Render map iterator in ASL JSON format.'''
|
|
@@ -8175,6 +8360,30 @@ class State(
|
|
|
8175
8360
|
check_type(argname="argument value", value=value, expected_type=type_hints["value"])
|
|
8176
8361
|
jsii.set(self, "iteration", value)
|
|
8177
8362
|
|
|
8363
|
+
@builtins.property
|
|
8364
|
+
@jsii.member(jsii_name="processor")
|
|
8365
|
+
def _processor(self) -> typing.Optional["StateGraph"]:
|
|
8366
|
+
return typing.cast(typing.Optional["StateGraph"], jsii.get(self, "processor"))
|
|
8367
|
+
|
|
8368
|
+
@_processor.setter
|
|
8369
|
+
def _processor(self, value: typing.Optional["StateGraph"]) -> None:
|
|
8370
|
+
if __debug__:
|
|
8371
|
+
type_hints = typing.get_type_hints(_typecheckingstub__18c6226d92e32b97a3bd2c7822b52c85358b3bd9174c0fcf373dcb3292508540)
|
|
8372
|
+
check_type(argname="argument value", value=value, expected_type=type_hints["value"])
|
|
8373
|
+
jsii.set(self, "processor", value)
|
|
8374
|
+
|
|
8375
|
+
@builtins.property
|
|
8376
|
+
@jsii.member(jsii_name="processorConfig")
|
|
8377
|
+
def _processor_config(self) -> typing.Optional[ProcessorConfig]:
|
|
8378
|
+
return typing.cast(typing.Optional[ProcessorConfig], jsii.get(self, "processorConfig"))
|
|
8379
|
+
|
|
8380
|
+
@_processor_config.setter
|
|
8381
|
+
def _processor_config(self, value: typing.Optional[ProcessorConfig]) -> None:
|
|
8382
|
+
if __debug__:
|
|
8383
|
+
type_hints = typing.get_type_hints(_typecheckingstub__2064eb72a766ce7c2f9e0be9e43dd6ea46736ba5dd83721de5468681035dcb9f)
|
|
8384
|
+
check_type(argname="argument value", value=value, expected_type=type_hints["value"])
|
|
8385
|
+
jsii.set(self, "processorConfig", value)
|
|
8386
|
+
|
|
8178
8387
|
|
|
8179
8388
|
class _StateProxy(State):
|
|
8180
8389
|
@jsii.member(jsii_name="toStateJson")
|
|
@@ -12036,7 +12245,7 @@ class Chain(metaclass=jsii.JSIIMeta, jsii_type="aws-cdk-lib.aws_stepfunctions.Ch
|
|
|
12036
12245
|
|
|
12037
12246
|
definition = choice.when(condition1, step1).otherwise(step2).afterwards().next(finish)
|
|
12038
12247
|
|
|
12039
|
-
map.
|
|
12248
|
+
map.item_processor(definition)
|
|
12040
12249
|
'''
|
|
12041
12250
|
|
|
12042
12251
|
@jsii.member(jsii_name="custom")
|
|
@@ -12279,7 +12488,7 @@ class Choice(
|
|
|
12279
12488
|
|
|
12280
12489
|
definition = choice.when(condition1, step1).otherwise(step2).afterwards().next(finish)
|
|
12281
12490
|
|
|
12282
|
-
map.
|
|
12491
|
+
map.item_processor(definition)
|
|
12283
12492
|
'''
|
|
12284
12493
|
|
|
12285
12494
|
def __init__(
|
|
@@ -12428,6 +12637,10 @@ class CustomState(
|
|
|
12428
12637
|
state_json=state_json
|
|
12429
12638
|
)
|
|
12430
12639
|
|
|
12640
|
+
# catch errors with addCatch
|
|
12641
|
+
error_handler = sfn.Pass(self, "handle failure")
|
|
12642
|
+
custom.add_catch(error_handler)
|
|
12643
|
+
|
|
12431
12644
|
chain = sfn.Chain.start(custom).next(final_status)
|
|
12432
12645
|
|
|
12433
12646
|
sm = sfn.StateMachine(self, "StateMachine",
|
|
@@ -12460,6 +12673,30 @@ class CustomState(
|
|
|
12460
12673
|
|
|
12461
12674
|
jsii.create(self.__class__, self, [scope, id, props])
|
|
12462
12675
|
|
|
12676
|
+
@jsii.member(jsii_name="addCatch")
|
|
12677
|
+
def add_catch(
|
|
12678
|
+
self,
|
|
12679
|
+
handler: IChainable,
|
|
12680
|
+
*,
|
|
12681
|
+
errors: typing.Optional[typing.Sequence[builtins.str]] = None,
|
|
12682
|
+
result_path: typing.Optional[builtins.str] = None,
|
|
12683
|
+
) -> "CustomState":
|
|
12684
|
+
'''Add a recovery handler for this state.
|
|
12685
|
+
|
|
12686
|
+
When a particular error occurs, execution will continue at the error
|
|
12687
|
+
handler instead of failing the state machine execution.
|
|
12688
|
+
|
|
12689
|
+
:param handler: -
|
|
12690
|
+
:param errors: Errors to recover from by going to the given state. A list of error strings to retry, which can be either predefined errors (for example Errors.NoChoiceMatched) or a self-defined error. Default: All errors
|
|
12691
|
+
:param result_path: JSONPath expression to indicate where to inject the error data. May also be the special value JsonPath.DISCARD, which will cause the error data to be discarded. Default: $
|
|
12692
|
+
'''
|
|
12693
|
+
if __debug__:
|
|
12694
|
+
type_hints = typing.get_type_hints(_typecheckingstub__af51c0590f129eeca0846aafaf90162dc24f8f5c4a9df58d88432f4facb4ff08)
|
|
12695
|
+
check_type(argname="argument handler", value=handler, expected_type=type_hints["handler"])
|
|
12696
|
+
props = CatchProps(errors=errors, result_path=result_path)
|
|
12697
|
+
|
|
12698
|
+
return typing.cast("CustomState", jsii.invoke(self, "addCatch", [handler, props]))
|
|
12699
|
+
|
|
12463
12700
|
@jsii.member(jsii_name="next")
|
|
12464
12701
|
def next(self, next: IChainable) -> Chain:
|
|
12465
12702
|
'''Continue normal execution with the given state.
|
|
@@ -12589,7 +12826,7 @@ class Map(
|
|
|
12589
12826
|
|
|
12590
12827
|
definition = choice.when(condition1, step1).otherwise(step2).afterwards().next(finish)
|
|
12591
12828
|
|
|
12592
|
-
map.
|
|
12829
|
+
map.item_processor(definition)
|
|
12593
12830
|
'''
|
|
12594
12831
|
|
|
12595
12832
|
def __init__(
|
|
@@ -12696,11 +12933,40 @@ class Map(
|
|
|
12696
12933
|
|
|
12697
12934
|
return typing.cast("Map", jsii.invoke(self, "addRetry", [props]))
|
|
12698
12935
|
|
|
12936
|
+
@jsii.member(jsii_name="itemProcessor")
|
|
12937
|
+
def item_processor(
|
|
12938
|
+
self,
|
|
12939
|
+
processor: IChainable,
|
|
12940
|
+
*,
|
|
12941
|
+
execution_type: typing.Optional[ProcessorType] = None,
|
|
12942
|
+
mode: typing.Optional[ProcessorMode] = None,
|
|
12943
|
+
) -> "Map":
|
|
12944
|
+
'''Define item processor in Map.
|
|
12945
|
+
|
|
12946
|
+
A Map must either have a non-empty iterator or a non-empty item processor, not both.
|
|
12947
|
+
|
|
12948
|
+
:param processor: -
|
|
12949
|
+
:param execution_type: Specifies the execution type for the Map workflow. You must provide this field if you specified ``DISTRIBUTED`` for the ``mode`` sub-field. Default: - no execution type
|
|
12950
|
+
:param mode: Specifies the execution mode for the Map workflow. Default: - ProcessorMode.INLINE
|
|
12951
|
+
'''
|
|
12952
|
+
if __debug__:
|
|
12953
|
+
type_hints = typing.get_type_hints(_typecheckingstub__57880144217f818052832dac038a8875120f8ef30f1d286864bba6785bb1afd5)
|
|
12954
|
+
check_type(argname="argument processor", value=processor, expected_type=type_hints["processor"])
|
|
12955
|
+
config = ProcessorConfig(execution_type=execution_type, mode=mode)
|
|
12956
|
+
|
|
12957
|
+
return typing.cast("Map", jsii.invoke(self, "itemProcessor", [processor, config]))
|
|
12958
|
+
|
|
12699
12959
|
@jsii.member(jsii_name="iterator")
|
|
12700
12960
|
def iterator(self, iterator: IChainable) -> "Map":
|
|
12701
|
-
'''Define iterator state machine in Map.
|
|
12961
|
+
'''(deprecated) Define iterator state machine in Map.
|
|
12962
|
+
|
|
12963
|
+
A Map must either have a non-empty iterator or a non-empty item processor, not both.
|
|
12702
12964
|
|
|
12703
12965
|
:param iterator: -
|
|
12966
|
+
|
|
12967
|
+
:deprecated: - use ``itemProcessor`` instead.
|
|
12968
|
+
|
|
12969
|
+
:stability: deprecated
|
|
12704
12970
|
'''
|
|
12705
12971
|
if __debug__:
|
|
12706
12972
|
type_hints = typing.get_type_hints(_typecheckingstub__46bf9177a387f4dcf5be0d20783b744edaca8974e7384b16a446321cc3bc65aa)
|
|
@@ -13060,6 +13326,9 @@ __all__ = [
|
|
|
13060
13326
|
"ParallelProps",
|
|
13061
13327
|
"Pass",
|
|
13062
13328
|
"PassProps",
|
|
13329
|
+
"ProcessorConfig",
|
|
13330
|
+
"ProcessorMode",
|
|
13331
|
+
"ProcessorType",
|
|
13063
13332
|
"Result",
|
|
13064
13333
|
"RetryProps",
|
|
13065
13334
|
"ServiceIntegrationPattern",
|
|
@@ -14170,6 +14439,14 @@ def _typecheckingstub__45d80da5dbca7702d56f2a0dd67c4a5a72e182c08bcd852d74ea0fa21
|
|
|
14170
14439
|
"""Type checking stubs"""
|
|
14171
14440
|
pass
|
|
14172
14441
|
|
|
14442
|
+
def _typecheckingstub__d31ff219914b0d650a3cc1eb8631c77a0fd4affa44a5d994dc200757166b4959(
|
|
14443
|
+
*,
|
|
14444
|
+
execution_type: typing.Optional[ProcessorType] = None,
|
|
14445
|
+
mode: typing.Optional[ProcessorMode] = None,
|
|
14446
|
+
) -> None:
|
|
14447
|
+
"""Type checking stubs"""
|
|
14448
|
+
pass
|
|
14449
|
+
|
|
14173
14450
|
def _typecheckingstub__03617b4630db9dcdb093cf33053ff1c356d21c05e74b38ea8811464bc3fd24b4(
|
|
14174
14451
|
value: typing.Any,
|
|
14175
14452
|
) -> None:
|
|
@@ -14291,6 +14568,15 @@ def _typecheckingstub__df2c90f3de37dcdaf38ae6a3e70460c7cdfd78a154847df351088cd8a
|
|
|
14291
14568
|
"""Type checking stubs"""
|
|
14292
14569
|
pass
|
|
14293
14570
|
|
|
14571
|
+
def _typecheckingstub__5de90784fdeaa0fa9de5d18b85a161ebed718ee0e26df2989a66073001fcb12d(
|
|
14572
|
+
processor: StateGraph,
|
|
14573
|
+
*,
|
|
14574
|
+
execution_type: typing.Optional[ProcessorType] = None,
|
|
14575
|
+
mode: typing.Optional[ProcessorMode] = None,
|
|
14576
|
+
) -> None:
|
|
14577
|
+
"""Type checking stubs"""
|
|
14578
|
+
pass
|
|
14579
|
+
|
|
14294
14580
|
def _typecheckingstub__5562e3f75801d7a93e7b5728bae35a75af70b818bb2fc8dcd8e5aa13d0766eb9(
|
|
14295
14581
|
iteration: StateGraph,
|
|
14296
14582
|
) -> None:
|
|
@@ -14339,6 +14625,18 @@ def _typecheckingstub__fe26ac05d39997cba9f0b774e8732e0d7e33aa2715be53c5d2b674663
|
|
|
14339
14625
|
"""Type checking stubs"""
|
|
14340
14626
|
pass
|
|
14341
14627
|
|
|
14628
|
+
def _typecheckingstub__18c6226d92e32b97a3bd2c7822b52c85358b3bd9174c0fcf373dcb3292508540(
|
|
14629
|
+
value: typing.Optional[StateGraph],
|
|
14630
|
+
) -> None:
|
|
14631
|
+
"""Type checking stubs"""
|
|
14632
|
+
pass
|
|
14633
|
+
|
|
14634
|
+
def _typecheckingstub__2064eb72a766ce7c2f9e0be9e43dd6ea46736ba5dd83721de5468681035dcb9f(
|
|
14635
|
+
value: typing.Optional[ProcessorConfig],
|
|
14636
|
+
) -> None:
|
|
14637
|
+
"""Type checking stubs"""
|
|
14638
|
+
pass
|
|
14639
|
+
|
|
14342
14640
|
def _typecheckingstub__45cc793b7e63b62353e75a13b1efe7e1c03416eb034851d41ac5b855a86cc475(
|
|
14343
14641
|
start_state: State,
|
|
14344
14642
|
graph_description: builtins.str,
|
|
@@ -14898,6 +15196,15 @@ def _typecheckingstub__ab8400575bd03faff673b28e1d5b185298520835ed4e6586fba73ccac
|
|
|
14898
15196
|
"""Type checking stubs"""
|
|
14899
15197
|
pass
|
|
14900
15198
|
|
|
15199
|
+
def _typecheckingstub__af51c0590f129eeca0846aafaf90162dc24f8f5c4a9df58d88432f4facb4ff08(
|
|
15200
|
+
handler: IChainable,
|
|
15201
|
+
*,
|
|
15202
|
+
errors: typing.Optional[typing.Sequence[builtins.str]] = None,
|
|
15203
|
+
result_path: typing.Optional[builtins.str] = None,
|
|
15204
|
+
) -> None:
|
|
15205
|
+
"""Type checking stubs"""
|
|
15206
|
+
pass
|
|
15207
|
+
|
|
14901
15208
|
def _typecheckingstub__c55cf19adb97a87b3d9f8561497d58ec4f0dc221883c0d757f4bec5f4690cadd(
|
|
14902
15209
|
next: IChainable,
|
|
14903
15210
|
) -> None:
|
|
@@ -14944,6 +15251,15 @@ def _typecheckingstub__477e230f69a651e6927594095a0d2d681abd0858db9b79de5caf573bd
|
|
|
14944
15251
|
"""Type checking stubs"""
|
|
14945
15252
|
pass
|
|
14946
15253
|
|
|
15254
|
+
def _typecheckingstub__57880144217f818052832dac038a8875120f8ef30f1d286864bba6785bb1afd5(
|
|
15255
|
+
processor: IChainable,
|
|
15256
|
+
*,
|
|
15257
|
+
execution_type: typing.Optional[ProcessorType] = None,
|
|
15258
|
+
mode: typing.Optional[ProcessorMode] = None,
|
|
15259
|
+
) -> None:
|
|
15260
|
+
"""Type checking stubs"""
|
|
15261
|
+
pass
|
|
15262
|
+
|
|
14947
15263
|
def _typecheckingstub__46bf9177a387f4dcf5be0d20783b744edaca8974e7384b16a446321cc3bc65aa(
|
|
14948
15264
|
iterator: IChainable,
|
|
14949
15265
|
) -> None:
|