aws-sdk 2.0.1 → 2.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (251) hide show
  1. package/.eslintrc +20 -0
  2. package/.gitignore +10 -0
  3. package/.travis.yml +20 -0
  4. package/.yardopts +20 -0
  5. package/.yardopts_guide +21 -0
  6. package/Gemfile +16 -0
  7. package/Gemfile.lock +34 -0
  8. package/README.md +5 -6
  9. package/Rakefile +14 -0
  10. package/UPGRADING.md +9 -4
  11. package/configuration.sample +5 -0
  12. package/dist/BUNDLE_LICENSE.txt +96 -0
  13. package/dist/aws-sdk.js +9594 -0
  14. package/dist/aws-sdk.min.js +21 -0
  15. package/dist-tools/.eslintrc +10 -0
  16. package/dist-tools/browser-builder.js +142 -0
  17. package/dist-tools/strategies/cache.js +68 -0
  18. package/dist-tools/strategies/default.js +165 -0
  19. package/dist-tools/test/browser-builder.mocha.spec.coffee +182 -0
  20. package/dist-tools/test/helpers.coffee +16 -0
  21. package/doc-src/guide/browser-building.md +93 -0
  22. package/doc-src/guide/browser-configuring-wif.md +287 -0
  23. package/doc-src/guide/browser-configuring.md +218 -0
  24. package/doc-src/guide/browser-examples.md +220 -0
  25. package/doc-src/guide/browser-intro.md +46 -0
  26. package/doc-src/guide/browser-making-requests.md +279 -0
  27. package/doc-src/guide/browser-services.md +75 -0
  28. package/doc-src/guide/index.md +41 -0
  29. package/doc-src/guide/node-configuring.md +272 -0
  30. package/doc-src/guide/node-examples.md +341 -0
  31. package/doc-src/guide/node-intro.md +32 -0
  32. package/doc-src/guide/node-making-requests.md +309 -0
  33. package/doc-src/guide/node-services.md +159 -0
  34. package/doc-src/templates/api-versions/model_documentor.rb +366 -0
  35. package/doc-src/templates/api-versions/plugin.rb +230 -0
  36. package/doc-src/templates/api-versions/templates/default/class/html/setup.rb +9 -0
  37. package/doc-src/templates/api-versions/templates/default/class/html/waiter_details_list.erb +7 -0
  38. package/doc-src/templates/api-versions/templates/default/class/html/waiter_summary.erb +7 -0
  39. package/doc-src/templates/api-versions/templates/default/docstring/html/experimental.erb +4 -0
  40. package/doc-src/templates/api-versions/templates/default/docstring/setup.rb +9 -0
  41. package/doc-src/templates/api-versions/templates/default/fulldoc/html/css/common.css +6 -0
  42. package/doc-src/templates/api-versions/templates/default/fulldoc/html/setup.rb +62 -0
  43. package/doc-src/templates/api-versions/templates/default/layout/html/services.erb +10 -0
  44. package/doc-src/templates/api-versions/templates/default/layout/html/setup.rb +28 -0
  45. package/doc-src/templates/api-versions/templates/default/module/html/box_info.erb +45 -0
  46. package/doc-src/templates/api-versions/templates/default/module/html/children.erb +8 -0
  47. package/doc-src/templates/api-versions/templates/default/tags/setup.rb +3 -0
  48. package/doc-src/templates/api-versions/templates/default/waiter_details/html/method_signature.erb +3 -0
  49. package/doc-src/templates/api-versions/templates/default/waiter_details/html/setup.rb +5 -0
  50. package/doc-src/templates/default/layout/html/footer.erb +31 -0
  51. package/doc-src/templates/default/layout/html/layout.erb +23 -0
  52. package/doc-src/templates/flasky_sphinx_guide/fulldoc/html/css/highlight.github.css +127 -0
  53. package/doc-src/templates/flasky_sphinx_guide/fulldoc/html/css/style.css +1192 -0
  54. package/doc-src/templates/flasky_sphinx_guide/fulldoc/html/img/logo.png +0 -0
  55. package/doc-src/templates/flasky_sphinx_guide/fulldoc/html/js/app.js +33 -0
  56. package/doc-src/templates/flasky_sphinx_guide/fulldoc/html/js/highlight.pack.js +27 -0
  57. package/doc-src/templates/flasky_sphinx_guide/fulldoc/html/js/sphinx/AUTHORS +55 -0
  58. package/doc-src/templates/flasky_sphinx_guide/fulldoc/html/js/sphinx/LICENSE +25 -0
  59. package/doc-src/templates/flasky_sphinx_guide/fulldoc/html/js/sphinx/doctools.js +247 -0
  60. package/doc-src/templates/flasky_sphinx_guide/fulldoc/html/js/sphinx/file.png +0 -0
  61. package/doc-src/templates/flasky_sphinx_guide/fulldoc/html/js/sphinx/searchtools.js +568 -0
  62. package/doc-src/templates/flasky_sphinx_guide/fulldoc/html/js/underscore.js +23 -0
  63. package/doc-src/templates/flasky_sphinx_guide/fulldoc/html/search.erb +29 -0
  64. package/doc-src/templates/flasky_sphinx_guide/fulldoc/html/search_index.erb +1 -0
  65. package/doc-src/templates/flasky_sphinx_guide/fulldoc/html/setup.rb +75 -0
  66. package/doc-src/templates/flasky_sphinx_guide/layout/html/layout.erb +93 -0
  67. package/doc-src/templates/flasky_sphinx_guide/layout/html/setup.rb +9 -0
  68. package/doc-src/templates/flasky_sphinx_guide/layout/html/sidebar.erb +45 -0
  69. package/doc-src/templates/flasky_sphinx_guide/onefile/html/layout.erb +51 -0
  70. package/doc-src/templates/flasky_sphinx_guide/onefile/html/setup.rb +1 -0
  71. package/eslint-rules/no-require-in-service.js +10 -0
  72. package/features/autoscaling/autoscaling.feature +21 -0
  73. package/features/autoscaling/step_definitions/autoscaling.js +49 -0
  74. package/features/cloudformation/cloudformation.feature +22 -0
  75. package/features/cloudformation/step_definitions/cloudformation.js +26 -0
  76. package/features/cloudfront/cloudfront.feature +28 -0
  77. package/features/cloudfront/step_definitions/cloudfront-latest.js +54 -0
  78. package/features/cloudfront/step_definitions/cloudfront.js +21 -0
  79. package/features/cloudsearch/cloudsearch.feature +34 -0
  80. package/features/cloudsearch/step_definitions/cloudsearch.js +42 -0
  81. package/features/cloudtrail/cloudtrail.feature +17 -0
  82. package/features/cloudtrail/step_definitions/cloudtrail.js +14 -0
  83. package/features/cloudwatch/cloudwatch.feature +15 -0
  84. package/features/cloudwatch/step_definitions/cloudwatch.js +48 -0
  85. package/features/datapipeline/datapipeline.feature +23 -0
  86. package/features/datapipeline/step_definitions/datapipeline.js +79 -0
  87. package/features/directconnect/directconnect.feature +20 -0
  88. package/features/directconnect/step_definitions/directconnect.js +44 -0
  89. package/features/dynamodb/crc32.feature +18 -0
  90. package/features/dynamodb/step_definitions/dynamodb.js +154 -0
  91. package/features/dynamodb/tables.feature +50 -0
  92. package/features/ec2/ec2.feature +28 -0
  93. package/features/ec2/step_definitions/ec2.js +65 -0
  94. package/features/elasticache/elasticache.feature +20 -0
  95. package/features/elasticache/step_definitions/elasticache.js +34 -0
  96. package/features/elasticbeanstalk/elasticbeanstalk.feature +22 -0
  97. package/features/elasticbeanstalk/step_definitions/elasticbeanstalk.js +38 -0
  98. package/features/elastictranscoder/elastictranscoder.feature +24 -0
  99. package/features/elastictranscoder/step_definitions/elastictranscoder.js +56 -0
  100. package/features/elb/elb.feature +19 -0
  101. package/features/elb/step_definitions/elb.js +37 -0
  102. package/features/emr/emr.feature +16 -0
  103. package/features/emr/step_definitions/emr.js +45 -0
  104. package/features/extra/assertions.js +29 -0
  105. package/features/extra/dummy.feature +0 -0
  106. package/features/extra/fixtures/testfile.txt +1 -0
  107. package/features/extra/helpers.js +113 -0
  108. package/features/extra/hooks.js +107 -0
  109. package/features/extra/world.js +12 -0
  110. package/features/glacier/glacier.feature +47 -0
  111. package/features/glacier/step_definitions/glacier.js +112 -0
  112. package/features/iam/iam.feature +24 -0
  113. package/features/iam/step_definitions/iam.js +66 -0
  114. package/features/importexport/importexport.feature +53 -0
  115. package/features/importexport/step_definitions/importexport.js +42 -0
  116. package/features/kinesis/kinesis.feature +9 -0
  117. package/features/kinesis/step_definitions/kinesis.js +10 -0
  118. package/features/opsworks/opsworks.feature +26 -0
  119. package/features/opsworks/step_definitions/opsworks.js +42 -0
  120. package/features/rds/rds.feature +32 -0
  121. package/features/rds/step_definitions/rds.js +72 -0
  122. package/features/redshift/redshift.feature +20 -0
  123. package/features/redshift/step_definitions/redshift.js +33 -0
  124. package/features/route53/route53.feature +41 -0
  125. package/features/route53/step_definitions/route53.js +97 -0
  126. package/features/s3/buckets.feature +40 -0
  127. package/features/s3/objects.feature +122 -0
  128. package/features/s3/step_definitions/buckets.js +136 -0
  129. package/features/s3/step_definitions/hooks.js +39 -0
  130. package/features/s3/step_definitions/objects.js +204 -0
  131. package/features/s3/step_definitions/proxy.js +44 -0
  132. package/features/ses/ses.feature +20 -0
  133. package/features/ses/step_definitions/ses.js +22 -0
  134. package/features/simpledb/simpledb.feature +29 -0
  135. package/features/simpledb/step_definitions/simpledb.js +46 -0
  136. package/features/sns/sns.feature +15 -0
  137. package/features/sns/step_definitions/sns.js +33 -0
  138. package/features/sqs/messages.feature +21 -0
  139. package/features/sqs/queues.feature +18 -0
  140. package/features/sqs/step_definitions/messages.js +46 -0
  141. package/features/sqs/step_definitions/queues.js +33 -0
  142. package/features/sqs/step_definitions/sqs.js +7 -0
  143. package/features/storagegateway/step_definitions/storagegateway.js +16 -0
  144. package/features/storagegateway/storagegateway.feature +13 -0
  145. package/features/sts/step_definitions/sts.js +35 -0
  146. package/features/sts/sts.feature +29 -0
  147. package/features/support/step_definitions/support.js +35 -0
  148. package/features/support/support.feature +18 -0
  149. package/features/swf/step_definitions/swf.js +38 -0
  150. package/features/swf/swf.feature +15 -0
  151. package/index.js +2 -0
  152. package/lib/core.js +2 -2
  153. package/lib/credentials/shared_ini_file_credentials.js +0 -1
  154. package/lib/event_listeners.js +13 -1
  155. package/lib/http/node.js +19 -30
  156. package/lib/model/resource_waiter.js +0 -4
  157. package/lib/model/shape.js +2 -1
  158. package/lib/protocol/rest_xml.js +1 -1
  159. package/lib/region_config.js +31 -0
  160. package/lib/region_config.json +56 -0
  161. package/lib/request.js +37 -45
  162. package/lib/sequential_executor.js +17 -34
  163. package/lib/service.js +17 -44
  164. package/lib/services/cloudsearchdomain.js +69 -0
  165. package/lib/services/route53.js +0 -12
  166. package/lib/services/s3.js +3 -19
  167. package/lib/signers/v4.js +2 -1
  168. package/lib/util.js +28 -3
  169. package/package.json +3 -3
  170. package/scripts/console +11 -3
  171. package/scripts/coverage +126 -0
  172. package/tasks/apis.rake +122 -0
  173. package/tasks/browser.rake +89 -0
  174. package/tasks/docs.rake +36 -0
  175. package/tasks/lib/cucumber_generator.rb +40 -0
  176. package/tasks/util.rake +33 -0
  177. package/test/browser/js/jasmine-1.3.1.js +2600 -0
  178. package/test/browser/js/jasmine-html.js +681 -0
  179. package/test/browser/runner.html +109 -0
  180. package/test/browser/runner.js +92 -0
  181. package/test/browser/sample/appinfo.sample.js +15 -0
  182. package/test/browser/sample/console.html +429 -0
  183. package/test/browser/sample/css/smoothness/images/animated-overlay.gif +0 -0
  184. package/test/browser/sample/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  185. package/test/browser/sample/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  186. package/test/browser/sample/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  187. package/test/browser/sample/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  188. package/test/browser/sample/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  189. package/test/browser/sample/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  190. package/test/browser/sample/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  191. package/test/browser/sample/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  192. package/test/browser/sample/css/smoothness/images/ui-icons_222222_256x240.png +0 -0
  193. package/test/browser/sample/css/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
  194. package/test/browser/sample/css/smoothness/images/ui-icons_454545_256x240.png +0 -0
  195. package/test/browser/sample/css/smoothness/images/ui-icons_888888_256x240.png +0 -0
  196. package/test/browser/sample/css/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
  197. package/test/browser/sample/css/smoothness/jquery-ui-1.10.1.custom.css +1175 -0
  198. package/test/browser/sample/css/smoothness/jquery-ui-1.10.1.custom.min.css +5 -0
  199. package/test/browser/sample/img/loading.gif +0 -0
  200. package/test/browser/sample/js/jquery-1.9.1.js +9597 -0
  201. package/test/browser/sample/js/jquery-ui-1.10.1.custom.js +14903 -0
  202. package/test/browser/sample/js/jquery-ui-1.10.1.custom.min.js +6 -0
  203. package/test/browser/sample/s3upload.html +111 -0
  204. package/test/browser.spec.coffee +207 -0
  205. package/test/config.spec.coffee +202 -0
  206. package/test/credential_provider_chain.spec.coffee +90 -0
  207. package/test/credentials.spec.coffee +452 -0
  208. package/test/endpoint.spec.coffee +80 -0
  209. package/test/event_listeners.spec.coffee +493 -0
  210. package/test/helpers.coffee +150 -0
  211. package/test/http_request.spec.coffee +55 -0
  212. package/test/json/builder.spec.coffee +129 -0
  213. package/test/json/parser.spec.coffee +108 -0
  214. package/test/metadata_service.spec.coffee +54 -0
  215. package/test/model/api.spec.coffee +67 -0
  216. package/test/model/shape.spec.coffee +23 -0
  217. package/test/node_http_client.spec.coffee +40 -0
  218. package/test/param_validator.spec.coffee +456 -0
  219. package/test/protocol/json.spec.coffee +167 -0
  220. package/test/protocol/query.spec.coffee +191 -0
  221. package/test/protocol/rest.spec.coffee +237 -0
  222. package/test/protocol/rest_json.spec.coffee +255 -0
  223. package/test/protocol/rest_xml.spec.coffee +329 -0
  224. package/test/query/query_param_serializer.spec.coffee +327 -0
  225. package/test/region_config.spec.coffee +50 -0
  226. package/test/request.spec.coffee +316 -0
  227. package/test/resource_waiter.spec.coffee +89 -0
  228. package/test/response.spec.coffee +81 -0
  229. package/test/sequential_executor.spec.coffee +118 -0
  230. package/test/service.spec.coffee +230 -0
  231. package/test/services/cloudfront.spec.coffee +44 -0
  232. package/test/services/cloudsearchdomain.spec.coffee +23 -0
  233. package/test/services/dynamodb.spec.coffee +32 -0
  234. package/test/services/ec2.spec.coffee +78 -0
  235. package/test/services/elastictranscoder.spec.coffee +43 -0
  236. package/test/services/glacier.spec.coffee +61 -0
  237. package/test/services/rds.spec.coffee +38 -0
  238. package/test/services/route53.spec.coffee +77 -0
  239. package/test/services/s3.spec.coffee +538 -0
  240. package/test/services/simpledb.spec.coffee +12 -0
  241. package/test/services/sqs.spec.coffee +130 -0
  242. package/test/services/sts.spec.coffee +72 -0
  243. package/test/services/swf.spec.coffee +6 -0
  244. package/test/signers/presign.spec.coffee +36 -0
  245. package/test/signers/s3.spec.coffee +297 -0
  246. package/test/signers/v2.spec.coffee +68 -0
  247. package/test/signers/v4.spec.coffee +135 -0
  248. package/test/util.spec.coffee +510 -0
  249. package/test/xml/builder.spec.coffee +529 -0
  250. package/test/xml/parser.spec.coffee +587 -0
  251. package/lib/services/simpledb.js +0 -15
