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 during the
last 35 days.
May throw TableNotFoundException. May throw ContinuousBackupsUnavailableException. May throw InternalServerError.
Parameter pointInTimeRecoverySpecification
:
Represents the settings used to enable point in time recovery.
Parameter tableName
:
The name of the table.
Implementation
Future<UpdateContinuousBackupsOutput> updateContinuousBackups({
required PointInTimeRecoverySpecification pointInTimeRecoverySpecification,
required String tableName,
}) async {
ArgumentError.checkNotNull(
pointInTimeRecoverySpecification, 'pointInTimeRecoverySpecification');
ArgumentError.checkNotNull(tableName, 'tableName');
_s.validateStringLength(
'tableName',
tableName,
3,
255,
isRequired: true,
);
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);
}