aws-sdk 1.8.5 → 1.9.0

Sign up to get free protection for your applications and to get access to all the features.
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
@@ -13,7 +13,7 @@
13
13
 
14
14
  AWS::Core::Configuration.module_eval do
15
15
 
16
- add_service 'DynamoDB', 'dynamo_db', 'dynamodb.us-east-1.amazonaws.com'
16
+ add_service 'DynamoDB', 'dynamo_db', 'dynamodb.%s.amazonaws.com'
17
17
 
18
18
  add_option :dynamo_db_retry_throughput_errors, true, :boolean => true
19
19
 
@@ -18,16 +18,16 @@ module AWS
18
18
  # complex primary key (according to the table schema) and consists
19
19
  # of a collection of attributes. Attributes are name/value pairs
20
20
  # where the value may be a string, number, string set, or number
21
- # set.
21
+ # set.
22
22
  #
23
23
  # Getting an item by hash key value:
24
24
  #
25
- # item = table.items['hash-key-value']
25
+ # item = table.items['hash-key-value']
26
26
  #
27
27
  # Getting an item from a table with both hash and range keys:
28
28
  #
29
- # item = table.items['hash-key','range-key']
30
- #
29
+ # item = table.items['hash-key','range-key']
30
+ #
31
31
  class Item < Core::Resource
32
32
 
33
33
  extend Types
@@ -41,7 +41,7 @@ module AWS
41
41
  attr_reader :hash_value
42
42
 
43
43
  # @return [String, Numeric, nil] The range key value of the
44
- # item, or +nil+ if the table has a simple primary key.
44
+ # item, or `nil` if the table has a simple primary key.
45
45
  attr_reader :range_value
46
46
 
47
47
  # @private
@@ -60,17 +60,17 @@ module AWS
60
60
  # The operation will fail unless the item exists and has the
61
61
  # attributes in the value for this option. For example:
62
62
  #
63
- # # throws DynamoDB::Errors::ConditionalCheckFailedException
64
- # # unless the item has "color" set to "red"
65
- # item.delete(:if => { :color => "red" })
63
+ # # throws DynamoDB::Errors::ConditionalCheckFailedException
64
+ # # unless the item has "color" set to "red"
65
+ # item.delete(:if => { :color => "red" })
66
66
  #
67
67
  # @option options [String, Symbol, Array] :unless_exists A name
68
68
  # or collection of attribute names; if the item has a value
69
69
  # for any of these attributes, this method will raise
70
- # +DynamoDB::Errors::ConditionalCheckFailedException+. For
70
+ # `DynamoDB::Errors::ConditionalCheckFailedException`. For
71
71
  # example:
72
72
  #
73
- # item.delete(:unless_exists => "version")
73
+ # item.delete(:unless_exists => "version")
74
74
  def delete(options = {})
75
75
  client_opts = item_key_options(self)
76
76
 
@@ -22,31 +22,31 @@ module AWS
22
22
  # * Get an {Item}
23
23
  # * Enumerate {Item} or {ItemData} objects
24
24
  #
25
- # == Creating an Item
25
+ # ## Creating an Item
26
26
  #
27
27
  # To create an item, just call {#create} with a hash of attributes.
28
28
  #
29
- # table = dynamo_db.tables['my-table']
30
- # table.hash_key = [:id, :string]
29
+ # table = dynamo_db.tables['my-table']
30
+ # table.hash_key = [:id, :string]
31
31
  #
32
- # table.items.create('id' => 'abc', 'count' => 5, 'colors' => %w(red blue))
32
+ # table.items.create('id' => 'abc', 'count' => 5, 'colors' => %w(red blue))
33
33
  #
34
34
  # Attribute names can be symbols/strings and values can be strings or
35
35
  # numbers or arrays/sets of strings/numbers. The attributes must contain
36
36
  # the hash key name/value for the item and the value must be of the
37
37
  # correct type (e.g. string or number).
38
38
  #
39
- # == Getting an Item
39
+ # ## Getting an Item
40
40
  #
41
41
  # To get an item, you provide the hash key
42
42
  #
43
- # # gets a reference to the item, no request is made
44
- # item = table.items['hash-key-value']
43
+ # # gets a reference to the item, no request is made
44
+ # item = table.items['hash-key-value']
45
45
  #
46
46
  # You call methods against the item returned to get, add, update or delete
