aws-sdk 1.3.9 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/aws.rb +2 -0
- data/lib/aws/api_config/CloudFormation-2010-05-15.yml +204 -0
- data/lib/aws/api_config/EC2-2011-12-15.yml +0 -2
- data/lib/aws/auto_scaling.rb +1 -1
- data/lib/aws/auto_scaling/group.rb +1 -1
- data/lib/aws/auto_scaling/instance.rb +4 -4
- data/lib/aws/auto_scaling/notification_configuration_collection.rb +2 -2
- data/lib/aws/cloud_formation.rb +287 -0
- data/lib/aws/cloud_formation/client.rb +33 -0
- data/lib/aws/cloud_formation/client/xml.rb +32 -0
- data/lib/aws/cloud_formation/config.rb +18 -0
- data/lib/aws/cloud_formation/errors.rb +26 -0
- data/lib/aws/cloud_formation/request.rb +30 -0
- data/lib/aws/cloud_formation/stack.rb +255 -0
- data/lib/aws/cloud_formation/stack_collection.rb +206 -0
- data/lib/aws/cloud_formation/stack_event.rb +75 -0
- data/lib/aws/cloud_formation/stack_event_collection.rb +47 -0
- data/lib/aws/cloud_formation/stack_options.rb +72 -0
- data/lib/aws/cloud_formation/stack_output.rb +53 -0
- data/lib/aws/cloud_formation/stack_resource.rb +117 -0
- data/lib/aws/cloud_formation/stack_resource_collection.rb +84 -0
- data/lib/aws/cloud_formation/stack_resource_summary_collection.rb +72 -0
- data/lib/aws/cloud_formation/stack_summary.rb +71 -0
- data/lib/aws/cloud_formation/stack_summary_collection.rb +127 -0
- data/lib/aws/core.rb +5 -1
- data/lib/aws/core/configuration.rb +4 -1
- data/lib/aws/core/resource.rb +16 -0
- data/lib/aws/core/response.rb +7 -5
- data/lib/aws/ec2/elastic_ip.rb +53 -4
- data/lib/aws/ec2/elastic_ip_collection.rb +20 -7
- data/lib/aws/ec2/instance.rb +28 -7
- data/lib/aws/simple_email_service.rb +4 -6
- data/lib/aws/sts/request.rb +7 -1
- metadata +23 -5
@@ -15,9 +15,22 @@ module AWS
|
|
15
15
|
class EC2
|
16
16
|
class ElasticIpCollection < Collection
|
17
17
|
|
18
|
-
|
19
|
-
|
18
|
+
# @param [Hash] options
|
19
|
+
#
|
20
|
+
# @option [Boolean] :vpc (false) When true, the elastic ip address
|
21
|
+
# will be allocated to your VPC.
|
22
|
+
#
|
23
|
+
# @return [ElasticIp]
|
24
|
+
#
|
25
|
+
def create options = {}
|
26
|
+
|
27
|
+
client_opts = {}
|
28
|
+
client_opts[:domain] = 'vpc' if options[:vpc]
|
29
|
+
|
30
|
+
response = client.allocate_address(client_opts)
|
31
|
+
|
20
32
|
ElasticIp.new(response.public_ip, :config => config)
|
33
|
+
|
21
34
|
end
|
22
35
|
|
23
36
|
alias_method :allocate, :create
|
@@ -63,11 +76,11 @@ module AWS
|
|
63
76
|
response = filtered_request(:describe_addresses)
|
64
77
|
response.addresses_set.each do |address|
|
65
78
|
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
79
|
+
elastic_ip = ElasticIp.new_from(
|
80
|
+
:describe_addresses,
|
81
|
+
address,
|
82
|
+
address.public_ip,
|
83
|
+
:config => config)
|
71
84
|
|
72
85
|
yield(elastic_ip)
|
73
86
|
|
data/lib/aws/ec2/instance.rb
CHANGED
@@ -356,6 +356,11 @@ module AWS
|
|
356
356
|
provider.provides :monitoring
|
357
357
|
end
|
358
358
|
|
359
|
+
# @return [Boolean] Returns true if this is an EC2 VPC instance.
|
360
|
+
def vpc?
|
361
|
+
!!vpc_id
|
362
|
+
end
|
363
|
+
|
359
364
|
# @return [VPC,nil] Returns the VPC this instance was launched in.
|
360
365
|
# If this instance was not launched inside a VPC, nil is returned.
|
361
366
|
def vpc
|
@@ -526,16 +531,32 @@ module AWS
|
|
526
531
|
|
527
532
|
# Associates the elastic IP address with this instance.
|
528
533
|
#
|
529
|
-
# @
|
530
|
-
#
|
531
|
-
#
|
534
|
+
# @overload associate_elastic_ip(elastic_ip)
|
535
|
+
# @param [ElasticIp,String] elastic_ip An Elastic ip address
|
536
|
+
# (VPC or non-VPC) or a public ip address string (non-VPC only).
|
537
|
+
#
|
538
|
+
# @overload associate_elastic_ip(allocation_id)
|
539
|
+
# @param [String] allocation_id The allocation id of a
|
540
|
+
# VPC elastic ip address.
|
541
|
+
#
|
532
542
|
# @return [nil]
|
543
|
+
#
|
533
544
|
def associate_elastic_ip elastic_ip
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
545
|
+
|
546
|
+
client_opts = {}
|
547
|
+
client_opts[:instance_id] = self.id
|
548
|
+
|
549
|
+
if vpc?
|
550
|
+
client_opts[:allocation_id] = elastic_ip.is_a?(ElasticIp) ?
|
551
|
+
elastic_ip.allocation_id :
|
552
|
+
elastic_ip.to_s
|
553
|
+
else
|
554
|
+
client_opts[:public_ip] = elastic_ip.to_s
|
555
|
+
end
|
556
|
+
|
557
|
+
client.associate_address(client_opts)
|
538
558
|
nil
|
559
|
+
|
539
560
|
end
|
540
561
|
|
541
562
|
alias_method :ip_address=, :associate_elastic_ip
|
@@ -290,14 +290,12 @@ module AWS
|
|
290
290
|
send_opts = {}
|
291
291
|
send_opts[:raw_message] = {}
|
292
292
|
send_opts[:raw_message][:data] = raw_message.to_s
|
293
|
-
|
294
|
-
|
295
|
-
|
293
|
+
send_opts[:source] = options[:from] if options[:from]
|
294
|
+
|
295
|
+
if raw_message.respond_to?(:destinations)
|
296
296
|
send_opts[:destinations] = raw_message.destinations
|
297
|
-
else
|
298
|
-
send_opts[:source] = options[:from] if options[:from]
|
299
|
-
send_opts[:destinations] = [options[:to]].flatten if options[:to]
|
300
297
|
end
|
298
|
+
send_opts[:destinations] = [options[:to]].flatten if options[:to]
|
301
299
|
|
302
300
|
client.send_raw_email(send_opts)
|
303
301
|
nil
|
data/lib/aws/sts/request.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 7
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 1.
|
8
|
+
- 4
|
9
|
+
- 0
|
10
|
+
version: 1.4.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Amazon Web Services
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-
|
18
|
+
date: 2012-04-12 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
version_requirements: &id001 !ruby/object:Gem::Requirement
|
@@ -113,6 +113,23 @@ files:
|
|
113
113
|
- lib/aws/auto_scaling/tag.rb
|
114
114
|
- lib/aws/auto_scaling/tag_collection.rb
|
115
115
|
- lib/aws/auto_scaling.rb
|
116
|
+
- lib/aws/cloud_formation/client/xml.rb
|
117
|
+
- lib/aws/cloud_formation/client.rb
|
118
|
+
- lib/aws/cloud_formation/config.rb
|
119
|
+
- lib/aws/cloud_formation/errors.rb
|
120
|
+
- lib/aws/cloud_formation/request.rb
|
121
|
+
- lib/aws/cloud_formation/stack.rb
|
122
|
+
- lib/aws/cloud_formation/stack_collection.rb
|
123
|
+
- lib/aws/cloud_formation/stack_event.rb
|
124
|
+
- lib/aws/cloud_formation/stack_event_collection.rb
|
125
|
+
- lib/aws/cloud_formation/stack_options.rb
|
126
|
+
- lib/aws/cloud_formation/stack_output.rb
|
127
|
+
- lib/aws/cloud_formation/stack_resource.rb
|
128
|
+
- lib/aws/cloud_formation/stack_resource_collection.rb
|
129
|
+
- lib/aws/cloud_formation/stack_resource_summary_collection.rb
|
130
|
+
- lib/aws/cloud_formation/stack_summary.rb
|
131
|
+
- lib/aws/cloud_formation/stack_summary_collection.rb
|
132
|
+
- lib/aws/cloud_formation.rb
|
116
133
|
- lib/aws/core/api_config.rb
|
117
134
|
- lib/aws/core/async_handle.rb
|
118
135
|
- lib/aws/core/authorize_v2.rb
|
@@ -453,6 +470,7 @@ files:
|
|
453
470
|
- lib/net/http/connection_pool/session.rb
|
454
471
|
- lib/net/http/connection_pool.rb
|
455
472
|
- lib/aws/api_config/AutoScaling-2011-01-01.yml
|
473
|
+
- lib/aws/api_config/CloudFormation-2010-05-15.yml
|
456
474
|
- lib/aws/api_config/DynamoDB-2011-12-05.yml
|
457
475
|
- lib/aws/api_config/EC2-2011-12-15.yml
|
458
476
|
- lib/aws/api_config/ELB-2011-08-15.yml
|