Module: Elastic::AppSearch::Client::Credentials

Included in:
Elastic::AppSearch::Client
Defined in:
lib/elastic/app-search/client/credentials.rb

Instance Method Summary collapse

Instance Method Details

#create_credential(options) ⇒ Object

Create a new credential



18
19
20
# File 'lib/elastic/app-search/client/credentials.rb', line 18

def create_credential(options)
  post("credentials", options)
end

#destroy_credential(name) ⇒ Object

Destroy an existing credential



28
29
30
# File 'lib/elastic/app-search/client/credentials.rb', line 28

def destroy_credential(name)
  delete("credentials/#{name}")
end

#get_credential(name) ⇒ Object

Retrieve a credential



13
14
15
# File 'lib/elastic/app-search/client/credentials.rb', line 13

def get_credential(name)
  get("credentials/#{name}")
end

#list_credentials(current: 1, size: 20) ⇒ Object

Retrieve available credentials



8
9
10
# File 'lib/elastic/app-search/client/credentials.rb', line 8

def list_credentials(current: 1, size: 20)
  get("credentials", :page => { :current => current, :size => size })
end

#update_credential(name, options) ⇒ Object

Update an existing credential



23
24
25
# File 'lib/elastic/app-search/client/credentials.rb', line 23

def update_credential(name, options)
  put("credentials/#{name}", options)
end