47
47
  # attributes. See {Item} for more information.
48
48
  #
49
- # == Enumerating Items
49
+ # ## Enumerating Items
50
50
  #
51
51
  # You can enumerate items 2 ways:
52
52
  #
@@ -61,26 +61,26 @@ module AWS
61
61
  #
62
62
  # To enumerate {Item} objects just call each on the item collection.
63
63
  #
64
- # table.items.each do |item|
65
- # puts item.hash_value
66
- # end
64
+ # table.items.each do |item|
65
+ # puts item.hash_value
66
+ # end
67
67
  #
68
68
  # To enumerate {ItemData} objects you need to specify what attributes
69
69
  # you are interested in. This will cause #each to yield {ItemData}
70
70
  # objects. Call {ItemData#attributes} to get the hash of attribute
71
71
  # names/values.
72
72
  #
73
- # table.items.select('id', 'category').each do |item_data|
74
- # item_data.attributes #=> { 'id' => 'abc', 'category' => 'foo' }
75
- # end
73
+ # table.items.select('id', 'category').each do |item_data|
74
+ # item_data.attributes #=> { 'id' => 'abc', 'category' => 'foo' }
75
+ # end
76
76
  #
77
77
  # If you want item data objects with all attributes just call select
78
78
  # without a list of attributes (#select still accepts options).
79
79
  #
80
- # # request a maximum of 10 items from Amazon DynamoDB
81
- # table.items.select(:limit => 10).each do |item_data|
82
- # item_data.attributes #=> { 'id' => 'abc', 'category' => 'foo', ... }
83
- # end
80
+ # # request a maximum of 10 items from Amazon DynamoDB
81
+ # table.items.select(:limit => 10).each do |item_data|
82
+ # item_data.attributes #=> { 'id' => 'abc', 'category' => 'foo', ... }
83
+ # end
84
84
  #
85
85
  # Please note that enumerating objects is done via the scan operation.
86
86
  # Refer to the Amazon DynamoDB documentation for more information
@@ -114,7 +114,7 @@ module AWS
114
114
  # primary key doesn't exist), or replace an existing item if it
115
115
  # has certain attribute values.
116
116
  #
117
- # items.put(:id => "abc123", :colors => ["red", "white"])
117
+ # items.put(:id => "abc123", :colors => ["red", "white"])
118
118
  #
119
119
  # @param [Hash] attributes The attributes to store with the
120
120
  # item. These must include the primary key attributes for the
@@ -122,10 +122,10 @@ module AWS
122
122
  # Attribute names may be symbols or UTF-8 strings, and
123
123
  # attribute values may be any of these types:
124
124
  #
125
- # * String
126
- # * Array<String> or Set<String>
127
- # * Numeric
128
- # * Array<Numeric> or Set<Numeric>
125
+ # * String
126
+ # * Array<String> or Set<String>
127
+ # * Numeric
128
+ # * Array<Numeric> or Set<Numeric>
129
129
  #
130
130
  # Empty sets, arrays, and strings are invalid.
131
131
  #
@@ -136,33 +136,33 @@ module AWS
136
136
  # operation will fail unless the item exists and has the
137
137
  # attributes in the value for this option. For example:
138
138
  #
139
- # # throws DynamoDB::Errors::ConditionalCheckFailedException
140
- # # unless the item has "color" set to "red"
141
- # items.put(
142
- # { :foo => "Bar" },
143
- # :if => { :color => "red" }
144
- # )
139
+ # # throws DynamoDB::Errors::ConditionalCheckFailedException
140
+ # # unless the item has "color" set to "red"
141
+ # items.put(
142
+ # { :foo => "Bar" },
143
+ # :if => { :color => "red" }
144
+ # )
145
145
  #
146
146
  # @option options [String, Symbol, Array] :unless_exists A name
147
147
  # or collection of attribute names; if the item already exists
148
148
  # and has a value for any of these attributes, this method
149
149
  # will raise
150
- # +DynamoDB::Errors::ConditionalCheckFailedException+. For example:
150
+ # `DynamoDB::Errors::ConditionalCheckFailedException`. For example:
151
151
  #
152
- # items.put({ :id => "abc123" }, :unless_exists => "id")
152
+ # items.put({ :id => "abc123" }, :unless_exists => "id")
153
153
  #
154
- # @option options [Symbol] :return If set to +:all_old+, this
154
+ # @option options [Symbol] :return If set to `:all_old`, this
155
155
  # method will return a hash containing the previous values of
156
156
  # all attributes for the item that was overwritten. If this
157
- # option is set to +:none+, or if it is set to +:all_old+ and
157
+ # option is set to `:none`, or if it is set to `:all_old` and
158
158
  # no item currently exists with the same primary key values,
159
- # the method will return +nil+.
159
+ # the method will return `nil`.
160
160
  #
161
161
  # @return [Item] An object representing the item that was
162
162
  # stored. Note that the SDK retains only the item's primary
163
163
  # key values in memory; if you access the attributes of the
164
164
  # item using the returned object, the SDK will contact the
165
- # service to retrieve those attributes. The +:return+ option
165
+ # service to retrieve those attributes. The `:return` option
166
166
  # may be used to change the return value of this method.
167
167
  def create attributes, options = {}
168
168
  table.assert_schema!
@@ -200,8 +200,8 @@ module AWS
200
200
  # exception unless the table has a schema loaded or configured,
201
201
  # or if the table has a composite primary key.
202
202
  #
203
- # table.hash_key = [:id, :string]
204
- # item = table.items["abc123"]
203
+ # table.hash_key = [:id, :string]
204
+ # item = table.items["abc123"]
205
205
  #
206
206
  # @param [String, Numeric] hash_value The hash key value for the
207
207
  # item. The type of this parameter must match the type in the
@@ -225,9 +225,9 @@ module AWS
225
225
  # currently the SDK makes no attempt to validate the key
226
226
  # elements.
227
227
  #
228
- # table.hash_key = [:id, :string]
229
- # table.range_key = [:range, :number]
230
- # item = table.items.at("abc123", 12)
228
+ # table.hash_key = [:id, :string]
229
+ # table.range_key = [:range, :number]
230
+ # item = table.items.at("abc123", 12)
231
231
  #
232
232
  # @param [String, Numeric] hash_value The hash key value for the
233
233
  # item.
@@ -249,7 +249,7 @@ module AWS
249
249
 
250
250
  # Provides a convenient syntax for expressing scan filters.
251
251
  #
252
- # table.items.where(:path).begins_with("users/")
252
+ # table.items.where(:path).begins_with("users/")
253
253
  #
254
254
  class FilterBuilder
255
255
 
@@ -423,7 +423,7 @@ module AWS
423
423
 
424
424
  # @overload where(attributes)
425
425
  #
426
- # table.items.where(:name => "Fred")
426
+ # table.items.where(:name => "Fred")
427
427
  #
428
428
  # @param [Hash] attributes The returned collection will be
429
429
  # filtered such that each item contains the attributes and
@@ -434,7 +434,7 @@ module AWS
434
434
  #
435
435
  # @overload where(attribute_name)
436
436
  #
437
- # table.items.where(:name).equals("Fred")
437
+ # table.items.where(:name).equals("Fred")
438
438
  #
439
439
  # @return [FilterBuilder] An object that allows you to specify
440
440
  # a filter on the provided attribute name.
@@ -505,16 +505,16 @@ module AWS
505
505
  # method allows you to specify which attributes to retrieve from
506
506
  # DynamoDB.
507
507
  #
508
- # # fetch all attributes for a collection of items
509
- # items.select { |data| p data.attributes }
508
+ # # fetch all attributes for a collection of items
509
+ # items.select { |data| p data.attributes }
510
510
  #
511
- # # fetch only the "color" attribute of each item
512
- # items.select(:color) { |data| p data.attributes["color"] }
511
+ # # fetch only the "color" attribute of each item
512
+ # items.select(:color) { |data| p data.attributes["color"] }
513
513
  #
514
- # # use client-side filtering to delete a subset of the items
515
- # items.select do |data|
516
- # data.item.delete if data.attributes.size % 2 == 0
517
- # end
514
+ # # use client-side filtering to delete a subset of the items
515
+ # items.select do |data|
516
+ # data.item.delete if data.attributes.size % 2 == 0
517
+ # end
518
518
  #
519
519
  # @overload select(*attributes, options = {})
520
520
  #
@@ -566,8 +566,8 @@ module AWS
566
566
  # count applies to the items that match all the filters on the
567
567
  # collection. For example:
568
568
  #
569
- # # count the blue items
570
- # items.where(:color => "blue").count
569
+ # # count the blue items
570
+ # items.where(:color => "blue").count
571
571
  #
572
572
  # @param [Hash] options Options for counting the items.
573
573
  #
@@ -618,32 +618,32 @@ module AWS
618
618
  # of key conditions and does not have the added step of
619
619
  # filtering out results.
620
620
  #
621
- # # find all items with a given hash key value
622
- # items.query(:hash_value => "abc123")
621
+ # # find all items with a given hash key value
622
+ # items.query(:hash_value => "abc123")
623
623
  #
624
- # # get only the colors attribute of each item
625
- # items.query(
626
- # :hash_value => "abc123",
627
- # :select => [:colors])
624
+ # # get only the colors attribute of each item
625
+ # items.query(
626
+ # :hash_value => "abc123",
627
+ # :select => [:colors])
628
628
  #
629
- # # find only the items where the range key is between two values
630
- # items.query(
631
- # :hash_value => "abc123",
632
- # :range_value => 1..100
633
- # )
629
+ # # find only the items where the range key is between two values
630
+ # items.query(
631
+ # :hash_value => "abc123",
632
+ # :range_value => 1..100
633
+ # )
634
634
  #
635
635
  # @note This method is only valid for tables with a composite
636
636
  # primary key.
637
637
  #
638
- # @param [Hash] options Options for the query. +:hash_value+ is
638
+ # @param [Hash] options Options for the query. `:hash_value` is
639
639
  # required. Only one of the following options may be set:
640
640
  #
641
- # * +:range_value+
642
- # * +:range_greater_than+
643
- # * +:range_less_than+
644
- # * +:range_gte+
645
- # * +:range_lte+
646
- # * +:range_begins_with+
641
+ # * `:range_value`
642
+ # * `:range_greater_than`
643
+ # * `:range_less_than`
644
+ # * `:range_gte`
645
+ # * `:range_lte`
646
+ # * `:range_begins_with`
647
647
  #
648
648
  # @option [Boolean] :scan_index_forward (true) Specifies which
649
649
  # order records will be returned. Defaults to returning them
@@ -653,11 +653,11 @@ module AWS
653
653
  # objects without any attribute data. If you want to select
654
654
  # specific attributes, pass a list of them to :select.
655
655
  #
656
- # :select => [:id, :category, :size]
656
+ # :select => [:id, :category, :size]
657
657
  #
658
- # If you want to select ALL attributes, pass the symbol +:all+
658
+ # If you want to select ALL attributes, pass the symbol `:all`
659
659
  #
660
- # :select => :all
660
+ # :select => :all
661
661
  #
662
662
  # @option options [String, Numeric] :hash_value Attribute value
663
663
  # of the hash component of the composite primary key.
@@ -665,7 +665,7 @@ module AWS
665
665
  # @option options [Array<String, Symbol>, String, Symbol] :select
666
666
  # Attribute name or names to retrieve. When this option is
667
667
  # set, the returned or yielded items will be instances of
668
- # {ItemData} instead of {Item}. The special value +:all+
668
+ # {ItemData} instead of {Item}. The special value `:all`
669
669
  # indicates that all attributes should be retrieved and
670
670
  # returned in ItemData instances.
671
671
  #
@@ -16,7 +16,7 @@ module AWS
16
16
 
17
17
  # Represents a DynamoDB table.
18
18
  #
19
- # == Working with Tables
19
+ # ## Working with Tables
20
20
  #
21
21
  # Dynamo DB allows you to organize data into tables. Tables have a
22
22
  # unique name and a key schema. A key schema is comprised of a
@@ -27,47 +27,47 @@ module AWS
27
27
  # by the scale of a single box. You can reserve the required throughput
28
28
  # by specifying a number of reads and writes per second to support.
29
29
  #
30
- # == Creating a Table
30
+ # ## Creating a Table
31
31
  #
32
32
  # To get started you can create a table by supplying a name
33
33
  # and the read/write capacity. A default schema with a hash_key
34
34
  # of :id => :string will be provided.
35
35
  #
36
- # dynamo_db = AWS::DynamoDB.new
37
- # dynamo_db.tables.create('mytable', 10, 5)
36
+ # dynamo_db = AWS::DynamoDB.new
37
+ # dynamo_db.tables.create('mytable', 10, 5)
38
38
  #
39
39
  # You can provide your own hash key and optional range key.
40
40
  #
41
- # dynamo_db.tables.create('comments', 10, 5,
42
- # :hash_key => { :blog_post_id => :number },
43
- # :range_key => { :comment_id => :number }
44
- # )
41
+ # dynamo_db.tables.create('comments', 10, 5,
42
+ # :hash_key => { :blog_post_id => :number },
43
+ # :range_key => { :comment_id => :number }
44
+ # )
45
45
  #
46
- # == Provisioning Throughput
46
+ # ## Provisioning Throughput
47
47
  #
48
48
  # You must specify the desired read and write capacity when
49
49
  # creating a table. After a table is created you can see what has
50
50
  # been provisioned.
51
51
  #
52
- # table.read_capacity_units #=> 10
53
- # table.write_capacity_units #=> 5
52
+ # table.read_capacity_units #=> 10
53
+ # table.write_capacity_units #=> 5
54
54
  #
55
55
  # To change these values, call {#provision_throughput}:
56
56
  #
57
- # table.provision_throughput :read_capacity_units => 100, :write_capacity_units => 100
57
+ # table.provision_throughput :read_capacity_units => 100, :write_capacity_units => 100
58
58
  #
59
59
  # Please note that provisioned throughput can be decreased only once
60
60
  # within a 24 hour period.
61
61
  #
62
- # == Table Status
62
+ # ## Table Status
63
63
  #
64
64
  # When you create or update a table the changes can take some time to
65
65
  # apply. You can query the status of your table at any time:
66
66
  #
67
- # # creating a table can be a *very* slow operation
68
- # table = dynamo_db.tables.create('mytable')
69
- # sleep 1 while table.status == :creating
70
- # table.status #=> :active
67
+ # # creating a table can be a *very* slow operation
68
+ # table = dynamo_db.tables.create('mytable')
69
+ # sleep 1 while table.status == :creating
70
+ # table.status #=> :active
71
71
  #
72
72
  # @attr_reader [Time] created_at When the table was first creatd.
73
73
  #
@@ -156,7 +156,7 @@ module AWS
156
156
  # @option options [Integer] :write_capacity_units
157
157
  #
158
158
  # @return [Hash] Returns a hash with the current throughput
159
- # provisioning (+:read_capacity_units+ and +:write_capacity_units+).
159
+ # provisioning (`:read_capacity_units` and `:write_capacity_units`).
160
160
  #
161
161
  def provision_throughput options = {}
162
162
 
@@ -236,9 +236,9 @@ module AWS
236
236
  # This is the preferred way to load the table schema so that it
237
237
  # can be used to work with DynamoDB items.
238
238
  #
239
- # # these are equivalent:
240
- # table.hash_key = [:id, :string]
241
- # table.hash_key = { :id => :string }
239
+ # # these are equivalent:
240
+ # table.hash_key = [:id, :string]
241
+ # table.hash_key = { :id => :string }
242
242
  #
243
243
  # @note For tables with composite primary keys, you must call
244
244
  # this method first followed by {#range_key=} to configure the
@@ -247,7 +247,7 @@ module AWS
247
247
  # @param description A description of the hash key element. If
248
248
  # this is a hash, it may contain a single mapping; the key is
249
249
  # the name of the hash key attribute and the value is the type
250
- # (+:string+, +:number+ or +:binary+). If it is an array, the first
250
+ # (`:string`, `:number` or `:binary`). If it is an array, the first
251
251
  # element is the name and the second element is the type.
252
252
  #
253
253
  def hash_key= description
@@ -262,14 +262,14 @@ module AWS
262
262
  # be called after {#hash_key=} has been used to configure the
263
263
  # hash key element.
264
264
  #
265
- # # these are equivalent:
266
- # table.range_key = [:id, :string]
267
- # table.range_key = { :id => :string }
265
+ # # these are equivalent:
266
+ # table.range_key = [:id, :string]
267
+ # table.range_key = { :id => :string }
268
268
  #
269
269
  # @param description A description of the range key element. If
270
270
  # this is a hash, it may contain a single mapping; the key is
271
271
  # the name of the hash key attribute and the value is the type
272
- # (+:string+, +:number+ or +:binary+). If it is an array, the first
272
+ # (`:string`, `:number` or `:binary`). If it is an array, the first
273
273
  # element is the name and the second element is the type.
274
274
  #
275
275
  def range_key= description
@@ -282,7 +282,7 @@ module AWS
282
282
  end
283
283
 
284
284
  # Deletes a table and all of its items. The table must be in an
285
- # +:active+ state (see {#status}).
285
+ # `:active` state (see {#status}).
286
286
  #
287
287
  # @return [nil]
288
288
  #
@@ -298,7 +298,7 @@ module AWS
298
298
  end
299
299
 
300
300
  # @return [Boolean] Returns true if the table exists. Note that a table
301
- # exists even when it is in a +:deleting+ state; this method
301
+ # exists even when it is in a `:deleting` state; this method
302
302
  # only returns false when DynamoDB no longer returns any
303
303
  # information about the table.
304
304
  def exists?
@@ -315,43 +315,43 @@ module AWS
315
315
  #
316
316
  # You can call this method in two forms:
317
317
  #
318
- # # block form
319
- # table.batch_get(:all, items) do |attributes|
320
- # # yeilds one hash of attribute names/values for each item
321
- # puts attributes.to_yaml
322
- # end
318
+ # # block form
319
+ # table.batch_get(:all, items) do |attributes|
320
+ # # yeilds one hash of attribute names/values for each item
321
+ # puts attributes.to_yaml
322
+ # end
323
323
  #
324
- # # enumerable return value
325
- # attribute_hashes = table.batch_get(:all, items)
326
- # attribute_hashes.each do |attributes|
327
- # # ...
328
- # end
324
+ # # enumerable return value
325
+ # attribute_hashes = table.batch_get(:all, items)
326
+ # attribute_hashes.each do |attributes|
327
+ # # ...
328
+ # end
329
329
  #
330
330
  # @note This method does not require the table schema to be loaded.
331
331
  #
332
- # == Attributes
332
+ # ## Attributes
333
333
  #
334
334
  # You can specify the list of attributes to request in 3 ways:
335
335
  #
336
- # * The symbol +:all+ (to recieve all attributes)
336
+ # * The symbol `:all` (to recieve all attributes)
337
337
  # * A single attribute name (e.g. 'size')
338
338
  # * An array of attribute names (e.g. ['size', 'color'])
339
339
  #
340
340
  # A few exmaples:
341
341
  #
342
- # # get all attributes
343
- # table.batch_get(:all, items)
342
+ # # get all attributes
343
+ # table.batch_get(:all, items)
344
344
  #
345
- # # only get the 'color' attribute
346
- # table.batch_get('color', items)
345
+ # # only get the 'color' attribute
346
+ # table.batch_get('color', items)
347
347
  #
348
- # # get 'color' and 'size' attributes
349
- # table.batch_get(['color', size'], items)
348
+ # # get 'color' and 'size' attributes
349
+ # table.batch_get(['color', size'], items)
350
350
  #
351
- # == Items
351
+ # ## Items
352
352
  #
353
353
  # You must specify an array of items to fetch attributes for.
354
- # The +items+ param should always be an array with:
354
+ # The `items` param should always be an array with:
355
355
  #
356
356
  # * String hash key values
357
357
  # * Arrays of string hash key and range key values
@@ -359,41 +359,41 @@ module AWS
359
359
  #
360
360
  # Here are a few examples:
361
361
  #
362
- # # items as a list of hash key values
363
- # items = %w(hashkey1 hashkey2 hashkey3)
364
- # table.batch_get(:all, items)
362
+ # # items as a list of hash key values
363
+ # items = %w(hashkey1 hashkey2 hashkey3)
364
+ # table.batch_get(:all, items)
365
365
  #
366
- # # items as a list of hash and range key values
367
- # items = [['hashkey1', 'rangekey2'], ['hashkey1', 'rangekey2']]
368
- # table.batch_get(:all, items)
366
+ # # items as a list of hash and range key values
367
+ # items = [['hashkey1', 'rangekey2'], ['hashkey1', 'rangekey2']]
368
+ # table.batch_get(:all, items)
369
369
  #
370
- # # items as a list of Item objects
371
- # items = []
372
- # items << Item.new(table, 'hashkey1')
373
- # items << Item.new(table, 'hashkey2')
374
- # table.batch_get(:all, items)
370
+ # # items as a list of Item objects
371
+ # items = []
372
+ # items << Item.new(table, 'hashkey1')
373
+ # items << Item.new(table, 'hashkey2')
374
+ # table.batch_get(:all, items)
375
375
  #
376
376
  # Please note that you must provide both hash and range keys for tables
377
377
  # that include a range key in the schema.
378
378
  #
379
379
  # @param [:all, String, Array<String>] attributes The list of
380
- # attributes you want to fetch for each item. +attributes+ may be:
380
+ # attributes you want to fetch for each item. `attributes` may be:
381
381
  #
382
- # * the symbol +:all+
383
- # * a single attribute name string
384
- # * an array of attribute name strings
382
+ # * the symbol `:all`
383
+ # * a single attribute name string
384
+ # * an array of attribute name strings
385
385
  #
386
386
  # @param [Mixed] items A list of 2 or more items to fetch attributes
387
- # for. You may provide +items+ as:
387
+ # for. You may provide `items` as:
388
388
  #
389
- # * an array of hash key value strings
390
- # * an array of hash and range key value pairs (nested arrays)
391
- # * an array of {Item} objects
389
+ # * an array of hash key value strings
390
+ # * an array of hash and range key value pairs (nested arrays)
391
+ # * an array of {Item} objects
392
392
  #
393
393
  # @param [Hash] options
394
394
  #
395
- # @option options [Boolean] :consistent_read (false) When +true+, items
396
- # are read from this table with consistent reads. When +false+, reads
395
+ # @option options [Boolean] :consistent_read (false) When `true`, items
396
+ # are read from this table with consistent reads. When `false`, reads
397
397
  # are eventually consistent.
398
398
  #
399
399
  # @yield [Hash] Yields a hash of attributes for each item.
@@ -410,11 +410,11 @@ module AWS
410
410
 
411
411
  # Batch puts up to 25 items to this table.
412
412
  #
413
- # table.batch_put([
414
- # { :id => 'id1', :color => 'red' },
415
- # { :id => 'id2', :color => 'blue' },
416
- # { :id => 'id3', :color => 'green' },
417
- # ])
413
+ # table.batch_put([
414
+ # { :id => 'id1', :color => 'red' },
415
+ # { :id => 'id2', :color => 'blue' },
416
+ # { :id => 'id3', :color => 'green' },
417
+ # ])
418
418
  #
419
419
  # @param [Array<Hash>] items A list of item attributes to put.
420
420
  # The hash must contain the table hash key element and range key
@@ -431,14 +431,14 @@ module AWS
431
431
  # Batch writes up to 25 items to this table. A batch may contain
432
432
  # a mix of items to put and items to delete.
433
433
  #
434
- # table.batch_write(
435
- # :put => [
436
- # { :id => 'id1', :color => 'red' },
437
- # { :id => 'id2', :color => 'blue' },
438
- # { :id => 'id3', :color => 'green' },
439
- # ],
440
- # :delete => ['id4', 'id5']
441
- # )
434
+ # table.batch_write(
435
+ # :put => [
436
+ # { :id => 'id1', :color => 'red' },
437
+ # { :id => 'id2', :color => 'blue' },
438
+ # { :id => 'id3', :color => 'green' },
439
+ # ],
440
+ # :delete => ['id4', 'id5']
441
+ # )
442
442
  #
443
443
  # @param [Hash] options
444
444
  #
@@ -454,18 +454,18 @@ module AWS
454
454
 
455
455
  # Delete up to 25 items in a single batch.
456
456
  #
457
- # table.batch_delete(%w(id1 id2 id3 id4 id5))
457
+ # table.batch_delete(%w(id1 id2 id3 id4 id5))
458
458
  #
459
459
  # @param [Array<String>,Array<Array>] items A list of item keys to
460
460
  # delete. For tables without a range key, items should be an array
461
461
  # of hash key strings.
462
462
  #
463
- # batch.delete('table-name', ['hk1', 'hk2', 'hk3'])
463
+ # batch.delete('table-name', ['hk1', 'hk2', 'hk3'])
464
464
  #
465
465
  # For tables with a range key, items should be an array of
466
466
  # hash key and range key pairs.
467
467
  #
468
- # batch.delete('table-name', [['hk1', 'rk1'], ['hk1', 'rk2']])
468
+ # batch.delete('table-name', [['hk1', 'rk1'], ['hk1', 'rk2']])
469
469
  #
470
470
  # @return (see BatchWrite#process!)
471
471
  #