|
9 | 9 | InspectionLevel, |
10 | 10 | LogLevel, |
11 | 11 | MapRunStatus, |
| 12 | + MockResponseValidationMode, |
12 | 13 | StateMachineStatus, |
13 | 14 | StateMachineType, |
14 | 15 | SyncExecutionStatus, |
@@ -2297,7 +2298,7 @@ export interface TaskTimedOutEventDetails { |
2297 | 2298 | */ |
2298 | 2299 | export interface HistoryEvent { |
2299 | 2300 | /** |
2300 | | - * <p>The date and time the event occurred.</p> |
| 2301 | + * <p>The date and time the event occurred, expressed in seconds and fractional milliseconds since the Unix epoch, which is defined as January 1, 1970, at 00:00:00 Coordinated Universal Time (UTC).</p> |
2301 | 2302 | * @public |
2302 | 2303 | */ |
2303 | 2304 | timestamp: Date | undefined; |
@@ -3597,12 +3598,99 @@ export interface TagResourceInput { |
3597 | 3598 | */ |
3598 | 3599 | export interface TagResourceOutput {} |
3599 | 3600 |
|
| 3601 | +/** |
| 3602 | + * <p>A JSON object that contains a mocked error.</p> |
| 3603 | + * @public |
| 3604 | + */ |
| 3605 | +export interface MockErrorOutput { |
| 3606 | + /** |
| 3607 | + * <p>A string denoting the error code of the exception thrown when invoking the tested state. This field is required if <code>mock.errorOutput</code> is specified.</p> |
| 3608 | + * @public |
| 3609 | + */ |
| 3610 | + error?: string | undefined; |
| 3611 | + |
| 3612 | + /** |
| 3613 | + * <p>A string containing the cause of the exception thrown when executing the state's logic.</p> |
| 3614 | + * @public |
| 3615 | + */ |
| 3616 | + cause?: string | undefined; |
| 3617 | +} |
| 3618 | + |
| 3619 | +/** |
| 3620 | + * <p>A JSON object that contains a mocked <code>result</code> or <code>errorOutput</code>.</p> |
| 3621 | + * @public |
| 3622 | + */ |
| 3623 | +export interface MockInput { |
| 3624 | + /** |
| 3625 | + * <p>A JSON string containing the mocked result of the state invocation.</p> |
| 3626 | + * @public |
| 3627 | + */ |
| 3628 | + result?: string | undefined; |
| 3629 | + |
| 3630 | + /** |
| 3631 | + * <p>The mocked error output when calling TestState. When specified, the mocked response is returned as a JSON object that contains an <code>error</code> and <code>cause</code> field.</p> |
| 3632 | + * @public |
| 3633 | + */ |
| 3634 | + errorOutput?: MockErrorOutput | undefined; |
| 3635 | + |
| 3636 | + /** |
| 3637 | + * <p>Determines the level of strictness when validating mocked results against their respective API models. Values include:</p> |
| 3638 | + * <ul> |
| 3639 | + * <li> |
| 3640 | + * <p> |
| 3641 | + * <code>STRICT</code>: All required fields must be present, and all present fields must conform to the API's schema.</p> |
| 3642 | + * </li> |
| 3643 | + * <li> |
| 3644 | + * <p> |
| 3645 | + * <code>PRESENT</code>: All present fields must conform to the API's schema.</p> |
| 3646 | + * </li> |
| 3647 | + * <li> |
| 3648 | + * <p> |
| 3649 | + * <code>NONE</code>: No validation is performed.</p> |
| 3650 | + * </li> |
| 3651 | + * </ul> |
| 3652 | + * <p>If no value is specified, the default value is <code>STRICT</code>.</p> |
| 3653 | + * @public |
| 3654 | + */ |
| 3655 | + fieldValidationMode?: MockResponseValidationMode | undefined; |
| 3656 | +} |
| 3657 | + |
| 3658 | +/** |
| 3659 | + * <p>Contains configurations for the tested state.</p> |
| 3660 | + * @public |
| 3661 | + */ |
| 3662 | +export interface TestStateConfiguration { |
| 3663 | + /** |
| 3664 | + * <p>The number of retry attempts that have occurred for the state's Retry that applies to the mocked error.</p> |
| 3665 | + * @public |
| 3666 | + */ |
| 3667 | + retrierRetryCount?: number | undefined; |
| 3668 | + |
| 3669 | + /** |
| 3670 | + * <p>The name of the state from which an error originates when an error is mocked for a Map or Parallel state.</p> |
| 3671 | + * @public |
| 3672 | + */ |
| 3673 | + errorCausedByState?: string | undefined; |
| 3674 | + |
| 3675 | + /** |
| 3676 | + * <p>The number of Map state iterations that failed during the Map state invocation.</p> |
| 3677 | + * @public |
| 3678 | + */ |
| 3679 | + mapIterationFailureCount?: number | undefined; |
| 3680 | + |
| 3681 | + /** |
| 3682 | + * <p>The data read by ItemReader in Distributed Map states as found in its original source.</p> |
| 3683 | + * @public |
| 3684 | + */ |
| 3685 | + mapItemReaderData?: string | undefined; |
| 3686 | +} |
| 3687 | + |
3600 | 3688 | /** |
3601 | 3689 | * @public |
3602 | 3690 | */ |
3603 | 3691 | export interface TestStateInput { |
3604 | 3692 | /** |
3605 | | - * <p>The <a href="https://docs.aws.amazon.com/step-functions/latest/dg/concepts-amazon-states-language.html">Amazon States Language</a> (ASL) definition of the state.</p> |
| 3693 | + * <p>The <a href="https://docs.aws.amazon.com/step-functions/latest/dg/concepts-amazon-states-language.html">Amazon States Language</a> (ASL) definition of the state or state machine.</p> |
3606 | 3694 | * @public |
3607 | 3695 | */ |
3608 | 3696 | definition: string | undefined; |
@@ -3653,6 +3741,55 @@ export interface TestStateInput { |
3653 | 3741 | * @public |
3654 | 3742 | */ |
3655 | 3743 | variables?: string | undefined; |
| 3744 | + |
| 3745 | + /** |
| 3746 | + * <p>Denotes the particular state within a state machine definition to be tested. If this field is specified, the <code>definition</code> must contain a fully-formed state machine definition.</p> |
| 3747 | + * @public |
| 3748 | + */ |
| 3749 | + stateName?: string | undefined; |
| 3750 | + |
| 3751 | + /** |
| 3752 | + * <p>Defines a mocked result or error for the state under test.</p> |
| 3753 | + * <p>A mock can only be specified for Task, Map, or Parallel states. If it is specified for another state type, an exception will be thrown.</p> |
| 3754 | + * @public |
| 3755 | + */ |
| 3756 | + mock?: MockInput | undefined; |
| 3757 | + |
| 3758 | + /** |
| 3759 | + * <p>A JSON string representing a valid Context object for the state under test. This field may only be specified if a mock is specified in the same request.</p> |
| 3760 | + * @public |
| 3761 | + */ |
| 3762 | + context?: string | undefined; |
| 3763 | + |
| 3764 | + /** |
| 3765 | + * <p>Contains configurations for the state under test.</p> |
| 3766 | + * @public |
| 3767 | + */ |
| 3768 | + stateConfiguration?: TestStateConfiguration | undefined; |
| 3769 | +} |
| 3770 | + |
| 3771 | +/** |
| 3772 | + * <p>An object containing data about a handled exception in the tested state.</p> |
| 3773 | + * @public |
| 3774 | + */ |
| 3775 | +export interface InspectionErrorDetails { |
| 3776 | + /** |
| 3777 | + * <p>The array index of the Catch which handled the exception.</p> |
| 3778 | + * @public |
| 3779 | + */ |
| 3780 | + catchIndex?: number | undefined; |
| 3781 | + |
| 3782 | + /** |
| 3783 | + * <p>The array index of the Retry which handled the exception.</p> |
| 3784 | + * @public |
| 3785 | + */ |
| 3786 | + retryIndex?: number | undefined; |
| 3787 | + |
| 3788 | + /** |
| 3789 | + * <p>The duration in seconds of the backoff for a retry on a failed state invocation.</p> |
| 3790 | + * @public |
| 3791 | + */ |
| 3792 | + retryBackoffIntervalSeconds?: number | undefined; |
3656 | 3793 | } |
3657 | 3794 |
|
3658 | 3795 | /** |
@@ -3791,6 +3928,54 @@ export interface InspectionData { |
3791 | 3928 | * @public |
3792 | 3929 | */ |
3793 | 3930 | variables?: string | undefined; |
| 3931 | + |
| 3932 | + /** |
| 3933 | + * <p>An object containing data about a handled exception in the tested state.</p> |
| 3934 | + * @public |
| 3935 | + */ |
| 3936 | + errorDetails?: InspectionErrorDetails | undefined; |
| 3937 | + |
| 3938 | + /** |
| 3939 | + * <p>The effective input after the ItemsPath filter is applied. Not populated when the QueryLanguage is JSONata.</p> |
| 3940 | + * @public |
| 3941 | + */ |
| 3942 | + afterItemsPath?: string | undefined; |
| 3943 | + |
| 3944 | + /** |
| 3945 | + * <p>An array containing the inputs for each Map iteration, transformed by the ItemSelector specified in a Map state.</p> |
| 3946 | + * @public |
| 3947 | + */ |
| 3948 | + afterItemSelector?: string | undefined; |
| 3949 | + |
| 3950 | + /** |
| 3951 | + * <p>The effective input after the ItemBatcher filter is applied in a Map state.</p> |
| 3952 | + * @public |
| 3953 | + */ |
| 3954 | + afterItemBatcher?: string | undefined; |
| 3955 | + |
| 3956 | + /** |
| 3957 | + * <p>The effective input after the ItemsPointer filter is applied in a Map state.</p> |
| 3958 | + * @public |
| 3959 | + */ |
| 3960 | + afterItemsPointer?: string | undefined; |
| 3961 | + |
| 3962 | + /** |
| 3963 | + * <p>The tolerated failure threshold for a Map state as defined in number of Map state iterations.</p> |
| 3964 | + * @public |
| 3965 | + */ |
| 3966 | + toleratedFailureCount?: number | undefined; |
| 3967 | + |
| 3968 | + /** |
| 3969 | + * <p>The tolerated failure threshold for a Map state as defined in percentage of Map state iterations.</p> |
| 3970 | + * @public |
| 3971 | + */ |
| 3972 | + toleratedFailurePercentage?: number | undefined; |
| 3973 | + |
| 3974 | + /** |
| 3975 | + * <p>The max concurrency of the Map state.</p> |
| 3976 | + * @public |
| 3977 | + */ |
| 3978 | + maxConcurrency?: number | undefined; |
3794 | 3979 | } |
3795 | 3980 |
|
3796 | 3981 | /** |
|
0 commit comments