updateSnapshot method
Updates a snapshot.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ValidationException.
Parameter snapshotName :
The name of the snapshot.
Parameter retentionPeriod :
The new retention period of the snapshot.
Implementation
Future<UpdateSnapshotResponse> updateSnapshot({
required String snapshotName,
int? retentionPeriod,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'RedshiftServerless.UpdateSnapshot'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'snapshotName': snapshotName,
if (retentionPeriod != null) 'retentionPeriod': retentionPeriod,
},
);
return UpdateSnapshotResponse.fromJson(jsonResponse.body);
}