updateContinuousBackups method
- required PointInTimeRecoverySpecification pointInTimeRecoverySpecification,
- required String tableName,
UpdateContinuousBackups enables or disables point in time
recovery for the specified table. A successful
UpdateContinuousBackups call returns the current
ContinuousBackupsDescription. Continuous backups are
ENABLED on all tables at table creation. If point in time
recovery is enabled, PointInTimeRecoveryStatus will be set to
ENABLED.
Once continuous backups and point in time recovery are enabled, you can
restore to any point in time within
EarliestRestorableDateTime and
LatestRestorableDateTime.
LatestRestorableDateTime is typically 5 minutes before the
current time. You can restore your table to any point in time in the last
35 days. You can set the RecoveryPeriodInDays to any value
between 1 and 35 days.
May throw ContinuousBackupsUnavailableException.
May throw InternalServerError.
May throw InvalidEndpointException.
May throw TableNotFoundException.
Parameter pointInTimeRecoverySpecification :
Represents the settings used to enable point in time recovery.
Parameter tableName :
The name of the table. You can also provide the Amazon Resource Name (ARN)
of the table in this parameter.
Implementation
Future<UpdateContinuousBackupsOutput> updateContinuousBackups({
required PointInTimeRecoverySpecification pointInTimeRecoverySpecification,
required String tableName,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'DynamoDB_20120810.UpdateContinuousBackups'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'PointInTimeRecoverySpecification': pointInTimeRecoverySpecification,
'TableName': tableName,
},
);
return UpdateContinuousBackupsOutput.fromJson(jsonResponse.body);
}