Exemple #1
0
        /// <summary>
        /// Update the password and/or the permissions of a database user.
        /// </summary>
        /// <param name="database">The name of the database where this user is allowed.</param>
        /// <param name="name">The name of the existing database user.</param>
        /// <param name="password">The password for this user.</param>
        /// <param name="permissions">An array of readFrom and writeTo permissions (in this order) and given in regex form.</param>
        /// <returns></returns>
        public async Task <InfluxDbApiResponse> UpdateDatabaseUserAsync(string database, string name, string password, params string[] permissions)
        {
            var user = new User {
                Name = name, Password = password
            };

            user.SetPermissions(permissions);
            return(await _influxDbClient.UpdateDatabaseUser(NoErrorHandlers, database, user, name));
        }
 public async Task <InfluxDbApiResponse> UpdateDatabaseUser(IEnumerable <ApiResponseErrorHandlingDelegate> errorHandlers, string database, User user, string name)
 {
     return(await _influxDbClient.UpdateDatabaseUser(errorHandlers, database, user, name));
 }