aws_client 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e456d832c42b18b6135889f59571385a0e8ad0d2
4
- data.tar.gz: d1bb40d831a84b2f65a0c4a4c58bb7ba3b8b83ce
3
+ metadata.gz: e0e6685a53797287639bdda145e16a47293510fa
4
+ data.tar.gz: f39271751a05675561d629269482c3899f3f3ea7
5
5
  SHA512:
6
- metadata.gz: ca49bee7678cfb3545ee68769933c7a6af00e950d6cad90257abeed99622455f70eb6d8bbea73c9d0cf2289832ba4f63a7abfcad6f3187d718acfc834c93ef2d
7
- data.tar.gz: a889f16334ed8324c3700cb925e0faafa16c8c3a9eeb6d3088aab8e8317942274d8a232e1c310e6021c1803bd8187ab6b1bc5b9f2904ef955c6f876d6a9e61c4
6
+ metadata.gz: a1c34feb17c04fdf75436c3cf5a7dce595c86201b5dfec6d170597180aad5fe85c7d163aab9bbbb0703eeda28d02f0fdbb57c8cb95c827b33f1b5e932f2072ce
7
+ data.tar.gz: b6488048aaede4ca2fcba564ad48f6572242128796aafe8c9a5fadc6171544d6316e2f0c2867225bc8ab807c34931f4271ce8d7dafee9cdafbcc5f94878f4847
@@ -10,6 +10,7 @@ require "ec2_wrapper"
10
10
  require "elb_wrapper"
11
11
  require "elb"
12
12
  require "elasticache_wrapper"
13
+ require "elasticsearch_wrapper"
13
14
 
14
15
  module AwsClient
15
16
 
@@ -53,6 +54,10 @@ module AwsClient
53
54
  @elasticache ||= ::AwsClient::ElastiCacheWrapper.new(client: client_connect(::Aws::ElastiCache::Client))
54
55
  end
55
56
 
57
+ def elasticsearch
58
+ @elasticsearch ||= ::AwsClient::ElasticSearchWrapper.new(client: client_connect(::Aws::ElasticsearchService::Client))
59
+ end
60
+
56
61
  protected
57
62
 
58
63
  def credentials
@@ -1,3 +1,3 @@
1
1
  module AwsClient
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
@@ -0,0 +1,16 @@
1
+ module AwsClient
2
+ class ElasticSearchWrapper < AwsClient::Wrapper
3
+
4
+ def endpoint_for_domain(domain)
5
+ domains = domains_by_reference([domain])
6
+ status_lists = domains.domain_status_list
7
+ raise "ElasticSearch - nothing found for domain '#{domain}'" if status_lists.first.nil?
8
+ return status_lists.first.endpoint
9
+ end
10
+
11
+ def domains_by_reference(domain_names)
12
+ return client.describe_elasticsearch_domains(:domain_names => domain_names)
13
+ end
14
+
15
+ end
16
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Webzakimbo
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-11-24 00:00:00.000000000 Z
11
+ date: 2017-04-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk
@@ -74,6 +74,7 @@ files:
74
74
  - lib/cf_wrapper.rb
75
75
  - lib/ec2_wrapper.rb
76
76
  - lib/elasticache_wrapper.rb
77
+ - lib/elasticsearch_wrapper.rb
77
78
  - lib/elb.rb
78
79
  - lib/elb_wrapper.rb
79
80
  - lib/rds_wrapper.rb
@@ -100,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
100
101
  version: '0'
101
102
  requirements: []
102
103
  rubyforge_project:
103
- rubygems_version: 2.5.1
104
+ rubygems_version: 2.6.8
104
105
  signing_key:
105
106
  specification_version: 4
106
107
  summary: Light-weight AWS wrapper.