deleteStorageVirtualMachine method
Deletes an existing Amazon FSx for ONTAP storage virtual machine (SVM). Prior to deleting an SVM, you must delete all non-root volumes in the SVM, otherwise the operation will fail.
May throw BadRequest.
May throw IncompatibleParameterError.
May throw InternalServerError.
May throw StorageVirtualMachineNotFound.
Parameter storageVirtualMachineId :
The ID of the SVM that you want to delete.
Implementation
Future<DeleteStorageVirtualMachineResponse> deleteStorageVirtualMachine({
required String storageVirtualMachineId,
String? clientRequestToken,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSSimbaAPIService_v20180301.DeleteStorageVirtualMachine'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'StorageVirtualMachineId': storageVirtualMachineId,
'ClientRequestToken':
clientRequestToken ?? _s.generateIdempotencyToken(),
},
);
return DeleteStorageVirtualMachineResponse.fromJson(jsonResponse.body);
}