Hi which version of Kibana are you working with? If you are not working off the master branch but using a version branch instead, the ES client might not be the same version as the documentation that you found and it might not be new enough to support X-Pack APIs.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.