Module: Awspec::Helper::Finder::Elasticsearch

Included in:
Awspec::Helper::Finder
Defined in:
lib/awspec/helper/finder/elasticsearch.rb

Instance Method Summary collapse

Instance Method Details

#find_elasticsearch_domain(id) ⇒ Object



4
5
6
7
8
9
# File 'lib/awspec/helper/finder/elasticsearch.rb', line 4

def find_elasticsearch_domain(id)
  res = elasticsearch_client.describe_elasticsearch_domain(domain_name: id)
  res.domain_status
rescue
  nil
end

#select_all_elasticsearch_domainsObject



11
12
13
14
15
16
# File 'lib/awspec/helper/finder/elasticsearch.rb', line 11

def select_all_elasticsearch_domains
  domain_names = elasticsearch_client.list_domain_names.domain_names
  domain_names.map do |domain|
    elasticsearch_client.describe_elasticsearch_domain(domain_name: domain.domain_name)
  end
end