aws-sdk 1.3.2 → 1.3.3

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.
Files changed (54) hide show
  1. data/lib/aws/api_config/{IAM-2010-07-15.yml → IAM-2010-05-08.yml} +56 -4
  2. data/lib/aws/api_config/SNS-2010-03-31.yml +90 -81
  3. data/lib/aws/core.rb +26 -11
  4. data/lib/aws/core/client.rb +12 -4
  5. data/lib/aws/core/collection.rb +5 -12
  6. data/lib/aws/core/collection/limitable.rb +10 -3
  7. data/lib/aws/core/collection/simple.rb +1 -0
  8. data/lib/aws/core/configuration.rb +2 -0
  9. data/lib/aws/core/configured_json_client_methods.rb +5 -2
  10. data/lib/aws/core/http/httparty_handler.rb +1 -1
  11. data/lib/aws/core/http/net_http_handler.rb +2 -1
  12. data/lib/aws/core/http/request.rb +27 -0
  13. data/lib/aws/core/json_client.rb +41 -0
  14. data/lib/aws/core/lazy_error_classes.rb +2 -0
  15. data/lib/aws/core/option_grammar.rb +1 -1
  16. data/lib/aws/core/resource.rb +12 -14
  17. data/lib/aws/core/session_signer.rb +0 -5
  18. data/lib/aws/core/xml_grammar.rb +12 -2
  19. data/lib/aws/dynamo_db.rb +4 -1
  20. data/lib/aws/dynamo_db/client.rb +4 -17
  21. data/lib/aws/dynamo_db/item_collection.rb +15 -0
  22. data/lib/aws/ec2/security_group.rb +2 -1
  23. data/lib/aws/ec2/security_group/ip_permission.rb +2 -3
  24. data/lib/aws/elb/listener.rb +2 -2
  25. data/lib/aws/iam.rb +17 -0
  26. data/lib/aws/iam/client.rb +9 -6
  27. data/lib/aws/iam/mfa_device.rb +4 -2
  28. data/lib/aws/iam/mfa_device_collection.rb +14 -3
  29. data/lib/aws/iam/user.rb +10 -0
  30. data/lib/aws/iam/virtual_mfa_device.rb +139 -0
  31. data/lib/aws/iam/virtual_mfa_device_collection.rb +73 -0
  32. data/lib/aws/record/abstract_base.rb +1 -0
  33. data/lib/aws/record/hash_model/attributes.rb +8 -8
  34. data/lib/aws/record/hash_model/finder_methods.rb +10 -15
  35. data/lib/aws/record/model.rb +1 -3
  36. data/lib/aws/record/model/finder_methods.rb +3 -3
  37. data/lib/aws/s3.rb +1 -0
  38. data/lib/aws/s3/bucket.rb +83 -16
  39. data/lib/aws/s3/bucket_lifecycle_configuration.rb +360 -0
  40. data/lib/aws/s3/client.rb +50 -0
  41. data/lib/aws/s3/client/xml.rb +10 -0
  42. data/lib/aws/s3/object_version.rb +5 -0
  43. data/lib/aws/s3/object_version_collection.rb +15 -1
  44. data/lib/aws/s3/request.rb +1 -1
  45. data/lib/aws/s3/s3_object.rb +56 -1
  46. data/lib/aws/sns.rb +1 -0
  47. data/lib/aws/sns/has_delivery_policy.rb +68 -0
  48. data/lib/aws/sns/subscription.rb +62 -14
  49. data/lib/aws/sns/subscription_collection.rb +1 -1
  50. data/lib/aws/sns/topic.rb +22 -4
  51. data/lib/aws/sts.rb +3 -2
  52. data/lib/net/http/connection_pool.rb +1 -1
  53. metadata +27 -25
  54. data/lib/aws/core/collection/batchable.rb +0 -133
@@ -405,7 +405,7 @@
405
405
  - :required
406
406
  SerialNumber:
407
407
  - :string
408
- - :pattern: !ruby/regexp /[\w]*/
408
+ - :pattern: !ruby/regexp /[\w+=\/:,.@-]*/
409
409
  - :required
410
410
  AuthenticationCode1:
411
411
  - :string
@@ -424,7 +424,7 @@
424
424
  - :required
425
425
  SerialNumber:
426
426
  - :string
427
- - :pattern: !ruby/regexp /[\w]*/
427
+ - :pattern: !ruby/regexp /[\w+=\/:,.@-]*/
428
428
  - :required
429
429
  AuthenticationCode1:
430
430
  - :string
@@ -443,7 +443,7 @@
443
443
  - :required
444
444
  SerialNumber:
445
445
  - :string
446
- - :pattern: !ruby/regexp /[\w]*/
446
+ - :pattern: !ruby/regexp /[\w+=\/:,.@-]*/
447
447
  - :required
448
448
  :output: []
