Package com.influxdb.client
Interface UsersApi
@ThreadSafe
public interface UsersApi
The client of the InfluxDB 2.x that implement User HTTP API endpoint.
- Author:
- Jakub Bednar (bednar@github) (11/09/2018 10:05)
-
Method Summary
Modifier and TypeMethodDescriptionClone an user.Clone an user.createUser
(User user) Creates a new user and setsUser.getId()
with the new identifier.createUser
(String name) Creates a new user and setsUser.getId()
with the new identifier.void
deleteUser
(User user) Delete an user.void
deleteUser
(String userID) Delete an user.findUserByID
(String userID) Retrieve an user.List all users.me()
Returns currently authenticated user.void
meUpdatePassword
(String oldPassword, String newPassword) Update the password to a currently authenticated user.updateUser
(User user) Update an user.void
updateUserPassword
(User user, String oldPassword, String newPassword) Update password to an user.void
updateUserPassword
(String userID, String oldPassword, String newPassword) Update password to an user.
-
Method Details
-
createUser
Creates a new user and setsUser.getId()
with the new identifier.- Parameters:
user
- the user to create- Returns:
- User created
-
createUser
Creates a new user and setsUser.getId()
with the new identifier.- Parameters:
name
- name of the user- Returns:
- User created
-
updateUser
Update an user.- Parameters:
user
- user update to apply- Returns:
- user updated
-
updateUserPassword
void updateUserPassword(@Nonnull User user, @Nonnull String oldPassword, @Nonnull String newPassword) Update password to an user.- Parameters:
user
- user to update passwordoldPassword
- old passwordnewPassword
- new password
-
updateUserPassword
void updateUserPassword(@Nonnull String userID, @Nonnull String oldPassword, @Nonnull String newPassword) Update password to an user.- Parameters:
userID
- ID of user to update passwordoldPassword
- old passwordnewPassword
- new password
-
deleteUser
Delete an user.- Parameters:
user
- user to delete
-
deleteUser
Delete an user.- Parameters:
userID
- ID of user to delete
-
cloneUser
Clone an user.- Parameters:
clonedName
- name of cloned useruserID
- ID of user to clone- Returns:
- cloned user
-
cloneUser
Clone an user.- Parameters:
clonedName
- name of cloned useruser
- user to clone- Returns:
- cloned user
-
me
Returns currently authenticated user.- Returns:
- user
-
meUpdatePassword
Update the password to a currently authenticated user.- Parameters:
oldPassword
- old passwordnewPassword
- new password
-
findUserByID
Retrieve an user.- Parameters:
userID
- ID of user to get- Returns:
- user details
-
findUsers
List all users.- Returns:
- List all users
-