AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Container for the parameters to the TestState operation. Accepts the definition of a single state and executes it. You can test a state without creating a state machine or updating an existing state machine. Using this API, you can test the following:
A state's input and output processing data flow
An Amazon Web Services service integration request and response
An HTTP Task request and response
You can call this API on only one state at a time. The states that you can test include the following:
The TestState
API assumes an IAM role which must contain the required IAM permissions
for the resources your state is accessing. For information about the permissions a
state might need, see IAM
permissions to test a state.
The TestState
API can run for up to five minutes. If the execution of a state
exceeds this duration, it fails with the States.Timeout
error.
TestState
doesn't support Activity
tasks, .sync
or .waitForTaskToken
service
integration patterns, Parallel,
or Map
states.
Namespace: Amazon.StepFunctions.Model
Assembly: AWSSDK.StepFunctions.dll
Version: 3.x.y.z
public class TestStateRequest : AmazonStepFunctionsRequest IAmazonWebServiceRequest
The TestStateRequest type exposes the following members
Name | Description | |
---|---|---|
![]() |
TestStateRequest() |
Name | Type | Description | |
---|---|---|---|
![]() |
Definition | System.String |
Gets and sets the property Definition. The Amazon States Language (ASL) definition of the state. |
![]() |
Input | System.String |
Gets and sets the property Input. A string that contains the JSON input data for the state. |
![]() |
InspectionLevel | Amazon.StepFunctions.InspectionLevel |
Gets and sets the property InspectionLevel. Determines the values to return when a state is tested. You can specify one of the following types:
Each of these levels also provide information about the status of the state execution and the next state to transition to. |
![]() |
RevealSecrets | System.Boolean |
Gets and sets the property RevealSecrets. Specifies whether or not to include secret information in the test result. For HTTP Tasks, a secret includes the data that an EventBridge connection adds to modify the HTTP request headers, query parameters, and body. Step Functions doesn't omit any information included in the state definition or the HTTP response.
If you set
By default, |
![]() |
RoleArn | System.String |
Gets and sets the property RoleArn. The Amazon Resource Name (ARN) of the execution role with the required IAM permissions for the state. |
![]() |
Variables | System.String |
Gets and sets the property Variables. JSON object literal that sets variables used in the state under test. Object keys are the variable names and values are the variable values. |
.NET:
Supported in: 8.0 and newer, Core 3.1
.NET Standard:
Supported in: 2.0
.NET Framework:
Supported in: 4.5 and newer, 3.5