You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
minimal amount of code that causes the bug (if possible) or a reference.
19
+
20
+
The code sample should be an SSCCE. See http://sscce.org/ for details.
21
+
In short, provide a code sample that we can copy/paste, run and reproduce.
22
+
-->
23
+
24
+
### What did you expect to happen?
25
+
26
+
<!--
27
+
What were you trying to achieve by performing the steps above?
28
+
-->
29
+
30
+
### What actually happened?
31
+
32
+
<!--
33
+
What is the unexpected behavior you were seeing? If you got an error, paste it here.
34
+
-->
35
+
36
+
37
+
### Environment
38
+
39
+
-**AWS Step Functions Data Science Python SDK version :**
40
+
-**Python Version:**<!-- Version of Python (run the command `python3 --version`) -->
41
+
42
+
### Other
43
+
44
+
<!-- e.g. detailed explanation, stack-traces, related issues, suggestions on how to fix, links for us to have context, eg. associated pull-request, stackoverflow, slack, etc -->
- want to help? submit a pull request! docs can be found here: https://github.com/aws/aws-step-functions-data-science-sdk-python/tree/main/doc
Copy file name to clipboardExpand all lines: src/stepfunctions/steps/states.py
+37-11
Original file line number
Diff line number
Diff line change
@@ -254,27 +254,29 @@ def accept(self, visitor):
254
254
255
255
defadd_retry(self, retry):
256
256
"""
257
-
Add a Retry block to the tail end of the list of retriers for the state.
257
+
Add a retrier or a list of retriers to the tail end of the list of retriers for the state.
258
+
See `Error handling in Step Functions <https://docs.aws.amazon.com/step-functions/latest/dg/concepts-error-handling.html#error-handling-retrying-after-an-error>`_ for more details.
258
259
259
260
Args:
260
-
retry (Retry): Retry block to add.
261
+
retry (Retry or list(Retry)): A retrier or list of retriers to add.
raiseValueError("{state_type} state does not support retry field. ".format(state_type=type(self).__name__))
266
+
raiseValueError(f"{type(self).__name__} state does not support retry field. ")
266
267
267
268
defadd_catch(self, catch):
268
269
"""
269
-
Add a Catch block to the tail end of the list of catchers for the state.
270
+
Add a catcher or a list of catchers to the tail end of the list of catchers for the state.
271
+
See `Error handling in Step Functions <https://docs.aws.amazon.com/step-functions/latest/dg/concepts-error-handling.html#error-handling-fallback-states>`_ for more details.
270
272
271
273
Args:
272
-
catch (Catch): Catch block to add.
274
+
catch (Catch or list(Catch): catcher or list of catchers to add.
raiseValueError("{state_type} state does not support catch field. ".format(state_type=type(self).__name__))
279
+
raiseValueError(f"{type(self).__name__} state does not support catch field. ")
278
280
279
281
defto_dict(self):
280
282
result=super(State, self).to_dict()
@@ -487,10 +489,12 @@ class Parallel(State):
487
489
A Parallel state causes the interpreter to execute each branch as concurrently as possible, and wait until each branch terminates (reaches a terminal state) before processing the next state in the Chain.
state_id (str): State name whose length **must be** less than or equal to 128 unicode characters. State names **must be** unique within the scope of the whole state machine.
496
+
retry (Retry or list(Retry), optional): A retrier or list of retriers that define the state's retry policy. See `Error handling in Step Functions <https://docs.aws.amazon.com/step-functions/latest/dg/concepts-error-handling.html#error-handling-retrying-after-an-error>`_ for more details.
497
+
catch (Catch or list(Catch), optional): A catcher or list of catchers that define a fallback state. See `Error handling in Step Functions <https://docs.aws.amazon.com/step-functions/latest/dg/concepts-error-handling.html#error-handling-fallback-states>`_ for more details.
494
498
comment (str, optional): Human-readable comment or description. (default: None)
495
499
input_path (str, optional): Path applied to the state’s raw input to select some or all of it; that selection is used by the state. (default: '$')
496
500
parameters (dict, optional): The value of this field becomes the effective input for the state.
A Map state can accept an input with a list of items, execute a state or chain for each item in the list, and return a list, with all corresponding results of each execution, as its output.
state_id (str): State name whose length **must be** less than or equal to 128 unicode characters. State names **must be** unique within the scope of the whole state machine.
543
553
iterator (State or Chain): State or chain to execute for each of the items in `items_path`.
554
+
retry (Retry or list(Retry), optional): A retrier or list of retriers that define the state's retry policy. See `Error handling in Step Functions <https://docs.aws.amazon.com/step-functions/latest/dg/concepts-error-handling.html#error-handling-retrying-after-an-error>`_ for more details.
555
+
catch (Catch or list(Catch), optional): A catcher or list of catchers that define a fallback state. See `Error handling in Step Functions <https://docs.aws.amazon.com/step-functions/latest/dg/concepts-error-handling.html#error-handling-fallback-states>`_ for more details.
544
556
items_path (str, optional): Path in the input for items to iterate over. (default: '$')
545
557
max_concurrency (int, optional): Maximum number of iterations to have running at any given point in time. (default: 0)
546
558
comment (str, optional): Human-readable comment or description. (default: None)
Attach `State` or `Chain` as iterator to the Map state, that will execute for each of the items in `items_path`. If an iterator was attached previously with the Map state, it will be replaced.
@@ -586,10 +604,12 @@ class Task(State):
586
604
Task State causes the interpreter to execute the work identified by the state’s `resource` field.
state_id (str): State name whose length **must be** less than or equal to 128 unicode characters. State names **must be** unique within the scope of the whole state machine.
611
+
retry (Retry or list(Retry), optional): A retrier or list of retriers that define the state's retry policy. See `Error handling in Step Functions <https://docs.aws.amazon.com/step-functions/latest/dg/concepts-error-handling.html#error-handling-retrying-after-an-error>`_ for more details.
612
+
catch (Catch or list(Catch), optional): A catcher or list of catchers that define a fallback state. See `Error handling in Step Functions <https://docs.aws.amazon.com/step-functions/latest/dg/concepts-error-handling.html#error-handling-fallback-states>`_ for more details.
593
613
resource (str): A URI that uniquely identifies the specific task to execute. The States language does not constrain the URI scheme nor any other part of the URI.
594
614
timeout_seconds (int, optional): Positive integer specifying timeout for the state in seconds. If the state runs longer than the specified timeout, then the interpreter fails the state with a `States.Timeout` Error Name. (default: 60)
595
615
timeout_seconds_path (str, optional): Path specifying the state's timeout value in seconds from the state input. When resolved, the path must select a field whose value is a positive integer.
0 commit comments