updateSnapshot method
Updates the name of an Amazon FSx for OpenZFS snapshot.
May throw BadRequest.
May throw InternalServerError.
May throw SnapshotNotFound.
Parameter name :
The name of the snapshot to update.
Parameter snapshotId :
The ID of the snapshot that you want to update, in the format
fsvolsnap-0123456789abcdef0.
Implementation
Future<UpdateSnapshotResponse> updateSnapshot({
required String name,
required String snapshotId,
String? clientRequestToken,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSSimbaAPIService_v20180301.UpdateSnapshot'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'Name': name,
'SnapshotId': snapshotId,
'ClientRequestToken':
clientRequestToken ?? _s.generateIdempotencyToken(),
},
);
return UpdateSnapshotResponse.fromJson(jsonResponse.body);
}