aws-sdk-v1 1.66.0 → 1.67.0

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: 15aa8aabcff05a8faa7cbf9665cc3c3b9c0a0604
4
- data.tar.gz: 31904ed8985793ba348f87c1a9e79e8711a50805
3
+ metadata.gz: 557d2397d21c3341c8fcb76db6d0ed3225fc8b1c
4
+ data.tar.gz: 5adcbf9c275eefeb1f93fc29eabb0363e3f9baad
5
5
  SHA512:
6
- metadata.gz: 2337c54355dffa023f13a94e9ce085cdd14a052965ab9d6f63999ee674fa774d9e2b4bd003faf97d00dd5229131e14a9ad243c1537bad56e0bc653fc37c003d9
7
- data.tar.gz: e8100c87dd17c61a3f8607cfabbe144ad0a9150b6e0a878db6cf65e6e57af99811a26de3b21b3aa4e6952b65df90838eacf2604b95be326d051feca8d195a123
6
+ metadata.gz: a79587764cb04fb95ce9105982783b85c7c67bfc49d4f1a25f652c1a216aa788829656483adc0891370e3f8effd933becdd5721b205c76ec84bc4f9b090ef955
7
+ data.tar.gz: b39a76ab2f5bcb6e975ab69e94e9a3da01adb85ebbfc13b3e855675e48fe249bfe15fb789d8e7e786ac9a57d37951069124a60882382278b2d24fc251a26d303
@@ -196,6 +196,11 @@ module AWS
196
196
  client_opts[:network_interface_id] = interface
197
197
  end
198
198
 
199
+ if vpc_peering_connection = options[:vpc_peering_connection]
200
+ vpc_peering_connection = vpc_peering_connection.id if vpc_peering_connection.is_a?(VPCPeeringConnection)
201
+ client_opts[:vpc_peering_connection_id] = vpc_peering_connection
202
+ end
203
+
199
204
  client_opts
200
205
 
201
206
  end
@@ -102,6 +102,18 @@ module AWS
102
102
  NetworkInterfaceCollection.new(:config => config).filter('vpc-id', id)
103
103
  end
104
104
 
105
+ # @return [VPCPeeringConnectionCollection] Returns a filtered collection
106
+ # of VPC peering connection from this VPC.
107
+ def peering_connections
108
+ VPCPeeringConnectionCollection.new(:config => config).filter('requester-vpc-info.vpc-id', vpc_id)
109
+ end
110
+
111
+ # @return [VPCPeeringConnectionCollection] Returns a filtered collection
112
+ # of VPC peering connection to this VPC.
113
+ def peering_connections
114
+ VPCPeeringConnectionCollection.new(:config => config).filter('accepter-vpc-info.vpc-id', vpc_id)
115
+ end
116
+
105
117
  # @return [InternetGateway,nil] Returns the internet gateway attached to
106
118
  # this VPC. If no internet gateway has been attached, then
107
119
  # nil is returned.
@@ -171,6 +183,42 @@ module AWS
171
183
  dhcp_options.associate(self)
172
184
  end
173
185
 
186
+ # Create a VPC peering connection between this VPC and another
187
+ # VPC owned by the same user, and accept it.
188
+ # @return [VPCPeeringConnection] Returns the VPC peering connection
189
+ # that was created
190
+ def peer_to vpc
191
+ peering_connection = peering_connections.create(self, vpc)
192
+ peering_connection.accept
193
+ peering_connection
194
+ end
195
+
196
+ # @return [Boolean] Returns true if DNS resolution is supported for
197
+ # this VPC
198
+ def dns_support
199
+ resp = client.describe_vpc_attribute(:vpc_id => vpc_id, :attribute => 'enableDnsSupport')
200
+ resp.enable_dns_support
201
+ end
202
+
203
+ # Enables DNS resolution support for this VPC
204
+ def dns_support= enable_dns_support
205
+ client.modify_vpc_attribute(:vpc_id => vpc_id, :enable_dns_support => { :value => enable_dns_support } )
206
+ enable_dns_support
207
+ end
208
+
209
+ # @return [Boolean] Returns true if instances launched in the VPC get
210
+ # DNS hostnames in this VPC
211
+ def dns_hostnames
212
+ resp = client.describe_vpc_attribute(:vpc_id => vpc_id, :attribute => 'enableDnsHostnames')
213
+ resp.enable_dns_hostnames
214
+ end
215
+
216
+ # Enables DNS hostnames for this VPC
217
+ def dns_hostnames= enable_dns_hostnames
218
+ client.modify_vpc_attribute(:vpc_id => vpc_id, :enable_dns_hostnames => { :value => enable_dns_hostnames } )
219
+ enable_dns_hostnames
220
+ end
221
+
174
222
  end
175
223
  end
176
224
  end
