def send_event(self, hub_name, message, device_id=None,<EOL>broker_properties=None):
_validate_not_none('<STR_LIT>', hub_name)<EOL>request = HTTPRequest()<EOL>request.method = '<STR_LIT:POST>'<EOL>request.host = self._get_host()<EOL>if device_id:<EOL><INDENT>request.path = '<STR_LIT>'.format(hub_name, device_id)<EOL><DEDENT>else:<EOL><INDENT>request.path = '<STR_LIT>'.format(hub_name)<EOL><DEDENT>if broker_properties:<EOL><INDENT>request.headers.append(<EOL>('<STR_LIT>', str(broker_properties)))<EOL><DEDENT>request.body = _get_request_body(message)<EOL>request.path, request.query = self._httpclient._update_request_uri_query(request)  <EOL>request.headers = self._update_service_bus_header(request)<EOL>self._perform_request(request)<EOL>
Sends a new message event to an Event Hub.