449
449
  ListMFADevices:
@@ -451,7 +451,6 @@
451
451
  UserName:
452
452
  - :string
453
453
  - :pattern: !ruby/regexp /[\w+=,.@-]*/
454
- - :required
455
454
  Marker:
456
455
  - :string
457
456
  - :pattern: !ruby/regexp /[\u0020-\u00FF]*/
@@ -465,6 +464,57 @@
465
464
  - :timestamp
466
465
  - IsTruncated:
467
466
  - :boolean
467
+ CreateVirtualMFADevice:
468
+ :input:
469
+ Path:
470
+ - :string
471
+ - :pattern: !ruby/regexp /(\u002F)|(\u002F[\u0021-\u007F]+\u002F)/
472
+ VirtualMFADeviceName:
473
+ - :string
474
+ - :pattern: !ruby/regexp /[\w+=,.@-]*/
475
+ - :required
476
+ :output:
477
+ - VirtualMFADevice:
478
+ - Base32StringSeed:
479
+ - :blob
480
+ - QRCodePNG:
481
+ - :blob
482
+ - User:
483
+ - CreateDate:
484
+ - :timestamp
485
+ - EnableDate:
486
+ - :timestamp
487
+ DeleteVirtualMFADevice:
488
+ :input:
489
+ SerialNumber:
490
+ - :string
491
+ - :pattern: !ruby/regexp /[\w+=\/:,.@-]*/
492
+ - :required
493
+ :output: []
494
+ ListVirtualMFADevices:
495
+ :input:
496
+ AssignmentStatus:
497
+ - :string
498
+ Marker:
499
+ - :string
500
+ - :pattern: !ruby/regexp /[\u0020-\u00FF]*/
501
+ MaxItems:
502
+ - :integer
503
+ :output:
504
+ - VirtualMFADevices:
505
+ - :list: member
506
+ - member:
507
+ - Base32StringSeed:
508
+ - :blob
509
+ - QRCodePNG:
510
+ - :blob
511
+ - User:
512
+ - CreateDate:
513
+ - :timestamp
514
+ - EnableDate:
515
+ - :timestamp
516
+ - IsTruncated:
517
+ - :boolean
468
518
  CreateLoginProfile:
469
519
  :input:
470
520
  UserName:
@@ -629,4 +679,6 @@
629
679
  DuplicateCertificate: []
630
680
  KeyPairMismatch: []
631
681
  NoSuchVendor: []
682
+ InvalidPublicKey: []
683
+ DuplicatePublicKey: []
632
684
  :server_errors: {}
@@ -18,154 +18,163 @@
18
18
  Name:
19
19
  - :string
20
20
  - :required
21
- :output:
21
+ :output:
22
22
  - TopicArn: []
23
-
24
- GetTopicAttributes:
25
- :input:
26
- TopicArn:
23
+ GetTopicAttributes:
24
+ :input:
25
+ TopicArn:
27
26
  - :string
28
27
  - :required
29
- :output:
30
- - Attributes:
31
- - :map:
28
+ :output:
29
+ - Attributes:
30
+ - :map:
32
31
  - entry
33
32
  - key
34
33
  - value
35
- SetTopicAttributes:
36
- :input:
37
- TopicArn:
34
+ SetTopicAttributes:
35
+ :input:
36
+ TopicArn:
38
37
  - :string
39
38
  - :required
40
- AttributeName:
39
+ AttributeName:
41
40
  - :string
42
41
  - :required
43
- AttributeValue:
42
+ AttributeValue:
44
43
  - :string
45
44
  - :required
46
45
  :output: []
47
-
48
- DeleteTopic:
49
- :input:
50
- TopicArn:
46
+ DeleteTopic:
47
+ :input:
48
+ TopicArn:
51
49
  - :string
52
50
  - :required
53
51
  :output: []
54
-
55
- AddPermission:
56
- :input:
57
- TopicArn:
52
+ AddPermission:
53
+ :input:
54
+ TopicArn:
58
55
  - :string
59
56
  - :required
60
- Label:
57
+ Label:
61
58
  - :string
62
59
  - :required
63
- AWSAccountId:
64
- - :membered_list:
60
+ AWSAccountId:
61
+ - :membered_list:
65
62
  - :string
66
63
  - :required
67
- ActionName:
68
- - :membered_list:
64
+ ActionName:
65
+ - :membered_list:
69
66
  - :string
70
67
  - :required
71
68
  :output: []
72
-
73
- RemovePermission:
74
- :input:
75
- TopicArn:
69
+ RemovePermission:
70
+ :input:
71
+ TopicArn:
76
72
  - :string
77
73
  - :required
78
- Label:
74
+ Label:
79
75
  - :string
80
76
  - :required
81
77
  :output: []
