getVirtualMachine method
By providing the ARN (Amazon Resource Name), this API returns the virtual machine.
May throw ResourceNotFoundException.
Parameter resourceArn :
The Amazon Resource Name (ARN) of the virtual machine.
Implementation
Future<GetVirtualMachineOutput> getVirtualMachine({
required String resourceArn,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'BackupOnPremises_v20210101.GetVirtualMachine'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ResourceArn': resourceArn,
},
);
return GetVirtualMachineOutput.fromJson(jsonResponse.body);
}