Struct aws_sdk_sfn::Client

source ·
pub struct Client { /* private fields */ }
Expand description

Client for AWS Step Functions

Client for invoking operations on AWS Step Functions. Each operation on AWS Step Functions is a method on this this struct. .send() MUST be invoked on the generated operations to dispatch the request to the service.

§Constructing a Client

A Config is required to construct a client. For most use cases, the aws-config crate should be used to automatically resolve this config using aws_config::load_from_env(), since this will resolve an SdkConfig which can be shared across multiple different AWS SDK clients. This config resolution process can be customized by calling aws_config::from_env() instead, which returns a ConfigLoader that uses the builder pattern to customize the default config.

In the simplest case, creating a client looks as follows:

let config = aws_config::load_from_env().await;
let client = aws_sdk_sfn::Client::new(&config);

Occasionally, SDKs may have additional service-specific values that can be set on the Config that is absent from SdkConfig, or slightly different settings for a specific client may be desired. The Config struct implements From<&SdkConfig>, so setting these specific settings can be done as follows:

let sdk_config = ::aws_config::load_from_env().await;
let config = aws_sdk_sfn::config::Builder::from(&sdk_config)
    .some_service_specific_setting("value")
    .build();

See the aws-config docs and Config for more information on customizing configuration.

Note: Client construction is expensive due to connection thread pool initialization, and should be done once at application start-up.

§Using the Client

A client has a function for every operation that can be performed by the service. For example, the CreateActivity operation has a Client::create_activity, function which returns a builder for that operation. The fluent builder ultimately has a send() function that returns an async future that returns a result, as illustrated below:

let result = client.create_activity()
    .name("example")
    .send()
    .await;

The underlying HTTP requests that get made by this can be modified with the customize_operation function on the fluent builder. See the customize module for more information.

Implementations§

source§

impl Client

source

pub fn create_activity(&self) -> CreateActivityFluentBuilder

Constructs a fluent builder for the CreateActivity operation.

source§

impl Client

source

pub fn create_state_machine(&self) -> CreateStateMachineFluentBuilder

Constructs a fluent builder for the CreateStateMachine operation.

source§

impl Client

source

pub fn create_state_machine_alias(&self) -> CreateStateMachineAliasFluentBuilder

Constructs a fluent builder for the CreateStateMachineAlias operation.

source§

impl Client

source

pub fn delete_activity(&self) -> DeleteActivityFluentBuilder

Constructs a fluent builder for the DeleteActivity operation.

source§

impl Client

source

pub fn delete_state_machine(&self) -> DeleteStateMachineFluentBuilder

Constructs a fluent builder for the DeleteStateMachine operation.

source§

impl Client

source

pub fn delete_state_machine_alias(&self) -> DeleteStateMachineAliasFluentBuilder

Constructs a fluent builder for the DeleteStateMachineAlias operation.

source§

impl Client

source

pub fn delete_state_machine_version( &self ) -> DeleteStateMachineVersionFluentBuilder

Constructs a fluent builder for the DeleteStateMachineVersion operation.

source§

impl Client

source

pub fn describe_activity(&self) -> DescribeActivityFluentBuilder

Constructs a fluent builder for the DescribeActivity operation.

source§

impl Client

source

pub fn describe_execution(&self) -> DescribeExecutionFluentBuilder

