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
@@ -27,53 +27,53 @@ module AWS
27
27
  # @!method delete_identity(options = {})
28
28
  # Calls the DeleteIdentity API operation.
29
29
  # @param [Hash] options
30
- # * +:identity+ - *required* - (String) The identity to be removed from
30
+ # * `:identity` - *required* - (String) The identity to be removed from
31
31
  # the list of identities for the AWS Account.
32
32
  # @return [Core::Response]
33
33
 
34
34
  # @!method delete_verified_email_address(options = {})
35
35
  # Calls the DeleteVerifiedEmailAddress API operation.
36
36
  # @param [Hash] options
37
- # * +:email_address+ - *required* - (String) An email address to be
37
+ # * `:email_address` - *required* - (String) An email address to be
38
38
  # removed from the list of verified addresses.
39
39
  # @return [Core::Response]
40
40
 
41
41
  # @!method get_identity_dkim_attributes(options = {})
42
42
  # Calls the GetIdentityDkimAttributes API operation.
43
43
  # @param [Hash] options
44
- # * +:identities+ - *required* - (Array<String>) A list of one or more
44
+ # * `:identities` - *required* - (Array<String>) A list of one or more
45
45
  # verified identities - email addresses, domains, or both.
46
46
  # @return [Core::Response]
47
47
  # The #data method of the response object returns
48
48
  # a hash with the following structure:
49
- # * +:dkim_attributes+ - (Hash<String,Hash>)
50
- # * +:dkim_enabled+ - (Boolean)
51
- # * +:dkim_verification_status+ - (String)
52
- # * +:dkim_tokens+ - (Array<String>)
49
+ # * `:dkim_attributes` - (Hash<String,Hash>)
50
+ # * `:dkim_enabled` - (Boolean)
51
+ # * `:dkim_verification_status` - (String)
52
+ # * `:dkim_tokens` - (Array<String>)
53
53
 
54
54
  # @!method get_identity_notification_attributes(options = {})
55
55
  # Calls the GetIdentityNotificationAttributes API operation.
56
56
  # @param [Hash] options
57
- # * +:identities+ - *required* - (Array<String>) A list of one or more
57
+ # * `:identities` - *required* - (Array<String>) A list of one or more
58
58
  # identities.
59
59
  # @return [Core::Response]
60
60
  # The #data method of the response object returns
61
61
  # a hash with the following structure:
62
- # * +:notification_attributes+ - (Hash<String,Hash>)
63
- # * +:bounce_topic+ - (String)
64
- # * +:complaint_topic+ - (String)
65
- # * +:forwarding_enabled+ - (Boolean)
62
+ # * `:notification_attributes` - (Hash<String,Hash>)
63
+ # * `:bounce_topic` - (String)
64
+ # * `:complaint_topic` - (String)
65
+ # * `:forwarding_enabled` - (Boolean)
66
66
 
67
67
  # @!method get_identity_verification_attributes(options = {})
68
68
  # Calls the GetIdentityVerificationAttributes API operation.
69
69
  # @param [Hash] options
70
- # * +:identities+ - *required* - (Array<String>) A list of identities.
70
+ # * `:identities` - *required* - (Array<String>) A list of identities.
71
71
  # @return [Core::Response]
72
72
  # The #data method of the response object returns
73
73
  # a hash with the following structure:
74
- # * +:verification_attributes+ - (Hash<String,Hash>)
75
- # * +:verification_status+ - (String)
76
- # * +:verification_token+ - (String)
74
+ # * `:verification_attributes` - (Hash<String,Hash>)
75
+ # * `:verification_status` - (String)
76
+ # * `:verification_token` - (String)
77
77
 
78
78
  # @!method get_send_quota(options = {})
79
79
  # Calls the GetSendQuota API operation.
@@ -81,9 +81,9 @@ module AWS
81
81
  # @return [Core::Response]
82
82
  # The #data method of the response object returns
83
83
  # a hash with the following structure:
84
- # * +:max_24_hour_send+ - (Numeric)
85
- # * +:max_send_rate+ - (Numeric)
86
- # * +:sent_last_24_hours+ - (Numeric)
84
+ # * `:max_24_hour_send` - (Numeric)
85
+ # * `:max_send_rate` - (Numeric)
86
+ # * `:sent_last_24_hours` - (Numeric)
87
87
 
88
88
  # @!method get_send_statistics(options = {})
89
89
  # Calls the GetSendStatistics API operation.
@@ -91,27 +91,30 @@ module AWS
91
91
  # @return [Core::Response]
92
92
  # The #data method of the response object returns
93
93
  # a hash with the following structure:
