deleteSnapshot method

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

Deletes a directory snapshot.

May throw EntityDoesNotExistException. May throw InvalidParameterException. May throw ClientException. May throw ServiceException.

Parameter snapshotId : The identifier of the directory snapshot to be deleted.

Implementation

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

  return DeleteSnapshotResult.fromJson(jsonResponse.body);
}