Constructs a fluent builder for the DescribeExecution operation.

  • The fluent builder is configurable:
  • On success, responds with DescribeExecutionOutput with field(s):
    • execution_arn(String):

      The Amazon Resource Name (ARN) that identifies the execution.

    • state_machine_arn(String):

      The Amazon Resource Name (ARN) of the executed stated machine.

    • name(Option<String>):

      The name of the execution.

      A name must not contain:

      • white space

      • brackets < > { } [ ]

      • wildcard characters ? *

      • special characters “ # % \ ^ | ~ ` $ & , ; : /

      • control characters (U+0000-001F, U+007F-009F)

      To enable logging with CloudWatch Logs, the name should only contain 0-9, A-Z, a-z, - and _.

    • status(ExecutionStatus):

      The current status of the execution.

    • start_date(DateTime):

      The date the execution is started.

    • stop_date(Option<DateTime>):

      If the execution ended, the date the execution stopped.

    • input(Option<String>):

      The string that contains the JSON input data of the execution. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.

    • input_details(Option<CloudWatchEventsExecutionDataDetails>):

      Provides details about execution input or output.

    • output(Option<String>):

      The JSON output data of the execution. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.

      This field is set only if the execution succeeds. If the execution fails, this field is null.

    • output_details(Option<CloudWatchEventsExecutionDataDetails>):

      Provides details about execution input or output.

    • trace_header(Option<String>):

      The X-Ray trace header that was passed to the execution.

    • map_run_arn(Option<String>):

      The Amazon Resource Name (ARN) that identifies a Map Run, which dispatched this execution.

    • error(Option<String>):

      The error string if the state machine execution failed.

    • cause(Option<String>):

      The cause string if the state machine execution failed.

    • state_machine_version_arn(Option<String>):

      The Amazon Resource Name (ARN) of the state machine version associated with the execution. The version ARN is a combination of state machine ARN and the version number separated by a colon (:). For example, stateMachineARN:1.

      If you start an execution from a StartExecution request without specifying a state machine version or alias ARN, Step Functions returns a null value.

    • state_machine_alias_arn(Option<String>):

      The Amazon Resource Name (ARN) of the state machine alias associated with the execution. The alias ARN is a combination of state machine ARN and the alias name separated by a colon (:). For example, stateMachineARN:PROD.

      If you start an execution from a StartExecution request with a state machine version ARN, this field will be null.

    • redrive_count(Option<i32>):

      The number of times you’ve redriven an execution. If you have not yet redriven an execution, the redriveCount is 0. This count is only updated if you successfully redrive an execution.

    • redrive_date(Option<DateTime>):

      The date the execution was last redriven. If you have not yet redriven an execution, the redriveDate is null.

      The redriveDate is unavailable if you redrive a Map Run that starts child workflow executions of type EXPRESS.

    • redrive_status(Option<ExecutionRedriveStatus>):

      Indicates whether or not an execution can be redriven at a given point in time.

      • For executions of type STANDARD, redriveStatus is NOT_REDRIVABLE if calling the RedriveExecution API action would return the ExecutionNotRedrivable error.

      • For a Distributed Map that includes child workflows of type STANDARD, redriveStatus indicates whether or not the Map Run can redrive child workflow executions.

      • For a Distributed Map that includes child workflows of type EXPRESS, redriveStatus indicates whether or not the Map Run can redrive child workflow executions.

        You can redrive failed or timed out EXPRESS workflows only if they’re a part of a Map Run. When you redrive the Map Run, these workflows are restarted using the StartExecution API action.

    • redrive_status_reason(Option<String>):

      When redriveStatus is NOT_REDRIVABLE, redriveStatusReason specifies the reason why an execution cannot be redriven.

      • For executions of type STANDARD, or for a Distributed Map that includes child workflows of type STANDARD, redriveStatusReason can include one of the following reasons:

        • State machine is in DELETING status.

        • Execution is RUNNING and cannot be redriven.

        • Execution is SUCCEEDED and cannot be redriven.

        • Execution was started before the launch of RedriveExecution.

        • Execution history event limit exceeded.

        • Execution has exceeded the max execution time.

        • Execution redrivable period exceeded.

      • For a Distributed Map that includes child workflows of type EXPRESS, redriveStatusReason is only returned if the child workflows are not redrivable. This happens when the child workflow executions have completed successfully.

  • On failure, responds with SdkError<DescribeExecutionError>
source§

impl Client

source

pub fn describe_map_run(&self) -> DescribeMapRunFluentBuilder

Constructs a fluent builder for the DescribeMapRun operation.

source§

impl Client

source

pub fn describe_state_machine(&self) -> DescribeStateMachineFluentBuilder

