updateHostKey method
Updates the description for the host key that's specified by the
ServerId and HostKeyId parameters.
May throw InternalServiceError.
May throw InvalidRequestException.
May throw ResourceNotFoundException.
May throw ServiceUnavailableException.
May throw ThrottlingException.
Parameter description :
An updated description for the host key.
Parameter hostKeyId :
The identifier of the host key that you are updating.
Parameter serverId :
The identifier of the server that contains the host key that you are
updating.
Implementation
Future<UpdateHostKeyResponse> updateHostKey({
required String description,
required String hostKeyId,
required String serverId,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'TransferService.UpdateHostKey'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'Description': description,
'HostKeyId': hostKeyId,
'ServerId': serverId,
},
);
return UpdateHostKeyResponse.fromJson(jsonResponse.body);
}