aws-sdk 1.12.0 → 1.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/bin/aws-rb +18 -0
  4. data/lib/aws/api_config/{CloudFront-2012-07-01.yml → CloudFront-2013-05-12.yml} +73 -23
  5. data/lib/aws/api_config/{RDS-2013-02-12.yml → RDS-2013-05-15.yml} +92 -5
  6. data/lib/aws/api_config/Redshift-2012-12-01.yml +188 -12
  7. data/lib/aws/api_config/STS-2011-06-15.yml +10 -0
  8. data/lib/aws/auto_scaling/client.rb +6 -0
  9. data/lib/aws/cloud_formation/client.rb +6 -0
  10. data/lib/aws/cloud_front/client.rb +37 -1
  11. data/lib/aws/cloud_search/client.rb +6 -0
  12. data/lib/aws/cloud_watch/client.rb +6 -0
  13. data/lib/aws/core.rb +15 -20
  14. data/lib/aws/core/client.rb +36 -0
  15. data/lib/aws/core/credential_providers.rb +45 -0
  16. data/lib/aws/core/region_collection.rb +4 -1
  17. data/lib/aws/data_pipeline/client.rb +6 -0
  18. data/lib/aws/direct_connect/client.rb +6 -0
  19. data/lib/aws/dynamo_db/client.rb +35 -1249
  20. data/lib/aws/dynamo_db/client/v20111205.rb +1266 -0
  21. data/lib/aws/dynamo_db/client/v20120810.rb +1409 -0
  22. data/lib/aws/dynamo_db/client_base.rb +1 -0
  23. data/lib/aws/dynamo_db/client_v2.rb +25 -1396
  24. data/lib/aws/ec2/client.rb +6 -0
  25. data/lib/aws/elastic_beanstalk/client.rb +6 -0
  26. data/lib/aws/elastic_transcoder/client.rb +6 -0
  27. data/lib/aws/elasticache/client.rb +6 -0
  28. data/lib/aws/elb/client.rb +6 -0
  29. data/lib/aws/emr/client.rb +6 -0
  30. data/lib/aws/glacier/client.rb +14 -8
  31. data/lib/aws/iam/client.rb +6 -0
  32. data/lib/aws/import_export/client.rb +6 -0
  33. data/lib/aws/ops_works/client.rb +6 -0
  34. data/lib/aws/rds/client.rb +83 -18
  35. data/lib/aws/record/abstract_base.rb +19 -22
  36. data/lib/aws/record/attributes.rb +5 -1
  37. data/lib/aws/record/hash_model.rb +50 -6
  38. data/lib/aws/record/model.rb +26 -0
  39. data/lib/aws/record/validator.rb +1 -1
  40. data/lib/aws/redshift/client.rb +186 -53
  41. data/lib/aws/route_53/client.rb +6 -0
  42. data/lib/aws/route_53/hosted_zone.rb +1 -1
  43. data/lib/aws/route_53/resource_record_set.rb +3 -3
  44. data/lib/aws/s3/client.rb +4 -1
  45. data/lib/aws/s3/presigned_post.rb +18 -21
  46. data/lib/aws/simple_db/client.rb +6 -0
  47. data/lib/aws/simple_email_service/client.rb +6 -0
  48. data/lib/aws/simple_email_service/identity.rb +1 -1
  49. data/lib/aws/simple_workflow/client.rb +24 -18
  50. data/lib/aws/sns/client.rb +6 -0
  51. data/lib/aws/sqs/client.rb +21 -15
  52. data/lib/aws/storage_gateway/client.rb +6 -0
  53. data/lib/aws/sts/client.rb +57 -38
  54. data/lib/aws/support/client.rb +6 -0
  55. data/lib/aws/version.rb +1 -1
  56. metadata +6 -4
@@ -17,6 +17,8 @@ module AWS
17
17
  # Client class for Amazon Elastic Compute Cloud (EC2).
18
18
  class Client < Core::QueryClient
19
19
 
20
+ API_VERSION = '2013-02-01'
21
+
20
22
  # @api private
21
23
  CACHEABLE_REQUESTS = Set[
22
24
  :describe_addresses,
@@ -56,6 +58,10 @@ module AWS
56
58
  :describe_network_interface_attribute,
57
59
  ]
