v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-1737274251.5 KB

Validates the syntax of a state machine definition specified in Amazon States Language (ASL), a JSON-based, structured language.

You can validate that a state machine definition is correct without creating a state machine resource.

Suggested uses for ValidateStateMachineDefinition:

  • Integrate automated checks into your code review or Continuous Integration (CI) process to check state machine definitions before starting deployments.

  • Run validation from a Git pre-commit hook to verify the definition before committing to your source repository.

Validation will look for problems in your state machine definition and return a result and a list of diagnostic elements.

The result value will be OK when your workflow definition can be successfully created or updated. Note the result can be OK even when diagnostic warnings are present in the response. The result value will be FAIL when the workflow definition contains errors that would prevent you from creating or updating your state machine.

The list of ValidateStateMachineDefinitionDiagnostic data elements can contain zero or more WARNING and/or ERROR elements.

The ValidateStateMachineDefinition API might add new diagnostics in the future, adjust diagnostic codes, or change the message wording. Your automated processes should only rely on the value of the result field value (OK, FAIL). Do not rely on the exact order, count, or wording of diagnostic messages.

post/#X-Amz-Target=AWSStepFunctions.ValidateStateMachineDefinition

Headers

X-Amz-Target'AWSStepFunctions.ValidateStateMachineDefinition' required

Request body

definitionstring password required

The Amazon States Language definition of the state machine. For more information, see <a href="https://docs.aws.amazon.com/step-functions/latest/dg/concepts-amazon-states-language.html">Amazon States Language</a> (ASL).

type'STANDARD' | 'EXPRESS'

The target type of state machine for this definition. The default is <code>STANDARD</code>.

severity'ERROR' | 'WARNING'

Minimum level of diagnostics to return. <code>ERROR</code> returns only <code>ERROR</code> diagnostics, whereas <code>WARNING</code> returns both <code>WARNING</code> and <code>ERROR</code> diagnostics. The default is <code>ERROR</code>.

maxResultsinteger
<p>The maximum number of diagnostics that are returned per call. The default and maximum value is 100. Setting the value to 0 will also use the default of 100.</p> <p>If the number of diagnostics returned in the response exceeds <code>maxResults</code>, the value of the <code>truncated</code> field in the response will be set to <code>true</code>.</p>

Response

Success

result'OK' | 'FAIL' required

The result value will be <code>OK</code> when no syntax errors are found, or <code>FAIL</code> if the workflow definition does not pass verification.

truncatedboolean

The result value will be <code>true</code> if the number of diagnostics found in the workflow definition exceeds <code>maxResults</code>. When all diagnostics results are returned, the value will be <code>false</code>.