cancelReplay method

Future<CancelReplayResponse> cancelReplay({
  1. required String replayName,
})

Cancels the specified replay.

May throw ConcurrentModificationException. May throw IllegalStatusException. May throw InternalException. May throw ResourceNotFoundException.

Parameter replayName : The name of the replay to cancel.

Implementation

Future<CancelReplayResponse> cancelReplay({
  required String replayName,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSEvents.CancelReplay'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ReplayName': replayName,
    },
  );

  return CancelReplayResponse.fromJson(jsonResponse.body);
}