58
60
 
61
+ end
62
+
63
+ class Client::V20130201 < Client
64
+
59
65
  # client methods #
60
66
 
61
67
  # @!method activate_license(options = {})
@@ -17,9 +17,15 @@ module AWS
17
17
  # Client class for AWS Elastic Beanstalk.
18
18
  class Client < Core::QueryClient
19
19
 
20
+ API_VERSION = '2010-12-01'
21
+
20
22
  # @api private
21
23
  CACHEABLE_REQUESTS = Set[]
22
24
 
25
+ end
26
+
27
+ class Client::V20101201 < Client
28
+
23
29
  # client methods #
24
30
 
25
31
  # @!method check_dns_availability(options = {})
@@ -16,6 +16,8 @@ module AWS
16
16
 
17
17
  class Client < Core::RESTJSONClient
18
18
 
19
+ API_VERSION = '2012-09-25'
20
+
19
21
  # @api private
20
22
  def extract_error_details response
21
23
  if
@@ -33,6 +35,10 @@ module AWS
33
35
  # @api private
34
36
  CACHEABLE_REQUESTS = Set[]
35
37
 
38
+ end
39
+
40
+ class Client::V20120925 < Client
41
+
36
42
  # client methods #
37
43
 
38
44
  # @!method cancel_job(options = {})
@@ -17,9 +17,15 @@ module AWS
17
17
  # Client class for Amazon ElastiCache.
18
18
  class Client < Core::QueryClient
19
19
 
20
+ API_VERSION = '2012-11-15'
21
+
20
22
  # @api private
21
23
  CACHEABLE_REQUESTS = Set[]
22
24
 
25
+ end
26
+
27
+ class Client::V20121115 < Client
28
+
23
29
  # client methods #
24
30
 
25
31
  # @!method authorize_cache_security_group_ingress(options = {})
@@ -17,9 +17,15 @@ module AWS
17
17
  # Client class for Elastic Load Balancing (ELB).
18
18
  class Client < Core::QueryClient
19
19
 
20
+ API_VERSION = '2012-06-01'
21
+
20
22
  # @api private
21
23
  CACHEABLE_REQUESTS = Set[]
22
24
 
25
+ end
26
+
27
+ class Client::V20120601 < Client
28
+
23
29
  # client methods #
24
30
 
25
31
  # @!method apply_security_groups_to_load_balancer(options = {})
@@ -17,9 +17,15 @@ module AWS
17
17
  # Client class for Elastic MapReduce (EMR).
18
18
  class Client < Core::QueryClient
19
19
 
20
+ API_VERSION = '2009-03-31'
21
+
20
22
  # @api private
21
23
  CACHEABLE_REQUESTS = Set[]
22
24
 
25
+ end
26
+
27
+ class Client::V20090331 < Client
28
+
23
29
  # client methods #
24
30
 
25
31
  # @!method add_instance_groups(options = {})
@@ -23,9 +23,23 @@ module AWS
23
23
  #
24
24
  class Client < Core::RESTJSONClient
25
25
 
26
+ API_VERSION = '2012-06-01'
27
+
26
28
  # @api private
27
29
  CACHEABLE_REQUESTS = Set[]
28
30
 
31
+ private
32
+
33
+ def build_request *args
34
+ request = super(*args)
35
+ request.headers['x-amz-glacier-version'] = self.class.const_get(:API_VERSION)
36
+ request
37
+ end
38
+
39
+ end
40
+
41
+ class Client::V20120601 < Client
42
+
29
43
  # client methods #
30
44
 
31
45
  # @!method abort_multipart_upload(options = {})
@@ -306,14 +320,6 @@ module AWS
306
320
 
307
321
  define_client_methods('2012-06-01')
308
322
 
309
- private
310
-
311
- def build_request *args
312
- request = super(*args)
313
- request.headers['x-amz-glacier-version'] = API_VERSION
314
- request
315
- end
316
-
317
323
  end
318
324
  end
319
325
  end
@@ -17,6 +17,8 @@ module AWS
17
17
  # Client class for AWS Identity and Access Management (IAM).
18
18
  class Client < Core::QueryClient
19
19
 
20
+ API_VERSION = '2010-05-08'
21
+
20
22
  # @api private