@@ -0,0 +1,75 @@
1
+ include T('guide/fulldoc/html')
2
+
3
+ def generate_assets
4
+ layout = Object.new.extend(T('layout'))
5
+ (layout.javascripts + layout.stylesheets).uniq.each do |file|
6
+ asset(file, file(file, true))
7
+ end
8
+
9
+ opts = options.merge(:contents => erb(:search), :page_title => "Search")
10
+ opts.delete(:files)
11
+ asset('search.html', T('layout').run(opts))
12
+ asset('searchindex.js', search_index)
13
+ asset('img/logo.png', file('img/logo.png'))
14
+ asset('css/file.png', file('js/sphinx/file.png'))
15
+ end
16
+
17
+ def search_index
18
+ require 'json'
19
+ @json = JSON.dump(generate_search_index)
20
+ erb(:search_index)
21
+ end
22
+
23
+ def generate_search_index
24
+ {
25
+ :titles => @files.map {|f| f.title },
26
+ :filenames => @files.map {|f|
27
+ options.readme == f ? 'index' :
28
+ @serializer.serialized_path(f).gsub(/\.html$/, '')
29
+ },
30
+ :terms => prune_terms(build_terms),
31
+ :objects => {},
32
+ :objtypes => {},
33
+ :objnames => {}
34
+ }
35
+ end
36
+
37
+ def build_terms
38
+ term_map = {}
39
+ @files.each_with_index do |file, i|
40
+ terms = file.contents.split(/[^a-z0-9]+/i)
41
+ terms.each do |term|
42
+ # generate subterms on casing split
43
+ subterms = [term] + term.split(/^([A-Z]?[a-z]+)(?=[A-Z])/)
44
+ subterms.uniq.each do |subterm|
45
+ (term_map[stem(subterm.downcase)] ||= []) << i
46
+ end
47
+ end
48
+ end
49
+
50
+ term_map.each do |term, list|
51
+ list.uniq!
52
+ term_map[term] = list.first if list.size == 1
53
+ end
54
+
55
+ term_map
56
+ end
57
+
58
+ def prune_terms(terms)
59
+ terms.keys.each do |term|
60
+ terms.delete(term) if term.length < 3 && term !~ /\d/
61
+ end
62
+ terms
63
+ end
64
+
65
+ def stem(word)
66
+ return word if word.size <= 3
67
+
68
+ # simple plural stemming
69
+ word = word.gsub(/e?s$/, '')
70
+
71
+ # simple verb stemming
72
+ word = word.gsub(/ing$/, '')
73
+
74
+ word
75
+ end
@@ -0,0 +1,93 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <% {:top => @topfile, :prev => @prevfile, :next => @nextfile}.each do |name, file| %>
6
+ <% if file %>
7
+ <link rel="<%= name %>" title="<%= file.title %>" href="<%= url_for(file) %>" />
8
+ <% end %>
9
+ <% end %>
10
+
11
+ <script type="text/javascript">
12
+ var DOCUMENTATION_OPTIONS = {
13
+ URL_ROOT: '',
14
+ COLLAPSE_INDEX: false,
15
+ FILE_SUFFIX: '.html',
16
+ HAS_SOURCE: true
17
+ };
18
+ </script>
19
+ <%= erb(:headers) %>
20
+ <script type="text/javascript" charset="utf-8">
21
+ $(function() {
22
+ $('.object_link').each(function() {
23
+ $(this).html($(this).find('a').html())
24
+ });
25
+ });
26
+ $(function() {
27
+ generateTOC();
28
+ if ($('#toc li').size() == 0) {
29
+ $('#sidebar h2.toc').hide();
30
+ }
31
+ })
32
+ </script>
33
+ <script type="text/javascript" charset="utf-8">
34
+ hljs.initHighlightingOnLoad();
35
+ </script>
36
+ </head>
37
+ <body>
38
+ <div id="menu">
39
+ <div class="width-wrapper">
40
+ <div id="left-logo"><a href="<%= url_for(@topfile) %>"><%= @title %></a></div>
41
+ <ul id="main-menu">
42
+ <li><a href="http://aws.amazon.com/javascript">Homepage</a></li>
43
+ <li><a href="http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/frames.html">API Docs</a></li>
44
+ <li><a href="https://forums.aws.amazon.com/forum.jspa?forumID=148">Forum</a></li>
45
+ <li><a href="https://github.com/aws/aws-sdk-js/issues">Issues</a></li>
46
+ </ul>
47
+ <!-- BEGIN-SECTION -->
48
+ <div id="github-stars">
49
+ <iframe src="http://ghbtns.com/github-btn.html?user=aws&repo=aws-sdk-js&type=watch&count=true&size=small"
50
+ allowtransparency="true" frameborder="0" scrolling="0" width="110px" height="20px"></iframe>
51
+ </div>
52
+ <!-- END-SECTION -->
53
+ </div>
54
+ </div>
55
+
56
+ <div id="indexwrapper">
57
+ <div class="related"></div>
58
+
59
+ <div class="document">
60
+ <div class="documentwrapper">
61
+ <div class="bodywrapper">
62
+ <div class="body">
63
+ <!--REGION_DISCLAIMER_DO_NOT_REMOVE-->
64
+
65
+ <div class="section">
66
+ <%= yieldall %>
67
+ </div>
68
+ </div>
69
+ </div>
70
+ </div>
71
+
72
+ <div class="sphinxsidebar">
73
+ <%= erb(:sidebar) %>
74
+ </div>
75
+
76
+ <div class="clearer"></div>
77
+ </div>
78
+
79
+ <% if options.files %>
80
+ <div id="footer-links" class="width-wrapper">
81
+ <%= link_file(@nextfile, "Next: #{@nextfile.title}") if @nextfile %>
82
+ <%= link_file(@prevfile, "Prev: #{@prevfile.title}") if @prevfile %>
83
+ </div>
84
+ <% end %>
85
+
86
+ <div class="related"></div>
87
+
88
+ <div class="footer">
89
+ <%= erb(:footer) %>
90
+ </div>
91
+ </div>
92
+ </body>
93
+ </html>
@@ -0,0 +1,9 @@
1
+ include T('guide/layout/html')
2
+
3
+ def stylesheets
4
+ super + %w(css/highlight.github.css)
5
+ end
6
+
7
+ def javascripts
8
+ super + %w(js/underscore.js js/sphinx/doctools.js js/sphinx/searchtools.js js/highlight.pack.js)
9
+ end
@@ -0,0 +1,45 @@
1
+ <p class="logo">
2
+ <a href="<%= url_for(@topfile) %>">
3
+ <img class="logo" src="img/logo.png" alt="Logo" height="63" />
4
+ </a>
5
+ </p>
6
+
7
+ <h3 class="toc-title">Table of Contents</h3>
8
+
9
+ <div id="toc"></div>
10
+
11
+ <h3>Related Topics</h3>
12
+
13
+ <ul>
14
+ <% if @topfile %>
15
+ <li><%= link_file(@topfile, "Documentation Overview") %></li>
16
+ <% end %>
17
+ <ul>
18
+ <% if @prevfile %>
19
+ <li>Previous: <%= link_file(@prevfile) %></li>
20
+ <% end %>
21
+ <% if @nextfile %>
22
+ <li>Next: <%= link_file(@nextfile) %></li>
23
+ <% end %>
24
+ </ul>
25
+ </ul>
26
+
27
+ <% if @file %>
28
+ <h3>Feedback</h3>
29
+ <p class="feedback">Did you find this page useful? Do you have a suggestion? <a href="https://aws-portal.amazon.com/gp/aws/html-forms-controller/documentation/aws_doc_feedback_02?service_name=AWSSDKforJavaScript&guide_name=Guide&file_name=<%= @file.name %>">Give us feedback</a> or
30
+ send us a <a href="https://github.com/aws/aws-sdk-js">pull request</a> on GitHub.</p>
31
+ <% end %>
32
+
33
+ <h3>Quick Search</h3>
34
+
35
+ <form class="search" action="search.html" method="get">
36
+ <input type="text" name="q" />
37
+ <input type="submit" value="Go" />
38
+ <input type="hidden" name="check_keywords" value="yes" />
39
+ <input type="hidden" name="area" value="default" />
40
+ </form>
41
+ <p class="searchtip" style="font-size: 90%">
42
+ Enter search terms or a module, class or function name.
43
+ </p>
44
+ </div>
45
+ <script type="text/javascript">$('#searchbox').show(0);</script>
@@ -0,0 +1,51 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <% {:top => @topfile, :prev => @prevfile, :next => @nextfile}.each do |name, file| %>
6
+ <% if file %>
7
+ <link rel="<%= name %>" title="<%= file.title %>" href="<%= url_for(file) %>" />
8
+ <% end %>
9
+ <% end %>
10
+
11
+ <%= erb(:headers) %>
12
+ <script type="text/javascript" charset="utf-8">
13
+ var DOCUMENTATION_OPTIONS = {
14
+ URL_ROOT: '',
15
+ COLLAPSE_INDEX: false,
16
+ FILE_SUFFIX: '.html',
17
+ HAS_SOURCE: true
18
+ };
19
+
20
+ $(function() {
21
+ $('.object_link').each(function() {
22
+ $(this).html($(this).find('a').html())
23
+ });
24
+ });
25
+
26
+ $(generateTOC);
27
+ hljs.initHighlightingOnLoad();
28
+ </script>
29
+ </head>
30
+ <body>
31
+ <div id="indexwrapper">
32
+ <div class="related"></div>
33
+ <div class="document">
34
+ <div class="documentwrapper">
35
+ <div class="bodywrapper">
36
+ <div class="body">
37
+ <div class="section">
38
+ <%= yieldall %>
39
+ </div>
40
+ </div>
41
+ </div>
42
+ </div>
43
+ <div class="clearer"></div>
44
+ </div>
45
+ <div class="related"></div>
46
+ <div class="footer">
47
+ <%= erb(:footer) %>
48
+ </div>
49
+ </div>
50
+ </body>
51
+ </html>
@@ -0,0 +1 @@
1
+ include T('guide/onefile/html')
@@ -0,0 +1,10 @@
1
+ module.exports = function(context) {
2
+ return {
3
+ CallExpression: function(node) {
4
+ if (!context.getFilename().match(/^lib\/services\//)) return;
5
+ if (node.callee.name === 'require' && node.arguments[0].value !== '../core') {
6
+ context.report(node, 'require() is disallowed in service files');
7
+ }
8
+ }
9
+ };
10
+ };
@@ -0,0 +1,21 @@
1
+ # language: en
2
+ @autoscaling
3
+ Feature: Auto Scaling
4
+
5
+ I want to use Auto Scaling
6
+
7
+ Scenario: Managing auto scaling groups
8
+ Given I create a launch configuration with name prefix "aws-sdk-js"
9
+ And I create an auto scaling group with name prefix "aws-sdk-js"
10
+ And I list auto scaling groups with the group name
11
+ Then the list should contain the auto scaling group
12
+ And I delete the auto scaling group
13
+ And I delete the launch configuration
14
+
15
+ Scenario: Error handling
16
+ Given I create a launch configuration with name prefix ""
17
+ Then the error code should be "ValidationError"
18
+ And the error message should contain:
19
+ """
20
+ Member must have length greater than or equal to 1
21
+ """
@@ -0,0 +1,49 @@
1
+ module.exports = function() {
2
+ this.Before("@autoscaling", function (callback) {
3
+ this.service = new this.AWS.AutoScaling();
4
+ callback();
5
+ });
6
+
7
+ this.Given(/^I create a launch configuration with name prefix "([^"]*)"$/, function(prefix, callback) {
8
+ this.launchConfigName = this.uniqueName(prefix);
9
+ var params = {
10
+ ImageId: 'ami-1624987f',
11
+ InstanceType: 'm1.small',
12
+ LaunchConfigurationName: this.launchConfigName
13
+ };
14
+ this.request(null, 'createLaunchConfiguration', params, callback, false);
15
+ });
16
+
17
+ this.Given(/^I create an auto scaling group with name prefix "([^"]*)"$/, function(prefix, callback) {
18
+ this.groupName = this.uniqueName(prefix);
19
+ var params = {
20
+ AutoScalingGroupName: this.groupName,
21
+ LaunchConfigurationName: this.launchConfigName,
22
+ MinSize: 1,
23
+ MaxSize: 4,
24
+ AvailabilityZones: ['us-east-1a']
25
+ };
26
+ this.request(null, 'createAutoScalingGroup', params, callback);
27
+ });
28
+
29
+ this.Given(/^I list auto scaling groups with the group name$/, function(callback) {
30
+ var params = {AutoScalingGroupNames: [this.groupName]};
31
+ this.request(null, 'describeAutoScalingGroups', params, callback)
32
+ });
33
+
34
+ this.Then(/^the list should contain the auto scaling group$/, function(callback) {
35
+ var name = this.data.AutoScalingGroups[0].AutoScalingGroupName;
36
+ this.assert.equal(name, this.groupName);
37
+ callback();
38
+ });
39
+
40
+ this.Then(/^I delete the auto scaling group$/, function(callback) {
41
+ var params = {AutoScalingGroupName: this.groupName};
42
+ this.request(null, 'deleteAutoScalingGroup', params, callback);
43
+ });
44
+
45
+ this.Then(/^I delete the launch configuration$/, function(callback) {
46
+ var params = {LaunchConfigurationName: this.launchConfigName};
47
+ this.request(null, 'deleteLaunchConfiguration', params, callback);
48
+ });
49
+ };
@@ -0,0 +1,22 @@
1
+ # language: en
2
+ @cloudformation
3
+ Feature: AWS CloudFormation
4
+
5
+ I want to use AWS CloudFormation
6
+
7
+ Scenario: Creating and deleting stacks
8
+ Given I create a CloudFormation stack with name prefix "aws-js-sdk"
9
+ And I get a CloudFormation template for the stack
10
+ Then the result should contain the CloudFormation template body
11
+ And I delete the CloudFormation stack
12
+
13
+ Scenario: Error handling
14
+ Given I create a CloudFormation stack with name prefix ""
15
+ Then the error code should be "ValidationError"
16
+
17
+ @pagination
18
+ Scenario: Paginating responses
19
+ Given I paginate the "listStacks" operation with limit 100
20
+ Then I should get more than one page
21
+ And I should get numPages - 1 markers
22
+ And the last page should not contain a marker
@@ -0,0 +1,26 @@
1
+ module.exports = function() {
2
+ this.Before("@cloudformation", function (callback) {
3
+ this.service = new this.AWS.CloudFormation();
4
+ callback();
5
+ });
6
+
7
+ this.Given(/^I create a CloudFormation stack with name prefix "([^"]*)"$/, function(prefix, callback) {
8
+ this.stackName = this.uniqueName(prefix);
9
+ this.templateBody = '{"Resources":{"member":{"Type":"AWS::SQS::Queue"}}}';
10
+ var params = { TemplateBody: this.templateBody, StackName: this.stackName };
11
+ this.request(null, 'createStack', params, callback, false);
12
+ });
13
+
14
+ this.Given(/^I get a CloudFormation template for the stack$/, function(callback) {
15
+ this.request(null, 'getTemplate', {StackName: this.stackName}, callback);
16
+ });
17
+
18
+ this.Then(/^the result should contain the CloudFormation template body$/, function(callback) {
19
+ this.assert.equal(this.data.TemplateBody.replace(/\s+/, ''), this.templateBody);
20
+ callback();
21
+ });
22
+
23
+ this.Then(/^I delete the CloudFormation stack$/, function(callback) {
24
+ this.request(null, 'deleteStack', {StackName: this.stackName}, callback);
25
+ });
26
+ };
@@ -0,0 +1,28 @@
1
+ # language: en
2
+ @cloudfront
3
+ Feature: Amazon CloudFront
4
+
5
+ I want to use Amazon CloudFront
6
+
7
+ Scenario: Listing distributions
8
+ Given I list CloudFront distributions
9
+ Then the result should contain a property Quantity with a number
10
+ And the result should contain a property Items with an Array
11
+
12
+ # Let this fail with NoSuchOrigin to confirm we serialized inputs
13
+ # but without creating a distribution.
14
+ Scenario: Creating a distribution
15
+ Given I create a CloudFront distribution with name prefix "aws-js-sdk"
16
+ Then the error code should be "NoSuchOrigin"
17
+ And the error message should be:
18
+ """
19
+ One or more of your origins do not exist.
20
+ """
21
+
22
+ Scenario: Error handling
23
+ Given I create a CloudFront distribution with name prefix ""
24
+ Then the error code should be "InvalidArgument"
25
+ And the error message should be:
26
+ """
27
+ The parameter CallerReference is too small.
28
+ """
@@ -0,0 +1,54 @@
1
+ module.exports = function() {
2
+ var createParams = {
3
+ CallerReference: '',
4
+ Aliases: {
5
+ Quantity: 0
6
+ },
7
+ DefaultRootObject: '',
8
+ Origins: {
9
+ Items: [{
10
+ Id: 'origin',
11
+ DomainName: 'example.com',
12
+ CustomOriginConfig: {
13
+ HTTPPort: 80,
14
+ HTTPSPort: 443,
15
+ OriginProtocolPolicy: 'match-viewer'
16
+ }
17
+ }],
18
+ Quantity: 1,
19
+ },
20
+ DefaultCacheBehavior: {
21
+ TargetOriginId: 'origin',
22
+ ForwardedValues: {
23
+ QueryString: false,
24
+ Cookies: { Forward: 'all' }
25
+ },
26
+ TrustedSigners: {
27
+ Items: [],
28
+ Enabled: false,
29
+ Quantity: 0
30
+ },
31
+ ViewerProtocolPolicy: 'allow-all',
32
+ MinTTL: 0
33
+ },
34
+ CacheBehaviors: {
35
+ Items: [],
36
+ Quantity: 0
37
+ },
38
+ Comment: '',
39
+ Logging: {
40
+ Enabled: false,
41
+ Bucket: 'invalidbucket.s3.amazonaws.com',
42
+ Prefix: 'prefix',
43
+ IncludeCookies: false
44
+ },
45
+ PriceClass: 'PriceClass_All',
46
+ Enabled: false
47
+ };
48
+
49
+ this.Before("@cloudfront", function (callback) {
50
+ this.service = new this.AWS.CloudFront();
51
+ this.cfCreateParams = createParams;
52
+ callback();
53
+ });
54
+ };
@@ -0,0 +1,21 @@
1
+ module.exports = function() {
2
+ this.Given(/^I create a CloudFront distribution with name prefix "([^"]*)"$/, function(prefix, callback) {
3
+ this.cfName = this.uniqueName(prefix);
4
+ this.cfCreateParams.CallerReference = this.cfName;
5
+ this.cfCreateParams.Origins.Items[0].Id = (this.cfName === '' ? 'origin' : 'InvalidOrigin');
6
+ this.request(null, 'createDistribution', { DistributionConfig: this.cfCreateParams }, callback, false);
7
+ });
8
+
9
+ this.Given(/^I list CloudFront distributions$/, function(callback) {
10
+ this.request(null, 'listDistributions', {}, callback);
11
+ });
12
+
13
+ this.Then(/^the result should contain a property (\w+) with an? (\w+)$/, function(property, type, callback) {
14
+ if (type === 'Array' || type === 'Date') {
15
+ this.assert.equal(this.AWS.util.isType(this.data[property], type), true);
16
+ } else {
17
+ this.assert.equal(typeof this.data[property], type);
18
+ }
19
+ callback();
20
+ });
21
+ };
@@ -0,0 +1,34 @@
1
+ # language: en
2
+ @cloudsearch @cloudsearch-2011-02-01
3
+ Feature: Amazon CloudSearch (2011-02-01)
4
+
5
+ I want to use Amazon CloudSearch
6
+
7
+ Scenario: Domain creation
8
+ Given I create a domain with name prefix "aws-js-sdk"
9
+ Then DomainStatus should show that Created is true
10
+ And I delete the domain
11
+
12
+ Scenario: Defining an index field
13
+ Given I create a domain with name prefix "aws-js-sdk"
14
+ And I define a CloudSearch index field with source attributes
15
+ Then the status code should be 200
16
+ And I delete the domain
17
+
18
+ Scenario: Error handling
19
+ Given I create a domain with name prefix ""
20
+ Then the error code should be "ValidationError"
21
+
22
+ @cloudsearch @cloudsearch-2013-01-01
23
+ Feature: Amazon CloudSearch (2013-01-01)
24
+
25
+ I want to use Amazon CloudSearch
26
+
27
+ Scenario: Domain creation
28
+ Given I create a domain with name prefix "aws-js-sdk"
29
+ Then DomainStatus should show that Created is true
30
+ And I delete the domain
31
+
32
+ Scenario: Error handling
33
+ Given I create a domain with name prefix ""
34
+ Then the error code should be "ValidationError"
@@ -0,0 +1,42 @@
1
+ module.exports = function() {
2
+ this.Before("@cloudsearch-2011-02-01", function (callback) {
3
+ this.service = new this.AWS.CloudSearch({apiVersion: '2011-02-01'});
4
+ callback();
5
+ });
6
+
7
+ this.Before("@cloudsearch-2013-01-01", function (callback) {
8
+ this.service = new this.AWS.CloudSearch({apiVersion: '2013-01-01'});
9
+ callback();
10
+ });
11
+
12
+ this.Given(/^I create a domain with name prefix "([^"]*)"$/, function(prefix, callback) {
13
+ this.domainName = this.uniqueName(prefix);
14
+ this.request(null, 'createDomain', {DomainName: this.domainName}, callback, false);
15
+ });
16
+
17
+ this.Given(/^I define a CloudSearch index field with source attributes$/, function(callback) {
18
+ var params = {
19
+ DomainName: this.domainName,
20
+ IndexField: {
21
+ IndexFieldName: 'fieldname',
22
+ IndexFieldType: 'text',
23
+ SourceAttributes: [{
24
+ SourceDataFunction: 'Map',
25
+ SourceDataMap: {
26
+ SourceName: 'sourcedata',
27
+ Cases: {
28
+ case1: 'value1',
29
+ case2: 'value2'
30
+ }
31
+ }
32
+ }]
33
+ }
34
+ };
35
+ this.request(null, 'defineIndexField', params, callback);
36
+ });
37
+
38
+ this.Then(/^DomainStatus should show that Created is true$/, function(callback) {
39
+ this.assert.equal(this.data.DomainStatus.Created, true);
40
+ callback();
41
+ });
42
+ };
@@ -0,0 +1,17 @@
1
+ # language: en
2
+ @cloudtrail
3
+ Feature: AWS CloudTrail
4
+
5
+ I want to use AWS CloudTrail
6
+
7
+ Scenario: Describing trails
8
+ Given I describe trails
9
+ Then the status code should be 200
10
+
11
+ Scenario: Error handling
12
+ Given I create a trail with an invalid name
13
+ Then the error code should be "InvalidTrailNameException"
14
+ And the error message should contain:
15
+ """
16
+ cannot be blank
17
+ """
@@ -0,0 +1,14 @@
1
+ module.exports = function() {
2
+ this.Before("@cloudtrail", function (callback) {
3
+ this.service = new this.AWS.CloudTrail();
4
+ callback();
5
+ });
6
+
7
+ this.Given(/^I describe trails$/, function(callback) {
8
+ this.request(null, 'describeTrails', {}, callback);
9
+ });
10
+
11
+ this.Given(/^I create a trail with an invalid name$/, function(callback) {
12
+ this.request(null, 'createTrail', {Name: '', S3BucketName: ''}, callback, false);
13
+ });
14
+ };
@@ -0,0 +1,15 @@
1
+ # language: en
2
+ @cloudwatch
3
+ Feature: Amazon CloudWatch
4
+
5
+ I want to use Amazon CloudWatch
6
+
7
+ Scenario: Alarms
8
+ Given I create a CloudWatch alarm with prefix "aws-js-sdk-alarm"
9
+ And I list the CloudWatch alarms
10
+ Then the list should contain the CloudWatch alarm
11
+ And I delete the CloudWatch alarm
12
+
13
+ Scenario: Error handling
14
+ Given I create a CloudWatch alarm with name ""
15
+ Then the error code should be "ValidationError"