aws-sdk 1.38.0 → 1.39.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +23 -8
  3. data/bin/aws-rb +0 -1
  4. data/lib/aws/api_config/AutoScaling-2011-01-01.yml +2 -0
  5. data/lib/aws/api_config/DynamoDB-2012-08-10.yml +101 -1
  6. data/lib/aws/api_config/ElastiCache-2014-03-24.yml +1375 -0
  7. data/lib/aws/api_config/OpsWorks-2013-02-18.yml +28 -0
  8. data/lib/aws/auto_scaling/group.rb +1 -1
  9. data/lib/aws/core.rb +14 -0
  10. data/lib/aws/core/client.rb +2 -1
  11. data/lib/aws/core/configuration.rb +1 -1
  12. data/lib/aws/core/credential_providers.rb +23 -10
  13. data/lib/aws/core/http/connection_pool.rb +12 -2
  14. data/lib/aws/core/http/request.rb +3 -0
  15. data/lib/aws/core/log_formatter.rb +1 -1
  16. data/lib/aws/core/policy.rb +2 -3
  17. data/lib/aws/dynamo_db/table.rb +4 -8
  18. data/lib/aws/ec2/instance.rb +1 -1
  19. data/lib/aws/ec2/instance_collection.rb +12 -3
  20. data/lib/aws/elasticache/client.rb +5 -2
  21. data/lib/aws/glacier/vault.rb +1 -1
  22. data/lib/aws/iam/server_certificate.rb +24 -17
  23. data/lib/aws/rails.rb +1 -1
  24. data/lib/aws/record/abstract_base.rb +0 -1
  25. data/lib/aws/record/hash_model.rb +1 -1
  26. data/lib/aws/record/model.rb +1 -1
  27. data/lib/aws/route_53/hosted_zone_collection.rb +2 -1
  28. data/lib/aws/s3/bucket_lifecycle_configuration.rb +1 -2
  29. data/lib/aws/s3/client.rb +48 -2
  30. data/lib/aws/s3/presign_v4.rb +1 -0
  31. data/lib/aws/s3/s3_object.rb +1 -0
  32. data/lib/aws/simple_workflow/decision_task.rb +2 -2
  33. data/lib/aws/simple_workflow/decision_task_collection.rb +0 -2
  34. data/lib/aws/simple_workflow/option_formatters.rb +1 -1
  35. data/lib/aws/simple_workflow/workflow_type.rb +0 -2
  36. data/lib/aws/sqs/queue.rb +1 -1
  37. data/lib/aws/version.rb +1 -1
  38. metadata +3 -16
@@ -134,7 +134,7 @@ module AWS
134
134
  # If you need to supply configuration values for SES that are different than
135
135
  # those in {AWS.config} then you can pass those options:
136
136
  #
137
- # AWS.add_action_mailer_delivery_method(:ses, custom_options)
137
+ # AWS::Rails.add_action_mailer_delivery_method(:ses, custom_options)
138
138
  #
139
139
  # @param [Symbol] name (:amazon_ses) The name of the delivery
140
140
  # method. The name used here should be the same as you set in
@@ -11,7 +11,6 @@
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 'uuidtools'
15
14
  require 'set'
16
15
 
17
16
  module AWS
@@ -140,7 +140,7 @@ module AWS
140
140
  def populate_id
141
141
  hash_key = self.class.hash_key_attribute
142
142
  if hash_key.options[:default_hash_key_attribute]
143
- self[hash_key.name] = UUIDTools::UUID.random_create.to_s.downcase
143
+ self[hash_key.name] = SecureRandom.uuid
144
144
  end
145
145
  end
146
146
 
@@ -397,7 +397,7 @@ module AWS
397
397
 
398
398
  # @api private
399
399
  def populate_id
400
- @_id = UUIDTools::UUID.random_create.to_s.downcase
400
+ @_id = SecureRandom.uuid
401
401
  end
402
402
 
403
403
  # @api private
@@ -24,7 +24,8 @@ module AWS
24
24
  # # Find existing hosted zone
25
25
  #
26
26
  # r53 = AWS::Route53.new
