updateHypervisor method
Updates a hypervisor metadata, including its host, username, and password. Specify which hypervisor to update using the Amazon Resource Name (ARN) of the hypervisor in your request.
May throw AccessDeniedException.
May throw ConflictException.
May throw ResourceNotFoundException.
Parameter hypervisorArn :
The Amazon Resource Name (ARN) of the hypervisor to update.
Parameter host :
The updated host of the hypervisor. This can be either an IP address or a
fully-qualified domain name (FQDN).
Parameter logGroupArn :
The Amazon Resource Name (ARN) of the group of gateways within the
requested log.
Parameter name :
The updated name for the hypervisor
Parameter password :
The updated password for the hypervisor.
Parameter username :
The updated username for the hypervisor.
Implementation
Future<UpdateHypervisorOutput> updateHypervisor({
required String hypervisorArn,
String? host,
String? logGroupArn,
String? name,
String? password,
String? username,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'BackupOnPremises_v20210101.UpdateHypervisor'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'HypervisorArn': hypervisorArn,
if (host != null) 'Host': host,
if (logGroupArn != null) 'LogGroupArn': logGroupArn,
if (name != null) 'Name': name,
if (password != null) 'Password': password,
if (username != null) 'Username': username,
},
);
return UpdateHypervisorOutput.fromJson(jsonResponse.body);
}