Class UsersApi
Inheritance
Implements
Namespace: InfluxDB.Client
Assembly: InfluxDB.Client.dll
Syntax
public class UsersApi : object, IUsersApi
Constructors
UsersApi(UsersService)
Declaration
protected UsersApi(UsersService service)
Parameters
Type | Name | Description |
---|---|---|
UsersService | service |
Methods
CloneUserAsync(String, User, CancellationToken)
Clone an user.
Declaration
public 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
public async 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
public 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
public 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
public 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
public 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
public 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
public async 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
public 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
public async 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
public 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
public 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
public 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 |