convertRecoveryPointToSnapshot method
Converts a recovery point to a snapshot. For more information about recovery points and snapshots, see Working with snapshots and recovery points.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw TooManyTagsException.
May throw ValidationException.
Parameter recoveryPointId :
The unique identifier of the recovery point.
Parameter snapshotName :
The name of the snapshot.
Parameter retentionPeriod :
How long to retain the snapshot.
Parameter tags :
An array of Tag
objects to associate with the created snapshot.
Implementation
Future<ConvertRecoveryPointToSnapshotResponse>
convertRecoveryPointToSnapshot({
required String recoveryPointId,
required String snapshotName,
int? retentionPeriod,
List<Tag>? tags,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'RedshiftServerless.ConvertRecoveryPointToSnapshot'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'recoveryPointId': recoveryPointId,
'snapshotName': snapshotName,
if (retentionPeriod != null) 'retentionPeriod': retentionPeriod,
if (tags != null) 'tags': tags,
},
);
return ConvertRecoveryPointToSnapshotResponse.fromJson(jsonResponse.body);
}