27
- # hosted_zone = r53.hosted_zones['example.com.']
27
+ # # to lookup a route53 hosted zone, you need to use the zone id (i.e hosted_zone.id)
28
+ # hosted_zone = r53.hosted_zones['Zabcdefghijklm']
28
29
  #
29
30
  class HostedZoneCollection
30
31
 
@@ -12,7 +12,6 @@
12
12
  # language governing permissions and limitations under the License.
13
13
 
14
14
  require 'nokogiri'
15
- require 'uuidtools'
16
15
 
17
16
  module AWS
18
17
  class S3
@@ -165,7 +164,7 @@ module AWS
165
164
  options[:expiration_time] = expiration_time
166
165
  end
167
166
 
168
- id = options[:id] || UUIDTools::UUID.random_create.to_s
167
+ id = options[:id] || SecureRandom.uuid
169
168
  opts = {
170
169
  :status => options[:disabled] == true ? 'Disabled' : 'Enabled',
171
170
  :expiration_time => options[:expiration_time],
@@ -1,4 +1,4 @@
1
- # Copyright 2011-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
1
+ # Copyright 2011-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License"). You
4
4
  # may not use this file except in compliance with the License. A copy of
@@ -1484,14 +1484,60 @@ module AWS
1484
1484
  # @option options [required,String] :bucket_name
1485
1485
  # @option options [required,String] :key
1486
1486
  # @option options [String] :version_id
1487
+ # @option options [Time] :if_modified_since If specified, the
1488
+ # response will contain an additional `:modified` value that
1489
+ # returns true if the object was modified after the given
1490
+ # time. If `:modified` is false, then the response
1491
+ # `:data` value will be `nil`.
1492
+ # @option options [Time] :if_unmodified_since If specified, the
1493
+ # response will contain an additional `:unmodified` value
1494
+ # that is true if the object was not modified after the
1495
+ # given time. If `:unmodified` returns false, the `:data`
1496
+ # value will be `nil`.
1497
+ # @option options [String] :if_match If specified, the response
1498
+ # will contain an additional `:matches` value that is true
1499
+ # if the object ETag matches the value for this option. If
1500
+ # `:matches` is false, the `:data` value of the
1501
+ # response will be `nil`.
1502
+ # @option options [String] :if_none_match If specified, the
1503
+ # response will contain an additional `:matches` value that
1504
+ # is true if and only if the object ETag matches the value for
1505
+ # this option. If `:matches` is true, the `:data` value
1506
+ # of the response will be `nil`.
1507
+ # @option options [Range<Integer>] :range A byte range of data to request.
1487
1508
  # @return [Core::Response]
1488
- object_method(:head_object, :head) do
1509
+ object_method(:head_object, :head,
1510
+ :header_options => {
1511
+ :if_modified_since => "If-Modified-Since",
1512
+ :if_unmodified_since => "If-Unmodified-Since",
1513
+ :if_match => "If-Match",
1514
+ :if_none_match => "If-None-Match"
1515
+ }) do
1489
1516
 
1490
1517
  configure_request do |req, options|
1491
1518
  super(req, options)
1492
1519
  if options[:version_id]
1493
1520
  req.add_param('versionId', options[:version_id])
1494
1521
  end
1522
+
1523
+ ["If-Modified-Since",
1524
+ "If-Unmodified-Since"].each do |date_header|
1525
+ case value = req.headers[date_header]
1526
+ when DateTime
1527
+ req.headers[date_header] = Time.parse(value.to_s).rfc2822
1528
+ when Time
1529
+ req.headers[date_header] = value.rfc2822
1530
+ end
1531
+ end
1532
+
1533
+ if options[:range]
1534
+ range = options[:range]
1535
+ if range.is_a?(Range)
1536
+ offset = range.exclude_end? ? -1 : 0
1537
+ range = "bytes=#{range.first}-#{range.last + offset}"
1538
+ end
1539
+ req.headers['Range'] = range
1540
+ end
1495
1541
  end
1496
1542
 
1497
1543
  process_response do |resp|
@@ -103,6 +103,7 @@ module AWS
103
103
  when :get, :read then :get_object
104
104
  when :put, :write then :put_object
105
105
  when :delete then :delete_object
106
+ when :head then :head_object
106
107
  else
107
108
  msg = "invalid method, expected :get, :put or :delete, got "
108
109
  msg << method.inspect
@@ -1179,6 +1179,7 @@ module AWS
1179
1179
  # * `:get` or `:read`
1180
1180
  # * `:put` or `:write`
1181
1181
  # * `:delete`
1182
+ # * `:head`
1182
1183
  #
1183
1184
  # @param [Hash] options Additional options for generating the URL.
1184
1185
  #
@@ -255,7 +255,7 @@ module AWS
255
255
  #
256
256
  def schedule_activity_task activity_type, options = {}
257
257
 
258
- options[:activity_id] ||= UUIDTools::UUID.random_create.to_s
258
+ options[:activity_id] ||= SecureRandom.uuid
259
259
 
260
260
  options[:activity_type] = case activity_type
261
261
  when Hash
@@ -448,7 +448,7 @@ module AWS
448
448
  # @return [String] Returns the id of the timer.
449
449
  #
450
450
  def start_timer start_to_fire_timeout, options = {}
451
- options[:timer_id] ||= UUIDTools::UUID.random_create.to_s
451
+ options[:timer_id] ||= SecureRandom.uuid
452
452
  options[:start_to_fire_timeout] = start_to_fire_timeout
453
453
  duration_opts(options, :start_to_fire_timeout)
454
454
  add_decision :start_timer, options
@@ -1,5 +1,3 @@
1
- require 'uuidtools'
2
-
3
1
  # Copyright 2011-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
4
2
  #
5
3
  # Licensed under the Apache License, Version 2.0 (the "License"). You
@@ -44,7 +44,7 @@ module AWS
44
44
 
45
45
  if workflow_type
46
46
 
47
- options[:workflow_id] ||= UUIDTools::UUID.random_create.to_s
47
+ options[:workflow_id] ||= SecureRandom.uuid
48
48
 
49
49
  if workflow_type.is_a?(WorkflowType)
50
50
  options[:workflow_type] = {}
@@ -11,8 +11,6 @@
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 'uuidtools'
15
-
16
14
  module AWS
17
15
  class SimpleWorkflow
18
16
 
@@ -512,7 +512,7 @@ module AWS
512
512
  # and optionally `:delay_seconds`.
513
513
  #
514
514
  # @raise [Errors::BatchSendError] Raises this error when one or more
515
- # of the messages failed to send, but others did. On the raised
515
+ # of the messages failed to send, but others did not. On the raised
516
516
  # object you can access a list of the messages that failed, and
517
517
  # a list of messages that succeeded.
518
518
  #
@@ -13,5 +13,5 @@
13
13
 
14
14
  module AWS
15
15
  # Current version of the AWS SDK for Ruby
16
- VERSION = '1.38.0'
16
+ VERSION = '1.39.0'
17
17
  end
metadata CHANGED
@@ -1,29 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.38.0
4
+ version: 1.39.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: 2014-03-25 00:00:00.000000000 Z
11
+ date: 2014-04-24 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: uuidtools
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ~>
18
- - !ruby/object:Gem::Version
19
- version: '2.1'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ~>
25
- - !ruby/object:Gem::Version
26
- version: '2.1'
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: nokogiri
29
15
  requirement: !ruby/object:Gem::Requirement
@@ -587,6 +573,7 @@ files:
587
573
  - lib/aws/api_config/EC2-2013-10-15.yml
588
574
  - lib/aws/api_config/EC2-2014-02-01.yml
589
575
  - lib/aws/api_config/ElastiCache-2013-06-15.yml
576
+ - lib/aws/api_config/ElastiCache-2014-03-24.yml
590
577
  - lib/aws/api_config/ElasticBeanstalk-2010-12-01.yml
591
578
  - lib/aws/api_config/ElasticTranscoder-2012-09-25.yml
592
579
  - lib/aws/api_config/ELB-2012-06-01.yml