94
- # * +:send_data_points+ - (Array<Hash>)
95
- # * +:timestamp+ - (Time)
96
- # * +:delivery_attempts+ - (Integer)
97
- # * +:bounces+ - (Integer)
98
- # * +:complaints+ - (Integer)
99
- # * +:rejects+ - (Integer)
94
+ # * `:send_data_points` - (Array<Hash>)
95
+ # * `:timestamp` - (Time)
96
+ # * `:delivery_attempts` - (Integer)
97
+ # * `:bounces` - (Integer)
98
+ # * `:complaints` - (Integer)
99
+ # * `:rejects` - (Integer)
100
100
 
101
101
  # @!method list_identities(options = {})
102
102
  # Calls the ListIdentities API operation.
103
103
  # @param [Hash] options
104
- # * +:identity_type+ - (String) The type of the identities to list.
104
+ # * `:identity_type` - (String) The type of the identities to list.
105
105
  # Possible values are "EmailAddress" and "Domain". If this parameter
106
- # is omitted, then all identities will be listed.
107
- # * +:next_token+ - (String) The token to use for pagination.
108
- # * +:max_items+ - (Integer) The maximum number of identities per page.
106
+ # is omitted, then all identities will be listed. Valid values
107
+ # include:
108
+ # * `EmailAddress`
109
+ # * `Domain`
110
+ # * `:next_token` - (String) The token to use for pagination.
111
+ # * `:max_items` - (Integer) The maximum number of identities per page.
109
112
  # Possible values are 1-100 inclusive.
110
113
  # @return [Core::Response]
111
114
  # The #data method of the response object returns
112
115
  # a hash with the following structure:
113
- # * +:identities+ - (Array<String>)
114
- # * +:next_token+ - (String)
116
+ # * `:identities` - (Array<String>)
117
+ # * `:next_token` - (String)
115
118
 
116
119
  # @!method list_verified_email_addresses(options = {})
117
120
  # Calls the ListVerifiedEmailAddresses API operation.
@@ -119,45 +122,45 @@ module AWS
119
122
  # @return [Core::Response]
120
123
  # The #data method of the response object returns
121
124
  # a hash with the following structure:
122
- # * +:verified_email_addresses+ - (Array<String>)
125
+ # * `:verified_email_addresses` - (Array<String>)
123
126
 
124
127
  # @!method send_email(options = {})
125
128
  # Calls the SendEmail API operation.
126
129
  # @param [Hash] options
127
- # * +:source+ - *required* - (String) The identity's email address.
128
- # * +:destination+ - *required* - (Hash) The destination for this
130
+ # * `:source` - *required* - (String) The identity's email address.
131
+ # * `:destination` - *required* - (Hash) The destination for this
129
132
  # email, composed of To:, CC:, and BCC: fields.
130
- # * +:to_addresses+ - (Array<String>) The To: field(s) of the
133
+ # * `:to_addresses` - (Array<String>) The To: field(s) of the
131
134
  # message.
132
- # * +:cc_addresses+ - (Array<String>) The CC: field(s) of the
135
+ # * `:cc_addresses` - (Array<String>) The CC: field(s) of the
133
136
  # message.
134
- # * +:bcc_addresses+ - (Array<String>) The BCC: field(s) of the
137
+ # * `:bcc_addresses` - (Array<String>) The BCC: field(s) of the
135
138
  # message.
136
- # * +:message+ - *required* - (Hash) The message to be sent.
137
- # * +:subject+ - *required* - (Hash) The subject of the message: A
139
+ # * `:message` - *required* - (Hash) The message to be sent.
140
+ # * `:subject` - *required* - (Hash) The subject of the message: A
138
141
  # short summary of the content, which will appear in the
139
142
  # recipient's inbox.
140
- # * +:data+ - *required* - (String) The textual data of the
143
+ # * `:data` - *required* - (String) The textual data of the
141
144
  # content.
142
- # * +:charset+ - (String) The character set of the content.
143
- # * +:body+ - *required* - (Hash) The message body.
144
- # * +:text+ - (Hash) The content of the message, in text format.
145
+ # * `:charset` - (String) The character set of the content.
146
+ # * `:body` - *required* - (Hash) The message body.
147
+ # * `:text` - (Hash) The content of the message, in text format.
145
148
  # Use this for text-based email clients, or clients on
146
149
  # high-latency networks (such as mobile devices).
147
- # * +:data+ - *required* - (String) The textual data of the
150
+ # * `:data` - *required* - (String) The textual data of the
148
151
  # content.
149
- # * +:charset+ - (String) The character set of the content.
150
- # * +:html+ - (Hash) The content of the message, in HTML format.
152
+ # * `:charset` - (String) The character set of the content.
153
+ # * `:html` - (Hash) The content of the message, in HTML format.
151
154
  # Use this for email clients that can process HTML. You can
