Module: Awspec::Helper::Finder::Elasticache

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

Instance Method Summary collapse

Instance Method Details

#find_cache_cluster(id) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/awspec/helper/finder/elasticache.rb', line 6

def find_cache_cluster(id)
  res = elasticache_client.describe_cache_clusters({
                                                     cache_cluster_id: id
                                                   })
  res.cache_clusters.single_resource(id)
rescue StandardError
  nil
end

#find_cache_subnet_group(group_name) ⇒ Object



15
16
17
18
19
20
# File 'lib/awspec/helper/finder/elasticache.rb', line 15

def find_cache_subnet_group(group_name)
  res = elasticache_client.describe_cache_subnet_groups({
                                                          cache_subnet_group_name: group_name
                                                        })
  res.cache_subnet_groups.single_resource(group_name)
end