I'm using the python elasticsearch pack library in order to automate user and role creation. Although the security.put_user() and security.put_role() methods do update the user/role if they already exists, the response returned is:
{'user': {'created': False}}
or
{'role': {'created': False}}
This doesn't really confirm the object was actually updated. I'm not sure if there could be a situation where the creation actually failed and returned this exact response, although It would be great if the response could acknowledge the update of an object. For example, return a response something like:
{'user': {'created': False, 'updated': True}}
would clearly indicate that the properties were successfully updated. If this seems like a reasonable modification to the X-Pack code base, I would be glad to open up a Github issue for this.