Validate State Machine Definition
sfn_validate_state_machine_definition | R Documentation |
Validates the syntax of a state machine definition¶
Description¶
Validates the syntax of a state machine definition.
You can validate that a state machine definition is correct without
creating a state machine resource. Step Functions will implicitly
perform the same syntax check when you invoke create_state_machine
and
update_state_machine
. State machine definitions are specified using a
JSON-based, structured language. For more information on Amazon States
Language see Amazon States
Language
(ASL).
Suggested uses for validate_state_machine_definition
:
-
Integrate automated checks into your code review or Continuous Integration (CI) process to validate state machine definitions before starting deployments.
-
Run the validation from a Git pre-commit hook to check your state machine definitions before committing them to your source repository.
Errors found in the state machine definition will be returned in the response as a list of diagnostic elements, rather than raise an exception.
Usage¶
Arguments¶
definition
[required] The Amazon States Language definition of the state machine. For more information, see Amazon States Language (ASL).
type
The target type of state machine for this definition. The default is
STANDARD
.severity
Minimum level of diagnostics to return.
ERROR
returns onlyERROR
diagnostics, whereasWARNING
returns bothWARNING
andERROR
diagnostics. The default isERROR
.maxResults
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.
If the number of diagnostics returned in the response exceeds
maxResults
, the value of thetruncated
field in the response will be set totrue
.
Value¶
A list with the following syntax:
list(
result = "OK"|"FAIL",
diagnostics = list(
list(
severity = "ERROR"|"WARNING",
code = "string",
message = "string",
location = "string"
)
),
truncated = TRUE|FALSE
)