executeFastReset method

Future<ExecuteFastResetOutput> executeFastReset({
  1. required Action action,
  2. String? token,
})

The fast reset REST API lets you reset a Neptune graph quicky and easily, removing all of its data.

Neptune fast reset is a two-step process. First you call ExecuteFastReset with action set to initiateDatabaseReset. This returns a UUID token which you then include when calling ExecuteFastReset again with action set to performDatabaseReset. See Empty an Amazon Neptune DB cluster using the fast reset API.

When invoking this operation in a Neptune cluster that has IAM authentication enabled, the IAM user or role making the request must have a policy attached that allows the neptune-db:ResetDatabase IAM action in that cluster.

May throw AccessDeniedException. May throw ClientTimeoutException. May throw ConstraintViolationException. May throw IllegalArgumentException. May throw InvalidArgumentException. May throw InvalidParameterException. May throw MethodNotAllowedException. May throw MissingParameterException. May throw PreconditionsFailedException. May throw ReadOnlyViolationException. May throw ServerShutdownException. May throw TooManyRequestsException. May throw UnsupportedOperationException.

Parameter action : The fast reset action. One of the following values:

  • initiateDatabaseReset - This action generates a unique token needed to actually perform the fast reset.
  • performDatabaseReset - This action uses the token generated by the initiateDatabaseReset action to actually perform the fast reset.

Parameter token : The fast-reset token to initiate the reset.

Implementation

Future<ExecuteFastResetOutput> executeFastReset({
  required Action action,
  String? token,
}) async {
  final $payload = <String, dynamic>{
    'action': action.value,
    if (token != null) 'token': token,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/system',
    exceptionFnMap: _exceptionFns,
  );
  return ExecuteFastResetOutput.fromJson(response);
}