cancelReplay method

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

Cancels the specified replay.

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

Parameter replayName : The name of the replay to cancel.

Implementation

Future<CancelReplayResponse> cancelReplay({
  required String replayName,
}) async {
  ArgumentError.checkNotNull(replayName, 'replayName');
  _s.validateStringLength(
    'replayName',
    replayName,
    1,
    64,
    isRequired: true,
  );
  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);
}