aws-sdk 1.8.3.1 → 1.8.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. data/.yardopts +3 -2
  2. data/ca-bundle.crt +566 -2
  3. data/lib/aws/api_config/CloudFormation-2010-05-15.yml +10 -0
  4. data/lib/aws/api_config/{EC2-2012-12-01.yml → EC2-2013-02-01.yml} +105 -15
  5. data/lib/aws/auto_scaling.rb +2 -0
  6. data/lib/aws/auto_scaling/scaling_policy.rb +2 -2
  7. data/lib/aws/auto_scaling/scaling_policy_options.rb +2 -1
  8. data/lib/aws/cloud_formation.rb +2 -0
  9. data/lib/aws/cloud_formation/client.rb +23 -11
  10. data/lib/aws/cloud_front.rb +2 -0
  11. data/lib/aws/cloud_search.rb +2 -0
  12. data/lib/aws/cloud_watch.rb +2 -0
  13. data/lib/aws/core.rb +1 -1
  14. data/lib/aws/core/client.rb +15 -0
  15. data/lib/aws/data_pipeline.rb +2 -0
  16. data/lib/aws/dynamo_db.rb +3 -11
  17. data/lib/aws/ec2.rb +2 -0
  18. data/lib/aws/ec2/client.rb +77 -12
  19. data/lib/aws/elastic_beanstalk.rb +2 -0
  20. data/lib/aws/elasticache.rb +2 -0
  21. data/lib/aws/elb.rb +2 -0
  22. data/lib/aws/emr.rb +2 -0
  23. data/lib/aws/glacier.rb +2 -0
  24. data/lib/aws/iam.rb +2 -0
  25. data/lib/aws/import_export.rb +2 -0
  26. data/lib/aws/rds.rb +2 -0
  27. data/lib/aws/record/abstract_base.rb +1 -1
  28. data/lib/aws/route_53.rb +2 -0
  29. data/lib/aws/route_53/hosted_zone.rb +1 -1
  30. data/lib/aws/route_53/resource_record_set.rb +12 -8
  31. data/lib/aws/s3/bucket.rb +1 -1
  32. data/lib/aws/s3/client.rb +4 -0
  33. data/lib/aws/s3/cors_rule_collection.rb +1 -1
  34. data/lib/aws/simple_db.rb +2 -0
  35. data/lib/aws/simple_email_service.rb +2 -0
  36. data/lib/aws/simple_workflow.rb +2 -0
  37. data/lib/aws/sns.rb +2 -0
  38. data/lib/aws/sqs.rb +2 -0
  39. data/lib/aws/sqs/request.rb +16 -0
  40. data/lib/aws/storage_gateway.rb +2 -0
  41. data/lib/aws/sts.rb +2 -0
  42. data/lib/aws/version.rb +1 -1
  43. metadata +4 -4
@@ -229,6 +229,8 @@ module AWS
229
229
  # ec2.images.create(:image_location => "mybucket/manifest.xml",
230
230
  # :name => "my-image")
231
231
  #
232
+ # @!attribute [r] client
233
+ # @return [Client] the low-level EC2 client object
232
234
  class EC2
233
235
 
234
236
  AWS.register_autoloads(self) do
@@ -391,6 +391,19 @@ module AWS
391
391
  # a hash with the following structure:
392
392
  # * +:owner_id+ - (String)
393
393
 
394
+ # @!method copy_image(options = {})
395
+ # Calls the CopyImage API operation.
396
+ # @param [Hash] options
397
+ # * +:source_region+ - *required* - (String)
398
+ # * +:source_image_id+ - *required* - (String)
399
+ # * +:name+ - *required* - (String)
400
+ # * +:description+ - (String)
401
+ # * +:client_token+ - (String)
402
+ # @return [Core::Response]
403
+ # The #data method of the response object returns
404
+ # a hash with the following structure:
405
+ # * +:image_id+ - (String)
406
+
394
407
  # @!method copy_snapshot(options = {})
