I was trying to change the login and password for elastic search database connection from a deployed application, but it seems like it is not possible. Even after checking the documentation, I couldn't find any way to create a new datasource or update the authentication details. It looks like only developers have the ability to edit the app and modify the datasource.
Unfortunately, it is not possible to create a datasource or change the login and password for an Elastic Search database connection from a deployed application. The only way to do so is by editing the app as a developer and updating the datasource manually. There are no code examples necessary as this is not a programming issue but rather a limitation of the platform.