21
23
  CACHEABLE_REQUESTS = Set[
22
24
  :get_group,
@@ -34,6 +36,10 @@ module AWS
34
36
  :list_virtual_mfa_devices,
35
37
  ]
36
38
 
39
+ end
40
+
41
+ class Client::V20100508 < Client
42
+
37
43
  # client methods #
38
44
 
39
45
  # @!method add_role_to_instance_profile(options = {})
@@ -17,9 +17,15 @@ module AWS
17
17
  # Client class for AWS Import/Export.
18
18
  class Client < Core::QueryClient
19
19
 
20
+ API_VERSION = '2010-06-01'
21
+
20
22
  # @api private
21
23
  CACHEABLE_REQUESTS = Set[]
22
24
 
25
+ end
26
+
27
+ class Client::V20100601 < Client
28
+
23
29
  # client methods #
24
30
 
25
31
  # @!method cancel_job(options = {})
@@ -17,9 +17,15 @@ module AWS
17
17
  # Client class for AWS OpsWorks.
18
18
  class Client < Core::JSONClient
19
19
 
20
+ API_VERSION = '2013-02-18'
21
+
20
22
  # @api private
21
23
  CACHEABLE_REQUESTS = Set[]
22
24
 
25
+ end
26
+
27
+ class Client::V20130218 < Client
28
+
23
29
  # client methods #
24
30
 
25
31
  # @!method attach_elastic_load_balancer(options = {})
@@ -17,9 +17,15 @@ module AWS
17
17
  # Client class for Amazon Relational Database Service (RDS).
18
18
  class Client < Core::QueryClient
19
19
 
20
+ API_VERSION = '2013-05-15'
21
+
20
22
  # @api private
21
23
  CACHEABLE_REQUESTS = Set[]
22
24
 
25
+ end
26
+
27
+ class Client::V20130515 < Client
28
+
23
29
  # client methods #
24
30
 
25
31
  # @!method add_source_identifier_to_subscription(options = {})
@@ -281,6 +287,11 @@ module AWS
281
287
  # * `:character_set_name` - (String)
282
288
  # * `:secondary_availability_zone` - (String)
283
289
  # * `:publicly_accessible` - (Boolean)
290
+ # * `:status_infos` - (Array<Hash>)
291
+ # * `:status_type` - (String)
292
+ # * `:normal` - (Boolean)
293
+ # * `:status` - (String)
294
+ # * `:message` - (String)
284
295
 
285
296
  # @!method create_db_instance_read_replica(options = {})
286
297
  # Calls the CreateDBInstanceReadReplica API operation.
@@ -392,6 +403,11 @@ module AWS
392
403
  # * `:character_set_name` - (String)
393
404
  # * `:secondary_availability_zone` - (String)
394
405
  # * `:publicly_accessible` - (Boolean)
406
+ # * `:status_infos` - (Array<Hash>)
407
+ # * `:status_type` - (String)
408
+ # * `:normal` - (Boolean)
409
+ # * `:status` - (String)
410
+ # * `:message` - (String)
395
411
 
396
412
  # @!method create_db_parameter_group(options = {})
397
413
  # Calls the CreateDBParameterGroup API operation.
@@ -572,6 +588,7 @@ module AWS
572
588
  # * `:option_name` - (String)
573
589
  # * `:option_description` - (String)
574
590
  # * `:persistent` - (Boolean)
591
+ # * `:permanent` - (Boolean)
575
592
  # * `:port` - (Integer)
576
593
  # * `:option_settings` - (Array<Hash>)
577
594
  # * `:name` - (String)
@@ -667,6 +684,11 @@ module AWS
667
684
  # * `:character_set_name` - (String)
668
685
  # * `:secondary_availability_zone` - (String)
669
686
  # * `:publicly_accessible` - (Boolean)
687
+ # * `:status_infos` - (Array<Hash>)
688
+ # * `:status_type` - (String)
689
+ # * `:normal` - (Boolean)
690
+ # * `:status` - (String)
691
+ # * `:message` - (String)
670
692
 
671
693
  # @!method delete_db_parameter_group(options = {})
672
694
  # Calls the DeleteDBParameterGroup API operation.
@@ -875,6 +897,11 @@ module AWS
875
897
  # * `:character_set_name` - (String)
