backtrackDBCluster method

Future<DBClusterBacktrack> backtrackDBCluster({
  1. required DateTime backtrackTo,
  2. required String dBClusterIdentifier,
  3. bool? force,
  4. bool? useEarliestTimeOnPointInTimeUnavailable,
})

Backtracks a DB cluster to a specific time, without creating a new DB cluster.

For more information on backtracking, see Backtracking an Aurora DB Cluster in the Amazon Aurora User Guide.

May throw DBClusterNotFoundFault. May throw InvalidDBClusterStateFault.

Parameter backtrackTo : The timestamp of the time to backtrack the DB cluster to, specified in ISO 8601 format. For more information about ISO 8601, see the ISO8601 Wikipedia page. Constraints:

  • Must contain a valid ISO 8601 timestamp.
  • Can't contain a timestamp set in the future.
Example: 2017-07-08T18:00Z

Parameter dBClusterIdentifier : The DB cluster identifier of the DB cluster to be backtracked. This parameter is stored as a lowercase string.

Constraints:

  • Must contain from 1 to 63 alphanumeric characters or hyphens.
  • First character must be a letter.
  • Can't end with a hyphen or contain two consecutive hyphens.
Example: my-cluster1

Parameter force : A value that indicates whether to force the DB cluster to backtrack when binary logging is enabled. Otherwise, an error occurs when binary logging is enabled.

Parameter useEarliestTimeOnPointInTimeUnavailable : A value that indicates whether to backtrack the DB cluster to the earliest possible backtrack time when BacktrackTo is set to a timestamp earlier than the earliest backtrack time. When this parameter is disabled and BacktrackTo is set to a timestamp earlier than the earliest backtrack time, an error occurs.

Implementation

Future<DBClusterBacktrack> backtrackDBCluster({
  required DateTime backtrackTo,
  required String dBClusterIdentifier,
  bool? force,
  bool? useEarliestTimeOnPointInTimeUnavailable,
}) async {
  ArgumentError.checkNotNull(backtrackTo, 'backtrackTo');
  ArgumentError.checkNotNull(dBClusterIdentifier, 'dBClusterIdentifier');
  final $request = <String, dynamic>{};
  $request['BacktrackTo'] = _s.iso8601ToJson(backtrackTo);
  $request['DBClusterIdentifier'] = dBClusterIdentifier;
  force?.also((arg) => $request['Force'] = arg);
  useEarliestTimeOnPointInTimeUnavailable?.also(
      (arg) => $request['UseEarliestTimeOnPointInTimeUnavailable'] = arg);
  final $result = await _protocol.send(
    $request,
    action: 'BacktrackDBCluster',
    version: '2014-10-31',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['BacktrackDBClusterMessage'],
    shapes: shapes,
    resultWrapper: 'BacktrackDBClusterResult',
  );
  return DBClusterBacktrack.fromXml($result);
}