Constructs a fluent builder for the DescribeStateMachine operation.

  • The fluent builder is configurable:
    • state_machine_arn(impl Into<String>) / set_state_machine_arn(Option<String>):
      required: true

      The Amazon Resource Name (ARN) of the state machine for which you want the information.

      If you specify a state machine version ARN, this API returns details about that version. The version ARN is a combination of state machine ARN and the version number separated by a colon (:). For example, stateMachineARN:1.


  • On success, responds with DescribeStateMachineOutput with field(s):
    • state_machine_arn(String):

      The Amazon Resource Name (ARN) that identifies the state machine.

      If you specified a state machine version ARN in your request, the API returns the version ARN. The version ARN is a combination of state machine ARN and the version number separated by a colon (:). For example, stateMachineARN:1.

    • name(String):

      The name of the state machine.

      A name must not contain:

      • white space

      • brackets < > { } [ ]

      • wildcard characters ? *

      • special characters “ # % \ ^ | ~ ` $ & , ; : /

      • control characters (U+0000-001F, U+007F-009F)

      To enable logging with CloudWatch Logs, the name should only contain 0-9, A-Z, a-z, - and _.

    • status(Option<StateMachineStatus>):

      The current status of the state machine.

    • definition(String):

      The Amazon States Language definition of the state machine. See Amazon States Language.

    • role_arn(String):

      The Amazon Resource Name (ARN) of the IAM role used when creating this state machine. (The IAM role maintains security by granting Step Functions access to Amazon Web Services resources.)

    • r#type(StateMachineType):

      The type of the state machine (STANDARD or EXPRESS).

    • creation_date(DateTime):

      The date the state machine is created.

      For a state machine version, creationDate is the date the version was created.

    • logging_configuration(Option<LoggingConfiguration>):

      The LoggingConfiguration data type is used to set CloudWatch Logs options.

    • tracing_configuration(Option<TracingConfiguration>):

      Selects whether X-Ray tracing is enabled.

    • label(Option<String>):

      A user-defined or an auto-generated string that identifies a Map state. This parameter is present only if the stateMachineArn specified in input is a qualified state machine ARN.

    • revision_id(Option<String>):

      The revision identifier for the state machine.

      Use the revisionId parameter to compare between versions of a state machine configuration used for executions without performing a diff of the properties, such as definition and roleArn.

    • description(Option<String>):

      The description of the state machine version.

  • On failure, responds with SdkError<DescribeStateMachineError>
source§

impl Client

source

pub fn describe_state_machine_alias( &self ) -> DescribeStateMachineAliasFluentBuilder

Constructs a fluent builder for the DescribeStateMachineAlias operation.

source§

impl Client

source

pub fn describe_state_machine_for_execution( &self ) -> DescribeStateMachineForExecutionFluentBuilder

Constructs a fluent builder for the DescribeStateMachineForExecution operation.

source§

impl Client

source

pub fn get_activity_task(&self) -> GetActivityTaskFluentBuilder

Constructs a fluent builder for the GetActivityTask operation.

source§

impl Client

source

pub fn get_execution_history(&self) -> GetExecutionHistoryFluentBuilder

Constructs a fluent builder for the GetExecutionHistory operation. This operation supports pagination; See into_paginator().

source§

impl Client

source

pub fn list_activities(&self) -> ListActivitiesFluentBuilder

Constructs a fluent builder for the ListActivities operation. This operation supports pagination; See into_paginator().

  • The fluent builder is configurable:
    • max_results(i32) / set_max_results(Option<i32>):
      required: false

      The maximum number of results that are returned per call. You can use nextToken to obtain further pages of results. The default is 100 and the maximum allowed page size is 1000. A value of 0 uses the default.

      This is only an upper limit. The actual number of results returned per call might be fewer than the specified maximum.


    • next_token(impl Into<String>) / set_next_token(Option<String>):
      required: false

      If nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an HTTP 400 InvalidToken error.


  • On success, responds with ListActivitiesOutput with field(s):
    • activities(Vec::<ActivityListItem>):

      The list of activities.

    • next_token(Option<String>):

      If nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an HTTP 400 InvalidToken error.

  • On failure, responds with SdkError<ListActivitiesError>
source§

impl Client

source

pub fn list_executions(&self) -> ListExecutionsFluentBuilder