82
-
83
- Subscribe:
84
- :input:
85
- TopicArn:
78
+ Subscribe:
79
+ :input:
80
+ TopicArn:
86
81
  - :string
87
82
  - :required
88
- Protocol:
83
+ Protocol:
89
84
  - :string
90
85
  - :required
91
- Endpoint:
86
+ Endpoint:
92
87
  - :string
93
88
  - :required
94
89
  :output: []
95
-
96
- Unsubscribe:
97
- :input:
98
- SubscriptionArn:
90
+ Unsubscribe:
91
+ :input:
92
+ SubscriptionArn:
99
93
  - :string
100
94
  - :required
101
95
  :output: []
102
-
103
- ConfirmSubscription:
104
- :input:
105
- TopicArn:
96
+ ConfirmSubscription:
97
+ :input:
98
+ TopicArn:
106
99
  - :string
107
100
  - :required
108
- Token:
101
+ Token:
109
102
  - :string
110
103
  - :required
111
- AuthenticateOnUnsubscribe:
104
+ AuthenticateOnUnsubscribe:
112
105
  - :boolean
113
106
  :output: []
114
-
115
- ListTopics:
116
- :input:
117
- NextToken:
107
+ SetSubscriptionAttributes:
108
+ :input:
109
+ SubscriptionArn:
110
+ - :string
111
+ - :required
112
+ AttributeName:
118
113
  - :string
119
- :output:
120
- - Topics:
114
+ - :required
115
+ AttributeValue:
116
+ - :string
117
+ - :required
118
+ :output: []
119
+ GetSubscriptionAttributes:
120
+ :input:
121
+ SubscriptionArn:
122
+ - :string
123
+ - :required
124
+ :output:
125
+ - Attributes:
126
+ - :map:
127
+ - entry
128
+ - key
129
+ - value
130
+ ListTopics:
131
+ :input:
132
+ NextToken:
133
+ - :string
134
+ :output:
135
+ - Topics:
121
136
  - :list: member
122
- - NextToken:
137
+ - NextToken:
123
138
  - :force
124
- ListSubscriptions:
125
- :input:
126
- NextToken:
139
+ ListSubscriptions:
140
+ :input:
141
+ NextToken:
127
142
  - :string
128
- :output:
129
- - Subscriptions:
143
+ :output:
144
+ - Subscriptions:
130
145
  - :list: member
131
- - NextToken:
146
+ - NextToken:
132
147
  - :force
133
- ListSubscriptionsByTopic:
134
- :input:
135
- TopicArn:
148
+ ListSubscriptionsByTopic:
149
+ :input:
150
+ TopicArn:
136
151
  - :string
137
152
  - :required
138
- NextToken:
153
+ NextToken:
139
154
  - :string
140
- :output:
141
- - Subscriptions:
155
+ :output:
156
+ - Subscriptions:
142
157
  - :list: member
143
- - NextToken:
158
+ - NextToken:
144
159
  - :force
145
- Publish:
146
- :input:
147
- TopicArn:
160
+ Publish:
161
+ :input:
162
+ TopicArn:
148
163
  - :string
149
164
  - :required
150
- Message:
165
+ Message:
151
166
  - :string
152
167
  - :required
153
- Subject:
168
+ Subject:
154
169
  - :string
155
- MessageStructure:
170
+ MessageStructure:
156
171
  - :string
157
172
  :output: []
158
-
159
- :client_errors:
173
+ :client_errors:
160
174
  InvalidParameter: []
161
-
162
175
  AuthorizationError: []
163
-
164
176
  TopicLimitExceeded: []
165
-
166
177
  SubscriptionLimitExceeded: []
167
-
168
178
  NotFound: []
169
-
170
- :server_errors:
179
+ :server_errors:
171
180
  InternalError: []
@@ -20,16 +20,16 @@ require 'aws/core/autoloader'
20
20
  #
21
21
  # The currently supported services are:
22
22
  #
23
- # * {DynamoDB}
24
- # * {EC2}
25
- # * {ELB}
26
- # * {IAM}
27
- # * {S3}
28
- # * {SimpleDB}
29
- # * {SimpleEmailService}
30
- # * {SNS}
31
- # * {SQS}
32
- # * {STS}
23
+ # * {AWS::DynamoDB}
24
+ # * {AWS::EC2}
25
+ # * {AWS::ELB}
26
+ # * {AWS::IAM}
27
+ # * {AWS::S3}
28
+ # * {AWS::SimpleDB}
29
+ # * {AWS::SimpleEmailService}
30
+ # * {AWS::SNS}
31
+ # * {AWS::SQS}
32
+ # * {AWS::STS}
33
33
  #
34
34
  # = AWS::Record
35
35
  #
@@ -58,7 +58,7 @@ require 'aws/core/autoloader'
58
58
  module AWS
59
59
 
60
60
  # Current version of the AWS SDK for Ruby
61
- VERSION = "1.3.2"
61
+ VERSION = "1.3.3"
62
62
 
63
63
  register_autoloads(self) do
64
64
  autoload :Errors, 'errors'
@@ -86,6 +86,7 @@ module AWS
86
86
  autoload :IgnoreResultElement, 'ignore_result_element'
87
87
  autoload :IndifferentHash, 'indifferent_hash'
88
88
  autoload :Inflection, 'inflection'
89
+ autoload :JsonClient, 'json_client'
89
90
  autoload :LazyErrorClasses, 'lazy_error_classes'
90
91
  autoload :MetaUtils, 'meta_utils'
91
92
  autoload :Model, 'model'
@@ -154,28 +155,40 @@ module AWS
154
155
  # that have already been constructed.
155
156
  #
156
157
  # @param [Hash] options
158
+ #
157
159
  # @option options [String] :access_key_id (nil) AWS access key id
158
160
  # credential.
161
+ #
159
162
  # @option options [String] :dynamo_db_endpoint ('dynamodb.amazonaws.com') The
160
163
  # service endpoint for Amazon DynamoDB.
164
+ #
161
165
  # @option options [String] :dynamo_db_retry_throughput_errors (false) When
162
166
  # true, AWS::DynamoDB::Errors::ProvisionedThroughputExceededException
163
167
  # errors will be retried. You may need to increase the maximum number
164
168
  # of retries if you have a low provisioned throughput.
169
+ #
165
170
  # @option options [String] :ec2_endpoint ('ec2.amazonaws.com') The
166
171
  # service endpoint for Amazon EC2.
172
+ #
173
+ # @option options [String] :elb_endpoint ('elasticloadbalancing.us-east-1.amazonaws.com')
174
+ # The server endpoint for Elastic Load Balancing.
175
+ #
167
176
  # @option options [Object] :http_handler (AWS::HTTPartyHandler) The
168
177
  # http handler that sends requests to AWS.
178
+ #
169
179
  # @option options [String] :iam_endpoint ('iam.amazonaws.com') The
170
180
  # service endpoint for AWS Idenity Access Management (IAM).
181
+ #
171
182
  # @option options [Object,nil] :logger (nil) A logger instance that
172
183
  # should receive log messages generated by service requets.
173
184
  # A logger needs to respond to #log and must accept a
174
185
  # severity (e.g. :info, :error, etc) and a string message.
186
+ #
175
187
  # @option options [Integer] :max_retries (3) The maximum number of times
176
188
  # service errors (500) should be retried. There is an exponential
177
189
  # backoff in between service request retries, so the more retries the
178
190
  # longer it can take to fail.
191
+ #
179
192
  # @option options [String, URI, nil] :proxy_uri (nil) The URI of the proxy
180
193
  # to send service requests through. You can pass a URI object or a
181
194
  # URI string:
@@ -241,6 +254,8 @@ module AWS
241
254
  # The AWS SDK for Ruby ships with a CA cert bundle, which is the
242
255
  # default value for this option.
243
256
  #
257
+ # @option options [String] :ssl_ca_path The path the a CA cert directory.
258
+ #
244
259
  # @option options [Boolean] :ssl_verify_peer (true) When +true+
245
260
  # the HTTP handler validate server certificates for HTTPS requests.
246
261
  #
@@ -335,9 +335,11 @@ module AWS
335
335
  response.request_type = name
336
336
  response.request_options = options
337
337
 
338
- if self.class::CACHEABLE_REQUESTS.include?(name) and
339
- cache = AWS.response_cache and
340
- cached_response = cache.cached(response)
338
+ if
339
+ cacheable_request?(name, options) and
340
+ cache = AWS.response_cache and
341
+ cached_response = cache.cached(response)
342
+ then
341
343
  cached_response.cached = true
342
344
  cached_response
343
345
  else
@@ -363,6 +365,11 @@ module AWS
363
365
  end
364
366
  end
365
367
  end
368
+
369
+ private
370
+ def cacheable_request? name, options
371
+ self.class::CACHEABLE_REQUESTS.include?(name)
372
+ end
366
373
 
367
374
  private
368
375
  def build_request(name, options, &block)
@@ -377,7 +384,8 @@ module AWS
377
384
  http_request.proxy_uri = config.proxy_uri
378
385
  http_request.use_ssl = config.use_ssl?
379
386
  http_request.ssl_verify_peer = config.ssl_verify_peer?
380
- http_request.ssl_ca_file = config.ssl_ca_file
387
+ http_request.ssl_ca_file = config.ssl_ca_file if config.ssl_ca_file
388
+ http_request.ssl_ca_path = config.ssl_ca_path if config.ssl_ca_path
381
389
 
382
390
  send("configure_#{name}_request", http_request, opts, &block)
383
391
  http_request.headers["user-agent"] = user_agent_string