deleteSnapshot method

Future<DeleteSnapshotResponse> deleteSnapshot({
  1. required String snapshotName,
})

Deletes an existing snapshot. When you receive a successful response from this operation, MemoryDB immediately begins deleting the snapshot; you cannot cancel or revert this operation.

May throw InvalidParameterCombinationException. May throw InvalidParameterValueException. May throw InvalidSnapshotStateFault. May throw ServiceLinkedRoleNotFoundFault. May throw SnapshotNotFoundFault.

Parameter snapshotName : The name of the snapshot to delete.

Implementation

Future<DeleteSnapshotResponse> deleteSnapshot({
  required String snapshotName,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AmazonMemoryDB.DeleteSnapshot'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'SnapshotName': snapshotName,
    },
  );

  return DeleteSnapshotResponse.fromJson(jsonResponse.body);
}