395
408
  # Calls the CopySnapshot API operation.
396
409
  # @param [Hash] options
@@ -649,6 +662,7 @@ module AWS
649
662
  # * +:value+ - (String)
650
663
  # * +:private_ip_addresses_set+ - (Array<Hash>)
651
664
  # * +:private_ip_address+ - (String)
665
+ # * +:private_dns_name+ - (String)
652
666
  # * +:primary+ - (Boolean)
653
667
  # * +:association+ - (Hash)
654
668
  # * +:public_ip+ - (String)
@@ -741,11 +755,6 @@ module AWS
741
755
  # * +:value+ - (String)
742
756
  # * +:propagating_vgw_set+ - (Array<Hash>)
743
757
  # * +:gateway_id+ - (String)
744
- # * +:propagated_route_set+ - (Array<Hash>)
745
- # * +:destination_cidr_block+ - (String)
746
- # * +:gateway_id+ - (String)
747
- # * +:status+ - (String)
748
- # * +:source_id+ - (String)
749
758
 
750
759
  # @!method create_security_group(options = {})
751
760
  # Calls the CreateSecurityGroup API operation.
@@ -819,6 +828,8 @@ module AWS
819
828
  # * +:cidr_block+ - (String)
820
829
  # * +:available_ip_address_count+ - (Integer)
821
830
  # * +:availability_zone+ - (String)
831
+ # * +:default_for_az+ - (Boolean)
832
+ # * +:map_public_ip_on_launch+ - (Boolean)
822
833
  # * +:tag_set+ - (Array<Hash>)
823
834
  # * +:key+ - (String)
824
835
  # * +:value+ - (String)
@@ -889,6 +900,7 @@ module AWS
889
900
  # * +:key+ - (String)
890
901
  # * +:value+ - (String)
891
902
  # * +:instance_tenancy+ - (String)
903
+ # * +:is_default+ - (Boolean)
892
904
 
893
905
  # @!method create_vpn_connection(options = {})
894
906
  # Calls the CreateVpnConnection API operation.
@@ -1123,6 +1135,18 @@ module AWS
1123
1135
  # deregister.
1124
1136
  # @return [Core::Response]
1125
1137
 
1138
+ # @!method describe_account_attributes(options = {})
1139
+ # Calls the DescribeAccountAttributes API operation.
1140
+ # @param [Hash] options
1141
+ # * +:attribute_names+ - (Array<String>)
1142
+ # @return [Core::Response]
1143
+ # The #data method of the response object returns
1144
+ # a hash with the following structure:
1145
+ # * +:account_attribute_set+ - (Array<Hash>)
1146
+ # * +:attribute_name+ - (String)
1147
+ # * +:attribute_value_set+ - (Array<Hash>)
1148
+ # * +:attribute_value+ - (String)
1149
+
1126
1150
  # @!method describe_addresses(options = {})
1127
1151
  # Calls the DescribeAddresses API operation.
1128
1152
  # @param [Hash] options
@@ -1599,7 +1623,16 @@ module AWS
1599
1623
  # * +:delete_on_termination+ - (Boolean)
1600
1624
  # * +:association+ - (Hash)
1601
1625
  # * +:public_ip+ - (String)
1626
+ # * +:public_dns_name+ - (String)
1602
1627
  # * +:ip_owner_id+ - (String)
1628
+ # * +:private_ip_addresses_set+ - (Array<Hash>)
1629
+ # * +:private_ip_address+ - (String)
1630
+ # * +:private_dns_name+ - (String)
1631
+ # * +:primary+ - (Boolean)
1632
+ # * +:association+ - (Hash)
1633
+ # * +:public_ip+ - (String)
1634
+ # * +:public_dns_name+ - (String)
1635
+ # * +:ip_owner_id+ - (String)
1603
1636
  # * +:iam_instance_profile+ - (Hash)
1604
1637
  # * +:arn+ - (String)
1605
1638
  # * +:id+ - (String)
@@ -1786,6 +1819,7 @@ module AWS
1786
1819
  # * +:value+ - (String)
