deleteSnapshot method

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

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

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

Parameter snapshotName : The name of the snapshot to be deleted.

Implementation

Future<DeleteSnapshotResult> deleteSnapshot({
  required String snapshotName,
}) async {
  ArgumentError.checkNotNull(snapshotName, 'snapshotName');
  final $request = <String, dynamic>{};
  $request['SnapshotName'] = snapshotName;
  final $result = await _protocol.send(
    $request,
    action: 'DeleteSnapshot',
    version: '2015-02-02',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['DeleteSnapshotMessage'],
    shapes: shapes,
    resultWrapper: 'DeleteSnapshotResult',
  );
  return DeleteSnapshotResult.fromXml($result);
}