aws-sdk 1.5.4 → 1.5.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -271,6 +271,13 @@
271
271
  ReasonMessage:
272
272
  - :string
273
273
  :outputs: {}
274
+ - :name: CancelExportTask
275
+ :method: :cancel_export_task
276
+ :inputs:
277
+ ExportTaskId:
278
+ - :string
279
+ - :required
280
+ :outputs: {}
274
281
  - :name: CancelSpotInstanceRequests
275
282
  :method: :cancel_spot_instance_requests
276
283
  :inputs:
@@ -372,6 +379,29 @@
372
379
  NoReboot:
373
380
  - :boolean
374
381
  :outputs: {}
382
+ - :name: CreateInstanceExportTask
383
+ :method: :create_instance_export_task
384
+ :inputs:
385
+ Description:
386
+ - :string
387
+ InstanceId:
388
+ - :string
389
+ - :required
390
+ TargetEnvironment:
391
+ - :string
392
+ - :required
393
+ ExportToS3:
394
+ - :structure:
395
+ DiskImageFormat:
396
+ - :string
397
+ ContainerFormat:
398
+ - :string
399
+ S3Bucket:
400
+ - :string
401
+ - :required
402
+ S3Prefix:
403
+ - :string
404
+ :outputs: {}
375
405
  - :name: CreateInternetGateway
376
406
  :method: :create_internet_gateway
377
407
  :inputs: {}
@@ -1175,6 +1205,21 @@
1175
1205
  item:
1176
1206
  :rename: :tag_set
1177
1207
  :list: true
1208
+ - :name: DescribeExportTasks
1209
+ :method: :describe_export_tasks
1210
+ :inputs:
1211
+ ExportTaskId:
1212
+ - :list:
1213
+ - :string
1214
+ - :rename: exportTaskIds
1215
+ :outputs:
1216
+ :children:
1217
+ exportTaskSet:
1218
+ :ignore: true
1219
+ :children:
1220
+ item:
1221
+ :rename: :export_task_set
1222
+ :list: true
1178
1223
  - :name: DescribeImageAttribute
1179
1224
  :method: :describe_image_attribute
1180
1225
  :inputs:
@@ -2664,7 +2709,9 @@
2664
2709
  - :string
2665
2710
  - :rename: blockDeviceMappings
2666
2711
  Monitoring:
2667
- - :boolean
2712
+ - :structure:
2713
+ Enabled:
2714
+ - :boolean
2668
2715
  SubnetId:
2669
2716
  - :string
2670
2717
  DisableApiTermination:
@@ -2991,6 +3038,10 @@
2991
3038
  VolumeId:
2992
3039
  - :string
2993
3040
  - :required
3041
+ Attribute:
3042
+ - :string
3043
+ OperationType:
3044
+ - :string
2994
3045
  AutoEnableIO:
2995
3046
  - :boolean
2996
3047
  :outputs: {}
@@ -3259,12 +3310,6 @@
3259
3310
  DeleteOnTermination:
3260
3311
  - :boolean
3261
3312
  - :rename: networkInterfaces
3262
- IamInstanceProfile:
3263
- - :structure:
3264
- Arn:
3265
- - :string
3266
- Name:
3267
- - :string
3268
3313
  :outputs:
3269
3314
  :children:
3270
3315
  spotInstanceRequestSet:
@@ -3570,12 +3615,6 @@
3570
3615
  DeleteOnTermination:
3571
3616
  - :boolean
3572
3617
  - :rename: networkInterfaces
3573
- IamInstanceProfile:
3574
- - :structure:
3575
- Arn:
3576
- - :string
3577
- Name:
3578
- - :string
3579
3618
  :outputs:
3580
3619
  :children:
3581
3620
  groupSet:
@@ -33,6 +33,31 @@
33
33
  :children:
34
34
  DeleteVerifiedEmailAddressResult:
35
35
  :ignore: true