876
898
  # * `:secondary_availability_zone` - (String)
877
899
  # * `:publicly_accessible` - (Boolean)
900
+ # * `:status_infos` - (Array<Hash>)
901
+ # * `:status_type` - (String)
902
+ # * `:normal` - (Boolean)
903
+ # * `:status` - (String)
904
+ # * `:message` - (String)
878
905
 
879
906
  # @!method describe_db_log_files(options = {})
880
907
  # Calls the DescribeDBLogFiles API operation.
@@ -1224,6 +1251,7 @@ module AWS
1224
1251
  # * `:default_port` - (Integer)
1225
1252
  # * `:options_depended_on` - (Array<String>)
1226
1253
  # * `:persistent` - (Boolean)
1254
+ # * `:permanent` - (Boolean)
1227
1255
  # * `:option_group_option_settings` - (Array<Hash>)
1228
1256
  # * `:setting_name` - (String)
1229
1257
  # * `:setting_description` - (String)
@@ -1268,6 +1296,7 @@ module AWS
1268
1296
  # * `:option_name` - (String)
1269
1297
  # * `:option_description` - (String)
1270
1298
  # * `:persistent` - (Boolean)
1299
+ # * `:permanent` - (Boolean)
1271
1300
  # * `:port` - (Integer)
1272
1301
  # * `:option_settings` - (Array<Hash>)
1273
1302
  # * `:name` - (String)
@@ -1619,6 +1648,11 @@ module AWS
1619
1648
  # * `:character_set_name` - (String)
1620
1649
  # * `:secondary_availability_zone` - (String)
1621
1650
  # * `:publicly_accessible` - (Boolean)
1651
+ # * `:status_infos` - (Array<Hash>)
1652
+ # * `:status_type` - (String)
1653
+ # * `:normal` - (Boolean)
1654
+ # * `:status` - (String)
1655
+ # * `:message` - (String)
1622
1656
 
1623
1657
  # @!method modify_db_parameter_group(options = {})
1624
1658
  # Calls the ModifyDBParameterGroup API operation.
@@ -1738,22 +1772,24 @@ module AWS
1738
1772
  # DBSecurityGroupMemebrship name strings used for this option.
1739
1773
  # * `:vpc_security_group_memberships` - (Array<String>) A list of
1740
1774
  # VpcSecurityGroupMemebrship name strings used for this option.
1741
- # * `:option_settings` - (Array<Hash>) A list of option settings
1742
- # applied for this option.
1743
- # * `:name` - (String) The name of the setting.
1744
- # * `:value` - (String) The value of this setting.
1745
- # * `:default_value` - (String) Default value for this setting.
1746
- # * `:description` - (String) The description of the setting.
1747
- # * `:apply_type` - (String) Specifies the apply type for this
1775
+ # * `:option_settings` - (Array<Hash>) The option settings to include
1776
+ # in an option group.
1777
+ # * `:name` - (String) The name of the option that has settings
1778
+ # that you can set.
1779
+ # * `:value` - (String) The current value of the option setting.
1780
+ # * `:default_value` - (String) The default value of the option
1748
1781
  # setting.
1749
- # * `:data_type` - (String) Specifies the valid data type of this
1750
- # setting
1751
- # * `:allowed_values` - (String) Specifies a valid list/range of
1752
- # values allowed for this setting.
1753
- # * `:is_modifiable` - (Boolean) Indicates if the setting is
1754
- # modifiable or not.
1755
- # * `:is_collection` - (Boolean) Indicates if the value for the
1756
- # setting can be a list of values or a single value.
1782
+ # * `:description` - (String) The description of the option
1783
+ # setting.
1784
+ # * `:apply_type` - (String) The DB engine specific parameter type.
1785
+ # * `:data_type` - (String) The data type of the option setting.
1786
+ # * `:allowed_values` - (String) The allowed values of the option
1787
+ # setting.
1788
+ # * `:is_modifiable` - (Boolean) A Boolean value that, when `true`
1789
+ # , indicates the option setting can be modified from the
1790
+ # default.
1791
+ # * `:is_collection` - (Boolean) Indicates if the option setting is
1792
+ # part of a collection.
1757
1793
  # * `:options_to_remove` - (Array<String>) Options in this list are
1758
1794
  # removed from the Option Group.
