describeStateMachineForExecution method

Future<DescribeStateMachineForExecutionOutput> describeStateMachineForExecution({
  1. required String executionArn,
})

Describes the state machine associated with a specific execution. This API action is not supported by EXPRESS state machines.

May throw ExecutionDoesNotExist. May throw InvalidArn.

Parameter executionArn : The Amazon Resource Name (ARN) of the execution you want state machine information for.

Implementation

Future<DescribeStateMachineForExecutionOutput>
    describeStateMachineForExecution({
  required String executionArn,
}) async {
  ArgumentError.checkNotNull(executionArn, 'executionArn');
  _s.validateStringLength(
    'executionArn',
    executionArn,
    1,
    256,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'AWSStepFunctions.DescribeStateMachineForExecution'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'executionArn': executionArn,
    },
  );

  return DescribeStateMachineForExecutionOutput.fromJson(jsonResponse.body);
}