Transport Client issue with ES cloud

FWIW you should look at https://github.com/elastic/found-shield-example/blob/5.1.1/src/main/java/org/elasticsearch/cloud/transport/example/TransportExample.java which is probably closer to what to expect on a 5.x version.

May be share your code and the exact and full error message you are getting.

Please follow the formatting rules in this guideline: About the Elasticsearch category.