1759
1795
  # * `:apply_immediately` - (Boolean) Indicates whether the changes
@@ -1771,6 +1807,7 @@ module AWS
1771
1807
  # * `:option_name` - (String)
1772
1808
  # * `:option_description` - (String)
1773
1809
  # * `:persistent` - (Boolean)
1810
+ # * `:permanent` - (Boolean)
1774
1811
  # * `:port` - (Integer)
1775
1812
  # * `:option_settings` - (Array<Hash>)
1776
1813
  # * `:name` - (String)
@@ -1881,6 +1918,11 @@ module AWS
1881
1918
  # * `:character_set_name` - (String)
1882
1919
  # * `:secondary_availability_zone` - (String)
1883
1920
  # * `:publicly_accessible` - (Boolean)
1921
+ # * `:status_infos` - (Array<Hash>)
1922
+ # * `:status_type` - (String)
1923
+ # * `:normal` - (Boolean)
1924
+ # * `:status` - (String)
1925
+ # * `:message` - (String)
1884
1926
 
1885
1927
  # @!method purchase_reserved_db_instances_offering(options = {})
1886
1928
  # Calls the PurchaseReservedDBInstancesOffering API operation.
@@ -1986,6 +2028,11 @@ module AWS
1986
2028
  # * `:character_set_name` - (String)
1987
2029
  # * `:secondary_availability_zone` - (String)
1988
2030
  # * `:publicly_accessible` - (Boolean)
2031
+ # * `:status_infos` - (Array<Hash>)
2032
+ # * `:status_type` - (String)
2033
+ # * `:normal` - (Boolean)
2034
+ # * `:status` - (String)
2035
+ # * `:message` - (String)
1989
2036
 
1990
2037
  # @!method remove_source_identifier_from_subscription(options = {})
1991
2038
  # Calls the RemoveSourceIdentifierFromSubscription API operation.
@@ -2110,7 +2157,11 @@ module AWS
2110
2157
  # * `:iops` - (Integer) The amount of Provisioned IOPS (input/output
2111
2158
  # operations per second) to be initially allocated for the DB
2112
2159
  # Instance. Constraints: Must be an integer greater than 1000.
2113
- # * `:option_group_name` - (String)
2160
+ # * `:option_group_name` - (String) The name of the option group to be
2161
+ # used for the restored DB instance. Permanent options, such as the
2162
+ # TDE option for Oracle Advanced Security TDE, cannot be removed from
2163
+ # an option group, and that option group cannot be removed from a DB
2164
+ # instance once it is associated with a DB instance
2114
2165
  # @return [Core::Response]
2115
2166
  # The #data method of the response object returns
2116
2167
  # a hash with the following structure:
@@ -2174,6 +2225,11 @@ module AWS
2174
2225
  # * `:character_set_name` - (String)
2175
2226
  # * `:secondary_availability_zone` - (String)
2176
2227
  # * `:publicly_accessible` - (Boolean)
2228
+ # * `:status_infos` - (Array<Hash>)
2229
+ # * `:status_type` - (String)
2230
+ # * `:normal` - (Boolean)
2231
+ # * `:status` - (String)
2232
+ # * `:message` - (String)
2177
2233
 
2178
2234
  # @!method restore_db_instance_to_point_in_time(options = {})
2179
2235
  # Calls the RestoreDBInstanceToPointInTime API operation.
@@ -2226,7 +2282,11 @@ module AWS
2226
2282
  # * `:iops` - (Integer) The amount of Provisioned IOPS (input/output
2227
2283
  # operations per second) to be initially allocated for the DB
2228
2284
  # Instance. Constraints: Must be an integer greater than 1000.
2229
- # * `:option_group_name` - (String)
2285
+ # * `:option_group_name` - (String) The name of the option group to be
2286
+ # used for the restored DB instance. Permanent options, such as the
2287
+ # TDE option for Oracle Advanced Security TDE, cannot be removed from
2288
+ # an option group, and that option group cannot be removed from a DB
2289
+ # instance once it is associated with a DB instance
2230
2290
  # @return [Core::Response]
2231
2291
  # The #data method of the response object returns
2232
2292
  # a hash with the following structure:
@@ -2290,6 +2350,11 @@ module AWS
2290
2350
  # * `:character_set_name` - (String)
