aws-sdk 1.3.6 → 1.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/aws/api_config/IAM-2010-05-08.yml +42 -0
- data/lib/aws/core.rb +1 -1
- data/lib/aws/core/http/net_http_handler.rb +1 -0
- data/lib/aws/core/policy.rb +1 -0
- data/lib/aws/iam.rb +75 -0
- data/lib/aws/iam/user_policy.rb +1 -0
- data/lib/aws/record/model/attributes.rb +5 -3
- data/lib/aws/simple_workflow/activity_task_collection.rb +8 -2
- data/lib/aws/simple_workflow/decision_task_collection.rb +8 -2
- data/lib/aws/simple_workflow/request.rb +1 -1
- data/lib/net/http/connection_pool.rb +9 -6
- metadata +9 -9
@@ -556,6 +556,17 @@
|
|
556
556
|
- :pattern: !ruby/regexp /[\w+=,.@-]*/
|
557
557
|
- :required
|
558
558
|
:output: []
|
559
|
+
ChangePassword:
|
560
|
+
:input:
|
561
|
+
OldPassword:
|
562
|
+
- :string
|
563
|
+
- :pattern: !ruby/regexp /[\u0009\u000A\u000D\u0020-\u00FF]+/
|
564
|
+
- :required
|
565
|
+
NewPassword:
|
566
|
+
- :string
|
567
|
+
- :pattern: !ruby/regexp /[\u0009\u000A\u000D\u0020-\u00FF]+/
|
568
|
+
- :required
|
569
|
+
:output: []
|
559
570
|
UploadServerCertificate:
|
560
571
|
:input:
|
561
572
|
Path:
|
@@ -666,6 +677,36 @@
|
|
666
677
|
- :pattern: !ruby/regexp /^[a-z0-9](([a-z0-9]|-(?!-))*[a-z0-9])?$/
|
667
678
|
- :required
|
668
679
|
:output: []
|
680
|
+
UpdateAccountPasswordPolicy:
|
681
|
+
:input:
|
682
|
+
MinimumPasswordLength:
|
683
|
+
- :integer
|
684
|
+
RequireSymbols:
|
685
|
+
- :boolean
|
686
|
+
RequireNumbers:
|
687
|
+
- :boolean
|
688
|
+
RequireUppercaseCharacters:
|
689
|
+
- :boolean
|
690
|
+
RequireLowercaseCharacters:
|
691
|
+
- :boolean
|
692
|
+
:output: []
|
693
|
+
DeleteAccountPasswordPolicy:
|
694
|
+
:input: {}
|
695
|
+
:output: []
|
696
|
+
GetAccountPasswordPolicy:
|
697
|
+
:input: {}
|
698
|
+
:output:
|
699
|
+
- PasswordPolicy:
|
700
|
+
- MinimumPasswordLength:
|
701
|
+
- :integer
|
702
|
+
- RequireSymbols:
|
703
|
+
- :boolean
|
704
|
+
- RequireNumbers:
|
705
|
+
- :boolean
|
706
|
+
- RequireUppercaseCharacters:
|
707
|
+
- :boolean
|
708
|
+
- RequireLowercaseCharacters:
|
709
|
+
- :boolean
|
669
710
|
:client_errors:
|
670
711
|
NoSuchEntity: []
|
671
712
|
MalformedCertificate: []
|
@@ -678,6 +719,7 @@
|
|
678
719
|
InvalidCertificate: []
|
679
720
|
DuplicateCertificate: []
|
680
721
|
KeyPairMismatch: []
|
722
|
+
PasswordPolicyViolation: []
|
681
723
|
NoSuchVendor: []
|
682
724
|
InvalidPublicKey: []
|
683
725
|
DuplicatePublicKey: []
|
data/lib/aws/core.rb
CHANGED
@@ -38,6 +38,7 @@ module AWS
|
|
38
38
|
options[:ssl_ca_path] = request.ssl_ca_path if request.ssl_ca_path
|
39
39
|
|
40
40
|
connection = self.class.pool.connection_for(request.host, options)
|
41
|
+
connection.read_timeout = request.read_timeout
|
41
42
|
|
42
43
|
begin
|
43
44
|
http_response = connection.request(build_request(request))
|
data/lib/aws/core/policy.rb
CHANGED
data/lib/aws/iam.rb
CHANGED
@@ -340,5 +340,80 @@ module AWS
|
|
340
340
|
end
|
341
341
|
end
|
342
342
|
|
343
|
+
# Changes the web password associated with the current IAM user.
|
344
|
+
# In order to change your password you must configure the sdk
|
345
|
+
# to use your IAM user credentials.
|
346
|
+
#
|
347
|
+
#
|
348
|
+
# To change a user password, you must be using credentials from the
|
349
|
+
# user you want to change:
|
350
|
+
#
|
351
|
+
# # pass in a key pair generated for the user you want to change
|
352
|
+
# # the password for
|
353
|
+
# iam = AWS::IAM.new(:access_key_id => '...', :secret_access_key => '...)
|
354
|
+
# iam.change_password('old-password', 'new-password')
|
355
|
+
#
|
356
|
+
# @param [String] old_password
|
357
|
+
#
|
358
|
+
# @param [String] new_password
|
359
|
+
#
|
360
|
+
# @return [nil]
|
361
|
+
#
|
362
|
+
def change_password old_password, new_password
|
363
|
+
client_opts = {}
|
364
|
+
client_opts[:old_password] = old_password
|
365
|
+
client_opts[:new_password] = new_password
|
366
|
+
client.change_password(client_opts)
|
367
|
+
nil
|
368
|
+
end
|
369
|
+
|
370
|
+
# Updates the account password policy for all IAM accounts.
|
371
|
+
# @param [Hash] options
|
372
|
+
# @option options [Integer] :minimum_password_length
|
373
|
+
# @option options [Boolean] :require_symbols
|
374
|
+
# @option options [Boolean] :require_numbers
|
375
|
+
# @option options [Boolean] :require_uppercase_characters
|
376
|
+
# @option options [Boolean] :require_lowercase_characters
|
377
|
+
# @return [nil]
|
378
|
+
def update_account_password_policy options = {}
|
379
|
+
client.update_account_password_policy(options)
|
380
|
+
nil
|
381
|
+
end
|
382
|
+
|
383
|
+
# Removes the account password policy.
|
384
|
+
# @return [nil]
|
385
|
+
def delete_account_password_policy
|
386
|
+
client.delete_account_password_policy
|
387
|
+
nil
|
388
|
+
end
|
389
|
+
|
390
|
+
# Returns the account password policy details as a hash. This method
|
391
|
+
# returns nil if no password policy has been set for this account.
|
392
|
+
#
|
393
|
+
# # set the policy
|
394
|
+
# iam.update_account_password_policy :minimum_password_length => 8
|
395
|
+
#
|
396
|
+
# iam.account_password_policy
|
397
|
+
# #=> {:require_symbols=>false, :require_numbers=>false, :require_uppercase_characters=>false, :require_lowercase_characters=>false, :minimum_password_length=>8}
|
398
|
+
#
|
399
|
+
# @return [Hash,nil]
|
400
|
+
def account_password_policy
|
401
|
+
begin
|
402
|
+
policy = client.get_account_password_policy.password_policy
|
403
|
+
[
|
404
|
+
:minimum_password_length,
|
405
|
+
:require_symbols?,
|
406
|
+
:require_numbers?,
|
407
|
+
:require_uppercase_characters?,
|
408
|
+
:require_lowercase_characters?,
|
409
|
+
].inject({}) do |hash,method|
|
410
|
+
key = method.to_s.sub(/\?/, '').to_sym
|
411
|
+
hash.merge(key => policy.send(method))
|
412
|
+
end
|
413
|
+
rescue Errors::NoSuchEntity
|
414
|
+
nil
|
415
|
+
end
|
416
|
+
end
|
417
|
+
|
343
418
|
end
|
344
419
|
end
|
data/lib/aws/iam/user_policy.rb
CHANGED
@@ -126,9 +126,11 @@ module AWS
|
|
126
126
|
end
|
127
127
|
|
128
128
|
def self.deserialize string_value, options = {}
|
129
|
-
|
130
|
-
|
131
|
-
|
129
|
+
expect(String, string_value) do
|
130
|
+
left, right = string_value.split('.')
|
131
|
+
left = SortableIntegerAttr.deserialize(left, options)
|
132
|
+
"#{left}.#{right}".to_f
|
133
|
+
end
|
132
134
|
end
|
133
135
|
|
134
136
|
end
|
@@ -11,6 +11,8 @@
|
|
11
11
|
# ANY KIND, either express or implied. See the License for the specific
|
12
12
|
# language governing permissions and limitations under the License.
|
13
13
|
|
14
|
+
require 'timeout'
|
15
|
+
|
14
16
|
module AWS
|
15
17
|
class SimpleWorkflow
|
16
18
|
|
@@ -105,8 +107,12 @@ module AWS
|
|
105
107
|
|
106
108
|
def poll task_list, options = {}, &block
|
107
109
|
loop do
|
108
|
-
|
109
|
-
|
110
|
+
begin
|
111
|
+
poll_for_single_task(task_list, options) do |activity_task|
|
112
|
+
yield(activity_task)
|
113
|
+
end
|
114
|
+
rescue Timeout::Error
|
115
|
+
retry
|
110
116
|
end
|
111
117
|
end
|
112
118
|
nil
|
@@ -13,6 +13,8 @@ require 'uuidtools'
|
|
13
13
|
# ANY KIND, either express or implied. See the License for the specific
|
14
14
|
# language governing permissions and limitations under the License.
|
15
15
|
|
16
|
+
require 'timeout'
|
17
|
+
|
16
18
|
module AWS
|
17
19
|
class SimpleWorkflow
|
18
20
|
|
@@ -207,8 +209,12 @@ module AWS
|
|
207
209
|
#
|
208
210
|
def poll task_list, options = {}, &block
|
209
211
|
loop do
|
210
|
-
|
211
|
-
|
212
|
+
begin
|
213
|
+
poll_for_single_task(task_list, options) do |decision_task|
|
214
|
+
yield(decision_task)
|
215
|
+
end
|
216
|
+
rescue Timeout::Error
|
217
|
+
retry
|
212
218
|
end
|
213
219
|
end
|
214
220
|
nil
|
@@ -124,7 +124,7 @@ class Net::HTTP::ConnectionPool
|
|
124
124
|
|
125
125
|
begin
|
126
126
|
|
127
|
-
session = session_for(connection)
|
127
|
+
session = session_for(connection, retried)
|
128
128
|
session.http_session.read_timeout = connection.read_timeout
|
129
129
|
response = session.request(*request_args, &block)
|
130
130
|
|
@@ -174,13 +174,16 @@ class Net::HTTP::ConnectionPool
|
|
174
174
|
|
175
175
|
# Returns a suitable session from the pool or creates a new one
|
176
176
|
private
|
177
|
-
def session_for connection
|
177
|
+
def session_for connection, force_new = false
|
178
|
+
|
178
179
|
session = nil
|
179
180
|
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
181
|
+
unless force_new
|
182
|
+
@pool_mutex.synchronize do
|
183
|
+
_clean
|
184
|
+
session = @pool.find{|idle_session| idle_session.key == connection.key }
|
185
|
+
@pool.delete(session) if session
|
186
|
+
end
|
184
187
|
end
|
185
188
|
|
186
189
|
if session.nil?
|
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: 21
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 1.3.
|
9
|
+
- 7
|
10
|
+
version: 1.3.7
|
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-03-
|
18
|
+
date: 2012-03-09 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
prerelease: false
|
@@ -53,14 +53,14 @@ dependencies:
|
|
53
53
|
requirement: &id003 !ruby/object:Gem::Requirement
|
54
54
|
none: false
|
55
55
|
requirements:
|
56
|
-
- -
|
56
|
+
- - <=
|
57
57
|
- !ruby/object:Gem::Version
|
58
|
-
hash:
|
58
|
+
hash: 3
|
59
59
|
segments:
|
60
60
|
- 1
|
61
|
-
-
|
62
|
-
-
|
63
|
-
version: 1.
|
61
|
+
- 5
|
62
|
+
- 0
|
63
|
+
version: 1.5.0
|
64
64
|
name: nokogiri
|
65
65
|
version_requirements: *id003
|
66
66
|
- !ruby/object:Gem::Dependency
|