1787
1820
  # * +:private_ip_addresses_set+ - (Array<Hash>)
1788
1821
  # * +:private_ip_address+ - (String)
1822
+ # * +:private_dns_name+ - (String)
1789
1823
  # * +:primary+ - (Boolean)
1790
1824
  # * +:association+ - (Hash)
1791
1825
  # * +:public_ip+ - (String)
@@ -1981,11 +2015,6 @@ module AWS
1981
2015
  # * +:value+ - (String)
1982
2016
  # * +:propagating_vgw_set+ - (Array<Hash>)
1983
2017
  # * +:gateway_id+ - (String)
1984
- # * +:propagated_route_set+ - (Array<Hash>)
1985
- # * +:destination_cidr_block+ - (String)
1986
- # * +:gateway_id+ - (String)
1987
- # * +:status+ - (String)
1988
- # * +:source_id+ - (String)
1989
2018
 
1990
2019
  # @!method describe_security_groups(options = {})
1991
2020
  # Calls the DescribeSecurityGroups API operation.
@@ -2233,6 +2262,8 @@ module AWS
2233
2262
  # * +:cidr_block+ - (String)
2234
2263
  # * +:available_ip_address_count+ - (Integer)
2235
2264
  # * +:availability_zone+ - (String)
2265
+ # * +:default_for_az+ - (Boolean)
2266
+ # * +:map_public_ip_on_launch+ - (Boolean)
2236
2267
  # * +:tag_set+ - (Array<Hash>)
2237
2268
  # * +:key+ - (String)
2238
2269
  # * +:value+ - (String)
@@ -2337,6 +2368,21 @@ module AWS
2337
2368
  # * +:volume_type+ - (String)
2338
2369
  # * +:iops+ - (Integer)
2339
2370
 
2371
+ # @!method describe_vpc_attribute(options = {})
2372
+ # Calls the DescribeVpcAttribute API operation.
2373
+ # @param [Hash] options
2374
+ # * +:vpc_id+ - *required* - (String)
2375
+ # * +:enable_dns_support+ - (String)
2376
+ # * +:enable_dns_hostnames+ - (String)
2377
+ # @return [Core::Response]
2378
+ # The #data method of the response object returns
2379
+ # a hash with the following structure:
2380
+ # * +:vpc_id+ - (String)
2381
+ # * +:enable_dns_support+ - (Hash)
2382
+ # * +:value+ - (Boolean)
2383
+ # * +:enable_dns_hostnames+ - (Hash)
2384
+ # * +:value+ - (Boolean)
2385
+
2340
2386
  # @!method describe_vpcs(options = {})
2341
2387
  # Calls the DescribeVpcs API operation.
2342
2388
  # @param [Hash] options
@@ -2360,6 +2406,7 @@ module AWS
2360
2406
  # * +:key+ - (String)
2361
2407
  # * +:value+ - (String)
2362
2408
  # * +:instance_tenancy+ - (String)
2409
+ # * +:is_default+ - (Boolean)
2363
2410
 
2364
2411
  # @!method describe_vpn_connections(options = {})
2365
2412
  # Calls the DescribeVpnConnections API operation.
@@ -2838,6 +2885,16 @@ module AWS
2838
2885
  # * +:auto_enable_io+ - (Boolean)
2839
2886
  # @return [Core::Response]
2840
2887
 
2888
+ # @!method modify_vpc_attribute(options = {})
2889
+ # Calls the ModifyVpcAttribute API operation.
2890
+ # @param [Hash] options
2891
+ # * +:vpc_id+ - (String)
2892
+ # * +:enable_dns_support+ - (Hash)
2893
+ # * +:value+ - (Boolean) Boolean value
2894
+ # * +:enable_dns_hostnames+ - (Hash)
2895
+ # * +:value+ - (Boolean) Boolean value
2896
+ # @return [Core::Response]
2897
+
2841
2898
  # @!method monitor_instances(options = {})