Constructs a fluent builder for the ListExecutions operation. This operation supports pagination; See into_paginator().

  • The fluent builder is configurable:
    • state_machine_arn(impl Into<String>) / set_state_machine_arn(Option<String>):
      required: false

      The Amazon Resource Name (ARN) of the state machine whose executions is listed.

      You can specify either a mapRunArn or a stateMachineArn, but not both.

      You can also return a list of executions associated with a specific alias or version, by specifying an alias ARN or a version ARN in the stateMachineArn parameter.


    • status_filter(ExecutionStatus) / set_status_filter(Option<ExecutionStatus>):
      required: false

      If specified, only list the executions whose current execution status matches the given filter.


    • max_results(i32) / set_max_results(Option<i32>):
      required: false

      The maximum number of results that are returned per call. You can use nextToken to obtain further pages of results. The default is 100 and the maximum allowed page size is 1000. A value of 0 uses the default.

      This is only an upper limit. The actual number of results returned per call might be fewer than the specified maximum.


    • next_token(impl Into<String>) / set_next_token(Option<String>):
      required: false

      If nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an HTTP 400 InvalidToken error.


    • map_run_arn(impl Into<String>) / set_map_run_arn(Option<String>):
      required: false

      The Amazon Resource Name (ARN) of the Map Run that started the child workflow executions. If the mapRunArn field is specified, a list of all of the child workflow executions started by a Map Run is returned. For more information, see Examining Map Run in the Step Functions Developer Guide.

      You can specify either a mapRunArn or a stateMachineArn, but not both.


    • redrive_filter(ExecutionRedriveFilter) / set_redrive_filter(Option<ExecutionRedriveFilter>):
      required: false

      Sets a filter to list executions based on whether or not they have been redriven.

      For a Distributed Map, redriveFilter sets a filter to list child workflow executions based on whether or not they have been redriven.

      If you do not provide a redriveFilter, Step Functions returns a list of both redriven and non-redriven executions.

      If you provide a state machine ARN in redriveFilter, the API returns a validation exception.


  • On success, responds with ListExecutionsOutput with field(s):
    • executions(Vec::<ExecutionListItem>):

      The list of matching executions.

    • next_token(Option<String>):

      If nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an HTTP 400 InvalidToken error.

  • On failure, responds with SdkError<ListExecutionsError>
source§

impl Client

source

pub fn list_map_runs(&self) -> ListMapRunsFluentBuilder

Constructs a fluent builder for the ListMapRuns operation. This operation supports pagination; See into_paginator().

  • The fluent builder is configurable:
    • execution_arn(impl Into<String>) / set_execution_arn(Option<String>):
      required: true

      The Amazon Resource Name (ARN) of the execution for which the Map Runs must be listed.


    • max_results(i32) / set_max_results(Option<i32>):
      required: false

      The maximum number of results that are returned per call. You can use nextToken to obtain further pages of results. The default is 100 and the maximum allowed page size is 1000. A value of 0 uses the default.

      This is only an upper limit. The actual number of results returned per call might be fewer than the specified maximum.


    • next_token(impl Into<String>) / set_next_token(Option<String>):
      required: false

      If nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an HTTP 400 InvalidToken error.


  • On success, responds with ListMapRunsOutput with field(s):
    • map_runs(Vec::<MapRunListItem>):

      An array that lists information related to a Map Run, such as the Amazon Resource Name (ARN) of the Map Run and the ARN of the state machine that started the Map Run.

    • next_token(Option<String>):

      If nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an HTTP 400 InvalidToken error.

  • On failure, responds with SdkError<ListMapRunsError>
source§

impl Client

source

pub fn list_state_machine_aliases(&self) -> ListStateMachineAliasesFluentBuilder

Constructs a fluent builder for the ListStateMachineAliases operation.

  • The fluent builder is configurable:
    • state_machine_arn(impl Into<String>) / set_state_machine_arn(Option<String>):
      required: true

      The Amazon Resource Name (ARN) of the state machine for which you want to list aliases.

      If you specify a state machine version ARN, this API returns a list of aliases for that version.


    • next_token(impl Into<String>) / set_next_token(Option<String>):
      required: false

      If nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an HTTP 400 InvalidToken error.


    • max_results(i32) / set_max_results(Option<i32>):
      required: false

      The maximum number of results that are returned per call. You can use nextToken to obtain further pages of results. The default is 100 and the maximum allowed page size is 1000. A value of 0 uses the default.

      This is only an upper limit. The actual number of results returned per call might be fewer than the specified maximum.


  • On success, responds with ListStateMachineAliasesOutput with field(s):
    • state_machine_aliases(Vec::<StateMachineAliasListItem>):

      Aliases for the state machine.

    • next_token(Option<String>):

      If nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an HTTP 400 InvalidToken error.

  • On failure, responds with SdkError<ListStateMachineAliasesError>
source§

impl Client

source

pub fn list_state_machine_versions( &self ) -> ListStateMachineVersionsFluentBuilder

Constructs a fluent builder for the ListStateMachineVersions operation.

source§

impl Client

source

pub fn list_state_machines(&self) -> ListStateMachinesFluentBuilder

