Module: Legion::Extensions::ElasticAppSearch::Runners::Credentials

Includes:
Helpers::Client, Helpers::Lex
Defined in:
lib/legion/extensions/elastic_app_search/runners/credentials.rb

Instance Method Summary collapse

Methods included from Helpers::Client

#client

Instance Method Details

#create(name:, type: 'private', read: true, write: false, access_all_engines: true, engines: [], **opts) ⇒ Object



16
17
18
19
20
21
22
23
24
25
# File 'lib/legion/extensions/elastic_app_search/runners/credentials.rb', line 16

def create(name:, type: 'private', read: true, write: false, access_all_engines: true, engines: [], **opts)
  client(opts).create_credential(
    { name: name,
      type: type,
      read: read,
      write: write,
      access_all_engines: access_all_engines,
      engines: engines }
  )
end

#destroy(name:, **opts) ⇒ Object



31
32
33
# File 'lib/legion/extensions/elastic_app_search/runners/credentials.rb', line 31

def destroy(name:, **opts)
  client(opts).destroy_credential(name)
end

#get(name:, **opts) ⇒ Object



12
13
14
# File 'lib/legion/extensions/elastic_app_search/runners/credentials.rb', line 12

def get(name:, **opts)
  client(opts).get_credential(name)
end

#list(current: 1, size: 20, **opts) ⇒ Object



8
9
10
# File 'lib/legion/extensions/elastic_app_search/runners/credentials.rb', line 8

def list(current: 1, size: 20, **opts)
  client(opts).list_credentials(current: current, size: size)
end

#update(name:, **opts) ⇒ Object



27
28
29
# File 'lib/legion/extensions/elastic_app_search/runners/credentials.rb', line 27

def update(name:, **opts)
  client(opts).update_credential(name, opts)
end