2842
2899
  # Calls the MonitorInstances API operation.
2843
2900
  # @param [Hash] options
@@ -3298,7 +3355,6 @@ module AWS
3298
3355
  # * +:security_group_ids+ - (Array<String>)
3299
3356
  # * +:user_data+ - (String) Specifies additional information to make
3300
3357
  # available to the instance(s).
3301
- # * +:addressing_type+ - (String)
3302
3358
  # * +:instance_type+ - (String) Specifies the instance type for the
3303
3359
  # launched instances.
3304
3360
  # * +:placement+ - (Hash) Specifies the placement constraints
@@ -3465,7 +3521,16 @@ module AWS
3465
3521
  # * +:delete_on_termination+ - (Boolean)
3466
3522
  # * +:association+ - (Hash)
3467
3523
  # * +:public_ip+ - (String)
3524
+ # * +:public_dns_name+ - (String)
3468
3525
  # * +:ip_owner_id+ - (String)
3526
+ # * +:private_ip_addresses_set+ - (Array<Hash>)
3527
+ # * +:private_ip_address+ - (String)
3528
+ # * +:private_dns_name+ - (String)
3529
+ # * +:primary+ - (Boolean)
3530
+ # * +:association+ - (Hash)
3531
+ # * +:public_ip+ - (String)
3532
+ # * +:public_dns_name+ - (String)
3533
+ # * +:ip_owner_id+ - (String)
3469
3534
  # * +:iam_instance_profile+ - (Hash)
3470
3535
  # * +:arn+ - (String)
3471
3536
  # * +:id+ - (String)
@@ -3550,7 +3615,7 @@ module AWS
3550
3615
 
3551
3616
  # end client methods #
3552
3617
 
3553
- define_client_methods('2012-12-01')
3618
+ define_client_methods('2013-02-01')
3554
3619
 
3555
3620
  end
3556
3621
  end
@@ -33,6 +33,8 @@ module AWS
33
33
  # :access_key_id => 'YOUR_ACCESS_KEY_ID',
34
34
  # :secret_access_key => 'YOUR_SECRET_ACCESS_KEY')
35
35
  #
36
+ # @!attribute [r] client
37
+ # @return [Client] the low-level ElasticBeanstalk client object
36
38
  class ElasticBeanstalk
37
39
 
38
40
  AWS.register_autoloads(self, 'aws/elastic_beanstalk') do
@@ -33,6 +33,8 @@ module AWS
33
33
  # :access_key_id => 'YOUR_ACCESS_KEY_ID',
34
34
  # :secret_access_key => 'YOUR_SECRET_ACCESS_KEY')
35
35
  #
36
+ # @!attribute [r] client
37
+ # @return [Client] the low-level ElastiCache client object
36
38
  class ElastiCache
37
39
 
38
40
  AWS.register_autoloads(self) do
@@ -34,6 +34,8 @@ module AWS
34
34
  # :access_key_id => 'YOUR_ACCESS_KEY_ID',
35
35
  # :secret_access_key => 'YOUR_SECRET_ACCESS_KEY')
36
36
  #
37
+ # @!attribute [r] client
38
+ # @return [Client] the low-level ELB client object
37
39
  class ELB
38
40
 
39
41
  AWS.register_autoloads(self) do
@@ -59,6 +59,8 @@ module AWS
59
59
  # See {JobFlowCollection} and {JobFlow} for more information on working
60
60
  # with job flows.
61
61
  #
62
+ # @!attribute [r] client
63
+ # @return [Client] the low-level EMR client object
62
64
  class EMR
63
65
 
64
66
  AWS.register_autoloads(self) do
@@ -43,6 +43,8 @@ module AWS
43
43
  #
44
44
  # See {Client} for documentation on all of the supported API operations.
45
45
  #
46
+ # @!attribute [r] client
47
+ # @return [Client] the low-level Glacier client object
46
48
  class Glacier
47
49
 
48
50
  AWS.register_autoloads(self, 'aws/glacier') do
