Skip to content
v2.273.0

QueryLanguage Enum ​

The name of the query language used by the state machine or state.

Example ​

ts
const jsonata = sfn.Pass.jsonata(this, 'JSONata');
const jsonPath = sfn.Pass.jsonPath(this, 'JSONPath');
const definition = jsonata.next(jsonPath);

new sfn.StateMachine(this, 'MixedStateMachine', {
  // queryLanguage: sfn.QueryLanguage.JSON_PATH, // default
  definitionBody: sfn.DefinitionBody.fromChainable(definition),
});

// This throws an error. If JSONata is specified at the top level, JSONPath cannot be used in the state machine definition.
new sfn.StateMachine(this, 'JSONataOnlyStateMachine', {
  queryLanguage: sfn.QueryLanguage.JSONATA,
  definitionBody: sfn.DefinitionBody.fromChainable(definition),
});

Members ​

MemberDescription
JSON_PATHUse JSONPath.
JSONATAUse JSONata.

Referenced by ​

  • State.queryLanguagequery_languagequeryLanguageQueryLanguageQueryLanguage
  • StateBaseProps.queryLanguagequery_languagequeryLanguageQueryLanguageQueryLanguage
  • StateMachineProps.queryLanguagequery_languagequeryLanguageQueryLanguageQueryLanguage