152
155
  # include clickable links, formatted text, and much more in an
153
156
  # HTML message.
154
- # * +:data+ - *required* - (String) The textual data of the
157
+ # * `:data` - *required* - (String) The textual data of the
155
158
  # content.
156
- # * +:charset+ - (String) The character set of the content.
157
- # * +:reply_to_addresses+ - (Array<String>) The reply-to email
159
+ # * `:charset` - (String) The character set of the content.
160
+ # * `:reply_to_addresses` - (Array<String>) The reply-to email
158
161
  # address(es) for the message. If the recipient replies to the
159
162
  # message, each reply-to address will receive the reply.
160
- # * +:return_path+ - (String) The email address to which bounce
163
+ # * `:return_path` - (String) The email address to which bounce
161
164
  # notifications are to be forwarded. If the message cannot be
162
165
  # delivered to the recipient, then an error message will be returned
163
166
  # from the recipient's ISP; this message will then be forwarded to
@@ -165,19 +168,19 @@ module AWS
165
168
  # @return [Core::Response]
166
169
  # The #data method of the response object returns
167
170
  # a hash with the following structure:
168
- # * +:message_id+ - (String)
171
+ # * `:message_id` - (String)
169
172
 
170
173
  # @!method send_raw_email(options = {})
171
174
  # Calls the SendRawEmail API operation.
172
175
  # @param [Hash] options
173
- # * +:source+ - (String) The identity's email address. If you specify
176
+ # * `:source` - (String) The identity's email address. If you specify
174
177
  # the Source parameter, then bounce notifications and complaints will
175
178
  # be sent to this email address. This takes precedence over any
176
179
  # Return-Path header that you might include in the raw text of the
177
180
  # message.
178
- # * +:destinations+ - (Array<String>) A list of destinations for the
181
+ # * `:destinations` - (Array<String>) A list of destinations for the
179
182
  # message.
180
- # * +:raw_message+ - *required* - (Hash) The raw text of the message.
183
+ # * `:raw_message` - *required* - (Hash) The raw text of the message.
181
184
  # The client is responsible for ensuring the following: Message must
182
185
  # contain a header and a body, separated by a blank line. All
183
186
  # required header fields must be present. Each part of a multipart
@@ -185,7 +188,7 @@ module AWS
185
188
  # among those supported by Amazon SES. Refer to the Amazon SES
186
189
  # Developer Guide for more details. Content must be base64-encoded,
187
190
  # if MIME requires it.
188
- # * +:data+ - *required* - (String) The raw data of the message. The
191
+ # * `:data` - *required* - (String) The raw data of the message. The
189
192
  # client must ensure that the message format complies with Internet
190
193
  # email standards regarding email header fields, MIME types, MIME
191
194
  # encoding, and base64 encoding (if necessary). For more
@@ -193,77 +196,80 @@ module AWS
193
196
  # @return [Core::Response]
194
197
  # The #data method of the response object returns
195
198
  # a hash with the following structure:
196
- # * +:message_id+ - (String)
199
+ # * `:message_id` - (String)
197
200
 
198
201
  # @!method set_identity_dkim_enabled(options = {})
199
202
  # Calls the SetIdentityDkimEnabled API operation.
200
203
  # @param [Hash] options
201
- # * +:identity+ - *required* - (String) The identity for which DKIM
204
+ # * `:identity` - *required* - (String) The identity for which DKIM
202
205
  # signing should be enabled or disabled.
203
- # * +:dkim_enabled+ - *required* - (Boolean) Sets whether DKIM signing
204
- # is enabled for an identity. Set to +true+ to enable DKIM signing
205
- # for this identity; +false+ to disable it.
206
+ # * `:dkim_enabled` - *required* - (Boolean) Sets whether DKIM signing
207
+ # is enabled for an identity. Set to `true` to enable DKIM signing
208
+ # for this identity; `false` to disable it.
206
209
  # @return [Core::Response]
207
210
 
208
211
  # @!method set_identity_feedback_forwarding_enabled(options = {})
209
212
  # Calls the SetIdentityFeedbackForwardingEnabled API operation.
210
213
  # @param [Hash] options
211
- # * +:identity+ - *required* - (String) The identity for which to set
214
+ # * `:identity` - *required* - (String) The identity for which to set
212
215
  # feedback notification forwarding. Examples: user@example.com,
213
216
  # example.com.
214
- # * +:forwarding_enabled+ - *required* - (Boolean) Sets whether Amazon
215
- # SES will forward feedback notifications as email. +true+ specifies
217
+ # * `:forwarding_enabled` - *required* - (Boolean) Sets whether Amazon
218
+ # SES will forward feedback notifications as email. `true` specifies
216
219
  # that Amazon SES will forward feedback notifications as email, in
