Interface TestStateRequest.Builder
- All Superinterfaces:
AwsRequest.Builder,Buildable,CopyableBuilder<TestStateRequest.Builder,,TestStateRequest> SdkBuilder<TestStateRequest.Builder,,TestStateRequest> SdkPojo,SdkRequest.Builder,SfnRequest.Builder
- Enclosing class:
TestStateRequest
-
Method Summary
Modifier and TypeMethodDescriptionA JSON string representing a valid Context object for the state under test.definition(String definition) The Amazon States Language (ASL) definition of the state or state machine.A string that contains the JSON input data for the state.inspectionLevel(String inspectionLevel) Determines the values to return when a state is tested.inspectionLevel(InspectionLevel inspectionLevel) Determines the values to return when a state is tested.default TestStateRequest.Buildermock(Consumer<MockInput.Builder> mock) Defines a mocked result or error for the state under test.Defines a mocked result or error for the state under test.overrideConfiguration(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer) Add an optional request override configuration.overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) Add an optional request override configuration.revealSecrets(Boolean revealSecrets) Specifies whether or not to include secret information in the test result.The Amazon Resource Name (ARN) of the execution role with the required IAM permissions for the state.default TestStateRequest.BuilderstateConfiguration(Consumer<TestStateConfiguration.Builder> stateConfiguration) Contains configurations for the state under test.stateConfiguration(TestStateConfiguration stateConfiguration) Contains configurations for the state under test.Denotes the particular state within a state machine definition to be tested.JSON object literal that sets variables used in the state under test.Methods inherited from interface software.amazon.awssdk.awscore.AwsRequest.Builder
overrideConfigurationMethods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copyMethods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, buildMethods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFieldsMethods inherited from interface software.amazon.awssdk.services.sfn.model.SfnRequest.Builder
build
-
Method Details
-
definition
The Amazon States Language (ASL) definition of the state or state machine.
- Parameters:
definition- The Amazon States Language (ASL) definition of the state or state machine.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
roleArn
The Amazon Resource Name (ARN) of the execution role with the required IAM permissions for the state.
- Parameters:
roleArn- The Amazon Resource Name (ARN) of the execution role with the required IAM permissions for the state.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
input
A string that contains the JSON input data for the state.
- Parameters:
input- A string that contains the JSON input data for the state.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
inspectionLevel
Determines the values to return when a state is tested. You can specify one of the following types:
-
INFO: Shows the final state output. By default, Step Functions setsinspectionLeveltoINFOif you don't specify a level. -
DEBUG: Shows the final state output along with the input and output data processing result. -
TRACE: Shows the HTTP request and response for an HTTP Task. This level also shows the final state output along with the input and output data processing result.
Each of these levels also provide information about the status of the state execution and the next state to transition to.
- Parameters:
inspectionLevel- Determines the values to return when a state is tested. You can specify one of the following types:-
INFO: Shows the final state output. By default, Step Functions setsinspectionLeveltoINFOif you don't specify a level. -
DEBUG: Shows the final state output along with the input and output data processing result. -
TRACE: Shows the HTTP request and response for an HTTP Task. This level also shows the final state output along with the input and output data processing result.
Each of these levels also provide information about the status of the state execution and the next state to transition to.
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
-
inspectionLevel
Determines the values to return when a state is tested. You can specify one of the following types:
-
INFO: Shows the final state output. By default, Step Functions setsinspectionLeveltoINFOif you don't specify a level. -
DEBUG: Shows the final state output along with the input and output data processing result. -
TRACE: Shows the HTTP request and response for an HTTP Task. This level also shows the final state output along with the input and output data processing result.
Each of these levels also provide information about the status of the state execution and the next state to transition to.
- Parameters:
inspectionLevel- Determines the values to return when a state is tested. You can specify one of the following types:-
INFO: Shows the final state output. By default, Step Functions setsinspectionLeveltoINFOif you don't specify a level. -
DEBUG: Shows the final state output along with the input and output data processing result. -
TRACE: Shows the HTTP request and response for an HTTP Task. This level also shows the final state output along with the input and output data processing result.
Each of these levels also provide information about the status of the state execution and the next state to transition to.
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
-
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
revealSecretstotrue, you must make sure that the IAM user that calls theTestStateAPI has permission for thestates:RevealSecretsaction. For an example of IAM policy that sets thestates:RevealSecretspermission, see IAM permissions to test a state. Without this permission, Step Functions throws an access denied error.By default,
revealSecretsis set tofalse.- Parameters:
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
revealSecretstotrue, you must make sure that the IAM user that calls theTestStateAPI has permission for thestates:RevealSecretsaction. For an example of IAM policy that sets thestates:RevealSecretspermission, see IAM permissions to test a state. Without this permission, Step Functions throws an access denied error.By default,
revealSecretsis set tofalse.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
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.
- Parameters:
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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
stateName
Denotes the particular state within a state machine definition to be tested. If this field is specified, the
definitionmust contain a fully-formed state machine definition.- Parameters:
stateName- Denotes the particular state within a state machine definition to be tested. If this field is specified, thedefinitionmust contain a fully-formed state machine definition.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
mock
Defines a mocked result or error for the state under test.
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.
- Parameters:
mock- Defines a mocked result or error for the state under test.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.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
mock
Defines a mocked result or error for the state under test.
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.
This is a convenience method that creates an instance of theMockInput.Builderavoiding the need to create one manually viaMockInput.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tomock(MockInput).- Parameters:
mock- a consumer that will call methods onMockInput.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
context
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.
- Parameters:
context- 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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
stateConfiguration
Contains configurations for the state under test.
- Parameters:
stateConfiguration- Contains configurations for the state under test.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
stateConfiguration
default TestStateRequest.Builder stateConfiguration(Consumer<TestStateConfiguration.Builder> stateConfiguration) Contains configurations for the state under test.
This is a convenience method that creates an instance of theTestStateConfiguration.Builderavoiding the need to create one manually viaTestStateConfiguration.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tostateConfiguration(TestStateConfiguration).- Parameters:
stateConfiguration- a consumer that will call methods onTestStateConfiguration.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
overrideConfiguration
TestStateRequest.Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) Description copied from interface:AwsRequest.BuilderAdd an optional request override configuration.- Specified by:
overrideConfigurationin interfaceAwsRequest.Builder- Parameters:
overrideConfiguration- The override configuration.- Returns:
- This object for method chaining.
-
overrideConfiguration
TestStateRequest.Builder overrideConfiguration(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer) Description copied from interface:AwsRequest.BuilderAdd an optional request override configuration.- Specified by:
overrideConfigurationin interfaceAwsRequest.Builder- Parameters:
builderConsumer- AConsumerto which an emptyAwsRequestOverrideConfiguration.Builderwill be given.- Returns:
- This object for method chaining.
-