deleteHostKey method

Future<void> deleteHostKey({
  1. required String hostKeyId,
  2. required String serverId,
})

Deletes the host key that's specified in the HostKeyId parameter.

May throw InternalServiceError. May throw InvalidRequestException. May throw ResourceNotFoundException. May throw ServiceUnavailableException. May throw ThrottlingException.

Parameter hostKeyId : The identifier of the host key that you are deleting.

Parameter serverId : The identifier of the server that contains the host key that you are deleting.

Implementation

Future<void> deleteHostKey({
  required String hostKeyId,
  required String serverId,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'TransferService.DeleteHostKey'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'HostKeyId': hostKeyId,
      'ServerId': serverId,
    },
  );
}