36
+ - :name: GetIdentityNotificationAttributes
37
+ :method: :get_identity_notification_attributes
38
+ :inputs:
39
+ Identities:
40
+ - :membered_list:
41
+ - :string
42
+ - :required
43
+ :outputs:
44
+ :children:
45
+ GetIdentityNotificationAttributesResult:
46
+ :ignore: true
47
+ :children:
48
+ NotificationAttributes:
49
+ :ignore: true
50
+ :children:
51
+ entry:
52
+ :rename: :notification_attributes
53
+ :map:
54
+ - key
55
+ - value
56
+ :children:
57
+ value:
58
+ :children:
59
+ ForwardingEnabled:
60
+ :type: :boolean
36
61
  - :name: GetIdentityVerificationAttributes
37
62
  :method: :get_identity_verification_attributes
38
63
  :inputs:
@@ -199,6 +224,34 @@
199
224
  :children:
200
225
  SendRawEmailResult:
201
226
  :ignore: true
227
+ - :name: SetIdentityFeedbackForwardingEnabled
228
+ :method: :set_identity_feedback_forwarding_enabled
229
+ :inputs:
230
+ Identity:
231
+ - :string
232
+ - :required
233
+ ForwardingEnabled:
234
+ - :boolean
235
+ - :required
236
+ :outputs:
237
+ :children:
238
+ SetIdentityFeedbackForwardingEnabledResult:
239
+ :ignore: true
240
+ - :name: SetIdentityNotificationTopic
241
+ :method: :set_identity_notification_topic
242
+ :inputs:
243
+ Identity:
244
+ - :string
245
+ - :required
246
+ NotificationType:
247
+ - :string
248
+ - :required
249
+ SnsTopic:
250
+ - :string
251
+ :outputs:
252
+ :children:
253
+ SetIdentityNotificationTopicResult:
254
+ :ignore: true
202
255
  - :name: VerifyDomainIdentity
203
256
  :method: :verify_domain_identity
204
257
  :inputs:
@@ -16,7 +16,13 @@ module AWS
16
16
 
17
17
  # @private
18
18
  class Request < Core::Http::Request
19
- include Core::Signature::Version2
19
+
20
+ include Core::Signature::Version4
21
+
22
+ def service
23
+ 'autoscaling'
24
+ end
25
+
20
26
  end
21
27
 
22
28
  end
@@ -27,15 +27,15 @@ module AWS
27
27
  def apply_template opts
28
28
  if template = opts.delete(:template)
29
29
  case template
30
- when String
31
- if template.match(/http/)
30
+ when String
31
+ if template.match(/^http/)
32
32
  opts[:template_url] = template
33
33
  else
34
34
  opts[:template_body] = template
35
35
  end
36
36
  when URI then opts[:template_url] = template.to_s
37
37
  when S3::S3Object then opts[:template_body] = template.read
38
- else
38
+ else
39
39
  opts[:template_body] = template.to_json
40
40
  end
41
41
  end
data/lib/aws/core.rb CHANGED
@@ -56,12 +56,17 @@ require 'aws/core/autoloader'
56
56
  # If you are loading AWS inside a Rails web application, it is recomended to
57
57
  # place your configuration inside:
58
58
  #
59
- # config/initializers/aws.rb
59
+ # config/initializers/aws-sdk.rb
60
+ #
61
+ # Optionally you can create a Yaml configuration file at
62
+ # RAILS_ROOT/config/aws.yaml; This should be formatted in the same manor
63
+ # as the default RAILS_ROOT/config/database.yml file (one section for
64
+ # each Rails environment).
60
65
  #
61
66
  module AWS
62
67
 
63
68
  # Current version of the AWS SDK for Ruby
64
- VERSION = "1.5.4"
69
+ VERSION = "1.5.5"
65
70
 
66
71
  register_autoloads(self) do
67
72
  autoload :Errors, 'errors'
@@ -201,10 +206,27 @@ module AWS
201
206
  # service endpoint for Amazon EC2.
202
207
  #