217
220
  # addition to any Amazon SNS topic publishing otherwise specified.
218
- # +false+ specifies that Amazon SES will publish feedback
221
+ # `false` specifies that Amazon SES will publish feedback
219
222
  # notifications only through Amazon SNS. This value can only be set
220
- # to +false+ when topics are specified for both Bounce and Complaint
223
+ # to `false` when topics are specified for both Bounce and Complaint
221
224
  # topic types.
222
225
  # @return [Core::Response]
223
226
 
224
227
  # @!method set_identity_notification_topic(options = {})
225
228
  # Calls the SetIdentityNotificationTopic API operation.
226
229
  # @param [Hash] options
227
- # * +:identity+ - *required* - (String) The identity for which the
230
+ # * `:identity` - *required* - (String) The identity for which the
228
231
  # topic will be set. Examples: user@example.com, example.com.
229
- # * +:notification_type+ - *required* - (String) The type of feedback
230
- # notifications that will be published to the specified topic.
231
- # * +:sns_topic+ - (String) The Amazon Resource Name (ARN) of the
232
+ # * `:notification_type` - *required* - (String) The type of feedback
233
+ # notifications that will be published to the specified topic. Valid
234
+ # values include:
235
+ # * `Bounce`
236
+ # * `Complaint`
237
+ # * `:sns_topic` - (String) The Amazon Resource Name (ARN) of the
232
238
  # Amazon Simple Notification Service (Amazon SNS) topic. If the
233
- # parameter is omitted from the request or a null value is passed,
239
+ # parameter is ommited from the request or a null value is passed,
234
240
  # the topic is cleared and publishing is disabled.
235
241
  # @return [Core::Response]
236
242
 
237
243
  # @!method verify_domain_dkim(options = {})
238
244
  # Calls the VerifyDomainDkim API operation.
239
245
  # @param [Hash] options
240
- # * +:domain+ - *required* - (String) The name of the domain to be
246
+ # * `:domain` - *required* - (String) The name of the domain to be
241
247
  # verified for Easy DKIM signing.
242
248
  # @return [Core::Response]
243
249
  # The #data method of the response object returns
244
250
  # a hash with the following structure:
245
- # * +:dkim_tokens+ - (Array<String>)
251
+ # * `:dkim_tokens` - (Array<String>)
246
252
 
247
253
  # @!method verify_domain_identity(options = {})
248
254
  # Calls the VerifyDomainIdentity API operation.
249
255
  # @param [Hash] options
250
- # * +:domain+ - *required* - (String) The domain to be verified.
256
+ # * `:domain` - *required* - (String) The domain to be verified.
251
257
  # @return [Core::Response]
252
258
  # The #data method of the response object returns
253
259
  # a hash with the following structure:
254
- # * +:verification_token+ - (String)
260
+ # * `:verification_token` - (String)
255
261
 
256
262
  # @!method verify_email_address(options = {})
257
263
  # Calls the VerifyEmailAddress API operation.
258
264
  # @param [Hash] options
259
- # * +:email_address+ - *required* - (String) The email address to be
265
+ # * `:email_address` - *required* - (String) The email address to be
260
266
  # verified.
261
267
  # @return [Core::Response]
262
268
 
263
269
  # @!method verify_email_identity(options = {})
264
270
  # Calls the VerifyEmailIdentity API operation.
265
271
  # @param [Hash] options
266
- # * +:email_address+ - *required* - (String) The email address to be
272
+ # * `:email_address` - *required* - (String) The email address to be
267
273
  # verified.
268
274
  # @return [Core::Response]
269
275
 
@@ -13,7 +13,6 @@
13
13
 
14
14
  AWS::Core::Configuration.module_eval do
15
15
 
16
- add_service 'SimpleEmailService', 'simple_email_service',
17
- 'email.us-east-1.amazonaws.com'
16
+ add_service 'SimpleEmailService', 'simple_email_service', 'email.%s.amazonaws.com'
18
17
 
19
18
  end
@@ -15,7 +15,7 @@ module AWS
15
15
  class SimpleEmailService
16
16
 
17
17
  # Helps you manage your verified SimpleEmailService email addresses.
18
- # @note This class is deprecated. Please use
18
+ # @note This class is deprecated. Please use
19
19
  # {SimpleEmailService#identities} instead.
20
20
  class EmailAddressCollection
21
21
 
@@ -23,8 +23,8 @@ module AWS
23
23
  include Enumerable
24
24
 
25
25
  # Requests for an email address to be verified. An email will be
