aws-sdk 1.24.0 → 1.25.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aws/api_config/CloudFormation-2010-05-15.yml +36 -0
- data/lib/aws/api_config/ELB-2012-06-01.yml +35 -0
- data/lib/aws/api_config/ElasticTranscoder-2012-09-25.yml +146 -0
- data/lib/aws/api_config/StorageGateway-2013-06-30.yml +1025 -0
- data/lib/aws/auto_scaling/scheduled_action.rb +23 -27
- data/lib/aws/auto_scaling/scheduled_action_collection.rb +16 -9
- data/lib/aws/core.rb +2 -2
- data/lib/aws/core/configuration.rb +2 -2
- data/lib/aws/s3/client.rb +14 -0
- data/lib/aws/s3/uploaded_part.rb +1 -1
- data/lib/aws/storage_gateway/client.rb +8 -1
- data/lib/aws/version.rb +1 -1
- metadata +3 -2
@@ -16,8 +16,6 @@ require 'time'
|
|
16
16
|
module AWS
|
17
17
|
class AutoScaling
|
18
18
|
|
19
|
-
# @attr_reader [String] auto_scaling_group_name
|
20
|
-
#
|
21
19
|
# @attr_reader [Integer] desired_capacity
|
22
20
|
#
|
23
21
|
# @attr_reader [String] recurrence
|
@@ -35,7 +33,8 @@ module AWS
|
|
35
33
|
class ScheduledAction < Core::Resource
|
36
34
|
|
37
35
|
# @api private
|
38
|
-
def initialize name, options = {}
|
36
|
+
def initialize group, name, options = {}
|
37
|
+
@group = group
|
39
38
|
@name = name
|
40
39
|
super
|
41
40
|
end
|
@@ -43,9 +42,14 @@ module AWS
|
|
43
42
|
# @return [String]
|
44
43
|
attr_reader :name
|
45
44
|
|
46
|
-
|
45
|
+
attr_reader :group
|
47
46
|
|
48
|
-
|
47
|
+
# @return [String]
|
48
|
+
def auto_scaling_group_name
|
49
|
+
group.name
|
50
|
+
end
|
51
|
+
|
52
|
+
attribute :arn, :from => :scheduled_action_arn
|
49
53
|
|
50
54
|
attribute :desired_capacity
|
51
55
|
|
@@ -65,11 +69,6 @@ module AWS
|
|
65
69
|
end
|
66
70
|
end
|
67
71
|
|
68
|
-
# @return [Group]
|
69
|
-
def group
|
70
|
-
Group.new(auto_scaling_group_name, :config => config)
|
71
|
-
end
|
72
|
-
|
73
72
|
# Updates the scheduled action. If you omit an option,
|
74
73
|
# the corresponding value remains unchanged in the Auto
|
75
74
|
# Scaling group.
|
@@ -91,22 +90,15 @@ module AWS
|
|
91
90
|
# @return [nil]
|
92
91
|
#
|
93
92
|
def update options = {}
|
94
|
-
|
95
|
-
|
96
|
-
client_opts[:scheduled_action_name] = name
|
97
|
-
client_opts[:auto_scaling_group_name] = auto_scaling_group_name
|
98
|
-
|
99
|
-
# convert these options to timestamps
|
93
|
+
options.update(resource_options)
|
94
|
+
# convert times to formatted strings
|
100
95
|
[:start_time, :end_time].each do |opt|
|
101
|
-
if
|
102
|
-
|
96
|
+
if options[opt].is_a?(Time)
|
97
|
+
options[opt] = options[opt].iso8601
|
103
98
|
end
|
104
99
|
end
|
105
|
-
|
106
|
-
client.put_scheduled_update_group_action(client_opts)
|
107
|
-
|
100
|
+
client.put_scheduled_update_group_action(options)
|
108
101
|
nil
|
109
|
-
|
110
102
|
end
|
111
103
|
alias_method :put, :update
|
112
104
|
|
@@ -114,29 +106,33 @@ module AWS
|
|
114
106
|
def exists?
|
115
107
|
client_opts = {}
|
116
108
|
client_opts[:scheduled_action_names] = [name]
|
109
|
+
client_opts[:auto_scaling_group_name] = auto_scaling_group_name
|
117
110
|
resp = client.describe_scheduled_actions(client_opts)
|
118
111
|
!resp.scheduled_update_group_actions.empty?
|
112
|
+
rescue Errors::ValidationError
|
113
|
+
false
|
119
114
|
end
|
120
115
|
|
121
116
|
# Deletes the current scheduled action.
|
122
117
|
# @return [nil]
|
123
118
|
def delete
|
124
|
-
|
125
|
-
client_opts[:scheduled_action_name] = name
|
126
|
-
client_opts[:auto_scaling_group_name] = auto_scaling_group_name
|
127
|
-
client.delete_scheduled_action(client_opts)
|
119
|
+
client.delete_scheduled_action(resource_options)
|
128
120
|
nil
|
129
121
|
end
|
130
122
|
|
131
123
|
protected
|
132
124
|
|
133
125
|
def resource_identifiers
|
134
|
-
[
|
126
|
+
[
|
127
|
+
[:auto_scaling_group_name, auto_scaling_group_name],
|
128
|
+
[:scheduled_action_name, name],
|
129
|
+
]
|
135
130
|
end
|
136
131
|
|
137
132
|
def get_resource attr_name = nil
|
138
133
|
client_opts = {}
|
139
134
|
client_opts[:scheduled_action_names] = [name]
|
135
|
+
client_opts[:auto_scaling_group_name] = auto_scaling_group_name
|
140
136
|
client.describe_scheduled_actions(client_opts)
|
141
137
|
end
|
142
138
|
|
@@ -62,8 +62,10 @@ module AWS
|
|
62
62
|
#
|
63
63
|
def create name, options = {}
|
64
64
|
|
65
|
-
|
66
|
-
|
65
|
+
group = auto_scaling_group(options)
|
66
|
+
|
67
|
+
scheduled_action = ScheduledAction.new(group, name,
|
68
|
+
:auto_scaling_group_name => group.name,
|
67
69
|
:config => config)
|
68
70
|
|
69
71
|
scheduled_action.update(options)
|
@@ -75,12 +77,14 @@ module AWS
|
|
75
77
|
# @param [String] name The name of the scheduled action.
|
76
78
|
# @return [ScheduledAction]
|
77
79
|
def [] name
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
80
|
+
if group_name = @filters[:auto_scaling_group_name]
|
81
|
+
group = Group.new(group_name, :config => config)
|
82
|
+
ScheduledAction.new(group, name)
|
83
|
+
else
|
84
|
+
msg = 'uou must filter this collection by a group to get a ' +
|
85
|
+
'scheduled action by name'
|
86
|
+
raise msg
|
82
87
|
end
|
83
|
-
ScheduledAction.new(name, options)
|
84
88
|
end
|
85
89
|
|
86
90
|
# Returns a new {ScheduledActionCollection} filtered
|
@@ -132,11 +136,11 @@ module AWS
|
|
132
136
|
|
133
137
|
protected
|
134
138
|
|
135
|
-
def
|
139
|
+
def auto_scaling_group(options)
|
136
140
|
|
137
141
|
group = options.delete(:group)
|
138
142
|
group ||= @filters[:auto_scaling_group_name]
|
139
|
-
group = group
|
143
|
+
group = Group.new(group, :config => config) if group.is_a?(String)
|
140
144
|
|
141
145
|
unless group
|
142
146
|
raise ArgumentError, 'missing required option :group'
|
@@ -176,9 +180,12 @@ module AWS
|
|
176
180
|
resp = client.describe_scheduled_actions(options.merge(@filters))
|
177
181
|
resp.scheduled_update_group_actions.each do |details|
|
178
182
|
|
183
|
+
group = Group.new(details[:auto_scaling_group_name], :config => config)
|
184
|
+
|
179
185
|
scheduled_action = ScheduledAction.new_from(
|
180
186
|
:describe_scheduled_actions,
|
181
187
|
details,
|
188
|
+
group,
|
182
189
|
details.scheduled_action_name,
|
183
190
|
:config => config)
|
184
191
|
|
data/lib/aws/core.rb
CHANGED
@@ -368,8 +368,8 @@ module AWS
|
|
368
368
|
# and instance of {Core::Response} and returns a string.
|
369
369
|
#
|
370
370
|
# @option options [Integer] :max_retries (3) The maximum number of times
|
371
|
-
# service errors (500) should be retried.
|
372
|
-
# backoff in between
|
371
|
+
# service errors (500) and throttling errors should be retried. There is
|
372
|
+
# an exponential backoff in between retries, so the more retries the
|
373
373
|
# longer it can take to fail.
|
374
374
|
#
|
375
375
|
# @option options [String, URI, nil] :proxy_uri (nil) The URI of the proxy
|
@@ -121,8 +121,8 @@ module AWS
|
|
121
121
|
# @attr_reader [LogFormatter] log_formatter The log message formatter.
|
122
122
|
#
|
123
123
|
# @attr_reader [Integer] max_retries (3) The maximum number of times
|
124
|
-
# service errors (500) should be retried.
|
125
|
-
# backoff in between
|
124
|
+
# service errors (500) and throttling errors should be retried. There is
|
125
|
+
# an exponential backoff in between retries, so the more retries the
|
126
126
|
# longer it can take to fail.
|
127
127
|
#
|
128
128
|
# @attr_reader [URI,nil] proxy_uri (nil) The URI of the proxy
|
data/lib/aws/s3/client.rb
CHANGED
@@ -1404,6 +1404,20 @@ module AWS
|
|
1404
1404
|
|
1405
1405
|
end
|
1406
1406
|
|
1407
|
+
# Gets the torrent for a key.
|
1408
|
+
# @overload get_object_torrent(options = {})
|
1409
|
+
# @param [Hash] options
|
1410
|
+
# @option options [required,String] :bucket_name
|
1411
|
+
# @option options [required,String] :key
|
1412
|
+
# @return [Core::Response]
|
1413
|
+
#
|
1414
|
+
object_method(:get_object_torrent, :get, 'torrent') do
|
1415
|
+
process_response do |resp|
|
1416
|
+
extract_object_headers(resp)
|
1417
|
+
resp.data[:data] = resp.http_response.body
|
1418
|
+
end
|
1419
|
+
end
|
1420
|
+
|
1407
1421
|
# @overload head_object(options = {})
|
1408
1422
|
# @param [Hash] options
|
1409
1423
|
# @option options [required,String] :bucket_name
|
data/lib/aws/s3/uploaded_part.rb
CHANGED
@@ -17,7 +17,7 @@ module AWS
|
|
17
17
|
# Client class for AWS Storage Gateway.
|
18
18
|
class Client < Core::JSONClient
|
19
19
|
|
20
|
-
API_VERSION = '
|
20
|
+
API_VERSION = '2013-06-30'
|
21
21
|
|
22
22
|
# @api private
|
23
23
|
CACHEABLE_REQUESTS = Set[]
|
@@ -29,5 +29,12 @@ module AWS
|
|
29
29
|
define_client_methods('2012-06-30')
|
30
30
|
|
31
31
|
end
|
32
|
+
|
33
|
+
class Client::V20130630 < Client
|
34
|
+
|
35
|
+
define_client_methods('2013-06-30')
|
36
|
+
|
37
|
+
end
|
38
|
+
|
32
39
|
end
|
33
40
|
end
|
data/lib/aws/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.25.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: 2013-
|
11
|
+
date: 2013-11-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: uuidtools
|
@@ -619,6 +619,7 @@ files:
|
|
619
619
|
- lib/aws/api_config/SNS-2010-03-31.yml
|
620
620
|
- lib/aws/api_config/SQS-2012-11-05.yml
|
621
621
|
- lib/aws/api_config/StorageGateway-2012-06-30.yml
|
622
|
+
- lib/aws/api_config/StorageGateway-2013-06-30.yml
|
622
623
|
- lib/aws/api_config/STS-2011-06-15.yml
|
623
624
|
- lib/aws/api_config/Support-2013-04-15.yml
|
624
625
|
- bin/aws-rb
|