aws-sdk 1.8.5 → 1.9.0

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 (386) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +1 -0
  3. data/README.rdoc +8 -0
  4. data/lib/aws-sdk.rb +39 -35
  5. data/lib/aws/api_config/CloudFront-2012-07-01.yml +2398 -0
  6. data/lib/aws/api_config/DirectConnect-2012-10-25.yml +475 -0
  7. data/lib/aws/api_config/DynamoDB-2011-12-05.yml +8 -0
  8. data/lib/aws/api_config/DynamoDB-2012-08-10.yml +1516 -0
  9. data/lib/aws/api_config/OpsWorks-2013-02-18.yml +2 -2
  10. data/lib/aws/auto_scaling.rb +44 -44
  11. data/lib/aws/auto_scaling/activity.rb +1 -1
  12. data/lib/aws/auto_scaling/activity_collection.rb +14 -15
  13. data/lib/aws/auto_scaling/client.rb +277 -277
  14. data/lib/aws/auto_scaling/config.rb +1 -1
  15. data/lib/aws/auto_scaling/group.rb +35 -36
  16. data/lib/aws/auto_scaling/group_collection.rb +10 -10
  17. data/lib/aws/auto_scaling/group_options.rb +19 -19
  18. data/lib/aws/auto_scaling/instance.rb +27 -27
  19. data/lib/aws/auto_scaling/instance_collection.rb +10 -10
  20. data/lib/aws/auto_scaling/launch_configuration.rb +3 -3
  21. data/lib/aws/auto_scaling/launch_configuration_collection.rb +1 -1
  22. data/lib/aws/auto_scaling/notification_configuration.rb +2 -2
  23. data/lib/aws/auto_scaling/notification_configuration_collection.rb +37 -38
  24. data/lib/aws/auto_scaling/scaling_policy.rb +3 -3
  25. data/lib/aws/auto_scaling/scaling_policy_collection.rb +6 -6
  26. data/lib/aws/auto_scaling/scaling_policy_options.rb +8 -7
  27. data/lib/aws/auto_scaling/scheduled_action.rb +3 -3
  28. data/lib/aws/auto_scaling/scheduled_action_collection.rb +28 -28
  29. data/lib/aws/auto_scaling/tag_collection.rb +30 -28
  30. data/lib/aws/cloud_formation.rb +95 -94
  31. data/lib/aws/cloud_formation/client.rb +136 -133
  32. data/lib/aws/cloud_formation/config.rb +1 -1
  33. data/lib/aws/cloud_formation/stack.rb +37 -37
  34. data/lib/aws/cloud_formation/stack_collection.rb +28 -27
  35. data/lib/aws/cloud_formation/stack_event.rb +9 -11
  36. data/lib/aws/cloud_formation/stack_output.rb +1 -1
  37. data/lib/aws/cloud_formation/stack_resource.rb +6 -6
  38. data/lib/aws/cloud_formation/stack_resource_collection.rb +11 -12
  39. data/lib/aws/cloud_formation/stack_resource_summary_collection.rb +11 -11
  40. data/lib/aws/cloud_formation/stack_summary_collection.rb +39 -39
  41. data/lib/aws/cloud_front.rb +21 -21
  42. data/lib/aws/cloud_front/client.rb +853 -652
  43. data/lib/aws/cloud_front/request.rb +3 -0
  44. data/lib/aws/cloud_search.rb +22 -22
  45. data/lib/aws/cloud_search/client.rb +322 -315
  46. data/lib/aws/cloud_search/config.rb +1 -1
  47. data/lib/aws/cloud_watch.rb +39 -39
  48. data/lib/aws/cloud_watch/alarm.rb +55 -37
  49. data/lib/aws/cloud_watch/alarm_collection.rb +18 -18
  50. data/lib/aws/cloud_watch/alarm_history_item_collection.rb +2 -2
  51. data/lib/aws/cloud_watch/client.rb +360 -146
  52. data/lib/aws/cloud_watch/config.rb +1 -1
  53. data/lib/aws/cloud_watch/metric.rb +15 -15
  54. data/lib/aws/cloud_watch/metric_alarm_collection.rb +17 -17
  55. data/lib/aws/cloud_watch/metric_collection.rb +16 -16
  56. data/lib/aws/cloud_watch/metric_statistics.rb +11 -11
  57. data/lib/aws/core.rb +243 -225
  58. data/lib/aws/core/async_handle.rb +13 -13
  59. data/lib/aws/core/cacheable.rb +14 -15
  60. data/lib/aws/core/client.rb +40 -15
  61. data/lib/aws/core/collection.rb +42 -46
  62. data/lib/aws/core/collection/with_limit_and_next_token.rb +1 -1
  63. data/lib/aws/core/collection/with_next_token.rb +1 -1
  64. data/lib/aws/core/configuration.rb +97 -133
  65. data/lib/aws/core/credential_providers.rb +16 -16
  66. data/lib/aws/core/data.rb +23 -23
  67. data/lib/aws/core/http/connection_pool.rb +348 -0
  68. data/lib/aws/core/http/net_http_handler.rb +17 -26
  69. data/lib/aws/core/http/patch.rb +102 -0
  70. data/lib/aws/core/http/request.rb +13 -19
  71. data/lib/aws/core/http/response.rb +2 -2
  72. data/lib/aws/core/lazy_error_classes.rb +17 -17
  73. data/lib/aws/core/log_formatter.rb +70 -104
  74. data/lib/aws/core/options/json_serializer.rb +1 -1
  75. data/lib/aws/core/options/validator.rb +4 -4
  76. data/lib/aws/core/page_result.rb +8 -8
  77. data/lib/aws/core/policy.rb +49 -49
  78. data/lib/aws/core/region.rb +72 -0
  79. data/lib/aws/core/region_collection.rb +106 -0
  80. data/lib/aws/core/resource.rb +5 -5
  81. data/lib/aws/core/response.rb +20 -17
  82. data/lib/aws/core/rest_request_builder.rb +4 -4
  83. data/lib/aws/core/service_interface.rb +24 -2
  84. data/lib/aws/core/signature/version_3.rb +2 -2
  85. data/lib/aws/core/uri_escape.rb +1 -1
  86. data/lib/aws/core/xml/frame_stack.rb +1 -1
  87. data/lib/aws/core/xml/grammar.rb +3 -4
  88. data/lib/aws/core/xml/sax_handlers/libxml.rb +2 -2
  89. data/lib/aws/core/xml/sax_handlers/nokogiri.rb +3 -3
  90. data/lib/aws/core/xml/sax_handlers/rexml.rb +5 -5
  91. data/lib/aws/core/xml/stub.rb +9 -9
  92. data/lib/aws/data_pipeline.rb +21 -21
  93. data/lib/aws/data_pipeline/client.rb +189 -133
  94. data/lib/aws/data_pipeline/config.rb +1 -1
  95. data/lib/aws/direct_connect.rb +74 -0
  96. data/lib/aws/direct_connect/client.rb +253 -0
  97. data/lib/aws/direct_connect/config.rb +18 -0
  98. data/lib/aws/direct_connect/errors.rb +22 -0
  99. data/lib/aws/direct_connect/request.rb +27 -0
  100. data/lib/aws/dynamo_db.rb +71 -69
  101. data/lib/aws/dynamo_db/attribute_collection.rb +53 -58
  102. data/lib/aws/dynamo_db/batch_get.rb +23 -23
  103. data/lib/aws/dynamo_db/batch_write.rb +43 -43
  104. data/lib/aws/dynamo_db/binary.rb +9 -9
  105. data/lib/aws/dynamo_db/client.rb +494 -509
  106. data/lib/aws/dynamo_db/client_base.rb +91 -0
  107. data/lib/aws/dynamo_db/client_v2.rb +825 -0
  108. data/lib/aws/dynamo_db/config.rb +1 -1
  109. data/lib/aws/dynamo_db/item.rb +10 -10
  110. data/lib/aws/dynamo_db/item_collection.rb +75 -75
  111. data/lib/aws/dynamo_db/table.rb +85 -85
  112. data/lib/aws/dynamo_db/table_collection.rb +13 -13
  113. data/lib/aws/ec2.rb +132 -142
  114. data/lib/aws/ec2/attachment.rb +31 -36
  115. data/lib/aws/ec2/attachment_collection.rb +1 -1
  116. data/lib/aws/ec2/availability_zone.rb +4 -4
  117. data/lib/aws/ec2/client.rb +2272 -2125
  118. data/lib/aws/ec2/config.rb +1 -1
  119. data/lib/aws/ec2/customer_gateway.rb +6 -6
  120. data/lib/aws/ec2/customer_gateway_collection.rb +6 -6
  121. data/lib/aws/ec2/dhcp_options.rb +3 -3
  122. data/lib/aws/ec2/dhcp_options_collection.rb +10 -10
  123. data/lib/aws/ec2/elastic_ip.rb +15 -15
  124. data/lib/aws/ec2/elastic_ip_collection.rb +11 -15
  125. data/lib/aws/ec2/export_task.rb +4 -4
  126. data/lib/aws/ec2/export_task_collection.rb +11 -11
  127. data/lib/aws/ec2/filtered_collection.rb +6 -8
  128. data/lib/aws/ec2/image.rb +46 -40
  129. data/lib/aws/ec2/image_collection.rb +44 -52
  130. data/lib/aws/ec2/instance.rb +64 -62
  131. data/lib/aws/ec2/instance_collection.rb +47 -50
  132. data/lib/aws/ec2/internet_gateway.rb +6 -6
  133. data/lib/aws/ec2/internet_gateway/attachment.rb +13 -13
  134. data/lib/aws/ec2/internet_gateway_collection.rb +3 -3
  135. data/lib/aws/ec2/key_pair.rb +3 -3
  136. data/lib/aws/ec2/key_pair_collection.rb +12 -12
  137. data/lib/aws/ec2/network_acl.rb +39 -39
  138. data/lib/aws/ec2/network_acl/association.rb +2 -2
  139. data/lib/aws/ec2/network_acl/entry.rb +22 -22
  140. data/lib/aws/ec2/network_acl_collection.rb +2 -2
  141. data/lib/aws/ec2/network_interface.rb +13 -4
  142. data/lib/aws/ec2/network_interface/attachment.rb +3 -3
  143. data/lib/aws/ec2/network_interface_collection.rb +5 -5
  144. data/lib/aws/ec2/permission_collection.rb +1 -1
  145. data/lib/aws/ec2/region.rb +6 -6
  146. data/lib/aws/ec2/region_collection.rb +1 -1
  147. data/lib/aws/ec2/reserved_instances_collection.rb +2 -2
  148. data/lib/aws/ec2/reserved_instances_offering_collection.rb +2 -2
  149. data/lib/aws/ec2/resource_tag_collection.rb +5 -5
  150. data/lib/aws/ec2/route_table.rb +14 -14
  151. data/lib/aws/ec2/route_table/association.rb +22 -22
  152. data/lib/aws/ec2/route_table/route.rb +8 -8
  153. data/lib/aws/ec2/route_table_collection.rb +3 -3
  154. data/lib/aws/ec2/security_group.rb +39 -41
  155. data/lib/aws/ec2/security_group_collection.rb +19 -21
  156. data/lib/aws/ec2/snapshot.rb +3 -3
  157. data/lib/aws/ec2/snapshot_collection.rb +11 -12
  158. data/lib/aws/ec2/subnet.rb +2 -2
  159. data/lib/aws/ec2/subnet_collection.rb +17 -17
  160. data/lib/aws/ec2/tag_collection.rb +1 -1
  161. data/lib/aws/ec2/tagged_collection.rb +7 -7
  162. data/lib/aws/ec2/tagged_item.rb +10 -10
  163. data/lib/aws/ec2/volume.rb +16 -16
  164. data/lib/aws/ec2/volume_collection.rb +9 -12
  165. data/lib/aws/ec2/vpc.rb +6 -6
  166. data/lib/aws/ec2/vpc_collection.rb +10 -10
  167. data/lib/aws/ec2/vpn_connection.rb +4 -4
  168. data/lib/aws/ec2/vpn_connection/telemetry.rb +1 -1
  169. data/lib/aws/ec2/vpn_connection_collection.rb +6 -6
  170. data/lib/aws/ec2/vpn_gateway.rb +2 -2
  171. data/lib/aws/ec2/vpn_gateway_collection.rb +5 -5
  172. data/lib/aws/elastic_beanstalk.rb +12 -12
  173. data/lib/aws/elastic_beanstalk/client.rb +376 -368
  174. data/lib/aws/elastic_beanstalk/config.rb +1 -1
  175. data/lib/aws/elastic_transcoder.rb +5 -5
  176. data/lib/aws/elastic_transcoder/client.rb +283 -283
  177. data/lib/aws/elastic_transcoder/config.rb +1 -1
  178. data/lib/aws/elasticache.rb +12 -12
  179. data/lib/aws/elasticache/client.rb +484 -479
  180. data/lib/aws/elasticache/config.rb +1 -1
  181. data/lib/aws/elb.rb +23 -23
  182. data/lib/aws/elb/availability_zone_collection.rb +34 -34
  183. data/lib/aws/elb/backend_server_policy_collection.rb +24 -24
  184. data/lib/aws/elb/client.rb +153 -153
  185. data/lib/aws/elb/config.rb +1 -1
  186. data/lib/aws/elb/errors.rb +1 -1
  187. data/lib/aws/elb/instance_collection.rb +20 -25
  188. data/lib/aws/elb/listener.rb +3 -3
  189. data/lib/aws/elb/listener_collection.rb +8 -8
  190. data/lib/aws/elb/load_balancer.rb +15 -16
  191. data/lib/aws/elb/load_balancer_collection.rb +36 -24
  192. data/lib/aws/elb/load_balancer_policy.rb +1 -1
  193. data/lib/aws/elb/load_balancer_policy_collection.rb +5 -5
  194. data/lib/aws/emr.rb +28 -26
  195. data/lib/aws/emr/client.rb +165 -149
  196. data/lib/aws/emr/config.rb +1 -1
  197. data/lib/aws/emr/instance_group.rb +1 -1
  198. data/lib/aws/emr/instance_group_collection.rb +1 -1
  199. data/lib/aws/emr/job_flow.rb +27 -26
  200. data/lib/aws/emr/job_flow_collection.rb +34 -34
  201. data/lib/aws/errors.rb +7 -7
  202. data/lib/aws/glacier.rb +21 -21
  203. data/lib/aws/glacier/archive_collection.rb +2 -2
  204. data/lib/aws/glacier/client.rb +139 -140
  205. data/lib/aws/glacier/config.rb +1 -1
  206. data/lib/aws/glacier/vault.rb +2 -2
  207. data/lib/aws/glacier/vault_collection.rb +1 -1
  208. data/lib/aws/iam.rb +133 -144
  209. data/lib/aws/iam/access_key.rb +17 -17
  210. data/lib/aws/iam/access_key_collection.rb +22 -22
  211. data/lib/aws/iam/account_alias_collection.rb +2 -2
  212. data/lib/aws/iam/client.rb +429 -420
  213. data/lib/aws/iam/collection.rb +1 -1
  214. data/lib/aws/iam/config.rb +2 -2
  215. data/lib/aws/iam/group.rb +8 -8
  216. data/lib/aws/iam/group_collection.rb +16 -16
  217. data/lib/aws/iam/group_policy_collection.rb +6 -6
  218. data/lib/aws/iam/group_user_collection.rb +3 -3
  219. data/lib/aws/iam/mfa_device.rb +1 -1
  220. data/lib/aws/iam/mfa_device_collection.rb +9 -9
  221. data/lib/aws/iam/policy_collection.rb +4 -4
  222. data/lib/aws/iam/resource.rb +2 -2
  223. data/lib/aws/iam/server_certificate.rb +1 -1
  224. data/lib/aws/iam/server_certificate_collection.rb +15 -15
  225. data/lib/aws/iam/signing_certificate.rb +29 -29
  226. data/lib/aws/iam/signing_certificate_collection.rb +23 -23
  227. data/lib/aws/iam/user.rb +33 -38
  228. data/lib/aws/iam/user_collection.rb +27 -27
  229. data/lib/aws/iam/user_group_collection.rb +3 -3
  230. data/lib/aws/iam/user_policy_collection.rb +6 -6
  231. data/lib/aws/iam/virtual_mfa_device.rb +12 -12
  232. data/lib/aws/iam/virtual_mfa_device_collection.rb +4 -4
  233. data/lib/aws/import_export.rb +22 -21
  234. data/lib/aws/import_export/client.rb +47 -43
  235. data/lib/aws/ops_works.rb +5 -5
  236. data/lib/aws/ops_works/client.rb +484 -438
  237. data/lib/aws/ops_works/config.rb +1 -1
  238. data/lib/aws/rails.rb +34 -34
  239. data/lib/aws/rds.rb +18 -18
  240. data/lib/aws/rds/client.rb +1286 -1277
  241. data/lib/aws/rds/config.rb +1 -1
  242. data/lib/aws/rds/db_instance.rb +15 -4
  243. data/lib/aws/rds/db_snapshot.rb +1 -1
  244. data/lib/aws/record.rb +50 -24
  245. data/lib/aws/record/abstract_base.rb +52 -60
  246. data/lib/aws/record/attributes.rb +79 -79
  247. data/lib/aws/record/conversion.rb +1 -1
  248. data/lib/aws/record/dirty_tracking.rb +69 -67
  249. data/lib/aws/record/errors.rb +21 -21
  250. data/lib/aws/record/exceptions.rb +2 -2
  251. data/lib/aws/record/hash_model.rb +20 -21
  252. data/lib/aws/record/hash_model/attributes.rb +13 -15
  253. data/lib/aws/record/hash_model/finder_methods.rb +46 -46
  254. data/lib/aws/record/hash_model/scope.rb +31 -31
  255. data/lib/aws/record/model.rb +136 -136
  256. data/lib/aws/record/model/attributes.rb +57 -59
  257. data/lib/aws/record/model/finder_methods.rb +67 -67
  258. data/lib/aws/record/model/scope.rb +48 -49
  259. data/lib/aws/record/naming.rb +1 -1
  260. data/lib/aws/record/scope.rb +23 -19
  261. data/lib/aws/record/validations.rb +253 -271
  262. data/lib/aws/record/validator.rb +3 -3
  263. data/lib/aws/record/validators/acceptance.rb +1 -3
  264. data/lib/aws/record/validators/block.rb +1 -3
  265. data/lib/aws/record/validators/confirmation.rb +1 -3
  266. data/lib/aws/record/validators/count.rb +2 -4
  267. data/lib/aws/record/validators/exclusion.rb +2 -4
  268. data/lib/aws/record/validators/format.rb +2 -4
  269. data/lib/aws/record/validators/inclusion.rb +1 -3
  270. data/lib/aws/record/validators/length.rb +5 -7
  271. data/lib/aws/record/validators/method.rb +1 -3
  272. data/lib/aws/record/validators/numericality.rb +6 -8
  273. data/lib/aws/record/validators/presence.rb +1 -3
  274. data/lib/aws/redshift.rb +14 -14
  275. data/lib/aws/redshift/client.rb +596 -592
  276. data/lib/aws/redshift/config.rb +1 -1
  277. data/lib/aws/route_53.rb +30 -30
  278. data/lib/aws/route_53/change_batch.rb +7 -7
  279. data/lib/aws/route_53/client.rb +188 -152
  280. data/lib/aws/route_53/hosted_zone.rb +4 -4
  281. data/lib/aws/route_53/hosted_zone_collection.rb +7 -7
  282. data/lib/aws/route_53/resource_record_set.rb +10 -10
  283. data/lib/aws/route_53/resource_record_set_collection.rb +6 -6
  284. data/lib/aws/s3.rb +79 -79
  285. data/lib/aws/s3/access_control_list.rb +44 -36
  286. data/lib/aws/s3/acl_options.rb +51 -51
  287. data/lib/aws/s3/bucket.rb +146 -146
  288. data/lib/aws/s3/bucket_collection.rb +21 -21
  289. data/lib/aws/s3/bucket_lifecycle_configuration.rb +81 -82
  290. data/lib/aws/s3/bucket_tag_collection.rb +4 -2
  291. data/lib/aws/s3/cipher_io.rb +5 -4
  292. data/lib/aws/s3/client.rb +89 -84
  293. data/lib/aws/s3/client/xml.rb +1 -1
  294. data/lib/aws/s3/config.rb +7 -1
  295. data/lib/aws/s3/cors_rule.rb +2 -0
  296. data/lib/aws/s3/cors_rule_collection.rb +42 -40
  297. data/lib/aws/s3/data_options.rb +16 -11
  298. data/lib/aws/s3/encryption_utils.rb +2 -2
  299. data/lib/aws/s3/errors.rb +7 -7
  300. data/lib/aws/s3/multipart_upload.rb +30 -33
  301. data/lib/aws/s3/multipart_upload_collection.rb +8 -6
  302. data/lib/aws/s3/object_collection.rb +35 -35
  303. data/lib/aws/s3/object_metadata.rb +6 -6
  304. data/lib/aws/s3/object_version.rb +4 -4
  305. data/lib/aws/s3/object_version_collection.rb +15 -15
  306. data/lib/aws/s3/policy.rb +2 -2
  307. data/lib/aws/s3/prefixed_collection.rb +9 -5
  308. data/lib/aws/s3/presigned_post.rb +39 -37
  309. data/lib/aws/s3/request.rb +11 -11
  310. data/lib/aws/s3/s3_object.rb +210 -200
  311. data/lib/aws/s3/tree.rb +25 -27
  312. data/lib/aws/s3/tree/child_collection.rb +3 -3
  313. data/lib/aws/s3/tree/leaf_node.rb +2 -2
  314. data/lib/aws/s3/tree/parent.rb +1 -1
  315. data/lib/aws/s3/website_configuration.rb +13 -13
  316. data/lib/aws/simple_db.rb +83 -83
  317. data/lib/aws/simple_db/attribute.rb +9 -7
  318. data/lib/aws/simple_db/attribute_collection.rb +22 -13
  319. data/lib/aws/simple_db/client.rb +107 -107
  320. data/lib/aws/simple_db/config.rb +7 -1
  321. data/lib/aws/simple_db/consistent_read_option.rb +5 -5
  322. data/lib/aws/simple_db/domain.rb +4 -2
  323. data/lib/aws/simple_db/domain_collection.rb +4 -4
  324. data/lib/aws/simple_db/domain_metadata.rb +5 -5
  325. data/lib/aws/simple_db/errors.rb +9 -9
  326. data/lib/aws/simple_db/item.rb +5 -5
  327. data/lib/aws/simple_db/item_collection.rb +83 -81
  328. data/lib/aws/simple_db/item_data.rb +4 -4
  329. data/lib/aws/simple_db/put_attributes.rb +3 -3
  330. data/lib/aws/simple_email_service.rb +140 -140
  331. data/lib/aws/simple_email_service/client.rb +82 -76
  332. data/lib/aws/simple_email_service/config.rb +1 -2
  333. data/lib/aws/simple_email_service/email_address_collection.rb +3 -3
  334. data/lib/aws/simple_email_service/identity.rb +8 -8
  335. data/lib/aws/simple_email_service/quotas.rb +8 -6
  336. data/lib/aws/simple_workflow.rb +106 -106
  337. data/lib/aws/simple_workflow/activity_task.rb +15 -22
  338. data/lib/aws/simple_workflow/activity_task_collection.rb +15 -15
  339. data/lib/aws/simple_workflow/activity_type.rb +23 -23
  340. data/lib/aws/simple_workflow/activity_type_collection.rb +23 -23
  341. data/lib/aws/simple_workflow/client.rb +1004 -956
  342. data/lib/aws/simple_workflow/config.rb +1 -1
  343. data/lib/aws/simple_workflow/count.rb +5 -5
  344. data/lib/aws/simple_workflow/decision_task.rb +129 -129
  345. data/lib/aws/simple_workflow/decision_task_collection.rb +59 -59
  346. data/lib/aws/simple_workflow/domain.rb +11 -11
  347. data/lib/aws/simple_workflow/domain_collection.rb +26 -26
  348. data/lib/aws/simple_workflow/history_event.rb +32 -32
  349. data/lib/aws/simple_workflow/history_event_collection.rb +3 -3
  350. data/lib/aws/simple_workflow/option_formatters.rb +5 -5
  351. data/lib/aws/simple_workflow/request.rb +1 -1
  352. data/lib/aws/simple_workflow/resource.rb +1 -1
  353. data/lib/aws/simple_workflow/type.rb +8 -8
  354. data/lib/aws/simple_workflow/type_collection.rb +15 -15
  355. data/lib/aws/simple_workflow/workflow_execution.rb +70 -72
  356. data/lib/aws/simple_workflow/workflow_execution_collection.rb +130 -130
  357. data/lib/aws/simple_workflow/workflow_type.rb +27 -25
  358. data/lib/aws/simple_workflow/workflow_type_collection.rb +20 -20
  359. data/lib/aws/sns.rb +25 -25
  360. data/lib/aws/sns/client.rb +55 -55
  361. data/lib/aws/sns/config.rb +1 -1
  362. data/lib/aws/sns/policy.rb +1 -1
  363. data/lib/aws/sns/subscription.rb +7 -7
  364. data/lib/aws/sns/subscription_collection.rb +5 -5
  365. data/lib/aws/sns/topic.rb +49 -49
  366. data/lib/aws/sns/topic_collection.rb +2 -2
  367. data/lib/aws/sns/topic_subscription_collection.rb +5 -5
  368. data/lib/aws/sqs.rb +20 -20
  369. data/lib/aws/sqs/client.rb +78 -78
  370. data/lib/aws/sqs/config.rb +1 -1
  371. data/lib/aws/sqs/errors.rb +12 -12
  372. data/lib/aws/sqs/queue.rb +66 -67
  373. data/lib/aws/sqs/queue_collection.rb +16 -8
  374. data/lib/aws/sqs/received_message.rb +7 -6
  375. data/lib/aws/storage_gateway.rb +21 -21
  376. data/lib/aws/storage_gateway/client.rb +269 -202
  377. data/lib/aws/storage_gateway/config.rb +1 -1
  378. data/lib/aws/sts.rb +10 -8
  379. data/lib/aws/sts/client.rb +35 -35
  380. data/lib/aws/sts/session.rb +3 -3
  381. data/lib/aws/version.rb +1 -2
  382. metadata +23 -21
  383. data/lib/aws/core/autoloader.rb +0 -64
  384. data/lib/net/http/connection_pool.rb +0 -226
  385. data/lib/net/http/connection_pool/connection.rb +0 -189
  386. data/lib/net/http/connection_pool/session.rb +0 -126
@@ -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 'aws/record/attributes.rb'
15
-
16
14
  module AWS
17
15
  module Record
18
16
  class Model
@@ -46,24 +44,24 @@ module AWS
46
44
  range.is_a?(Range) and range.first.is_a?(Integer)
47
45
  super(name, options)
48
46
  end
49
-
47
+
50
48
  # Returns a serialized representation of the integer value suitable for
51
49
  # storing in SimpleDB.
52
50
  #
53
- # attribute.serialize(123)
54
- # #=> '123'
51
+ # attribute.serialize(123)
52
+ # #=> '123'
55
53
  #
56
- # # padded to the correct number of digits
57
- # attribute.serialize('123', :range => (0..10_000)
58
- # #=> '00123'
54
+ # # padded to the correct number of digits
55
+ # attribute.serialize('123', :range => (0..10_000)
56
+ # #=> '00123'
59
57
  #
60
- # # offset applied to make all values positive
61
- # attribute.serialize('-55', :range => (-100..10_000)
62
- # #=> '00045'
58
+ # # offset applied to make all values positive
59
+ # attribute.serialize('-55', :range => (-100..10_000)
60
+ # #=> '00045'
63
61
  #
64
62
  # @param [Integer] integer The number to serialize.
65
63
  # @param [Hash] options
66
- # @option options [required,Range] :range A range that represents the
64
+ # @option options [required,Range] :range A range that represents the
67
65
  # minimum and maximum values this integer can be.
68
66
  # The returned value will have an offset applied (if min is
69
67
  # less than 0) and will be zero padded.
@@ -117,7 +115,7 @@ module AWS
117
115
  end
118
116
 
119
117
  def self.serialize float, options = {}
120
- expect(Float, float) do
118
+ expect(Float, float) do
121
119
  left, right = float.to_s.split('.')
122
120
  left = SortableIntegerAttr.serialize(left.to_i, options)
123
121
  SortableIntegerAttr.check_range(float, options)
@@ -138,7 +136,7 @@ module AWS
138
136
  end
139
137
 
140
138
  class << self
141
-
139
+
142
140
  # Adds a string attribute to this class.
143
141
  #
144
142
  # @example A standard string attribute
@@ -150,14 +148,14 @@ module AWS
150
148
  # recipe = Recipe.new(:name => "Buttermilk Pancakes")
151
149
  # recipe.name #=> 'Buttermilk Pancakes'
152
150
  #
153
- # @example A string attribute with +:set+ set to true
151
+ # @example A string attribute with `:set` set to true
154
152
  #
155
153
  # class Recipe < AWS::Record::Model
156
154
  # string_attr :tags, :set => true
157
155
  # end
158
156
  #
159
157
  # recipe = Recipe.new(:tags => %w(popular dessert))
160
- # recipe.tags #=> #<Set: {"popular", "desert"}>
158
+ # recipe.tags #=> #<Set: {"popular", "desert"}>
161
159
  #
162
160
  # @param [Symbol] name The name of the attribute.
163
161
  # @param [Hash] options
@@ -166,15 +164,15 @@ module AWS
166
164
  def string_attr name, options = {}
167
165
  add_attribute(Record::Attributes::StringAttr.new(name, options))
168
166
  end
169
-
167
+
170
168
  # Adds an integer attribute to this class.
171
169
  #
172
- # class Recipe < AWS::Record::Model
173
- # integer_attr :servings
174
- # end
170
+ # class Recipe < AWS::Record::Model
171
+ # integer_attr :servings
172
+ # end
175
173
  #
176
- # recipe = Recipe.new(:servings => '10')
177
- # recipe.servings #=> 10
174
+ # recipe = Recipe.new(:servings => '10')
175
+ # recipe.servings #=> 10
178
176
  #
179
177
  # @param [Symbol] name The name of the attribute.
180
178
  # @param [Hash] options
@@ -183,24 +181,24 @@ module AWS
183
181
  def integer_attr name, options = {}
184
182
  add_attribute(Attributes::IntegerAttr.new(name, options))
185
183
  end
186
-
184
+
187
185
  # Adds a sortable integer attribute to this class.
188
186
  #
189
- # class Person < AWS::Record::Model
190
- # sortable_integer_attr :age, :range => 0..150
191
- # end
187
+ # class Person < AWS::Record::Model
188
+ # sortable_integer_attr :age, :range => 0..150
189
+ # end
192
190
  #
193
- # person = Person.new(:age => 10)
194
- # person.age #=> 10
191
+ # person = Person.new(:age => 10)
192
+ # person.age #=> 10
193
+ #
194
+ # ### Validations
195
195
  #
196
- # === Validations
197
- #
198
196
  # It is recomended to apply a validates_numericality_of with
199
197
  # minimum and maximum value constraints. If a value is assigned
200
198
  # to a sortable integer that falls outside of the +:range: it will
201
199
  # raise a runtime error when the record is saved.
202
200
  #
203
- # === Difference Between Sortable an Regular Integer Attributes
201
+ # ### Difference Between Sortable an Regular Integer Attributes
204
202
  #
205
203
  # Because SimpleDB does not support numeric types, all values must
206
204
  # be converted to strings. This complicates sorting by numeric values.
@@ -216,15 +214,15 @@ module AWS
216
214
  def sortable_integer_attr name, options = {}
217
215
  add_attribute(Attributes::SortableIntegerAttr.new(name, options))
218
216
  end
219
-
217
+
220
218
  # Adds a float attribute to this class.
221
219
  #
222
- # class Listing < AWS::Record::Model
223
- # float_attr :score
224
- # end
220
+ # class Listing < AWS::Record::Model
221
+ # float_attr :score
222
+ # end
225
223
  #
226
- # listing = Listing.new(:score => '123.456')
227
- # listing.score # => 123.456
224
+ # listing = Listing.new(:score => '123.456')
225
+ # listing.score # => 123.456
228
226
  #
229
227
  # @param [Symbol] name The name of the attribute.
230
228
  # @param [Hash] options
@@ -233,35 +231,35 @@ module AWS
233
231
  def float_attr name, options = {}
234
232
  add_attribute(Attributes::FloatAttr.new(name, options))
235
233
  end
236
-
234
+
237
235
  # Adds sortable float attribute to this class.
238
236
  #
239
237
  # Persisted values are stored (and sorted) as strings. This makes it
240
- # more difficult to sort numbers because they don't sort
238
+ # more difficult to sort numbers because they don't sort
241
239
  # lexicographically unless they have been offset to be positive and
242
240
  # then zero padded.
243
241
  #
244
- # === Postive Floats
242
+ # ### Postive Floats
245
243
  #
246
244
  # To store floats in a sort-friendly manor:
247
245
  #
248
- # sortable_float_attr :score, :range => (0..10)
246
+ # sortable_float_attr :score, :range => (0..10)
249
247
  #
250
- # This will cause values like 5.5 to persist as a string like '05.5' so
248
+ # This will cause values like 5.5 to persist as a string like '05.5' so
251
249
  # that they can be sorted lexicographically.
252
250
  #
253
- # === Negative Floats
251
+ # ### Negative Floats
254
252
  #
255
- # If you need to store negative sortable floats, increase your +:range+
253
+ # If you need to store negative sortable floats, increase your `:range`
256
254
  # to include a negative value.
257
255
  #
258
- # sortable_float_attr :position, :range => (-10..10)
256
+ # sortable_float_attr :position, :range => (-10..10)
259
257
  #
260
- # AWS::Record will add 10 to all values and zero pad them
261
- # (e.g. -10.0 will be represented as '00.0' and 10 will be represented as
258
+ # AWS::Record will add 10 to all values and zero pad them
259
+ # (e.g. -10.0 will be represented as '00.0' and 10 will be represented as
262
260
  # '20.0'). This will allow the values to be compared lexicographically.
263
261
  #
264
- # @note If you change the +:range+ after some values have been persisted
262
+ # @note If you change the `:range` after some values have been persisted
265
263
  # you must also manually migrate all of the old values to have the
266
264
  # correct padding & offset or they will be interpreted differently.
267
265
  #
@@ -276,7 +274,7 @@ module AWS
276
274
  def sortable_float_attr name, options = {}
277
275
  add_attribute(Attributes::SortableFloatAttr.new(name, options))
278
276
  end
279
-
277
+
280
278
  # Adds a boolean attribute to this class.
281
279
  #
282
280
  # @example
@@ -295,16 +293,16 @@ module AWS
295
293
  #
296
294
  # @param [Symbol] name The name of the attribute.
297
295
  def boolean_attr name, options = {}
298
-
296
+
299
297
  attr = add_attribute(Attributes::BooleanAttr.new(name, options))
300
-
298
+
301
299
  # add the boolean question mark method
302
300
  define_method("#{attr.name}?") do
303
301
  !!__send__(attr.name)
304
302
  end
305
-
303
+
306
304
  end
307
-
305
+
308
306
  # Adds a datetime attribute to this class.
309
307
  #
310
308
  # @example A standard datetime attribute
@@ -316,7 +314,7 @@ module AWS
316
314
  # recipe = Recipe.new(:invented => Time.now)
317
315
  # recipe.invented #=> <DateTime ...>
318
316
  #
319
- # If you add a datetime_attr for +:created_at+ and/or +:updated_at+ those
317
+ # If you add a datetime_attr for `:created_at` and/or `:updated_at` those
320
318
  # will be automanaged.
321
319
  #
322
320
  # @param [Symbol] name The name of the attribute.
@@ -329,7 +327,7 @@ module AWS
329
327
  def datetime_attr name, options = {}
330
328
  add_attribute(Record::Attributes::DateTimeAttr.new(name, options))
331
329
  end
332
-
330
+
333
331
  # Adds a date attribute to this class.
334
332
  #
335
333
  # @example A standard date attribute
@@ -352,9 +350,9 @@ module AWS
352
350
  def date_attr name, options = {}
353
351
  add_attribute(Record::Attributes::DateAttr.new(name, options))
354
352
  end
355
-
353
+
356
354
  # A convenience method for adding the standard two datetime attributes
357
- # +:created_at+ and +:updated_at+.
355
+ # `:created_at` and `:updated_at`.
358
356
  #
359
357
  # @example
360
358
  #
@@ -366,13 +364,13 @@ module AWS
366
364
  # recipe.save
367
365
  # recipe.created_at #=> <DateTime ...>
368
366
  # recipe.updated_at #=> <DateTime ...>
369
- #
367
+ #
370
368
  def timestamps
371
369
  c = datetime_attr :created_at
372
370
  u = datetime_attr :updated_at
373
371
  [c, u]
374
372
  end
375
-
373
+
376
374
  end
377
375
  end
378
376
  end
@@ -24,46 +24,46 @@ module AWS
24
24
  # was no data found for the given id.
25
25
  # @return [Record::HashModel] Returns the record with the given id.
26
26
  def find_by_id id, options = {}
27
-
27
+
28
28
  domain = sdb_domain(options[:shard] || options[:domain])
29
-
29
+
30
30
  data = domain.items[id].data.attributes
31
-
31
+
32
32
  raise RecordNotFound, "no data found for id: #{id}" if data.empty?
33
-
33
+
34
34
  obj = self.new(:shard => domain)
35
35
  obj.send(:hydrate, id, data)
36
36
  obj
37
-
37
+
38
38
  end
39
39
  alias_method :[], :find_by_id
40
-
41
- # Finds records in SimpleDB and returns them as objects of the
40
+
41
+ # Finds records in SimpleDB and returns them as objects of the
42
42
  # current class.
43
43
  #
44
- # Finding +:all+ returns an enumerable scope object
44
+ # Finding `:all` returns an enumerable scope object
45
45
  #
46
- # People.find(:all, :order => [:age, :desc], :limit => 10).each do |person|
47
- # puts person.name
48
- # end
46
+ # People.find(:all, :order => [:age, :desc], :limit => 10).each do |person|
47
+ # puts person.name
48
+ # end
49
49
  #
50
- # Finding +:first+ returns a single record (or nil)
50
+ # Finding `:first` returns a single record (or nil)
51
51
  #
52
- # boss = People.find(:first, :where => { :boss => true })
52
+ # boss = People.find(:first, :where => { :boss => true })
53
53
  #
54
- # Find accepts a hash of find modifiers (+:where+, +:order+ and
55
- # +:limit+). You can also choose to omit these modifiers and
54
+ # Find accepts a hash of find modifiers (`:where`, `:order` and
55
+ # `:limit`). You can also choose to omit these modifiers and
56
56
  # chain them on the scope object returned. In the following
57
57
  # example only one request is made to SimpleDB (when #each is
58
58
  # called)
59
59
  #
60
- # people = People.find(:all)
60
+ # people = People.find(:all)
61
61
  #
62
- # johns = people.where(:name => 'John Doe')
62
+ # johns = people.where(:name => 'John Doe')
63
63
  #
64
- # johns.order(:age, :desc).limit(10).each do |suspects|
65
- # # ...
66
- # end
64
+ # johns.order(:age, :desc).limit(10).each do |suspects|
65
+ # # ...
66
+ # end
67
67
  #
68
68
  # See also {where}, {order} and {limit} for more
69
69
  # information and options.
@@ -73,25 +73,25 @@ module AWS
73
73
  # not found.
74
74
  #
75
75
  # @overload find(mode, options = {})
76
- # @param [:all,:first] mode (:all) When finding +:all+ matching records
77
- # and array is returned of records. When finding +:first+ then
78
- # +nil+ or a single record will be returned.
76
+ # @param [:all,:first] mode (:all) When finding `:all` matching records
77
+ # and array is returned of records. When finding `:first` then
78
+ # `nil` or a single record will be returned.
79
79
  # @param [Hash] options
80
80
  # @option options [Mixed] :where Conditions that determine what
81
81
  # records are returned.
82
- # @option options [String,Array] :sort The order records should be
82
+ # @option options [String,Array] :sort The order records should be
83
83
  # returned in.
84
84
  # @option options [Integer] :limit The max number of records to fetch.
85
85
  def find *args
86
86
  new_scope.find(*args)
87
87
  end
88
-
88
+
89
89
  # Returns a chainable scope object that restricts further scopes to a
90
90
  # particular domain.
91
91
  #
92
- # Book.domain('books-2').each do |book|
93
- # # ...
94
- # end
92
+ # Book.domain('books-2').each do |book|
93
+ # # ...
94
+ # end
95
95
  #
96
96
  # @param [String] shard_name
97
97
  # @return [Scope] Returns a scope for restricting the domain of subsequent
@@ -99,20 +99,20 @@ module AWS
99
99
  new_scope.shard(shard_name)
100
100
  end
101
101
  alias_method :domain, :shard
102
-
102
+
103
103
  # Returns an enumerable scope object represents all records.
104
104
  #
105
- # Book.all.each do |book|
106
- # # ...
107
- # end
105
+ # Book.all.each do |book|
106
+ # # ...
107
+ # end
108
108
  #
109
- # This method is equivalent to +find(:all)+, and therefore you can also
110
- # pass aditional options. See {.find} for more information on what
109
+ # This method is equivalent to `find(:all)`, and therefore you can also
110
+ # pass aditional options. See {.find} for more information on what
111
111
  # options you can pass.
112
112
  #
113
- # Book.all(:where => { :author' => 'me' }).each do |my_book|
114
- # # ...
115
- # end
113
+ # Book.all(:where => { :author' => 'me' }).each do |my_book|
114
+ # # ...
115
+ # end
116
116
  #
117
117
  # @return [Scope] Returns an enumerable scope object.
118
118
  def all options = {}
@@ -123,20 +123,20 @@ module AWS
123
123
  def each &block
124
124
  all.each(&block)
125
125
  end
126
-
126
+
127
127
  # Counts records in SimpleDB.
128
128
  #
129
129
  # With no arguments, counts all records:
130
130
  #
131
- # People.count
131
+ # People.count
132
132
  #
133
133
  # Accepts query options to count a subset of records:
134
134
  #
135
- # People.count(:where => { :boss => true })
135
+ # People.count(:where => { :boss => true })
136
136
  #
137
137
  # You can also count records on a scope object:
138
138
  #
139
- # People.find(:all).where(:boss => true).count
139
+ # People.find(:all).where(:boss => true).count
140
140
  #
141
141
  # See {find} and {Scope#count} for more details.
142
142
  #
@@ -150,43 +150,43 @@ module AWS
150
150
  new_scope.count(options)
151
151
  end
152
152
  alias_method :size, :count
153
-
153
+
154
154
  # @return [Object,nil] Returns the first record found. If there were
155
155
  # no records found, nil is returned.
156
156
  def first options = {}
157
157
  new_scope.first(options)
158
158
  end
159
-
159
+
160
160
  # Limits which records are retried from SimpleDB when performing a find.
161
- #
161
+ #
162
162
  # Simple string condition
163
163
  #
164
- # Car.where('color = "red" or color = "blue"').each {|car| ... }
165
- #
164
+ # Car.where('color = "red" or color = "blue"').each {|car| ... }
165
+ #
166
166
  # String with placeholders for quoting params
167
167
  #
168
- # Car.where('color = ?', 'red')
168
+ # Car.where('color = ?', 'red')
169
+ #
170
+ # Car.where('color = ? OR style = ?', 'red', 'compact')
169
171
  #
170
- # Car.where('color = ? OR style = ?', 'red', 'compact')
172
+ # # produces a condition using in, like: WHERE color IN ('red', 'blue')
173
+ # Car.where('color IN ?', ['red','blue'])
171
174
  #
172
- # # produces a condition using in, like: WHERE color IN ('red', 'blue')
173
- # Car.where('color IN ?', ['red','blue'])
174
- #
175
175
  # Hash arguments
176
176
  #
177
- # # WHERE age = '40' AND gender = 'male'
178
- # People.where(:age => 40, :gender => 'male').each {|person| ... }
177
+ # # WHERE age = '40' AND gender = 'male'
178
+ # People.where(:age => 40, :gender => 'male').each {|person| ... }
179
179
  #
180
- # # WHERE name IN ('John', 'Jane')
181
- # People.where(:name => ['John', 'Jane']).each{|person| ... }
180
+ # # WHERE name IN ('John', 'Jane')
181
+ # People.where(:name => ['John', 'Jane']).each{|person| ... }
182
182
  #
183
183
  # Chaining where with other scope modifiers
184
184
  #
185
- # # 10 most expensive red cars
186
- # Car.where(:color => 'red').order(:price, :desc).limit(10)
187
- #
185
+ # # 10 most expensive red cars
186
+ # Car.where(:color => 'red').order(:price, :desc).limit(10)
187
+ #
188
188
  # @overload where(conditions_hash)
189
- # @param [Hash] conditions_hash A hash of attributes to values. Each
189
+ # @param [Hash] conditions_hash A hash of attributes to values. Each
190
190
  # key/value pair from the hash becomes a find condition. All
191
191
  # conditions are joined by AND.
192
192
  #
@@ -195,16 +195,16 @@ module AWS
195
195
  def where *args
196
196
  new_scope.where(*args)
197
197
  end
198
-
198
+
199
199
  # Defines the order in which records are returned when performing a find.
200
200
  # SimpleDB only allows sorting by one attribute per request.
201
201
  #
202
- # # oldest to youngest
203
- # People.order(:age, :desc).each {|person| ... }
202
+ # # oldest to youngest
203
+ # People.order(:age, :desc).each {|person| ... }
204
204
  #
205
205
  # You can chain order with the other scope modifiers:
206
206
  #
207
- # Pepole.order(:age, :desc).limit(10).each {|person| ... }
207
+ # Pepole.order(:age, :desc).limit(10).each {|person| ... }
208
208
  #
209
209
  # @overload order(attribute, direction = :asc)
210
210
  # @param [String,Symbol] attribute The attribute to sort by.
@@ -212,15 +212,15 @@ module AWS
212
212
  def order *args
213
213
  new_scope.order(*args)
214
214
  end
215
-
215
+
216
216
  # The maximum number of records to return. By default, all records
217
217
  # matching the where conditions will be returned from a find.
218
- #
219
- # People.limit(10).each {|person| ... }
218
+ #
219
+ # People.limit(10).each {|person| ... }
220
220
  #
221
221
  # Limit can be chained with other scope modifiers:
222
222
  #
223
- # People.where(:age => 40).limit(10).each {|person| ... }
223
+ # People.where(:age => 40).limit(10).each {|person| ... }
224
224
  #
225
225
  def limit limit
226
226
  new_scope.limit(limit)