aws-cdk-lib.aws_stepfunctions.SingleStateOptions

interface SingleStateOptions

LanguageType name
.NETAmazon.CDK.AWS.StepFunctions.SingleStateOptions
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsstepfunctions#SingleStateOptions
Javasoftware.amazon.awscdk.services.stepfunctions.SingleStateOptions
Pythonaws_cdk.aws_stepfunctions.SingleStateOptions
TypeScript (source)aws-cdk-lib » aws_stepfunctions » SingleStateOptions

Options for creating a single state.

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_stepfunctions as stepfunctions } from 'aws-cdk-lib';

declare const resultSelector: any;
const singleStateOptions: stepfunctions.SingleStateOptions = {
  comment: 'comment',
  inputPath: 'inputPath',
  outputPath: 'outputPath',
  prefixStates: 'prefixStates',
  resultPath: 'resultPath',
  resultSelector: {
    resultSelectorKey: resultSelector,
  },
  stateId: 'stateId',
};

Properties

NameTypeDescription
comment?stringAn optional description for this state.
inputPath?stringJSONPath expression to select part of the state to be the input to this state.
outputPath?stringJSONPath expression to select part of the state to be the output to this state.
prefixStates?stringString to prefix all stateIds in the state machine with.
resultPath?stringJSONPath expression to indicate where to inject the state's output.
resultSelector?{ [string]: any }The JSON that will replace the state's raw result and become the effective result before ResultPath is applied.
stateId?stringID of newly created containing state.

comment?

Type: string (optional, default: No comment)

An optional description for this state.


inputPath?

Type: string (optional, default: $)

JSONPath expression to select part of the state to be the input to this state.

May also be the special value JsonPath.DISCARD, which will cause the effective input to be the empty object {}.


outputPath?

Type: string (optional, default: $)

JSONPath expression to select part of the state to be the output to this state.

May also be the special value JsonPath.DISCARD, which will cause the effective output to be the empty object {}.


prefixStates?

Type: string (optional, default: stateId)

String to prefix all stateIds in the state machine with.


resultPath?

Type: string (optional, default: $)

JSONPath expression to indicate where to inject the state's output.

May also be the special value JsonPath.DISCARD, which will cause the state's input to become its output.


resultSelector?

Type: { [string]: any } (optional, default: None)

The JSON that will replace the state's raw result and become the effective result before ResultPath is applied.

You can use ResultSelector to create a payload with values that are static or selected from the state's raw result.

See also: https://docs.aws.amazon.com/step-functions/latest/dg/input-output-inputpath-params.html#input-output-resultselector


stateId?

Type: string (optional, default: Construct ID of the StateMachineFragment)

ID of newly created containing state.