@@ -132,6 +132,8 @@ module AWS
132
132
  # * Signing Certificates ({SigningCertificateCollection}, {SigningCertificate})
133
133
  # * Multifactor Authentication Devices ({MFADeviceCollection}, {MFADevice})
134
134
  #
135
+ # @!attribute [r] client
136
+ # @return [Client] the low-level IAM client object
135
137
  class IAM
136
138
 
137
139
  AWS.register_autoloads(self) do
@@ -57,6 +57,8 @@ module AWS
57
57
  #
58
58
  # See {Client} for documentation on all of the supported operations.
59
59
  #
60
+ # @!attribute [r] client
61
+ # @return [Client] the low-level ImportExport client object
60
62
  class ImportExport
61
63
 
62
64
  AWS.register_autoloads(self, 'aws/import_export') do
@@ -39,6 +39,8 @@ module AWS
39
39
  # :access_key_id => 'YOUR_ACCESS_KEY_ID',
40
40
  # :secret_access_key => 'YOUR_SECRET_ACCESS_KEY')
41
41
  #
42
+ # @!attribute [r] client
43
+ # @return [Client] the low-level RDS client object
42
44
  class RDS
43
45
 
44
46
  AWS.register_autoloads(self) do
@@ -298,7 +298,7 @@ module AWS
298
298
 
299
299
  protected
300
300
  def populate_id
301
- @_id = UUIDTools::UUID.random_create.to_s
301
+ @_id = UUIDTools::UUID.random_create.to_s.downcase
302
302
  end
303
303
 
304
304
  protected
@@ -57,6 +57,8 @@ module AWS
57
57
  #
58
58
  # See {Client} for documentation on all of the supported operations.
59
59
  #
60
+ # @!attribute [r] client
61
+ # @return [Client] the low-level Route53 client object
60
62
  class Route53
61
63
 
62
64
  AWS.register_autoloads(self, 'aws/route_53') do
@@ -89,7 +89,7 @@ module AWS
89
89
  get_resource.data[:hosted_zone][:id] == path
90
90
  end
91
91
 
92
- # Returns resource recoed sets.
92
+ # Returns resource record sets.
93
93
  # @return [ResourceRecordSetCollection]
94
94
  def resource_record_sets
95
95
  ResourceRecordSetCollection.new(id, :config => config)
@@ -153,8 +153,10 @@ module AWS
153
153
  # @return [ResourceRecordSet] New resource record set with current value.
154
154
  def update options = {}
155
155
  batch = new_change_batch(options)
156
- batch << new_delete_request
157
- batch << new_change_request
156
+ AWS.memoize do
157
+ batch << new_delete_request
158
+ batch << new_create_request
159
+ end
158
160
 
159
161
  @change_info = batch.call()
160
162
  @name = @create_options[:name]
@@ -220,12 +222,14 @@ module AWS
220
222
  # @return [Hash]
221
223
  def delete_options
222
224
  options = {:name => name, :type => type}
223
- options[:set_identifier] = set_identifier if set_identifier
224
- options[:alias_target] = alias_target if alias_target
225
- options[:weight] = weight if weight
226
- options[:region] = region if region
227
- options[:ttl] = ttl if ttl
228
- options[:resource_records] = resource_records if resource_records
225
+ AWS.memoize do
226
+ options[:set_identifier] = set_identifier if set_identifier
227
+ options[:alias_target] = alias_target if alias_target
228
+ options[:weight] = weight if weight
229
+ options[:region] = region if region
230
+ options[:ttl] = ttl if ttl
231
+ options[:resource_records] = resource_records if resource_records && !resource_records.empty?
232
+ end
229
233
  options
230
234
  end
231
235
  end
@@ -188,7 +188,7 @@ module AWS
188
188
  #
189
189
  # bucket.versioning_enabled? #=> false
190
190
  # bucket.enable_versioning
191
- # # there is also a #disable_versioning method
191
+ # # there is also a #suspend_versioning method
192
192
  #
193
193
  # obj = bucket.objects['my-obj']