26
- # sent to the given +email_address+ with a link to click. Once
27
- # the link has been followed the +email_address+ will be verified.
26
+ # sent to the given `email_address` with a link to click. Once
27
+ # the link has been followed the `email_address` will be verified.
28
28
  #
29
29
  # @param [String] email_address The email address to verify.
30
30
  # @return [nil]
@@ -22,15 +22,15 @@ module AWS
22
22
  #
23
23
  # @attr [String] complaint_topic_arn
24
24
  #
25
- # @attr [Boolean] forwarding_enabled When +false+, complaint and bounce
25
+ # @attr [Boolean] forwarding_enabled When `false`, complaint and bounce
26
26
  # notifications will not be forwarded via email. Can only be set to
27
- # +false+ when there is both a +bounce_topic+ and +complaint_topic+.
27
+ # `false` when there is both a `bounce_topic` and `complaint_topic`.
28
28
  #
29
- # @attr [Boolean] dkim_enabled When set to +true+, Easy DKIM signing will
29
+ # @attr [Boolean] dkim_enabled When set to `true`, Easy DKIM signing will
30
30
  # be enabled for email sent from this identity.
31
31
  #
32
32
  # @attr_reader [Array<String>] dkim_tokens Returns a set of DNS records,
33
- # or tokens, that must be published in the domain name's DNS to
33
+ # or tokens, that must be published in the domain name's DNS to
34
34
  # complete the DKIM verification process. Call {#verify_dkim} if this
35
35
  # returns an empty list.
36
36
  #
@@ -124,25 +124,25 @@ module AWS
124
124
  end
125
125
  end
126
126
 
127
- # @return [Boolean] Returns +true+ if this {Identity} represents an
127
+ # @return [Boolean] Returns `true` if this {Identity} represents an
128
128
  # email address.
129
129
  def email_address?
130
130
  identity.match(/@/) ? true : false
131
131
  end
132
132
 
133
- # @return [Boolean] Returns +true+ if this {Identity} represents a
133
+ # @return [Boolean] Returns `true` if this {Identity} represents a
134
134
  # domain.
135
135
  def domain?
136
136
  !email_address?
137
137
  end
138
138
 
139
- # @return [Boolean] Returns +true+ if this email address/domain has
139
+ # @return [Boolean] Returns `true` if this email address/domain has
140
140
  # been verified.
141
141
  def verified?
142
142
  verification_status == 'Success'
143
143
  end
144
144
 
145
- # @return [Boolean] Returns +true+ if verification for this email
145
+ # @return [Boolean] Returns `true` if verification for this email
146
146
  # address/domain is still pending.
147
147
  def pending?
148
148
  verification_status == 'Pending'
@@ -25,13 +25,13 @@ module AWS
25
25
  to_h[:max_24_hour_send]
26
26
  end
27
27
 
28
- # @return [Float] The maximum number of emails the user is allowed
28
+ # @return [Float] The maximum number of emails the user is allowed
29
29
  # to send per second.
30
30
  def max_send_rate
31
31
  to_h[:max_send_rate]
32
32
  end
33
33
 
34
- # @return [Integer] Returns the number of emails sent during the
34
+ # @return [Integer] Returns the number of emails sent during the
35
35
  # previous 24 hours.
36
36
  def sent_last_24_hours
37
37
  to_h[:sent_last_24_hours]
@@ -39,17 +39,19 @@ module AWS
39
39
 
40
40
  # Returns a hash of the SES quotas.
41
41
  #
42
- # @ses.quotas.to_hash
42
+ # @example
43
+ #
44
+ # ses.quotas.to_hash
43
45
  # # {:max_24_hour_send=>200, :max_send_rate=>1.0, :sent_last_24_hours=>22}
44
46
  #
45
- # @return [Hash]
47
+ # @return [Hash]
46
48
  #
47
49
  def to_hash
48
50
  response = client.get_send_quota
49
51
  {
50
52
  :max_24_hour_send => response.max_24_hour_send.to_i,
51
53
  :max_send_rate => response.max_send_rate.to_f,
52
- :sent_last_24_hours => response.sent_last_24_hours.to_i,
54
+ :sent_last_24_hours => response.sent_last_24_hours.to_i,
53
55
  }
54
56
  end
55
57
  alias_method :to_h, :to_hash
@@ -58,7 +60,7 @@ module AWS
58
60
  def inspect
59
61
  "<#{self.class} #{to_hash.inspect}>"
60
62
  end
61
-
63
+
62
64
  end
63
65
  end
64
66
  end
@@ -18,21 +18,21 @@ module AWS
18
18
 
19
19
  # This is the starting point for working with Amazon Simple Workflow Service.
20
20
  #
