import { Command as $Command } from "@smithy/core/client"; import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { TestStateInput, TestStateOutput } from "../models/models_0"; import type { ServiceInputTypes, ServiceOutputTypes, SFNClientResolvedConfig } from "../SFNClient"; /** * @public */ export type { __MetadataBearer }; export { $Command }; /** * @public * * The input for {@link TestStateCommand}. */ export interface TestStateCommandInput extends TestStateInput { } /** * @public * * The output of {@link TestStateCommand}. */ export interface TestStateCommandOutput extends TestStateOutput, __MetadataBearer { } declare const TestStateCommand_base: { new (input: TestStateCommandInput): import("@smithy/core/client").CommandImpl; new (input: TestStateCommandInput): import("@smithy/core/client").CommandImpl; getEndpointParameterInstructions(): { [x: string]: unknown; }; }; /** *

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:

* *

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 only supports the following when a mock is specified: Activity tasks, .sync or .waitForTaskToken * service integration patterns, Parallel, or Map states.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { SFNClient, TestStateCommand } from "@aws-sdk/client-sfn"; // ES Modules import * // const { SFNClient, TestStateCommand } = require("@aws-sdk/client-sfn"); // CommonJS import * // import type { SFNClientConfig } from "@aws-sdk/client-sfn"; * const config = {}; // type is SFNClientConfig * const client = new SFNClient(config); * const input = { // TestStateInput * definition: "STRING_VALUE", // required * roleArn: "STRING_VALUE", * input: "STRING_VALUE", * inspectionLevel: "INFO" || "DEBUG" || "TRACE", * revealSecrets: true || false, * variables: "STRING_VALUE", * stateName: "STRING_VALUE", * mock: { // MockInput * result: "STRING_VALUE", * errorOutput: { // MockErrorOutput * error: "STRING_VALUE", * cause: "STRING_VALUE", * }, * fieldValidationMode: "STRICT" || "PRESENT" || "NONE", * }, * context: "STRING_VALUE", * stateConfiguration: { // TestStateConfiguration * retrierRetryCount: Number("int"), * errorCausedByState: "STRING_VALUE", * mapIterationFailureCount: Number("int"), * mapItemReaderData: "STRING_VALUE", * }, * }; * const command = new TestStateCommand(input); * const response = await client.send(command); * // { // TestStateOutput * // output: "STRING_VALUE", * // error: "STRING_VALUE", * // cause: "STRING_VALUE", * // inspectionData: { // InspectionData * // input: "STRING_VALUE", * // afterArguments: "STRING_VALUE", * // afterInputPath: "STRING_VALUE", * // afterParameters: "STRING_VALUE", * // result: "STRING_VALUE", * // afterResultSelector: "STRING_VALUE", * // afterResultPath: "STRING_VALUE", * // request: { // InspectionDataRequest * // protocol: "STRING_VALUE", * // method: "STRING_VALUE", * // url: "STRING_VALUE", * // headers: "STRING_VALUE", * // body: "STRING_VALUE", * // }, * // response: { // InspectionDataResponse * // protocol: "STRING_VALUE", * // statusCode: "STRING_VALUE", * // statusMessage: "STRING_VALUE", * // headers: "STRING_VALUE", * // body: "STRING_VALUE", * // }, * // variables: "STRING_VALUE", * // errorDetails: { // InspectionErrorDetails * // catchIndex: Number("int"), * // retryIndex: Number("int"), * // retryBackoffIntervalSeconds: Number("int"), * // }, * // afterItemsPath: "STRING_VALUE", * // afterItemSelector: "STRING_VALUE", * // afterItemBatcher: "STRING_VALUE", * // afterItemsPointer: "STRING_VALUE", * // toleratedFailureCount: Number("int"), * // toleratedFailurePercentage: Number("float"), * // maxConcurrency: Number("int"), * // }, * // nextState: "STRING_VALUE", * // status: "SUCCEEDED" || "FAILED" || "RETRIABLE" || "CAUGHT_ERROR", * // }; * * ``` * * @param TestStateCommandInput - {@link TestStateCommandInput} * @returns {@link TestStateCommandOutput} * @see {@link TestStateCommandInput} for command's `input` shape. * @see {@link TestStateCommandOutput} for command's `response` shape. * @see {@link SFNClientResolvedConfig | config} for SFNClient's `config` shape. * * @throws {@link InvalidArn} (client fault) *

The provided Amazon Resource Name (ARN) is not valid.

* * @throws {@link InvalidDefinition} (client fault) *

The provided Amazon States Language definition is not valid.

* * @throws {@link InvalidExecutionInput} (client fault) *

The provided JSON input data is not valid.

* * @throws {@link ValidationException} (client fault) *

The input does not satisfy the constraints specified by an Amazon Web Services service.

* * @throws {@link SFNServiceException} *

Base exception class for all service exceptions from SFN service.

* * * @public */ export declare class TestStateCommand extends TestStateCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: TestStateInput; output: TestStateOutput; }; sdk: { input: TestStateCommandInput; output: TestStateCommandOutput; }; }; }