194
194
  # obj.write('a')
@@ -1464,8 +1464,11 @@ module AWS
1464
1464
  {
1465
1465
  'x-amz-version-id' => :version_id,
1466
1466
  'content-type' => :content_type,
1467
+ 'content-encoding' => :content_encoding,
1468
+ 'cache-control' => :cache_control,
1467
1469
  'etag' => :etag,
1468
1470
  'x-amz-website-redirect-location' => :website_redirect_location,
1471
+ 'accept-ranges' => :accept_ranges,
1469
1472
  }.each_pair do |header,method|
1470
1473
  if value = resp.http_response.header(header)
1471
1474
  resp.data[method] = value
@@ -1483,6 +1486,7 @@ module AWS
1483
1486
  if sse = resp.http_response.header('x-amz-server-side-encryption')
1484
1487
  resp.data[:server_side_encryption] = sse.downcase.to_sym
1485
1488
  end
1489
+
1486
1490
  end
1487
1491
 
1488
1492
  module Validators
@@ -148,7 +148,7 @@ module AWS
148
148
  self.each do |rule|
149
149
  rules << rule unless yield(rule)
150
150
  end
151
- self.set(*rules)
151
+ self.set(rules)
152
152
  end
153
153
 
154
154
  # Removes all CORS rules attached to this bucket.
@@ -136,6 +136,8 @@ module AWS
136
136
  # # one request to delete the colors attribute
137
137
  # colors.delete
138
138
  #
139
+ # @!attribute [r] client
140
+ # @return [Client] the low-level SimpleDB client object
139
141
  class SimpleDB
140
142
 
141
143
  AWS.register_autoloads(self, 'aws/simple_db') do
@@ -168,6 +168,8 @@ module AWS
168
168
  # puts "Complaints: #{stats[:complaints]}"
169
169
  # end
170
170
  #
171
+ # @!attribute [r] client
172
+ # @return [Client] the low-level SimpleEmailService client object
171
173
  class SimpleEmailService
172
174
 
173
175
  AWS.register_autoloads(self, 'aws/simple_email_service') do
@@ -188,6 +188,8 @@ module AWS
188
188
  #
189
189
  # See {HistoryEvent} and {HistoryEvent::Attributes} for more information.
190
190
  #
191
+ # @!attribute [r] client
192
+ # @return [Client] the low-level SimpleWorkflow client object
191
193
  class SimpleWorkflow
192
194
 
193
195
  AWS.register_autoloads(self, 'aws/simple_workflow') do
@@ -41,6 +41,8 @@ module AWS
41
41
  # :access_key_id => 'YOUR_ACCESS_KEY_ID',
42
42
  # :secret_access_key => 'YOUR_SECRET_ACCESS_KEY')
43
43
  #
44
+ # @!attribute [r] client
45
+ # @return [Client] the low-level SNS client object
44
46
  class SNS
45
47
 
46
48
  AWS.register_autoloads(self) do
@@ -53,6 +53,8 @@ module AWS
53
53
  # See the {Queue} class for more information on how to send and
54
54
  # receive messages.
55
55
  #
56
+ # @!attribute [r] client
57
+ # @return [Client] the low-level SQS client object
56
58
  class SQS
57
59
 
58
60
  AWS.register_autoloads(self) do
@@ -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 'uri'
15
+
14
16
  module AWS
15
17
  class SQS
16
18
 
@@ -35,6 +37,20 @@ module AWS
35
37
  path
36
38
  end
37
39
 
40
+ def region
41
+ # sigv4 requires the region name when signing, this should come from
42
+ # the QueueUrl param whenever present
43
+ if
44
+ param = params.find{|p| p.name == 'QueueUrl' } and
45
+ host = URI.parse(param.value).host and
46
+ matches = host.match(/^sqs\.(.+?)\./)
47
+ then
48
+ return matches[1]
49
+ else
50
+ super
51
+ end
52
+ end
53
+
38
54
  private
39
55
 
40
56
  def full_url