21
- # = Domains
21
+ # # Domains
22
22
  #
23
- # To get started, you need to first create a domain. Domains are used to
24
- # organize related tasks and activities.
23
+ # To get started, you need to first create a domain. Domains are used to
24
+ # organize related tasks and activities.
25
25
  #
26
- # swf = AWS::SimpleWorkflow.new
26
+ # swf = AWS::SimpleWorkflow.new
27
27
  #
28
- # # name the domain and specify the retention period (in days)
29
- # domain = swf.domains.create('my-domain', 10)
28
+ # # name the domain and specify the retention period (in days)
29
+ # domain = swf.domains.create('my-domain', 10)
30
30
  #
31
31
  # You can reference existing domains as well.
32
32
  #
33
- # domain = swf.domains['my-domain']
33
+ # domain = swf.domains['my-domain']
34
34
  #
35
- # = Workflow and Activity Types
35
+ # # Workflow and Activity Types
36
36
  #
37
37
  # Once you have a domain you can create a workflow and
38
38
  # activity types. Both types (workflow and activity) are templates that
@@ -44,44 +44,44 @@ module AWS
44
44
  # the actual values when starting a workflow execution or scheduling
45
45
  # an activity task.
46
46
  #
47
- # == Sample Workflow type and activity type
48
- #
49
- # # register an workflow type with the version id '1'
50
- # workflow_type = domain.workflow_types.create('my-long-processes', '1',
51
- # :default_task_list => 'my-task-list',
52
- # :default_child_policy => :request_cancel,
53
- # :default_task_start_to_close_timeout => 3600,
54
- # :default_execution_start_to_close_timeout => 24 * 3600)
55
- #
56
- # # register an activity type, with the version id '1'
57
- # activity_type = domain.activity_types.create('do-something', '1',
58
- # :default_task_list => 'my-task-list',
59
- # :default_task_heartbeat_timeout => 900,
60
- # :default_task_schedule_to_start_timeout => 60,
61
- # :default_task_schedule_to_close_timeout => 3660,
62
- # :default_task_start_to_close_timeout => 3600)
63
- #
64
- # = Starting a Workflow Execution
47
+ # ## Sample Workflow type and activity type
48
+ #
49
+ # # register an workflow type with the version id '1'
50
+ # workflow_type = domain.workflow_types.create('my-long-processes', '1',
51
+ # :default_task_list => 'my-task-list',
52
+ # :default_child_policy => :request_cancel,
53
+ # :default_task_start_to_close_timeout => 3600,
54
+ # :default_execution_start_to_close_timeout => 24 * 3600)
55
+ #
56
+ # # register an activity type, with the version id '1'
57
+ # activity_type = domain.activity_types.create('do-something', '1',
58
+ # :default_task_list => 'my-task-list',
59
+ # :default_task_heartbeat_timeout => 900,
60
+ # :default_task_schedule_to_start_timeout => 60,
61
+ # :default_task_schedule_to_close_timeout => 3660,
62
+ # :default_task_start_to_close_timeout => 3600)
63
+ #
64
+ # # Starting a Workflow Execution
65
65
  #
66
66
  # Once you have a domain and at least one workflow type you can
67
67
  # start a workflow execution. You may provide a workflow id, or a
68
68
  # random one will be generated. You may also provide optional
69
- # input and override any of the defaults registered with the
69
+ # input and override any of the defaults registered with the
70
70
  # workflow type.
71
71
  #
72
- # workflow_execution = workflow_type.start_execution :input => '...'
72
+ # workflow_execution = workflow_type.start_execution :input => '...'
73
73
  #
74
- # workflow_execution.workflow_id #=> "5abbdd75-70c7-4af3-a324-742cd29267c2"
75
- # workflow_execution.run_id #=> "325a8c34-d133-479e-9ecf-5a61286d165f"
74
+ # workflow_execution.workflow_id #=> "5abbdd75-70c7-4af3-a324-742cd29267c2"
75
+ # workflow_execution.run_id #=> "325a8c34-d133-479e-9ecf-5a61286d165f"
76
76
  #
77
- # = Decision Tasks
77
+ # # Decision Tasks
78
78
  #
79
79
  # Once a workflow execution has been started, it will start to generate
80
80
  # decision tasks. You poll for decision tasks from a task list.
81
81
  # Yielded decision tasks provide access to the history of events
82
82
  # for the workflow execution. You can also enumerate only new
83
83
  # events since the last decision.
84
- #
84
+ #
85
85
  # To make decisions you call methods from the list below. You can call
86
86
  # any number of decision methods any number of times.
87
87
  #
@@ -101,90 +101,90 @@ module AWS
101
101
  # This sample gets a decision task and responds based on the events