203
208
  # @option options [String] :elb_endpoint ('elasticloadbalancing.us-east-1.amazonaws.com')
204
- # The server endpoint for Elastic Load Balancing.
209
+ # The service endpoint for Elastic Load Balancing.
210
+ #
211
+ # @option options [Object] :http_handler (AWS::Core::Http::NetHttpHandler)
212
+ # The http handler that sends requests to AWS.
213
+ #
214
+ # @option options [Integer] :http_idle_timeout (60) The number of seconds
215
+ # a persistent connection is allowed to sit idle before it should no
216
+ # longer be used.
205
217
  #
206
- # @option options [Object] :http_handler (AWS::HTTPartyHandler) The
207
- # http handler that sends requests to AWS.
218
+ # @option options [Integer] :http_open_timeout (15) The number of seconds
219
+ # before the +:http_handler+ should timeout while trying to open a new
220
+ # HTTP sesssion.
221
+ #
222
+ # @option options [Integer] :http_read_timeout (60) The number of seconds
223
+ # before the +:http_handler+ should timeout while waiting for a HTTP
224
+ # response.
225
+ #
226
+ # @option options [Boolean] :http_wire_trace (false) When +true+, the
227
+ # http handler will log all wire traces to the +:logger+. If a
228
+ # +:logger+ is not configured, then wire traces will be sent to
229
+ # standard out.
208
230
  #
209
231
  # @option options [String] :iam_endpoint ('iam.amazonaws.com') The
210
232
  # service endpoint for AWS Idenity Access Management (IAM).
@@ -285,8 +307,8 @@ module AWS
285
307
  # * {S3::S3Object#presigned_post}
286
308
  # * {S3::Bucket#presigned_post}
287
309
  #
288
- # @option options [String] :simple_db_endpoint ('sdb.amazonaws.com') The
289
- # service endpoint for Amazon SimpleDB.
310
+ # @option options [String] :simple_db_endpoint ('sdb.amazonaws.com')
311
+ # The service endpoint for Amazon SimpleDB.
290
312
  #
291
313
  # @option options [Boolean] :simple_db_consistent_reads (false) Determines
292
314
  # if all SimpleDB read requests should be done consistently.
@@ -298,7 +320,7 @@ module AWS
298
320
  # @option options [String] :simple_workflow_service ('swf.us-east-1.amazonaws.com')
299
321
  # The service endpoint for Amazon Simple Workflow Service.
300
322
  #
301
- # @option options [Object] :credential_provider (AWS::Core::CredentialProviders::DefaultProvider.new)
323
+ # @option options [CredentialProviders::Provider] :credential_provider (AWS::Core::CredentialProviders::DefaultProvider.new)
302
324
  # Returns the credential provider. The default credential provider
303
325
  # attempts to check for statically assigned credentials, ENV credentials
304
326
  # and credentials in the metadata service of EC2.
@@ -438,7 +460,6 @@ module AWS
438
460
  # are discarded.
439
461
  def memoize
440
462
  return yield if memoizing?
441
-
442
463
  begin
443
464
  start_memoizing
444
465
  yield if block_given?
@@ -47,14 +47,14 @@ module AWS
47
47
  end
48
48
  end
49
49
 
50
- @config = options.delete(:config)
51
- @config ||= AWS.config
50
+ @config = (options.delete(:config) || AWS.config)
52
51
  @config = @config.with(options)
53
52
 
54
53
  @credential_provider = @config.credential_provider
55
54
  @http_handler = @config.http_handler
56
55
  @endpoint = config.send(:"#{service_ruby_name}_endpoint")
57
56
  @port = config.send(:"#{service_ruby_name}_port")
57
+ @http_read_timeout = @config.http_read_timeout
58
58
 
59
59
  end
60
60
 
@@ -75,6 +75,10 @@ module AWS
75
75
  # @private
76
76
  attr_reader :port
77
77
 
