There's nothing built in, but you can do it quite easily yourself.
The GET API returns something that is almost exactly the same as what you need to PUT to recreate the user/role.
In the case of roles, I believe you can feed the GET back into a PUT without modifying it (but I'm working from memory).
For users you would need to remove the transient_metadata and add a password.
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.