deleteStateMachine method

Future<void> deleteStateMachine({
  1. required String stateMachineArn,
})

Deletes a state machine. This is an asynchronous operation: It sets the state machine's status to DELETING and begins the deletion process.

May throw InvalidArn.

Parameter stateMachineArn : The Amazon Resource Name (ARN) of the state machine to delete.

Implementation

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