78
+ # @return [Integer] The number of secords before requests made by
79
+ # this client should timeout if they have not received a response.
80
+ attr_reader :http_read_timeout
81
+
78
82
  # @return [String] Returns the service endpoint (hostname) this client
79
83
  # makes requests against.
80
84
  # @private
@@ -432,6 +436,7 @@ module AWS
432
436
 
433
437
  # configure the http request
434
438
  http_request.service_ruby_name = service_ruby_name
439
+ http_request.default_read_timeout = http_read_timeout
435
440
  http_request.host = endpoint
436
441
  http_request.port = port
437
442
  http_request.region = config.send(:"#{service_ruby_name}_region")
@@ -19,7 +19,7 @@ module AWS
19
19
 
20
20
  # A configuration object for AWS interfaces and clients.
21
21
  #
22
- # == Configuring Credential
22
+ # == Configuring Credentials
23
23
  #
24
24
  # In order to do anything with AWS you will need to assign credentials.
25
25
  # The simplest method is to assing your credentials into the default
@@ -85,6 +85,22 @@ module AWS
85
85
  # @attr_reader [Object] http_handler The http handler that sends requests
86
86
  # to AWS. Defaults to an HTTP handler built on net/http.
87
87
  #
88
+ # @attr_reader [Integer] http_idle_timeout The number of seconds a
89
+ # persistent connection is allowed to sit idle before it should no
90
+ # longer be used.
91
+ #
92
+ # @attr_reader [Integer] http_open_timeout The number of seconds before
93
+ # the +http_handler+ should timeout while trying to open a new HTTP
94
+ # sesssion.
95
+ #
96
+ # @attr_reader [Integer] http_read_timeout The number of seconds before
97
+ # the +http_handler+ should timeout while waiting for a HTTP
98
+ # response.
99
+ #
100
+ # @attr_reader [Boolean] http_wire_trace When +true+, the http handler
101
+ # will log all wire traces to the +:logger+. If a +:logger+ is not
102
+ # configured, then wire traces will be sent to standard out.
103
+ #
88
104
  # @attr_reader [String] iam_endpoint ('iam.amazonaws.com')
89
105
  # The service endpoint for AWS Idenity Access Management (IAM).
90
106
  #
@@ -99,11 +115,8 @@ module AWS
99
115
  # backoff in between service request retries, so the more retries the
100
116
  # longer it can take to fail.
101
117
  #
102
- # @attr_reader [String, URI, nil] proxy_uri (nil) The URI of the proxy
103
- # to send service requests through. You can pass a URI object or a
104
- # URI string. Defautls to +nil+.
105
- #
106
- # AWS.config(:proxy_uri => 'https://user:pass@my.proxy:443')
118
+ # @attr_reader [URI,nil] proxy_uri (nil) The URI of the proxy
119
+ # to send service requests through.
107
120
  #
108
121
  # @attr_reader [String] s3_endpoint ('s3.amazonaws.com')
109
122
  # The service endpoint for Amazon S3.
@@ -272,18 +285,17 @@ module AWS
272
285
  # @return [Hash] Returns a hash of all configuration values.
273
286
  def to_h
274
287
  self.class.accepted_options.inject({}) do |h,k|
275
- h[k] = send(k)
276
- h
288
+ h.merge(k => send(k))
277
289
  end
278
290
  end
291
+ alias_method :to_hash, :to_h
279
292
 
280
293
  # @return [Boolean] Returns true if the two configuration objects have
281
294
  # the same values.
282
- def == other
295
+ def eql? other
283
296
  other.is_a?(self.class) and self.supplied == other.supplied
284
297
  end
285
-
286
- alias_method :eql, :==
298
+ alias_method :==, :eql?
287
299
 
288
300
  # @private
289
301
  def inspect
@@ -291,6 +303,7 @@ module AWS
291
303
  end
292
304
 
293
305
  protected
306
+
294
307
  def supplied
295
308
  @supplied ||= {}
296
309
  end
@@ -338,11 +351,11 @@ module AWS
338
351
 