@@ -0,0 +1,47 @@
1
+ # Licensed under the Apache License, Version 2.0 (the "License"). You
2
+ # may not use this file except in compliance with the License. A copy of
3
+ # the License is located at
4
+ #
5
+ # http://aws.amazon.com/apache2.0/
6
+ #
7
+ # or in the "license" file accompanying this file. This file is
8
+ # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
9
+ # ANY KIND, either express or implied. See the License for the specific
10
+ # language governing permissions and limitations under the License.
11
+
12
+ module AWS
13
+ class EC2
14
+
15
+ class VPCPeeringConnection < Resource
16
+
17
+ include TaggedItem
18
+
19
+ # @api private
20
+ def initialize vpc_peering_connection_id, options = {}
21
+ @vpc_peering_connection_id = vpc_peering_connection_id
22
+ super
23
+ end
24
+
25
+ attr_reader :vpc_peering_connection_id
26
+
27
+ alias_method :id, :vpc_peering_connection_id
28
+
29
+ # Accept a requested VPC peering connection
30
+ def accept
31
+ client_opts = {}
32
+ client_opts[:vpc_peering_connection_id] = vpc_peering_connection_id
33
+ resp = client.accept_vpc_peering_connection(client_opts)
34
+ end
35
+
36
+ # Deletes this VPC peering connection.
37
+ # @return [nil]
38
+ def delete
39
+ client_opts = {}
40
+ client_opts[:vpc_peering_connection_id] = vpc_peering_connection_id
41
+ client.delete_vpc_peering_connection(client_opts)
42
+ nil
43
+ end
44
+
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,57 @@
1
+ # Licensed under the Apache License, Version 2.0 (the "License"). You
2
+ # may not use this file except in compliance with the License. A copy of
3
+ # the License is located at
4
+ #
5
+ # http://aws.amazon.com/apache2.0/
6
+ #
7
+ # or in the "license" file accompanying this file. This file is
8
+ # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
9
+ # ANY KIND, either express or implied. See the License for the specific
10
+ # language governing permissions and limitations under the License.
11
+
12
+ module AWS
13
+ class EC2
14
+
15
+ class VPCPeeringConnectionCollection < Collection
16
+ include TaggedCollection
17
+ include Core::Collection::Simple
18
+
19
+ # Requests a new VPC peering connection between the "local" VPC and
20
+ # the "remote" VPC
21
+ def create local_vpc, remote_vpc, options = {}
22
+ client_opts = {}
23
+ client_opts[:vpc_id] = local_vpc.id
24
+ client_opts[:peer_vpc_id] = remote_vpc.id
25
+
26
+ resp = client.create_vpc_peering_connection(client_opts)
27
+ VPCPeeringConnection.new_from(:create_vpc_peering_connection, resp.vpc_peering_connection, resp.vpc_peering_connection.vpc_peering_connection_id, :config => config)
28
+ end
29
+
30
+ # Returns a reference to the VPC peering connection with the given id.
31
+ #
32
+ # vpc_peering_connection = vpc.peering_connections['vpc-peering-connection-id']
33
+ #
34
+ # @param [String] vpc_peering_connection_id
35
+ #
36
+ # @return [VPCPeeringConnection]
37
+ #
38
+ def [] vpc_peering_connection_id
39
+ VPCPeeringConnection.new(vpc_peering_connection_id, :config => config)
40
+ end
41
+
42
+ protected
43
+
44
+ def _each_item options = {}, &block
45
+ response = filtered_request(:describe_vpc_peering_connections, options, &block)
46
+ response.vpc_peering_connection_set.each do |c|
47
+
48
+ vpc_peering_connection = VPCPeeringConnection.new_from(:describe_vpc_peering_connections,
49
+ c, c.vpc_peering_connection_id, :config => config)
50
+
51
+ yield(vpc_peering_connection)
52
+
53
+ end
54
+ end
55
+ end
56
+ end
57
+ end
@@ -13,5 +13,5 @@
13
13
 
14
14
  module AWS
15
15
  # Current version of the AWS SDK for Ruby
16
- VERSION = '1.66.0'
16
+ VERSION = '1.67.0'
17
17
  end
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.66.0
4
+ version: 1.67.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-05 00:00:00.000000000 Z
11
+ date: 2017-04-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.4.4
19
+ version: '1'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 1.4.4
26
+ version: '1'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: json
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -338,6 +338,8 @@ files:
338
338
  - lib/aws/ec2/volume_collection.rb
339
339
  - lib/aws/ec2/vpc.rb
340
340
  - lib/aws/ec2/vpc_collection.rb
341
+ - lib/aws/ec2/vpc_peering_connection.rb
342
+ - lib/aws/ec2/vpc_peering_connection_collection.rb
341
343
  - lib/aws/ec2/vpn_connection.rb
342
344
  - lib/aws/ec2/vpn_connection/telemetry.rb
343
345
  - lib/aws/ec2/vpn_connection_collection.rb
@@ -633,9 +635,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
633
635
  version: '0'
634
636
  requirements: []
635
637
  rubyforge_project:
636
- rubygems_version: 2.4.5
638
+ rubygems_version: 2.5.1
637
639
  signing_key:
638
640
  specification_version: 4
639
641
  summary: AWS SDK for Ruby V1
640
642
  test_files: []
641
- has_rdoc: