sasKeyName = "Key"; def sasKey = "Blahblahblah"; endpoint = new URI("http://blah.net"); EventDetailsDto eventDetailsDto = new EventDetailsDto(); eventDetailsDto.setEndpoint(endpoint); eventDetailsDto.setEventHubName(eventHubName); eventDetailsDto.setSasKeyName(sasKeyName); eventDetailsDto.setSasKey(sasKey); String partitionKey = "uuid"; byte[] payloadBytes = "[{\"EmailAddress\":\"
[email protected]\",\"TemplateId\":\"WelcomeEmail\",\"TimeStamp\":\" 2017-04-20T13:26:25\",\"Parameters\":{\"SenderName\":\“John Doe\"},\"Random\":\"Random\"}]".getBytes("UTF-8"); String streamNamespace = "Email"; PushEvent.sendEvent(eventDetailsDto, partitionKey,payloadBytes, streamNamespace);