339
352
  return supplied[name] if supplied.has_key?(name)
340
353
 
341
- needed = needs.collect{|need| send(need) }
354
+ needed = needs.inject({}) {|h,need| h.merge(need => send(need)) }
342
355
 
343
356
  unless @created.key?(name) and @created[name][:needed] == needed
344
357
  @created[name] = {}
345
- @created[name][:object] = create_block.call(self)
358
+ @created[name][:object] = create_block.call(self,needed)
346
359
  @created[name][:needed] = needed
347
360
  end
348
361
 
@@ -380,23 +393,26 @@ module AWS
380
393
  end
381
394
 
382
395
  needs = [
383
- :credential_provider,
384
- :http_handler,
385
396
  :"#{ruby_name}_endpoint",
386
397
  :"#{ruby_name}_port",
398
+ :"#{ruby_name}_region",
399
+ :credential_provider,
400
+ :http_handler,
401
+ :http_read_timeout,
402
+ :log_formatter,
403
+ :log_level,
404
+ :logger,
405
+ :proxy_uri,
387
406
  :max_retries,
388
407
  :stub_requests?,
389
- :proxy_uri,
390
- :use_ssl?,
391
408
  :ssl_verify_peer?,
392
409
  :ssl_ca_file,
410
+ :ssl_ca_path,
411
+ :use_ssl?,
393
412
  :user_agent_prefix,
394
- :logger,
395
- :log_formatter,
396
- :log_level,
397
413
  ]
398
414
 
399
- create_block = lambda do |config|
415
+ create_block = lambda do |config,client_options|
400
416
  AWS.const_get(name)::Client.new(:config => config)
401
417
  end
402
418
 
@@ -406,15 +422,38 @@ module AWS
406
422
 
407
423
  end
408
424
 
409
- add_option :access_key_id,
410
- ENV['AWS_ACCESS_KEY_ID'] || ENV['AMAZON_ACCESS_KEY_ID']
425
+ add_option :access_key_id
411
426
 
412
- add_option :secret_access_key,
413
- ENV['AWS_SECRET_ACCESS_KEY'] || ENV['AMAZON_SECRET_ACCESS_KEY']
427
+ add_option :secret_access_key
414
428
 
415
429
  add_option :session_token
430
+
431
+ add_option_with_needs :credential_provider,
432
+ [:access_key_id, :secret_access_key, :session_token] do |cfg,static_creds|
433
+
434
+ CredentialProviders::DefaultProvider.new(static_creds)
435
+
436
+ end
437
+
438
+ add_option :http_open_timeout, 15
439
+
440
+ add_option :http_read_timeout, 60
416
441
 
417
- add_option :http_handler, Http::NetHttpHandler.new
442
+ add_option :http_idle_timeout, 60
443
+
444
+ add_option :http_wire_trace, false, :boolean => true
445
+
446
+ add_option_with_needs :http_handler,
447
+ [
448
+ :http_open_timeout,
449
+ :http_idle_timeout,
450
+ :http_wire_trace,
451
+ :logger,
452
+ ] do |config,handler_options|
453
+
454
+ Http::NetHttpHandler.new(handler_options)
455
+
456
+ end
418
457
 
419
458
  add_option :logger
420
459
 
@@ -426,16 +465,6 @@ module AWS
426
465
 
427
466
  add_option :proxy_uri do |config,uri| uri ? URI.parse(uri.to_s) : nil end
428
467
 
429
- add_option_with_needs :credential_provider,
430
- [:access_key_id, :secret_access_key, :session_token] do |config|
431
-
432
- CredentialProviders::DefaultProvider.new(
433
- :access_key_id => config.access_key_id,
434
- :secret_access_key => config.secret_access_key,
435
- :session_token => config.session_token)
436
-
437
- end
438
-
439
468
  add_option :ssl_verify_peer, true, :boolean => true
440
469
 
441
470
  add_option :ssl_ca_file,