102
102
  # by scheduling an activity task or completing the workflow execution.
103
103
  #
104
- # # poll for decision tasks from 'my-task-list'
105
- # domain.decision_tasks.poll('my-task-list') do |task|
106
- #
107
- # # investigate new events and make decisions
108
- # task.new_events.each do |event|
109
- # case event.event_type
110
- # when 'WorkflowExecutionStarted'
111
- # task.schedule_activity_task 'do-something', :input => 'abc xyz'
112
- # when 'ActivityTaskCompleted'
113
- # task.complete_workflow_execution :result => event.attributes.result
104
+ # # poll for decision tasks from 'my-task-list'
105
+ # domain.decision_tasks.poll('my-task-list') do |task|
106
+ #
107
+ # # investigate new events and make decisions
108
+ # task.new_events.each do |event|
109
+ # case event.event_type
110
+ # when 'WorkflowExecutionStarted'
111
+ # task.schedule_activity_task 'do-something', :input => 'abc xyz'
112
+ # when 'ActivityTaskCompleted'
113
+ # task.complete_workflow_execution :result => event.attributes.result
114
+ # end
114
115
  # end
115
- # end
116
116
  #
117
- # end # decision task is completed here
117
+ # end # decision task is completed here
118
118
  #
119
119
  # When you are done calling decision methods, you need to complete the
120
120
  # decision task. This is done by default if you pass a block to
121
- # +poll+ or +poll_for_single_task+.
121
+ # `poll` or `poll_for_single_task`.
122
122
  #
123
- # = Activity Tasks
123
+ # # Activity Tasks
124
124
  #
125
- # The only way to spawn activity tasks is to call +schedule_activity_task+
125
+ # The only way to spawn activity tasks is to call `schedule_activity_task`
126
126
  # on a decision task. Scheduled activity tasks are returned when you
127
127
  # poll for activity tasks.
128
128
  #
129
- # # poll 'my-task-list' for activities
130
- # domain.activity_tasks.poll('my-task-list') do |activity_task|
129
+ # # poll 'my-task-list' for activities
130
+ # domain.activity_tasks.poll('my-task-list') do |activity_task|
131
+ #
132
+ # case activity_task.activity_type.name
133
+ # when 'do-something'
134
+ # # ...
135
+ # else
136
+ # activity_task.fail! :reason => 'unknown activity task type'
137
+ # end
131
138
  #
132
- # case activity_task.activity_type.name
133
- # when 'do-something'
134
- # # ...
135
- # else
136
- # activity_task.fail! :reason => 'unknown activity task type'
137
139
  # end
138
- #
139
- # end
140
140
  #
141
- # == Activity Task Heartbeats
141
+ # ## Activity Task Heartbeats
142
142
  #
143
143
  # When you receive an activity task, you need to update the service
144
144
  # with status messages. This is called recording a heartbeat.#
145
- # To record a heartbeat, just call {ActivityTask#record_heartbeat!}.
146
- # When you call +record_heartbeat+ you should rescue
145
+ # To record a heartbeat, just call {ActivityTask#record_heartbeat!}.
146
+ # When you call `record_heartbeat` you should rescue
147
147
  # {ActivityTask::CancelRequestedError}. These are thrown when a task
148
- # should be canceled. You can cleanup the task and then call
149
- # +cancel!+ when you are finished.
148
+ # should be canceled. You can cleanup the task and then call
149
+ # `cancel!` when you are finished.
150
150
  #
151
- # # poll 'my-task-list' for activities
152
- # domain.activity_tasks.poll('my-task-list') do |activity_task|
153
- # begin
151
+ # # poll 'my-task-list' for activities
152
+ # domain.activity_tasks.poll('my-task-list') do |activity_task|
153
+ # begin
154
154
  #
155
- # # do stuff ...
155
+ # # do stuff ...
156
156
  #
157
- # activity_task.record_heartbeat! :details => '25%'
157
+ # activity_task.record_heartbeat! :details => '25%'
158
158
  #
159
- # # do more stuff ...
159
+ # # do more stuff ...
160
160
  #
161
- # activity_task.record_heartbeat! :details => '50%'
161
+ # activity_task.record_heartbeat! :details => '50%'
162
162
  #
163
- # # do more stuff ...
163
+ # # do more stuff ...
164
164
  #
165
- # activity_task.record_heartbeat! :details => '75%'
165
+ # activity_task.record_heartbeat! :details => '75%'
166
166
  #
167
- # # do more stuff ...
167
+ # # do more stuff ...
168
168
  #
169
- # rescue ActivityTask::CancelRequestedError
170
- # # cleanup after ourselves
171
- # activity_task.cancel!
169
+ # rescue ActivityTask::CancelRequestedError
170
+ # # cleanup after ourselves
171
+ # activity_task.cancel!
172
+ # end
172
173
  # end