Constructs a fluent builder for the ListStateMachines operation. This operation supports pagination; See into_paginator().

  • The fluent builder is configurable:
    • max_results(i32) / set_max_results(Option<i32>):
      required: false

      The maximum number of results that are returned per call. You can use nextToken to obtain further pages of results. The default is 100 and the maximum allowed page size is 1000. A value of 0 uses the default.

      This is only an upper limit. The actual number of results returned per call might be fewer than the specified maximum.


    • next_token(impl Into<String>) / set_next_token(Option<String>):
      required: false

      If nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an HTTP 400 InvalidToken error.


  • On success, responds with ListStateMachinesOutput with field(s):
    • state_machines(Vec::<StateMachineListItem>): (undocumented)
    • next_token(Option<String>):

      If nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an HTTP 400 InvalidToken error.

  • On failure, responds with SdkError<ListStateMachinesError>
source§

impl Client

source

pub fn list_tags_for_resource(&self) -> ListTagsForResourceFluentBuilder

Constructs a fluent builder for the ListTagsForResource operation.

source§

impl Client

source

pub fn publish_state_machine_version( &self ) -> PublishStateMachineVersionFluentBuilder

Constructs a fluent builder for the PublishStateMachineVersion operation.

source§

impl Client

source

pub fn redrive_execution(&self) -> RedriveExecutionFluentBuilder

Constructs a fluent builder for the RedriveExecution operation.

source§

impl Client

source

pub fn send_task_failure(&self) -> SendTaskFailureFluentBuilder

Constructs a fluent builder for the SendTaskFailure operation.

source§

impl Client

source

pub fn send_task_heartbeat(&self) -> SendTaskHeartbeatFluentBuilder

Constructs a fluent builder for the SendTaskHeartbeat operation.

source§

impl Client

source

pub fn send_task_success(&self) -> SendTaskSuccessFluentBuilder

Constructs a fluent builder for the SendTaskSuccess operation.

source§

impl Client

source

pub fn start_execution(&self) -> StartExecutionFluentBuilder

Constructs a fluent builder for the StartExecution operation.

  • The fluent builder is configurable:
    • state_machine_arn(impl Into<String>) / set_state_machine_arn(Option<String>):
      required: true

      The Amazon Resource Name (ARN) of the state machine to execute.

      The stateMachineArn parameter accepts one of the following inputs:

      • An unqualified state machine ARN – Refers to a state machine ARN that isn’t qualified with a version or alias ARN. The following is an example of an unqualified state machine ARN.

        arn: :states: : :stateMachine:

        Step Functions doesn’t associate state machine executions that you start with an unqualified ARN with a version. This is true even if that version uses the same revision that the execution used.

      • A state machine version ARN – Refers to a version ARN, which is a combination of state machine ARN and the version number separated by a colon (:). The following is an example of the ARN for version 10.

        arn: :states: : :stateMachine: :10

        Step Functions doesn’t associate executions that you start with a version ARN with any aliases that point to that version.

      • A state machine alias ARN – Refers to an alias ARN, which is a combination of state machine ARN and the alias name separated by a colon (:). The following is an example of the ARN for an alias named PROD.

        arn: :states: : :stateMachine: mystatemachine:prod</mystatemachine:prod>

        Step Functions associates executions that you start with an alias ARN with that alias and the state machine version used for that execution.


    • name(impl Into<String>) / set_name(Option<String>):
      required: false

      Optional name of the execution. This name must be unique for your Amazon Web Services account, Region, and state machine for 90 days. For more information, see Limits Related to State Machine Executions in the Step Functions Developer Guide.

      If you don’t provide a name for the execution, Step Functions automatically generates a universally unique identifier (UUID) as the execution name.

      A name must not contain:

      • white space

      • brackets < > { } [ ]

      • wildcard characters ? *

      • special characters “ # % \ ^ | ~ ` $ & , ; : /

      • control characters (U+0000-001F, U+007F-009F)

      To enable logging with CloudWatch Logs, the name should only contain 0-9, A-Z, a-z, - and _.


    • input(impl Into<String>) / set_input(Option<String>):
      required: false

      The string that contains the JSON input data for the execution, for example:

      “input”: “{"first_name" : "test"}”

      If you don’t include any JSON input data, you still must include the two braces, for example: “input”: “{}”

      Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.


    • trace_header(impl Into<String>) / set_trace_header(Option<String>):
      required: false

      Passes the X-Ray trace header. The trace header can also be passed in the request payload.


  • On success, responds with StartExecutionOutput with field(s):
  • On failure, responds with SdkError<StartExecutionError>
