1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`TestState`](crate::operation::test_state::builders::TestStateFluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`definition(impl Into<String>)`](crate::operation::test_state::builders::TestStateFluentBuilder::definition) / [`set_definition(Option<String>)`](crate::operation::test_state::builders::TestStateFluentBuilder::set_definition):<br>required: **true**<br><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><br>
    ///   - [`role_arn(impl Into<String>)`](crate::operation::test_state::builders::TestStateFluentBuilder::role_arn) / [`set_role_arn(Option<String>)`](crate::operation::test_state::builders::TestStateFluentBuilder::set_role_arn):<br>required: **true**<br><p>The Amazon Resource Name (ARN) of the execution role with the required IAM permissions for the state.</p><br>
    ///   - [`input(impl Into<String>)`](crate::operation::test_state::builders::TestStateFluentBuilder::input) / [`set_input(Option<String>)`](crate::operation::test_state::builders::TestStateFluentBuilder::set_input):<br>required: **false**<br><p>A string that contains the JSON input data for the state.</p><br>
    ///   - [`inspection_level(InspectionLevel)`](crate::operation::test_state::builders::TestStateFluentBuilder::inspection_level) / [`set_inspection_level(Option<InspectionLevel>)`](crate::operation::test_state::builders::TestStateFluentBuilder::set_inspection_level):<br>required: **false**<br><p>Determines the values to return when a state is tested. You can specify one of the following types:</p> <ul>  <li>   <p><code>INFO</code>: Shows the final state output. By default, Step Functions sets <code>inspectionLevel</code> to <code>INFO</code> if you don't specify a level.</p></li>  <li>   <p><code>DEBUG</code>: Shows the final state output along with the input and output data processing result.</p></li>  <li>   <p><code>TRACE</code>: 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.</p></li> </ul> <p>Each of these levels also provide information about the status of the state execution and the next state to transition to.</p><br>
    ///   - [`reveal_secrets(bool)`](crate::operation::test_state::builders::TestStateFluentBuilder::reveal_secrets) / [`set_reveal_secrets(Option<bool>)`](crate::operation::test_state::builders::TestStateFluentBuilder::set_reveal_secrets):<br>required: **false**<br><p>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.</p> <p>If you set <code>revealSecrets</code> to <code>true</code>, you must make sure that the IAM user that calls the <code>TestState</code> API has permission for the <code>states:RevealSecrets</code> action. For an example of IAM policy that sets the <code>states:RevealSecrets</code> permission, see <a href="https://docs.aws.amazon.com/step-functions/latest/dg/test-state-isolation.html#test-state-permissions">IAM permissions to test a state</a>. Without this permission, Step Functions throws an access denied error.</p> <p>By default, <code>revealSecrets</code> is set to <code>false</code>.</p><br>
    /// - On success, responds with [`TestStateOutput`](crate::operation::test_state::TestStateOutput) with field(s):
    ///   - [`output(Option<String>)`](crate::operation::test_state::TestStateOutput::output): <p>The JSON output data of the state. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.</p>
    ///   - [`error(Option<String>)`](crate::operation::test_state::TestStateOutput::error): <p>The error returned when the execution of a state fails.</p>
    ///   - [`cause(Option<String>)`](crate::operation::test_state::TestStateOutput::cause): <p>A detailed explanation of the cause for the error when the execution of a state fails.</p>
    ///   - [`inspection_data(Option<InspectionData>)`](crate::operation::test_state::TestStateOutput::inspection_data): <p>Returns additional details about the state's execution, including its input and output data processing flow, and HTTP request and response information. The <code>inspectionLevel</code> request parameter specifies which details are returned.</p>
    ///   - [`next_state(Option<String>)`](crate::operation::test_state::TestStateOutput::next_state): <p>The name of the next state to transition to. If you haven't defined a next state in your definition or if the execution of the state fails, this field doesn't contain a value.</p>
    ///   - [`status(Option<TestExecutionStatus>)`](crate::operation::test_state::TestStateOutput::status): <p>The execution status of the state.</p>
    /// - On failure, responds with [`SdkError<TestStateError>`](crate::operation::test_state::TestStateError)
    pub fn test_state(&self) -> crate::operation::test_state::builders::TestStateFluentBuilder {
        crate::operation::test_state::builders::TestStateFluentBuilder::new(self.handle.clone())
    }
}