createVolumeFromBackup method
Creates a new Amazon FSx for NetApp ONTAP volume from an existing Amazon FSx volume backup.
May throw BackupNotFound.
May throw BadRequest.
May throw FileSystemNotFound.
May throw IncompatibleParameterError.
May throw InternalServerError.
May throw MissingVolumeConfiguration.
May throw ServiceLimitExceeded.
May throw StorageVirtualMachineNotFound.
Parameter name :
The name of the new volume you're creating.
Parameter ontapConfiguration :
Specifies the configuration of the ONTAP volume that you are creating.
Implementation
Future<CreateVolumeFromBackupResponse> createVolumeFromBackup({
required String backupId,
required String name,
String? clientRequestToken,
CreateOntapVolumeConfiguration? ontapConfiguration,
List<Tag>? tags,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSSimbaAPIService_v20180301.CreateVolumeFromBackup'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'BackupId': backupId,
'Name': name,
'ClientRequestToken':
clientRequestToken ?? _s.generateIdempotencyToken(),
if (ontapConfiguration != null)
'OntapConfiguration': ontapConfiguration,
if (tags != null) 'Tags': tags,
},
);
return CreateVolumeFromBackupResponse.fromJson(jsonResponse.body);
}