diff --git a/clients/client-sfn/src/commands/DescribeStateMachineCommand.ts b/clients/client-sfn/src/commands/DescribeStateMachineCommand.ts index d57a60dda409..6d950c246d69 100644 --- a/clients/client-sfn/src/commands/DescribeStateMachineCommand.ts +++ b/clients/client-sfn/src/commands/DescribeStateMachineCommand.ts @@ -108,6 +108,11 @@ export interface DescribeStateMachineCommandOutput extends DescribeStateMachineO * // kmsDataKeyReusePeriodSeconds: Number("int"), * // type: "AWS_OWNED_KEY" || "CUSTOMER_MANAGED_KMS_KEY", // required * // }, + * // variableReferences: { // VariableReferences + * // "": [ // VariableNameList + * // "STRING_VALUE", + * // ], + * // }, * // }; * * ``` diff --git a/clients/client-sfn/src/commands/DescribeStateMachineForExecutionCommand.ts b/clients/client-sfn/src/commands/DescribeStateMachineForExecutionCommand.ts index 0069040651ac..c2eeb2637c6b 100644 --- a/clients/client-sfn/src/commands/DescribeStateMachineForExecutionCommand.ts +++ b/clients/client-sfn/src/commands/DescribeStateMachineForExecutionCommand.ts @@ -85,6 +85,11 @@ export interface DescribeStateMachineForExecutionCommandOutput * // kmsDataKeyReusePeriodSeconds: Number("int"), * // type: "AWS_OWNED_KEY" || "CUSTOMER_MANAGED_KMS_KEY", // required * // }, + * // variableReferences: { // VariableReferences + * // "": [ // VariableNameList + * // "STRING_VALUE", + * // ], + * // }, * // }; * * ``` diff --git a/clients/client-sfn/src/commands/GetExecutionHistoryCommand.ts b/clients/client-sfn/src/commands/GetExecutionHistoryCommand.ts index f1661d2512b9..42a3988939cc 100644 --- a/clients/client-sfn/src/commands/GetExecutionHistoryCommand.ts +++ b/clients/client-sfn/src/commands/GetExecutionHistoryCommand.ts @@ -57,7 +57,7 @@ export interface GetExecutionHistoryCommandOutput extends GetExecutionHistoryOut * // events: [ // HistoryEventList // required * // { // HistoryEvent * // timestamp: new Date("TIMESTAMP"), // required - * // type: "ActivityFailed" || "ActivityScheduled" || "ActivityScheduleFailed" || "ActivityStarted" || "ActivitySucceeded" || "ActivityTimedOut" || "ChoiceStateEntered" || "ChoiceStateExited" || "ExecutionAborted" || "ExecutionFailed" || "ExecutionStarted" || "ExecutionSucceeded" || "ExecutionTimedOut" || "FailStateEntered" || "LambdaFunctionFailed" || "LambdaFunctionScheduled" || "LambdaFunctionScheduleFailed" || "LambdaFunctionStarted" || "LambdaFunctionStartFailed" || "LambdaFunctionSucceeded" || "LambdaFunctionTimedOut" || "MapIterationAborted" || "MapIterationFailed" || "MapIterationStarted" || "MapIterationSucceeded" || "MapStateAborted" || "MapStateEntered" || "MapStateExited" || "MapStateFailed" || "MapStateStarted" || "MapStateSucceeded" || "ParallelStateAborted" || "ParallelStateEntered" || "ParallelStateExited" || "ParallelStateFailed" || "ParallelStateStarted" || "ParallelStateSucceeded" || "PassStateEntered" || "PassStateExited" || "SucceedStateEntered" || "SucceedStateExited" || "TaskFailed" || "TaskScheduled" || "TaskStarted" || "TaskStartFailed" || "TaskStateAborted" || "TaskStateEntered" || "TaskStateExited" || "TaskSubmitFailed" || "TaskSubmitted" || "TaskSucceeded" || "TaskTimedOut" || "WaitStateAborted" || "WaitStateEntered" || "WaitStateExited" || "MapRunAborted" || "MapRunFailed" || "MapRunStarted" || "MapRunSucceeded" || "ExecutionRedriven" || "MapRunRedriven", // required + * // type: "ActivityFailed" || "ActivityScheduled" || "ActivityScheduleFailed" || "ActivityStarted" || "ActivitySucceeded" || "ActivityTimedOut" || "ChoiceStateEntered" || "ChoiceStateExited" || "ExecutionAborted" || "ExecutionFailed" || "ExecutionStarted" || "ExecutionSucceeded" || "ExecutionTimedOut" || "FailStateEntered" || "LambdaFunctionFailed" || "LambdaFunctionScheduled" || "LambdaFunctionScheduleFailed" || "LambdaFunctionStarted" || "LambdaFunctionStartFailed" || "LambdaFunctionSucceeded" || "LambdaFunctionTimedOut" || "MapIterationAborted" || "MapIterationFailed" || "MapIterationStarted" || "MapIterationSucceeded" || "MapStateAborted" || "MapStateEntered" || "MapStateExited" || "MapStateFailed" || "MapStateStarted" || "MapStateSucceeded" || "ParallelStateAborted" || "ParallelStateEntered" || "ParallelStateExited" || "ParallelStateFailed" || "ParallelStateStarted" || "ParallelStateSucceeded" || "PassStateEntered" || "PassStateExited" || "SucceedStateEntered" || "SucceedStateExited" || "TaskFailed" || "TaskScheduled" || "TaskStarted" || "TaskStartFailed" || "TaskStateAborted" || "TaskStateEntered" || "TaskStateExited" || "TaskSubmitFailed" || "TaskSubmitted" || "TaskSucceeded" || "TaskTimedOut" || "WaitStateAborted" || "WaitStateEntered" || "WaitStateExited" || "MapRunAborted" || "MapRunFailed" || "MapRunStarted" || "MapRunSucceeded" || "ExecutionRedriven" || "MapRunRedriven" || "EvaluationFailed", // required * // id: Number("long"), // required * // previousEventId: Number("long"), * // activityFailedEventDetails: { // ActivityFailedEventDetails @@ -230,6 +230,12 @@ export interface GetExecutionHistoryCommandOutput extends GetExecutionHistoryOut * // name: "STRING_VALUE", // required * // output: "STRING_VALUE", * // outputDetails: "", + * // assignedVariables: { // AssignedVariables + * // "": "STRING_VALUE", + * // }, + * // assignedVariablesDetails: { // AssignedVariablesDetails + * // truncated: true || false, + * // }, * // }, * // mapRunStartedEventDetails: { // MapRunStartedEventDetails * // mapRunArn: "STRING_VALUE", @@ -242,6 +248,12 @@ export interface GetExecutionHistoryCommandOutput extends GetExecutionHistoryOut * // mapRunArn: "STRING_VALUE", * // redriveCount: Number("int"), * // }, + * // evaluationFailedEventDetails: { // EvaluationFailedEventDetails + * // error: "STRING_VALUE", + * // cause: "STRING_VALUE", + * // location: "STRING_VALUE", + * // state: "STRING_VALUE", // required + * // }, * // }, * // ], * // nextToken: "STRING_VALUE", diff --git a/clients/client-sfn/src/commands/TestStateCommand.ts b/clients/client-sfn/src/commands/TestStateCommand.ts index 50c6042792b4..c1a886fb4594 100644 --- a/clients/client-sfn/src/commands/TestStateCommand.ts +++ b/clients/client-sfn/src/commands/TestStateCommand.ts @@ -91,10 +91,11 @@ export interface TestStateCommandOutput extends TestStateOutput, __MetadataBeare * const client = new SFNClient(config); * const input = { // TestStateInput * definition: "STRING_VALUE", // required - * roleArn: "STRING_VALUE", // required + * roleArn: "STRING_VALUE", * input: "STRING_VALUE", * inspectionLevel: "INFO" || "DEBUG" || "TRACE", * revealSecrets: true || false, + * variables: "STRING_VALUE", * }; * const command = new TestStateCommand(input); * const response = await client.send(command); @@ -104,6 +105,7 @@ export interface TestStateCommandOutput extends TestStateOutput, __MetadataBeare * // cause: "STRING_VALUE", * // inspectionData: { // InspectionData * // input: "STRING_VALUE", + * // afterArguments: "STRING_VALUE", * // afterInputPath: "STRING_VALUE", * // afterParameters: "STRING_VALUE", * // result: "STRING_VALUE", @@ -123,6 +125,7 @@ export interface TestStateCommandOutput extends TestStateOutput, __MetadataBeare * // headers: "STRING_VALUE", * // body: "STRING_VALUE", * // }, + * // variables: "STRING_VALUE", * // }, * // nextState: "STRING_VALUE", * // status: "SUCCEEDED" || "FAILED" || "RETRIABLE" || "CAUGHT_ERROR", diff --git a/clients/client-sfn/src/commands/ValidateStateMachineDefinitionCommand.ts b/clients/client-sfn/src/commands/ValidateStateMachineDefinitionCommand.ts index 75f232b0f75d..2d097d4ac491 100644 --- a/clients/client-sfn/src/commands/ValidateStateMachineDefinitionCommand.ts +++ b/clients/client-sfn/src/commands/ValidateStateMachineDefinitionCommand.ts @@ -9,6 +9,7 @@ import { ValidateStateMachineDefinitionInput, ValidateStateMachineDefinitionInputFilterSensitiveLog, ValidateStateMachineDefinitionOutput, + ValidateStateMachineDefinitionOutputFilterSensitiveLog, } from "../models/models_0"; import { de_ValidateStateMachineDefinitionCommand, @@ -37,26 +38,37 @@ export interface ValidateStateMachineDefinitionCommandOutput __MetadataBearer {} /** - *

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 CreateStateMachine and - * UpdateStateMachine. State machine definitions are specified using a - * JSON-based, structured language. For more information on Amazon States Language see Amazon States Language (ASL).