173
- # end
174
- #
175
- # Like decision tasks, activity tasks are auto-completed at the
174
+ #
175
+ # Like decision tasks, activity tasks are auto-completed at the
176
176
  # end of a poll block.
177
177
  #
178
- # = History Events
178
+ # # History Events
179
179
  #
180
180
  # You might want to view the event history for a running workflow
181
181
  # execution. You can get a workflow execution by its workflow
182
182
  # id (you may optionally provide the run id as well).
183
183
  #
184
- # execution = domain.workflow_executions['workflow-id']
185
- # execution.events.each do |event|
186
- # puts event.attributes.to_h.inspect
187
- # end
184
+ # execution = domain.workflow_executions['workflow-id']
185
+ # execution.events.each do |event|
186
+ # puts event.attributes.to_h.inspect
187
+ # end
188
188
  #
189
189
  # See {HistoryEvent} and {HistoryEvent::Attributes} for more information.
190
190
  #
@@ -192,33 +192,33 @@ module AWS
192
192
  # @return [Client] the low-level SimpleWorkflow client object
193
193
  class SimpleWorkflow
194
194
 
195
- AWS.register_autoloads(self, 'aws/simple_workflow') do
196
- autoload :ActivityType, 'activity_type'
197
- autoload :ActivityTypeCollection, 'activity_type_collection'
198
- autoload :ActivityTask, 'activity_task'
199
- autoload :ActivityTaskCollection, 'activity_task_collection'
200
- autoload :Client, 'client'
201
- autoload :Count, 'count'
202
- autoload :DecisionTask, 'decision_task'
203
- autoload :DecisionTaskCollection, 'decision_task_collection'
204
- autoload :Domain, 'domain'
205
- autoload :DomainCollection, 'domain_collection'
206
- autoload :Errors, 'errors'
207
- autoload :HistoryEvent, 'history_event'
208
- autoload :HistoryEventCollection, 'history_event_collection'
209
- autoload :OptionFormatters, 'option_formatters'
210
- autoload :Request, 'request'
211
- autoload :Resource, 'resource'
212
- autoload :Type, 'type'
213
- autoload :TypeCollection, 'type_collection'
214
- autoload :WorkflowExecution, 'workflow_execution'
215
- autoload :WorkflowExecutionCollection, 'workflow_execution_collection'
216
- autoload :WorkflowType, 'workflow_type'
217
- autoload :WorkflowTypeCollection, 'workflow_type_collection'
218
- end
195
+ autoload :ActivityType, 'aws/simple_workflow/activity_type'
196
+ autoload :ActivityTypeCollection, 'aws/simple_workflow/activity_type_collection'
197
+ autoload :ActivityTask, 'aws/simple_workflow/activity_task'
198
+ autoload :ActivityTaskCollection, 'aws/simple_workflow/activity_task_collection'
199
+ autoload :Client, 'aws/simple_workflow/client'
200
+ autoload :Count, 'aws/simple_workflow/count'
201
+ autoload :DecisionTask, 'aws/simple_workflow/decision_task'
202
+ autoload :DecisionTaskCollection, 'aws/simple_workflow/decision_task_collection'
203
+ autoload :Domain, 'aws/simple_workflow/domain'
204
+ autoload :DomainCollection, 'aws/simple_workflow/domain_collection'
205
+ autoload :Errors, 'aws/simple_workflow/errors'
206
+ autoload :HistoryEvent, 'aws/simple_workflow/history_event'
207
+ autoload :HistoryEventCollection, 'aws/simple_workflow/history_event_collection'
208
+ autoload :OptionFormatters, 'aws/simple_workflow/option_formatters'
209
+ autoload :Request, 'aws/simple_workflow/request'
210
+ autoload :Resource, 'aws/simple_workflow/resource'
211
+ autoload :Type, 'aws/simple_workflow/type'
212
+ autoload :TypeCollection, 'aws/simple_workflow/type_collection'
213
+ autoload :WorkflowExecution, 'aws/simple_workflow/workflow_execution'
214
+ autoload :WorkflowExecutionCollection, 'aws/simple_workflow/workflow_execution_collection'
215
+ autoload :WorkflowType, 'aws/simple_workflow/workflow_type'
216
+ autoload :WorkflowTypeCollection, 'aws/simple_workflow/workflow_type_collection'
219
217
 
220
218
  include Core::ServiceInterface
221
219
 
220
+ endpoint_prefix 'swf'
221
+
222
222
  # @return [DomainCollection]
223
223
  def domains
224
224
  DomainCollection.new(:config => config)