2291
2351
  # * `:secondary_availability_zone` - (String)
2292
2352
  # * `:publicly_accessible` - (Boolean)
2353
+ # * `:status_infos` - (Array<Hash>)
2354
+ # * `:status_type` - (String)
2355
+ # * `:normal` - (Boolean)
2356
+ # * `:status` - (String)
2357
+ # * `:message` - (String)
2293
2358
 
2294
2359
  # @!method revoke_db_security_group_ingress(options = {})
2295
2360
  # Calls the RevokeDBSecurityGroupIngress API operation.
@@ -2328,7 +2393,7 @@ module AWS
2328
2393
 
2329
2394
  # end client methods #
2330
2395
 
2331
- define_client_methods('2013-02-12')
2396
+ define_client_methods('2013-05-15')
2332
2397
 
2333
2398
  end
2334
2399
  end
@@ -72,19 +72,10 @@ module AWS
72
72
  end
73
73
  alias_method :domain, :shard # for backwards compatability
74
74
 
75
- # The id for each record is auto-generated. The default strategy
76
- # generates uuid strings.
77
- # @return [String] Returns the id string (uuid) for this record. Retuns
78
- # nil if this is a new record that has not been persisted yet.
79
- def id
80
- @_id
81
- end
82
-
83
75
  # @return [Hash] A hash with attribute names as hash keys (strings) and
84
76
  # attribute values (of mixed types) as hash values.
85
77
  def attributes
86
78
  attributes = Core::IndifferentHash.new
87
- attributes['id'] = id if persisted?
88
79
  self.class.attributes.keys.inject(attributes) do |hash,attr_name|
89
80
  hash.merge(attr_name => __send__(attr_name))
90
81
  end
@@ -288,11 +279,6 @@ module AWS
288
279
  update_storage
289
280
  end
290
281
 
291
- protected
292
- def populate_id
293
- @_id = UUIDTools::UUID.random_create.to_s.downcase
294
- end
295
-
296
282
  protected
297
283
  def touch_timestamps *attributes
298
284
  now = Time.now
@@ -343,12 +329,13 @@ module AWS
343
329
  # populate default attribute values
344
330
  ignore_changes do
345
331
  self.class.attributes.values.each do |attribute|
332
+ default = attribute.default_value
346
333
  begin
347
334
  # copy default values down so methods like #gsub! don't
348
335
  # modify the default values for other objects
349
- @_data[attribute.name] = attribute.default_value.clone
336
+ @_data[attribute.name] = default.clone
350
337
  rescue TypeError
351
- @_data[attribute.name] = attribute.default_value
338
+ @_data[attribute.name] = default
352
339
  end
353
340
  end
354
341
  end
@@ -451,11 +438,6 @@ module AWS
451
438
  # @api private
452
439
  protected
453
440
  def hydrate id, data
454
-
455
- # @todo need to do something about partial hyrdation of attributes
456
-
457
- @_id = id
458
-
459
441
  # New objects are populated with default values, but we don't
460
442
  # want these values to hang around when hydrating persisted values
461
443
  # (those values may have been blanked out before save).
@@ -468,7 +450,6 @@ module AWS
468
450
  end
469
451
 
470
452
  @_persisted = true
471
-
472
453
  end
473
454
 
474
455
  protected
@@ -675,6 +656,22 @@ module AWS
675
656
 
676
657
  end
677
658
 
659
+ # @api private
660
+ def remove_attribute(attribute)
661
+ send(:remove_method, attribute.name)
662
+ send(:remove_method, "#{attribute.name}=")
663
+ send(:remove_method, "#{attribute.name}_before_type_cast")
664
+ send(:remove_method, "#{attribute.name}_changed?")
665
+ send(:remove_method, "#{attribute.name}_change")
666
+ send(:remove_method, "#{attribute.name}_was")
667
+ send(:remove_method, "#{attribute.name}_will_change!")
668
+ send(:remove_method, "reset_#{attribute.name}!")
669
+ validators.each do |validator|
670
+ validator.attribute_names.delete(attribute.name)
671
+ end
672
+ attributes.delete(attribute.name)
673
+ end
674
+
678
675
  private
679
676
 
680
677
  def create_impl attributes = {}, create_method = :create, save_method = :save