source§

impl Client

source

pub fn start_sync_execution(&self) -> StartSyncExecutionFluentBuilder

Constructs a fluent builder for the StartSyncExecution operation.

source§

impl Client

source

pub fn stop_execution(&self) -> StopExecutionFluentBuilder

Constructs a fluent builder for the StopExecution operation.

source§

impl Client

source

pub fn tag_resource(&self) -> TagResourceFluentBuilder

Constructs a fluent builder for the TagResource operation.

source§

impl Client

source

pub fn test_state(&self) -> TestStateFluentBuilder

Constructs a fluent builder for the TestState operation.

  • The fluent builder is configurable:
    • definition(impl Into<String>) / set_definition(Option<String>):
      required: true

      The Amazon States Language (ASL) definition of the state.


    • role_arn(impl Into<String>) / set_role_arn(Option<String>):
      required: true

      The Amazon Resource Name (ARN) of the execution role with the required IAM permissions for the state.


    • input(impl Into<String>) / set_input(Option<String>):
      required: false

      A string that contains the JSON input data for the state.


    • inspection_level(InspectionLevel) / set_inspection_level(Option<InspectionLevel>):
      required: false

      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 sets inspectionLevel to INFO if 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.


    • reveal_secrets(bool) / set_reveal_secrets(Option<bool>):
      required: false

      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 revealSecrets to true, you must make sure that the IAM user that calls the TestState API has permission for the states:RevealSecrets action. For an example of IAM policy that sets the states:RevealSecrets permission, see IAM permissions to test a state. Without this permission, Step Functions throws an access denied error.

      By default, revealSecrets is set to false.


  • On success, responds with TestStateOutput with field(s):
    • output(Option<String>):

      The JSON output data of the state. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.

    • error(Option<String>):

      The error returned when the execution of a state fails.

    • cause(Option<String>):

      A detailed explanation of the cause for the error when the execution of a state fails.

    • inspection_data(Option<InspectionData>):

      Returns additional details about the state’s execution, including its input and output data processing flow, and HTTP request and response information. The inspectionLevel request parameter specifies which details are returned.

    • next_state(Option<String>):

      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.

    • status(Option<TestExecutionStatus>):

      The execution status of the state.

  • On failure, responds with SdkError<TestStateError>
source§

impl Client

source

pub fn untag_resource(&self) -> UntagResourceFluentBuilder

Constructs a fluent builder for the UntagResource operation.

source§

impl Client

source

pub fn update_map_run(&self) -> UpdateMapRunFluentBuilder

Constructs a fluent builder for the UpdateMapRun operation.

source§

impl Client

source

pub fn update_state_machine(&self) -> UpdateStateMachineFluentBuilder

Constructs a fluent builder for the UpdateStateMachine operation.

source§

impl Client

source

pub fn update_state_machine_alias(&self) -> UpdateStateMachineAliasFluentBuilder

Constructs a fluent builder for the UpdateStateMachineAlias operation.

source§

impl Client

source

pub fn from_conf(conf: Config) -> Self

Creates a new client from the service Config.

§Panics

This method will panic in the following cases:

  • Retries or timeouts are enabled without a sleep_impl configured.
  • Identity caching is enabled without a sleep_impl and time_source configured.
  • No behavior_version is provided.

The panic message for each of these will have instructions on how to resolve them.

source

pub fn config(&self) -> &Config

Returns the client’s configuration.

source§

impl Client

source

pub fn new(sdk_config: &SdkConfig) -> Self

Creates a new client from an SDK Config.

§Panics
  • This method will panic if the sdk_config is missing an async sleep implementation. If you experience this panic, set the sleep_impl on the Config passed into this function to fix it.
  • This method will panic if the sdk_config is missing an HTTP connector. If you experience this panic, set the http_connector on the Config passed into this function to fix it.
  • This method will panic if no BehaviorVersion is provided. If you experience this panic, set behavior_version on the Config or enable the behavior-version-latest Cargo feature.

Trait Implementations§

source§

impl Clone for Client

source§

fn clone(&self) -> Client

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Client

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Client

§

impl !RefUnwindSafe for Client

§

impl Send for Client

§

impl Sync for Client

§

impl Unpin for Client

§

impl !UnwindSafe for Client

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

source§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more