Interface IUsersApi
Namespace: InfluxDB.Client
Assembly: InfluxDB.Client.dll
Syntax
public interface IUsersApi
Methods
CloneUserAsync(String, User, CancellationToken)
Clone an user.
Declaration
Task<User> CloneUserAsync(string clonedName, User user, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | clonedName | name of cloned user |
User | user | user to clone |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<User> | cloned user |
CloneUserAsync(String, String, CancellationToken)
Clone an user.
Declaration
Task<User> CloneUserAsync(string clonedName, string userId, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | clonedName | name of cloned user |
System.String | userId | ID of user to clone |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<User> | cloned user |
CreateUserAsync(User, CancellationToken)
Creates a new user and sets Id with the new identifier.
Declaration
Task<User> CreateUserAsync(User user, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
User | user | name of the user |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<User> | Created user |
CreateUserAsync(String, CancellationToken)
Creates a new user and sets Id with the new identifier.
Declaration
Task<User> CreateUserAsync(string name, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | name of the user |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<User> | Created user |
DeleteUserAsync(User, CancellationToken)
Delete an user.
Declaration
Task DeleteUserAsync(User user, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
User | user | user to delete |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task | async task |
DeleteUserAsync(String, CancellationToken)
Delete an user.
Declaration
Task DeleteUserAsync(string userId, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | userId | ID of user to delete |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task | async task |
FindUserByIdAsync(String, CancellationToken)
Retrieve an user.
Declaration
Task<User> FindUserByIdAsync(string userId, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | userId | ID of user to get |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<User> | User Details |
FindUsersAsync(Nullable<Int32>, Nullable<Int32>, String, String, String, CancellationToken)
List all users.
Declaration
Task<List<User>> FindUsersAsync(int? offset = null, int? limit = null, string after = null, string name = null, string id = null, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.Int32> | offset | (optional) |
System.Nullable<System.Int32> | limit | (optional, default to 20) |
System.String | after | The last resource ID from which to seek from (but not including). This is to be used instead of |
System.String | name | (optional) |
System.String | id | (optional) |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<List<User>> | List all users |
MeAsync(CancellationToken)
Returns currently authenticated user.
Declaration
Task<User> MeAsync(CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<User> | currently authenticated user |
MeUpdatePasswordAsync(String, String, CancellationToken)
Update the password to a currently authenticated user.
Declaration
Task MeUpdatePasswordAsync(string oldPassword, string newPassword, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | oldPassword | old password |
System.String | newPassword | new password |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task | currently authenticated user |
UpdateUserAsync(User, CancellationToken)
Update an user.
Declaration
Task<User> UpdateUserAsync(User user, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
User | user | user update to apply |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<User> | user updated |
UpdateUserPasswordAsync(User, String, String, CancellationToken)
Update password to an user.
Declaration
Task UpdateUserPasswordAsync(User user, string oldPassword, string newPassword, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
User | user | user to update password |
System.String | oldPassword | old password |
System.String | newPassword | new password |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task | user updated |
UpdateUserPasswordAsync(String, String, String, CancellationToken)
Update password to an user.
Declaration
Task UpdateUserPasswordAsync(string userId, string oldPassword, string newPassword, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | userId | ID of user to update password |
System.String | oldPassword | old password |
System.String | newPassword | new password |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task | user updated |