Module: InfluxDB::Query::Cluster

Included in:
Client
Defined in:
lib/influxdb/query/cluster.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#create_cluster_admin(username, password) ⇒ Object



4
5
6
# File 'lib/influxdb/query/cluster.rb', line 4

def create_cluster_admin(username, password)
  execute("CREATE USER \"#{username}\" WITH PASSWORD '#{password}' WITH ALL PRIVILEGES")
end

#list_cluster_adminsObject



8
9
10
# File 'lib/influxdb/query/cluster.rb', line 8

def list_cluster_admins
  list_users.select { |u| u["admin".freeze] }.map { |u| u["username".freeze] }
end

#revoke_cluster_admin_privileges(username) ⇒ Object



12
13
14
# File 'lib/influxdb/query/cluster.rb', line 12

def revoke_cluster_admin_privileges(username)
  execute("REVOKE ALL PRIVILEGES FROM \"#{username}\"")
end