+ *

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 validate state machine definitions before starting + * (CI) process to check 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.

    + *

    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.

* - *

Errors found in the state machine definition will be returned in the response as a list of diagnostic elements, rather than raise an exception.

+ *

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.

*
* @example * Use a bare-bones client and the command you need to make an API call. @@ -118,7 +130,7 @@ export class ValidateStateMachineDefinitionCommand extends $Command }) .s("AWSStepFunctions", "ValidateStateMachineDefinition", {}) .n("SFNClient", "ValidateStateMachineDefinitionCommand") - .f(ValidateStateMachineDefinitionInputFilterSensitiveLog, void 0) + .f(ValidateStateMachineDefinitionInputFilterSensitiveLog, ValidateStateMachineDefinitionOutputFilterSensitiveLog) .ser(se_ValidateStateMachineDefinitionCommand) .de(de_ValidateStateMachineDefinitionCommand) .build() { diff --git a/clients/client-sfn/src/models/models_0.ts b/clients/client-sfn/src/models/models_0.ts index 0852a247d6c5..714dee1253a1 100644 --- a/clients/client-sfn/src/models/models_0.ts +++ b/clients/client-sfn/src/models/models_0.ts @@ -135,7 +135,7 @@ export interface ActivityListItem { export interface HistoryEventExecutionDataDetails { /** *

Indicates whether input or output was truncated in the response. Always false - * for API calls.

+ * for API calls. In CloudWatch logs, the value will be true if the data is truncated due to size limits.

* @public */ truncated?: boolean | undefined; @@ -267,6 +267,19 @@ export class ActivityWorkerLimitExceeded extends __BaseException { } } +/** + *

Provides details about assigned variables in an execution history event.

+ * @public + */ +export interface AssignedVariablesDetails { + /** + *

Indicates whether assigned variables were truncated in the response. Always false + * for API calls. In CloudWatch logs, the value will be true if the data is truncated due to size limits.

+ * @public + */ + truncated?: boolean | undefined; +} + /** * @public * @enum @@ -1923,6 +1936,12 @@ export interface DescribeStateMachineOutput { * @public */ encryptionConfiguration?: EncryptionConfiguration | undefined; + + /** + *

A map of state name to a list of variables referenced by that state. States that do not use variable references will not be shown in the response.

+ * @public + */ + variableReferences?: Record | undefined; } /** @@ -2087,6 +2106,12 @@ export interface DescribeStateMachineForExecutionOutput { * @public */ encryptionConfiguration?: EncryptionConfiguration | undefined; + + /** + *

A map of state name to a list of variables referenced by that state. States that do not use variable references will not be shown in the response.

+ * @public + */ + variableReferences?: Record | undefined; } /** @@ -2167,6 +2192,36 @@ export interface GetExecutionHistoryInput { includeExecutionData?: boolean | undefined; } +/** + *

Contains details about an evaluation failure that occurred while processing a state, for example, when a JSONata expression throws an error. This event will only be present in state machines that have QueryLanguage set to JSONata, or individual states set to JSONata.

+ * @public + */ +export interface EvaluationFailedEventDetails { + /** + *

The error code of the failure.

+ * @public + */ + error?: string | undefined; + + /** + *

A more detailed explanation of the cause of the failure.

+ * @public + */ + cause?: string | undefined; + + /** + *

The location of the field in the state in which the evaluation error occurred.

+ * @public + */ + location?: string | undefined; + + /** + *

The name of the state in which the evaluation error occurred.

+ * @public + */ + state: string | undefined; +} + /** *

Contains details about an abort of an execution.

* @public @@ -2573,6 +2628,18 @@ export interface StateExitedEventDetails { * @public */ outputDetails?: HistoryEventExecutionDataDetails | undefined; + + /** + *

Map of variable name and value as a serialized JSON representation.

+ * @public + */ + assignedVariables?: Record | undefined; + + /** + *

Provides details about input or output in an execution history event.

+ * @public + */ + assignedVariablesDetails?: AssignedVariablesDetails | undefined; } /** @@ -2836,6 +2903,7 @@ export const HistoryEventType = { ActivityTimedOut: "ActivityTimedOut", ChoiceStateEntered: "ChoiceStateEntered", ChoiceStateExited: "ChoiceStateExited", + EvaluationFailed: "EvaluationFailed", ExecutionAborted: "ExecutionAborted", ExecutionFailed: "ExecutionFailed", ExecutionRedriven: "ExecutionRedriven", @@ -3143,6 +3211,12 @@ export interface HistoryEvent { * @public */ mapRunRedrivenEventDetails?: MapRunRedrivenEventDetails | undefined; + + /** + *

Contains details about an evaluation failure that occurred while processing a state.

+ * @public + */ + evaluationFailedEventDetails?: EvaluationFailedEventDetails | undefined; } /** @@ -4382,7 +4456,7 @@ export interface TestStateInput { *

The Amazon Resource Name (ARN) of the execution role with the required IAM permissions for the state.

* @public */ - roleArn: string | undefined; + roleArn?: string | undefined; /** *

A string that contains the JSON input data for the state.

@@ -4418,6 +4492,12 @@ export interface TestStateInput { * @public */ revealSecrets?: boolean | undefined; + + /** + *

JSON object literal that sets variables used in the state under test. Object keys are the variable names and values are the variable values.

+ * @public + */ + variables?: string | undefined; } /** @@ -4504,13 +4584,19 @@ export interface InspectionData { input?: string | undefined; /** - *

The input after Step Functions applies the InputPath filter.

+ *

The input after Step Functions applies an Arguments filter. This event will only be present when QueryLanguage for the state machine or individual states is set to JSONata. For more info, see Transforming data with Step Functions.

+ * @public + */ + afterArguments?: string | undefined; + + /** + *

The input after Step Functions applies the InputPath filter. Not populated when QueryLanguage is JSONata.

* @public */ afterInputPath?: string | undefined; /** - *

The effective input after Step Functions applies the Parameters filter.

+ *

The effective input after Step Functions applies the Parameters filter. Not populated when QueryLanguage is JSONata.

* @public */ afterParameters?: string | undefined; @@ -4522,13 +4608,13 @@ export interface InspectionData { result?: string | undefined; /** - *

The effective result after Step Functions applies the ResultSelector filter.

+ *

The effective result after Step Functions applies the ResultSelector filter. Not populated when QueryLanguage is JSONata.

* @public */ afterResultSelector?: string | undefined; /** - *

The effective result combined with the raw state input after Step Functions applies the ResultPath filter.

+ *

The effective result combined with the raw state input after Step Functions applies the ResultPath filter. Not populated when QueryLanguage is JSONata.

* @public */ afterResultPath?: string | undefined; @@ -4544,6 +4630,12 @@ export interface InspectionData { * @public */ response?: InspectionDataResponse | undefined; + + /** + *

JSON string that contains the set of workflow variables after execution of the state. The set will include variables assigned in the state and variables set up as test state input.

+ * @public + */ + variables?: string | undefined; } /** @@ -4843,14 +4935,104 @@ export interface ValidateStateMachineDefinitionInput { } /** - *

Describes an error found during validation. Validation errors found in the definition - * return in the response as diagnostic elements, rather - * than raise an exception.

+ *

Describes potential issues found during state machine validation. Rather than raise an + * exception, validation will return a list of diagnostic + * elements containing diagnostic information.

+ * + *

The ValidateStateMachineDefinitionlAPI 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.

+ *
+ *

+ * List of warning codes + *

+ *
+ *
NO_DOLLAR
+ *
+ *

No .$ on a field that appears to be a JSONPath or Intrinsic Function.

+ *
+ *
NO_PATH
+ *
+ *

Field value looks like a path, but field name does not end with 'Path'.

+ *
+ *
PASS_RESULT_IS_STATIC
+ *
+ *

Attempt to use a path in the result of a pass state.

+ *
+ *
+ *

+ * List of error codes + *

+ *
+ *
INVALID_JSON_DESCRIPTION
+ *
+ *

JSON syntax problem found.

+ *
+ *
MISSING_DESCRIPTION
+ *
+ *

Received a null or empty workflow input.

+ *
+ *
SCHEMA_VALIDATION_FAILED
+ *
+ *

Schema validation reported errors.

+ *
+ *
INVALID_RESOURCE
+ *
+ *

The value of a Task-state resource field is invalid.

+ *
+ *
MISSING_END_STATE
+ *
+ *

The workflow does not have a terminal state.

+ *
+ *
DUPLICATE_STATE_NAME
+ *
+ *

The same state name appears more than once.

+ *
+ *
INVALID_STATE_NAME
+ *
+ *

The state name does not follow the naming convention.

+ *
+ *
STATE_MACHINE_NAME_EMPTY
+ *
+ *

The state machine name has not been specified.

+ *
+ *
STATE_MACHINE_NAME_INVALID
+ *
+ *

The state machine name does not follow the naming convention.

+ *
+ *
STATE_MACHINE_NAME_TOO_LONG
+ *
+ *

The state name exceeds the allowed length.

+ *
+ *
STATE_MACHINE_NAME_ALREADY_EXISTS
+ *
+ *

The state name already exists.

+ *
+ *
DUPLICATE_LABEL_NAME
+ *
+ *

A label name appears more than once.

+ *
+ *
INVALID_LABEL_NAME
+ *
+ *

You have provided an invalid label name.

+ *
+ *
MISSING_TRANSITION_TARGET
+ *
+ *

The value of "Next" field doesn't match a known state name.

+ *
+ *
TOO_DEEPLY_NESTED
+ *
+ *

The states are too deeply nested.

+ *
+ *
* @public */ export interface ValidateStateMachineDefinitionDiagnostic { /** *

A value of ERROR means that you cannot create or update a state machine with this definition.

+ *

+ * WARNING level diagnostics alert you to potential issues, but they will not prevent you from creating or updating your state machine.

* @public */ severity: ValidateStateMachineDefinitionSeverity | undefined; @@ -4902,9 +5084,7 @@ export interface ValidateStateMachineDefinitionOutput { result: ValidateStateMachineDefinitionResultCode | undefined; /** - *

If the result is OK, this field will be empty. When there are errors, - * this field will contain an array of Diagnostic objects - * to help you troubleshoot.

+ *

An array of diagnostic errors and warnings found during validation of the state machine definition. Since warnings do not prevent deploying your workflow definition, the result value could be OK even when warning diagnostics are present in the response.

* @public */ diagnostics: ValidateStateMachineDefinitionDiagnostic[] | undefined; @@ -4995,6 +5175,7 @@ export const DescribeStateMachineOutputFilterSensitiveLog = (obj: DescribeStateM ...obj, ...(obj.definition && { definition: SENSITIVE_STRING }), ...(obj.description && { description: SENSITIVE_STRING }), + ...(obj.variableReferences && { variableReferences: SENSITIVE_STRING }), }); /** @@ -5013,6 +5194,7 @@ export const DescribeStateMachineForExecutionOutputFilterSensitiveLog = ( ): any => ({ ...obj, ...(obj.definition && { definition: SENSITIVE_STRING }), + ...(obj.variableReferences && { variableReferences: SENSITIVE_STRING }), }); /** @@ -5023,6 +5205,16 @@ export const GetActivityTaskOutputFilterSensitiveLog = (obj: GetActivityTaskOutp ...(obj.input && { input: SENSITIVE_STRING }), }); +/** + * @internal + */ +export const EvaluationFailedEventDetailsFilterSensitiveLog = (obj: EvaluationFailedEventDetails): any => ({ + ...obj, + ...(obj.error && { error: SENSITIVE_STRING }), + ...(obj.cause && { cause: SENSITIVE_STRING }), + ...(obj.location && { location: SENSITIVE_STRING }), +}); + /** * @internal */ @@ -5149,6 +5341,7 @@ export const StateEnteredEventDetailsFilterSensitiveLog = (obj: StateEnteredEven export const StateExitedEventDetailsFilterSensitiveLog = (obj: StateExitedEventDetails): any => ({ ...obj, ...(obj.output && { output: SENSITIVE_STRING }), + ...(obj.assignedVariables && { assignedVariables: SENSITIVE_STRING }), }); /** @@ -5310,6 +5503,9 @@ export const HistoryEventFilterSensitiveLog = (obj: HistoryEvent): any => ({ ...(obj.mapRunFailedEventDetails && { mapRunFailedEventDetails: MapRunFailedEventDetailsFilterSensitiveLog(obj.mapRunFailedEventDetails), }), + ...(obj.evaluationFailedEventDetails && { + evaluationFailedEventDetails: EvaluationFailedEventDetailsFilterSensitiveLog(obj.evaluationFailedEventDetails), + }), }); /** @@ -5388,6 +5584,7 @@ export const TestStateInputFilterSensitiveLog = (obj: TestStateInput): any => ({ ...obj, ...(obj.definition && { definition: SENSITIVE_STRING }), ...(obj.input && { input: SENSITIVE_STRING }), + ...(obj.variables && { variables: SENSITIVE_STRING }), }); /** @@ -5396,11 +5593,13 @@ export const TestStateInputFilterSensitiveLog = (obj: TestStateInput): any => ({ export const InspectionDataFilterSensitiveLog = (obj: InspectionData): any => ({ ...obj, ...(obj.input && { input: SENSITIVE_STRING }), + ...(obj.afterArguments && { afterArguments: SENSITIVE_STRING }), ...(obj.afterInputPath && { afterInputPath: SENSITIVE_STRING }), ...(obj.afterParameters && { afterParameters: SENSITIVE_STRING }), ...(obj.result && { result: SENSITIVE_STRING }), ...(obj.afterResultSelector && { afterResultSelector: SENSITIVE_STRING }), ...(obj.afterResultPath && { afterResultPath: SENSITIVE_STRING }), + ...(obj.variables && { variables: SENSITIVE_STRING }), }); /** @@ -5440,3 +5639,27 @@ export const ValidateStateMachineDefinitionInputFilterSensitiveLog = ( ...obj, ...(obj.definition && { definition: SENSITIVE_STRING }), }); + +/** + * @internal + */ +export const ValidateStateMachineDefinitionDiagnosticFilterSensitiveLog = ( + obj: ValidateStateMachineDefinitionDiagnostic +): any => ({ + ...obj, + ...(obj.code && { code: SENSITIVE_STRING }), + ...(obj.message && { message: SENSITIVE_STRING }), + ...(obj.location && { location: SENSITIVE_STRING }), +}); + +/** + * @internal + */ +export const ValidateStateMachineDefinitionOutputFilterSensitiveLog = ( + obj: ValidateStateMachineDefinitionOutput +): any => ({ + ...obj, + ...(obj.diagnostics && { + diagnostics: obj.diagnostics.map((item) => ValidateStateMachineDefinitionDiagnosticFilterSensitiveLog(item)), + }), +}); diff --git a/clients/client-sfn/src/protocols/Aws_json1_0.ts b/clients/client-sfn/src/protocols/Aws_json1_0.ts index 0007998727f3..1a1acd3575f9 100644 --- a/clients/client-sfn/src/protocols/Aws_json1_0.ts +++ b/clients/client-sfn/src/protocols/Aws_json1_0.ts @@ -2221,6 +2221,10 @@ const de_ActivityListItem = (output: any, context: __SerdeContext): ActivityList // de_ActivityWorkerLimitExceeded omitted. +// de_AssignedVariables omitted. + +// de_AssignedVariablesDetails omitted. + // de_BillingDetails omitted. // de_CloudWatchEventsExecutionDataDetails omitted. @@ -2361,6 +2365,7 @@ const de_DescribeStateMachineForExecutionOutput = ( stateMachineArn: __expectString, tracingConfiguration: _json, updateDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + variableReferences: _json, }) as any; }; @@ -2382,11 +2387,14 @@ const de_DescribeStateMachineOutput = (output: any, context: __SerdeContext): De status: __expectString, tracingConfiguration: _json, type: __expectString, + variableReferences: _json, }) as any; }; // de_EncryptionConfiguration omitted. +// de_EvaluationFailedEventDetails omitted. + // de_ExecutionAbortedEventDetails omitted. // de_ExecutionAlreadyExists omitted. @@ -2462,6 +2470,7 @@ const de_HistoryEvent = (output: any, context: __SerdeContext): HistoryEvent => activityStartedEventDetails: _json, activitySucceededEventDetails: _json, activityTimedOutEventDetails: _json, + evaluationFailedEventDetails: _json, executionAbortedEventDetails: _json, executionFailedEventDetails: _json, executionRedrivenEventDetails: _json, @@ -2889,6 +2898,10 @@ const de_UpdateStateMachineOutput = (output: any, context: __SerdeContext): Upda // de_ValidationException omitted. +// de_VariableNameList omitted. + +// de_VariableReferences omitted. + const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, requestId: diff --git a/codegen/sdk-codegen/aws-models/sfn.json b/codegen/sdk-codegen/aws-models/sfn.json index 4dc3fd39396d..5aa17f807052 100644 --- a/codegen/sdk-codegen/aws-models/sfn.json +++ b/codegen/sdk-codegen/aws-models/sfn.json @@ -1413,6 +1413,30 @@ } } }, + "com.amazonaws.sfn#AssignedVariables": { + "type": "map", + "key": { + "target": "com.amazonaws.sfn#VariableName" + }, + "value": { + "target": "com.amazonaws.sfn#VariableValue" + } + }, + "com.amazonaws.sfn#AssignedVariablesDetails": { + "type": "structure", + "members": { + "truncated": { + "target": "com.amazonaws.sfn#truncated", + "traits": { + "smithy.api#default": false, + "smithy.api#documentation": "

Indicates whether assigned variables were truncated in the response. Always false\n for API calls. In CloudWatch logs, the value will be true if the data is truncated due to size limits.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Provides details about assigned variables in an execution history event.

" + } + }, "com.amazonaws.sfn#BilledDuration": { "type": "long", "traits": { @@ -2643,6 +2667,12 @@ "traits": { "smithy.api#documentation": "

Settings to configure server-side encryption.

" } + }, + "variableReferences": { + "target": "com.amazonaws.sfn#VariableReferences", + "traits": { + "smithy.api#documentation": "

A map of state name to a list of variables referenced by that state. States that do not use variable references will not be shown in the response.

" + } } }, "traits": { @@ -2753,6 +2783,12 @@ "traits": { "smithy.api#documentation": "

Settings to configure server-side encryption.

" } + }, + "variableReferences": { + "target": "com.amazonaws.sfn#VariableReferences", + "traits": { + "smithy.api#documentation": "

A map of state name to a list of variables referenced by that state. States that do not use variable references will not be shown in the response.

" + } } }, "traits": { @@ -2812,6 +2848,49 @@ "com.amazonaws.sfn#ErrorMessage": { "type": "string" }, + "com.amazonaws.sfn#EvaluationFailedEventDetails": { + "type": "structure", + "members": { + "error": { + "target": "com.amazonaws.sfn#SensitiveError", + "traits": { + "smithy.api#documentation": "

The error code of the failure.

" + } + }, + "cause": { + "target": "com.amazonaws.sfn#SensitiveCause", + "traits": { + "smithy.api#documentation": "

A more detailed explanation of the cause of the failure.

" + } + }, + "location": { + "target": "com.amazonaws.sfn#EvaluationFailureLocation", + "traits": { + "smithy.api#documentation": "

The location of the field in the state in which the evaluation error occurred.

" + } + }, + "state": { + "target": "com.amazonaws.sfn#StateName", + "traits": { + "smithy.api#documentation": "

The name of the state in which the evaluation error occurred.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Contains details about an evaluation failure that occurred while processing a state, for example, when a JSONata expression throws an error. This event will only be present in state machines that have QueryLanguage set to JSONata, or individual states set to JSONata.

" + } + }, + "com.amazonaws.sfn#EvaluationFailureLocation": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 256 + }, + "smithy.api#sensitive": {} + } + }, "com.amazonaws.sfn#EventId": { "type": "long", "traits": { @@ -3561,6 +3640,12 @@ "traits": { "smithy.api#documentation": "

Contains details about the redrive attempt of a Map Run.

" } + }, + "evaluationFailedEventDetails": { + "target": "com.amazonaws.sfn#EvaluationFailedEventDetails", + "traits": { + "smithy.api#documentation": "

Contains details about an evaluation failure that occurred while processing a state.

" + } } }, "traits": { @@ -3574,7 +3659,7 @@ "target": "com.amazonaws.sfn#truncated", "traits": { "smithy.api#default": false, - "smithy.api#documentation": "

Indicates whether input or output was truncated in the response. Always false\n for API calls.

" + "smithy.api#documentation": "

Indicates whether input or output was truncated in the response. Always false\n for API calls. In CloudWatch logs, the value will be true if the data is truncated due to size limits.

" } } }, @@ -3959,6 +4044,12 @@ "traits": { "smithy.api#enumValue": "MapRunRedriven" } + }, + "EvaluationFailed": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EvaluationFailed" + } } } }, @@ -4006,16 +4097,22 @@ "smithy.api#documentation": "

The raw state input.

" } }, + "afterArguments": { + "target": "com.amazonaws.sfn#SensitiveData", + "traits": { + "smithy.api#documentation": "

The input after Step Functions applies an Arguments filter. This event will only be present when QueryLanguage for the state machine or individual states is set to JSONata. For more info, see Transforming data with Step Functions.

" + } + }, "afterInputPath": { "target": "com.amazonaws.sfn#SensitiveData", "traits": { - "smithy.api#documentation": "

The input after Step Functions applies the InputPath filter.

" + "smithy.api#documentation": "

The input after Step Functions applies the InputPath filter. Not populated when QueryLanguage is JSONata.

" } }, "afterParameters": { "target": "com.amazonaws.sfn#SensitiveData", "traits": { - "smithy.api#documentation": "

The effective input after Step Functions applies the Parameters filter.

" + "smithy.api#documentation": "

The effective input after Step Functions applies the Parameters filter. Not populated when QueryLanguage is JSONata.

" } }, "result": { @@ -4027,13 +4124,13 @@ "afterResultSelector": { "target": "com.amazonaws.sfn#SensitiveData", "traits": { - "smithy.api#documentation": "

The effective result after Step Functions applies the ResultSelector filter.

" + "smithy.api#documentation": "

The effective result after Step Functions applies the ResultSelector filter. Not populated when QueryLanguage is JSONata.

" } }, "afterResultPath": { "target": "com.amazonaws.sfn#SensitiveData", "traits": { - "smithy.api#documentation": "

The effective result combined with the raw state input after Step Functions applies the ResultPath filter.

" + "smithy.api#documentation": "

The effective result combined with the raw state input after Step Functions applies the ResultPath filter. Not populated when QueryLanguage is JSONata.

" } }, "request": { @@ -4047,6 +4144,12 @@ "traits": { "smithy.api#documentation": "

The raw HTTP response that is returned when you test an HTTP Task.

" } + }, + "variables": { + "target": "com.amazonaws.sfn#SensitiveData", + "traits": { + "smithy.api#documentation": "

JSON string that contains the set of workflow variables after execution of the state. The set will include variables assigned in the state and variables set up as test state input.

" + } } }, "traits": { @@ -6279,6 +6382,18 @@ "traits": { "smithy.api#documentation": "

Contains details about the output of an execution history event.

" } + }, + "assignedVariables": { + "target": "com.amazonaws.sfn#AssignedVariables", + "traits": { + "smithy.api#documentation": "

Map of variable name and value as a serialized JSON representation.

" + } + }, + "assignedVariablesDetails": { + "target": "com.amazonaws.sfn#AssignedVariablesDetails", + "traits": { + "smithy.api#documentation": "

Provides details about input or output in an execution history event.

" + } } }, "traits": { @@ -7085,8 +7200,7 @@ "roleArn": { "target": "com.amazonaws.sfn#Arn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the execution role with the required IAM permissions for the state.

", - "smithy.api#required": {} + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the execution role with the required IAM permissions for the state.

" } }, "input": { @@ -7107,6 +7221,12 @@ "smithy.api#default": false, "smithy.api#documentation": "

Specifies whether or not to include secret information in the test result. For HTTP Tasks, a secret includes the data that an EventBridge connection adds to modify the HTTP request headers, query parameters, and body. Step Functions doesn't omit any information included in the state definition or the HTTP response.

\n

If you set revealSecrets to true, you must make sure that the IAM user that calls the TestState API has permission for the states:RevealSecrets action. For an example of IAM policy that sets the states:RevealSecrets permission, see IAM permissions to test a state. Without this permission, Step Functions throws an access denied error.

\n

By default, revealSecrets is set to false.

" } + }, + "variables": { + "target": "com.amazonaws.sfn#SensitiveData", + "traits": { + "smithy.api#documentation": "

JSON object literal that sets variables used in the state under test. Object keys are the variable names and values are the variable values.

" + } } }, "traits": { @@ -7586,11 +7706,14 @@ } ], "traits": { - "smithy.api#documentation": "

Validates the syntax of a state machine definition.

\n

You can validate that a state machine definition is correct without \n creating a state machine resource. Step Functions will implicitly perform the same\n syntax check when you invoke CreateStateMachine and\n UpdateStateMachine. State machine definitions are specified using a\n JSON-based, structured language. For more information on Amazon States Language see Amazon States Language (ASL).

\n

Suggested uses for ValidateStateMachineDefinition:

\n
    \n
  • \n

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

    \n
  • \n
  • \n

    Run the validation from a Git pre-commit hook to check your state machine\n definitions before committing them to your source repository.

    \n
  • \n
\n \n

Errors found in the state machine definition will be returned in the response as a list of diagnostic elements, rather than raise an exception.

\n
" + "smithy.api#documentation": "

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

\n

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

\n

Suggested uses for ValidateStateMachineDefinition:

\n
    \n
  • \n

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

    \n
  • \n
  • \n

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

    \n
  • \n
\n

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

\n

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

\n

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

\n \n

The ValidateStateMachineDefinition API might add\n new diagnostics in the future, adjust diagnostic codes, or change the message\n 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\n wording of diagnostic messages.

\n
" } }, "com.amazonaws.sfn#ValidateStateMachineDefinitionCode": { - "type": "string" + "type": "string", + "traits": { + "smithy.api#sensitive": {} + } }, "com.amazonaws.sfn#ValidateStateMachineDefinitionDiagnostic": { "type": "structure", @@ -7598,7 +7721,7 @@ "severity": { "target": "com.amazonaws.sfn#ValidateStateMachineDefinitionSeverity", "traits": { - "smithy.api#documentation": "

A value of ERROR means that you cannot create or update a state machine with this definition.

", + "smithy.api#documentation": "

A value of ERROR means that you cannot create or update a state machine with this definition.

\n

\n WARNING level diagnostics alert you to potential issues, but they will not prevent you from creating or updating your state machine.

", "smithy.api#required": {} } }, @@ -7624,7 +7747,7 @@ } }, "traits": { - "smithy.api#documentation": "

Describes an error found during validation. Validation errors found in the definition\n return in the response as diagnostic elements, rather\n than raise an exception.

" + "smithy.api#documentation": "

Describes potential issues found during state machine validation. Rather than raise an\n exception, validation will return a list of diagnostic\n elements containing diagnostic information.

\n \n

The ValidateStateMachineDefinitionlAPI might add\n new diagnostics in the future, adjust diagnostic codes, or change the message\n 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\n wording of diagnostic messages.

\n
\n

\n List of warning codes\n

\n
\n
NO_DOLLAR
\n
\n

No .$ on a field that appears to be a JSONPath or Intrinsic Function.

\n
\n
NO_PATH
\n
\n

Field value looks like a path, but field name does not end with 'Path'.

\n
\n
PASS_RESULT_IS_STATIC
\n
\n

Attempt to use a path in the result of a pass state.

\n
\n
\n

\n List of error codes\n

\n
\n
INVALID_JSON_DESCRIPTION
\n
\n

JSON syntax problem found.

\n
\n
MISSING_DESCRIPTION
\n
\n

Received a null or empty workflow input.

\n
\n
SCHEMA_VALIDATION_FAILED
\n
\n

Schema validation reported errors.

\n
\n
INVALID_RESOURCE
\n
\n

The value of a Task-state resource field is invalid.

\n
\n
MISSING_END_STATE
\n
\n

The workflow does not have a terminal state.

\n
\n
DUPLICATE_STATE_NAME
\n
\n

The same state name appears more than once.

\n
\n
INVALID_STATE_NAME
\n
\n

The state name does not follow the naming convention.

\n
\n
STATE_MACHINE_NAME_EMPTY
\n
\n

The state machine name has not been specified.

\n
\n
STATE_MACHINE_NAME_INVALID
\n
\n

The state machine name does not follow the naming convention.

\n
\n
STATE_MACHINE_NAME_TOO_LONG
\n
\n

The state name exceeds the allowed length.

\n
\n
STATE_MACHINE_NAME_ALREADY_EXISTS
\n
\n

The state name already exists.

\n
\n
DUPLICATE_LABEL_NAME
\n
\n

A label name appears more than once.

\n
\n
INVALID_LABEL_NAME
\n
\n

You have provided an invalid label name.

\n
\n
MISSING_TRANSITION_TARGET
\n
\n

The value of \"Next\" field doesn't match a known state name.

\n
\n
TOO_DEEPLY_NESTED
\n
\n

The states are too deeply nested.

\n
\n
" } }, "com.amazonaws.sfn#ValidateStateMachineDefinitionDiagnosticList": { @@ -7668,7 +7791,10 @@ } }, "com.amazonaws.sfn#ValidateStateMachineDefinitionLocation": { - "type": "string" + "type": "string", + "traits": { + "smithy.api#sensitive": {} + } }, "com.amazonaws.sfn#ValidateStateMachineDefinitionMaxResult": { "type": "integer", @@ -7681,7 +7807,10 @@ } }, "com.amazonaws.sfn#ValidateStateMachineDefinitionMessage": { - "type": "string" + "type": "string", + "traits": { + "smithy.api#sensitive": {} + } }, "com.amazonaws.sfn#ValidateStateMachineDefinitionOutput": { "type": "structure", @@ -7696,7 +7825,7 @@ "diagnostics": { "target": "com.amazonaws.sfn#ValidateStateMachineDefinitionDiagnosticList", "traits": { - "smithy.api#documentation": "

If the result is OK, this field will be empty. When there are errors,\n this field will contain an array of Diagnostic objects\n to help you troubleshoot.

", + "smithy.api#documentation": "

An array of diagnostic errors and warnings found during validation of the state machine definition. Since warnings do not prevent deploying your workflow definition, the result value could be OK even when warning diagnostics are present in the response.

", "smithy.api#required": {} } }, @@ -7796,6 +7925,36 @@ } } }, + "com.amazonaws.sfn#VariableName": { + "type": "string", + "traits": { + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.sfn#VariableNameList": { + "type": "list", + "member": { + "target": "com.amazonaws.sfn#VariableName" + } + }, + "com.amazonaws.sfn#VariableReferences": { + "type": "map", + "key": { + "target": "com.amazonaws.sfn#StateName" + }, + "value": { + "target": "com.amazonaws.sfn#VariableNameList" + }, + "traits": { + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.sfn#VariableValue": { + "type": "string", + "traits": { + "smithy.api#sensitive": {} + } + }, "com.amazonaws.sfn#VersionDescription": { "type": "string", "traits": {