aws-sdk-core 2.0.0.rc12 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (536) hide show
  1. checksums.yaml +4 -4
  2. data/apis/AutoScaling.api.json +1943 -0
  3. data/apis/CloudFormation.api.json +785 -0
  4. data/apis/CloudFront.api.json +2581 -0
  5. data/apis/CloudFront.paginators.json +32 -0
  6. data/apis/CloudSearch.api.json +1955 -0
  7. data/apis/CloudSearchDomain.api.json +349 -0
  8. data/apis/CloudTrail.api.json +559 -0
  9. data/apis/CloudWatch.api.json +917 -0
  10. data/apis/CloudWatchLogs.api.json +816 -0
  11. data/apis/CognitoIdentity.api.json +631 -0
  12. data/apis/CognitoSync.api.json +721 -0
  13. data/apis/DataPipeline.api.json +940 -0
  14. data/apis/DirectConnect.api.json +833 -0
  15. data/apis/DynamoDB.api.json +1210 -0
  16. data/apis/{dynamodb-2011-12-05.paginators.json → DynamoDB.paginators.json} +1 -3
  17. data/apis/EC2.api.json +9914 -0
  18. data/apis/{ec2-2014-06-15.resources.json → EC2.resources.json} +16 -0
  19. data/apis/EMR.api.json +1339 -0
  20. data/apis/ElastiCache.api.json +3410 -0
  21. data/apis/ElasticBeanstalk.api.json +1543 -0
  22. data/apis/ElasticLoadBalancing.api.json +2131 -0
  23. data/apis/ElasticTranscoder.api.json +1647 -0
  24. data/apis/Glacier.api.json +1456 -0
  25. data/apis/{glacier-2012-06-01.resources.json → Glacier.resources.json} +5 -9
  26. data/apis/IAM.api.json +4033 -0
  27. data/apis/{iam-2010-05-08.resources.json → IAM.resources.json} +1 -1
  28. data/apis/ImportExport.api.json +515 -0
  29. data/apis/Kinesis.api.json +706 -0
  30. data/apis/{kinesis-2013-12-02.paginators.json → Kinesis.paginators.json} +0 -6
  31. data/apis/OpsWorks.api.json +2555 -0
  32. data/apis/OpsWorks.resources.json +181 -0
  33. data/apis/RDS.api.json +4473 -0
  34. data/apis/Redshift.api.json +4482 -0
  35. data/apis/Route53.api.json +1935 -0
  36. data/apis/Route53Domains.api.json +1129 -0
  37. data/apis/{s3-2006-03-01.api.json → S3.api.json} +377 -972
  38. data/apis/{s3-2006-03-01.paginators.json → S3.paginators.json} +1 -1
  39. data/apis/{s3-2006-03-01.resources.json → S3.resources.json} +13 -2
  40. data/apis/SES.api.json +644 -0
  41. data/apis/SNS.api.json +1760 -0
  42. data/apis/SQS.api.json +1113 -0
  43. data/apis/{sqs-2012-11-05.resources.json → SQS.resources.json} +0 -10
  44. data/apis/STS.api.json +594 -0
  45. data/apis/SWF.api.json +2656 -0
  46. data/apis/SimpleDB.api.json +954 -0
  47. data/apis/StorageGateway.api.json +2311 -0
  48. data/apis/Support.api.json +869 -0
  49. data/bin/aws.rb +19 -1
  50. data/endpoints.json +77 -0
  51. data/lib/aws-sdk-core/api/docstrings.rb +35 -0
  52. data/lib/aws-sdk-core/api/documenter.rb +241 -0
  53. data/lib/{aws/api/documentor.rb → aws-sdk-core/api/operation_documenter.rb} +39 -28
  54. data/lib/{aws/api/doc_example.rb → aws-sdk-core/api/operation_example.rb} +31 -22
  55. data/lib/{aws → aws-sdk-core}/api/service_customizations.rb +5 -1
  56. data/lib/aws-sdk-core/autoscaling.rb +5 -0
  57. data/lib/aws-sdk-core/client.rb +121 -0
  58. data/lib/aws-sdk-core/cloudformation.rb +5 -0
  59. data/lib/aws-sdk-core/cloudfront.rb +6 -0
  60. data/lib/aws-sdk-core/cloudsearch.rb +5 -0
  61. data/lib/aws-sdk-core/cloudsearchdomain.rb +4 -0
  62. data/lib/aws-sdk-core/cloudtrail.rb +5 -0
  63. data/lib/aws-sdk-core/cloudwatch.rb +5 -0
  64. data/lib/aws-sdk-core/cloudwatchlogs.rb +5 -0
  65. data/lib/aws-sdk-core/cognitoidentity.rb +4 -0
  66. data/lib/aws-sdk-core/cognitosync.rb +4 -0
  67. data/lib/{aws → aws-sdk-core}/credential_provider_chain.rb +4 -1
  68. data/lib/aws-sdk-core/datapipeline.rb +5 -0
  69. data/lib/aws-sdk-core/directconnect.rb +5 -0
  70. data/lib/aws-sdk-core/dynamodb/attribute_value.rb +87 -0
  71. data/lib/aws-sdk-core/dynamodb.rb +12 -0
  72. data/lib/aws-sdk-core/ec2.rb +7 -0
  73. data/lib/aws-sdk-core/elasticache.rb +5 -0
  74. data/lib/aws-sdk-core/elasticbeanstalk.rb +5 -0
  75. data/lib/aws-sdk-core/elasticloadbalancing.rb +5 -0
  76. data/lib/aws-sdk-core/elastictranscoder.rb +5 -0
  77. data/lib/{aws → aws-sdk-core}/empty_structure.rb +4 -3
  78. data/lib/aws-sdk-core/emr.rb +5 -0
  79. data/lib/aws-sdk-core/endpoint_provider.rb +97 -0
  80. data/lib/{aws → aws-sdk-core}/errors.rb +27 -8
  81. data/lib/aws-sdk-core/glacier.rb +7 -0
  82. data/lib/aws-sdk-core/iam.rb +6 -0
  83. data/lib/aws-sdk-core/importexport.rb +5 -0
  84. data/lib/{aws → aws-sdk-core}/instance_profile_credentials.rb +13 -9
  85. data/lib/aws-sdk-core/kinesis.rb +5 -0
  86. data/lib/aws-sdk-core/opsworks.rb +6 -0
  87. data/lib/{aws → aws-sdk-core}/pageable_response.rb +1 -1
  88. data/lib/aws-sdk-core/plugins/csd_conditional_signing.rb +37 -0
  89. data/lib/aws-sdk-core/plugins/dynamodb_simple_attributes.rb +179 -0
  90. data/lib/{aws → aws-sdk-core}/plugins/global_configuration.rb +14 -7
  91. data/lib/{aws → aws-sdk-core}/plugins/protocols/json_rpc.rb +9 -7
  92. data/lib/{aws → aws-sdk-core}/plugins/regional_endpoint.rb +2 -4
  93. data/lib/{aws → aws-sdk-core}/plugins/request_signer.rb +18 -8
  94. data/lib/aws-sdk-core/plugins/response_paging.rb +25 -0
  95. data/lib/{aws → aws-sdk-core}/plugins/retry_errors.rb +11 -1
  96. data/lib/aws-sdk-core/plugins/route_53_id_fix.rb +55 -0
  97. data/lib/aws-sdk-core/plugins/s3_expect_100_continue.rb +27 -0
  98. data/lib/aws-sdk-core/plugins/s3_sse_cpk.rb +63 -0
  99. data/lib/aws-sdk-core/plugins/s3_url_encoded_keys.rb +92 -0
  100. data/lib/{aws → aws-sdk-core}/plugins/user_agent.rb +1 -2
  101. data/lib/{aws → aws-sdk-core}/query/handler.rb +4 -5
  102. data/lib/aws-sdk-core/rds.rb +6 -0
  103. data/lib/aws-sdk-core/redshift.rb +6 -0
  104. data/lib/aws-sdk-core/route53.rb +5 -0
  105. data/lib/aws-sdk-core/route53domains.rb +4 -0
  106. data/lib/aws-sdk-core/s3/presigner.rb +64 -0
  107. data/lib/aws-sdk-core/s3.rb +13 -0
  108. data/lib/aws-sdk-core/service.rb +4 -0
  109. data/lib/aws-sdk-core/ses.rb +6 -0
  110. data/lib/{aws → aws-sdk-core}/signers/v4.rb +6 -5
  111. data/lib/aws-sdk-core/simpledb.rb +5 -0
  112. data/lib/aws-sdk-core/sns.rb +6 -0
  113. data/lib/aws-sdk-core/sqs.rb +6 -0
  114. data/lib/aws-sdk-core/storagegateway.rb +5 -0
  115. data/lib/{aws → aws-sdk-core}/structure.rb +60 -4
  116. data/lib/aws-sdk-core/sts.rb +4 -0
  117. data/lib/aws-sdk-core/support.rb +5 -0
  118. data/lib/aws-sdk-core/swf.rb +5 -0
  119. data/lib/aws-sdk-core/version.rb +3 -0
  120. data/lib/aws-sdk-core/waiters/errors.rb +30 -0
  121. data/lib/aws-sdk-core/waiters/null_provider.rb +12 -0
  122. data/lib/aws-sdk-core/waiters/provider.rb +54 -0
  123. data/lib/aws-sdk-core/waiters/waiter.rb +194 -0
  124. data/lib/{aws → aws-sdk-core}/xml/builder.rb +4 -3
  125. data/lib/aws-sdk-core/xml/default_list.rb +10 -0
  126. data/lib/{aws → aws-sdk-core}/xml/parser.rb +6 -1
  127. data/lib/aws-sdk-core.rb +288 -1
  128. data/{vendor/seahorse/lib → lib}/seahorse/client/base.rb +45 -20
  129. data/{vendor/seahorse/lib → lib}/seahorse/client/handler_list.rb +17 -3
  130. data/{vendor/seahorse/lib → lib}/seahorse/client/http/error.rb +2 -2
  131. data/{vendor/seahorse/lib → lib}/seahorse/client/http/request.rb +1 -9
  132. data/{vendor/seahorse/lib → lib}/seahorse/client/net_http/connection_pool.rb +2 -0
  133. data/{vendor/seahorse/lib → lib}/seahorse/client/net_http/handler.rb +13 -1
  134. data/lib/seahorse/client/net_http/patches.rb +97 -0
  135. data/{vendor/seahorse/lib → lib}/seahorse/client/param_converter.rb +2 -2
  136. data/{vendor/seahorse/lib → lib}/seahorse/client/plugins/endpoint.rb +24 -15
  137. data/{vendor/seahorse/lib → lib}/seahorse/client/plugins/restful_bindings.rb +1 -1
  138. data/{vendor/seahorse/lib → lib}/seahorse/client/request.rb +1 -1
  139. data/{vendor/seahorse/lib → lib}/seahorse/client/response.rb +0 -2
  140. data/{vendor/seahorse/lib → lib}/seahorse/client/xml/builder.rb +0 -1
  141. data/{vendor/seahorse/lib → lib}/seahorse/model/shape_map.rb +1 -0
  142. data/{vendor/seahorse/lib → lib}/seahorse/model/shapes.rb +13 -4
  143. data/{vendor/seahorse/lib → lib}/seahorse.rb +3 -3
  144. metadata +257 -593
  145. data/.gitignore +0 -8
  146. data/.simplecov +0 -6
  147. data/.travis.yml +0 -20
  148. data/.yardopts +0 -11
  149. data/Gemfile +0 -26
  150. data/LICENSE.txt +0 -12
  151. data/README.md +0 -250
  152. data/Rakefile +0 -17
  153. data/apis/autoscaling-2011-01-01.api.json +0 -2602
  154. data/apis/cloudformation-2010-05-15.api.json +0 -1306
  155. data/apis/cloudfront-2014-01-31.api.json +0 -3478
  156. data/apis/cloudfront-2014-01-31.paginators.json +0 -32
  157. data/apis/cloudfront-2014-05-31.api.json +0 -3540
  158. data/apis/cloudfront-2014-05-31.paginators.json +0 -32
  159. data/apis/cloudfront-2014-05-31.waiters.json +0 -29
  160. data/apis/cloudsearch-2011-02-01.api.json +0 -2093
  161. data/apis/cloudsearch-2011-02-01.paginators.json +0 -13
  162. data/apis/cloudsearch-2013-01-01.api.json +0 -2655
  163. data/apis/cloudsearchdomain-2013-01-01.api.json +0 -508
  164. data/apis/cloudtrail-2013-11-01.api.json +0 -773
  165. data/apis/cognito-identity-2014-06-30.api.json +0 -884
  166. data/apis/cognito-sync-2014-06-30.api.json +0 -1029
  167. data/apis/datapipeline-2012-10-29.api.json +0 -1432
  168. data/apis/directconnect-2012-10-25.api.json +0 -1174
  169. data/apis/dynamodb-2011-12-05.api.json +0 -1208
  170. data/apis/dynamodb-2011-12-05.waiters.json +0 -27
  171. data/apis/dynamodb-2012-08-10.api.json +0 -1857
  172. data/apis/dynamodb-2012-08-10.paginators.json +0 -27
  173. data/apis/ec2-2014-06-15.api.json +0 -11661
  174. data/apis/elasticache-2014-03-24.api.json +0 -4789
  175. data/apis/elasticbeanstalk-2010-12-01.api.json +0 -2442
  176. data/apis/elasticloadbalancing-2012-06-01.api.json +0 -2576
  177. data/apis/elasticmapreduce-2009-03-31.api.json +0 -2282
  178. data/apis/elastictranscoder-2012-09-25.api.json +0 -2478
  179. data/apis/email-2010-12-01.api.json +0 -954
  180. data/apis/endpoints.json +0 -98
  181. data/apis/glacier-2012-06-01.api.json +0 -2012
  182. data/apis/iam-2010-05-08.api.json +0 -5046
  183. data/apis/importexport-2010-06-01.api.json +0 -687
  184. data/apis/kinesis-2013-12-02.api.json +0 -769
  185. data/apis/logs-2014-03-28.api.json +0 -942
  186. data/apis/manifest.json +0 -250
  187. data/apis/monitoring-2010-08-01.api.json +0 -1338
  188. data/apis/opsworks-2013-02-18.api.json +0 -4348
  189. data/apis/rds-2013-01-10.api.json +0 -6074
  190. data/apis/rds-2013-02-12.api.json +0 -6392
  191. data/apis/rds-2013-02-12.paginators.json +0 -110
  192. data/apis/rds-2013-09-09.api.json +0 -6564
  193. data/apis/rds-2013-09-09.paginators.json +0 -110
  194. data/apis/redshift-2012-12-01.api.json +0 -6318
  195. data/apis/route53-2013-04-01.api.json +0 -1927
  196. data/apis/sdb-2009-04-15.api.json +0 -1178
  197. data/apis/sns-2010-03-31.api.json +0 -2275
  198. data/apis/sqs-2012-11-05.api.json +0 -1438
  199. data/apis/storagegateway-2013-06-30.api.json +0 -3153
  200. data/apis/sts-2011-06-15.api.json +0 -786
  201. data/apis/support-2013-04-15.api.json +0 -1115
  202. data/apis/swf-2012-01-25.api.json +0 -4463
  203. data/aws-sdk-core.gemspec +0 -22
  204. data/doc-src/images/lastnode.png +0 -0
  205. data/doc-src/images/node.png +0 -0
  206. data/doc-src/images/vline.png +0 -0
  207. data/doc-src/plugins/apis.rb +0 -260
  208. data/doc-src/plugins/stability.rb +0 -1
  209. data/doc-src/services/CloudSearchDomain/client.md +0 -8
  210. data/doc-src/services/CloudSearchDomain/service.md +0 -0
  211. data/doc-src/services/default/client.md +0 -84
  212. data/doc-src/services/default/errors.md +0 -45
  213. data/doc-src/services/default/service.md +0 -28
  214. data/doc-src/templates/default/fulldoc/html/css/common.css +0 -90
  215. data/doc-src/templates/default/fulldoc/html/js/tabs.js +0 -21
  216. data/doc-src/templates/default/fulldoc/html/setup.rb +0 -66
  217. data/doc-src/templates/default/layout/html/footer.erb +0 -29
  218. data/doc-src/templates/default/layout/html/layout.erb +0 -37
  219. data/doc-src/templates/default/layout/html/setup.rb +0 -3
  220. data/features/autoscaling/client.feature +0 -18
  221. data/features/autoscaling/step_definitions.rb +0 -6
  222. data/features/cloudformation/client.feature +0 -17
  223. data/features/cloudformation/step_definitions.rb +0 -6
  224. data/features/cloudfront/client.feature +0 -17
  225. data/features/cloudfront/step_definitions.rb +0 -6
  226. data/features/cloudsearch/client.feature +0 -16
  227. data/features/cloudsearch/step_definitions.rb +0 -6
  228. data/features/cloudtrail/client.feature +0 -16
  229. data/features/cloudtrail/step_definitions.rb +0 -6
  230. data/features/cloudwatch/client.feature +0 -19
  231. data/features/cloudwatch/step_definitions.rb +0 -6
  232. data/features/cloudwatchlogs/client.feature +0 -17
  233. data/features/cloudwatchlogs/step_definitions.rb +0 -6
  234. data/features/cognitoidentity/client.feature +0 -17
  235. data/features/cognitoidentity/step_definitions.rb +0 -6
  236. data/features/cognitosync/client.feature +0 -16
  237. data/features/cognitosync/step_definitions.rb +0 -6
  238. data/features/datapipeline/client.feature +0 -16
  239. data/features/datapipeline/step_definitions.rb +0 -6
  240. data/features/directconnect/client.feature +0 -16
  241. data/features/directconnect/step_definitions.rb +0 -6
  242. data/features/dynamodb/client.feature +0 -17
  243. data/features/dynamodb/simplified.feature +0 -32
  244. data/features/dynamodb/step_definitions.rb +0 -11
  245. data/features/ec2/client.feature +0 -16
  246. data/features/ec2/step_definitions.rb +0 -6
  247. data/features/elasticache/client.feature +0 -16
  248. data/features/elasticache/step_definitions.rb +0 -6
  249. data/features/elasticbeanstalk/client.feature +0 -16
  250. data/features/elasticbeanstalk/step_definitions.rb +0 -6
  251. data/features/elasticloadbalancing/client.feature +0 -16
  252. data/features/elasticloadbalancing/step_definitions.rb +0 -6
  253. data/features/elastictranscoder/client.feature +0 -16
  254. data/features/elastictranscoder/step_definitions.rb +0 -6
  255. data/features/emr/client.feature +0 -16
  256. data/features/emr/step_definitions.rb +0 -6
  257. data/features/env.rb +0 -23
  258. data/features/glacier/client.feature +0 -17
  259. data/features/glacier/step_definitions.rb +0 -93
  260. data/features/glacier/upload.feature +0 -27
  261. data/features/iam/client.feature +0 -16
  262. data/features/iam/step_definitions.rb +0 -6
  263. data/features/importexport/client.feature +0 -16
  264. data/features/importexport/step_definitions.rb +0 -6
  265. data/features/kinesis/client.feature +0 -16
  266. data/features/kinesis/step_definitions.rb +0 -6
  267. data/features/opsworks/client.feature +0 -16
  268. data/features/opsworks/step_definitions.rb +0 -6
  269. data/features/rds/client.feature +0 -16
  270. data/features/rds/step_definitions.rb +0 -6
  271. data/features/redshift/client.feature +0 -16
  272. data/features/redshift/step_definitions.rb +0 -6
  273. data/features/route53/client.feature +0 -16
  274. data/features/route53/step_definitions.rb +0 -6
  275. data/features/s3/buckets.feature +0 -40
  276. data/features/s3/objects.feature +0 -37
  277. data/features/s3/step_definitions.rb +0 -165
  278. data/features/s3/test.png +0 -0
  279. data/features/ses/client.feature +0 -16
  280. data/features/ses/step_definitions.rb +0 -6
  281. data/features/simpledb/client.feature +0 -16
  282. data/features/simpledb/step_definitions.rb +0 -6
  283. data/features/sns/client.feature +0 -17
  284. data/features/sns/step_definitions.rb +0 -6
  285. data/features/sqs/client.feature +0 -21
  286. data/features/sqs/step_definitions.rb +0 -29
  287. data/features/step_definitions.rb +0 -94
  288. data/features/storagegateway/client.feature +0 -16
  289. data/features/storagegateway/step_definitions.rb +0 -6
  290. data/features/sts/client.feature +0 -17
  291. data/features/sts/step_definitions.rb +0 -6
  292. data/features/swf/client.feature +0 -17
  293. data/features/swf/step_definitions.rb +0 -6
  294. data/integration-test-config.json.sample +0 -3
  295. data/lib/aws/api/manifest.rb +0 -29
  296. data/lib/aws/api/manifest_builder.rb +0 -57
  297. data/lib/aws/client.rb +0 -241
  298. data/lib/aws/endpoint_provider.rb +0 -165
  299. data/lib/aws/plugins/response_paging.rb +0 -20
  300. data/lib/aws/plugins/s3_sse_cpk.rb +0 -42
  301. data/lib/aws/response_handler.rb +0 -38
  302. data/lib/aws/service.rb +0 -32
  303. data/lib/aws/signers/v4.rb.orig +0 -243
  304. data/lib/aws/version.rb +0 -3
  305. data/lib/aws/version.rb.orig +0 -7
  306. data/lib/aws.rb +0 -208
  307. data/lib/aws.rb.orig +0 -218
  308. data/spec/aws/client_spec.rb +0 -269
  309. data/spec/aws/credential_provider_chain_spec.rb +0 -120
  310. data/spec/aws/credentials_spec.rb +0 -47
  311. data/spec/aws/errors_spec.rb +0 -39
  312. data/spec/aws/iam_spec.rb +0 -17
  313. data/spec/aws/instance_profile_credentials_spec.rb +0 -94
  314. data/spec/aws/json/builder_spec.rb +0 -188
  315. data/spec/aws/json/parser_spec.rb +0 -214
  316. data/spec/aws/operations_spec.rb +0 -145
  317. data/spec/aws/pageable_response_spec.rb +0 -171
  318. data/spec/aws/plugins/global_configuration_spec.rb +0 -58
  319. data/spec/aws/plugins/region_endpoint_spec.rb +0 -86
  320. data/spec/aws/plugins/request_signer_spec.rb +0 -88
  321. data/spec/aws/plugins/retry_errors_spec.rb +0 -266
  322. data/spec/aws/plugins/s3_md5s_spec.rb +0 -84
  323. data/spec/aws/plugins/sqs_queue_urls_spec.rb +0 -42
  324. data/spec/aws/query/param_builder_spec.rb +0 -362
  325. data/spec/aws/query/param_list_spec.rb +0 -80
  326. data/spec/aws/query/param_spec.rb +0 -64
  327. data/spec/aws/s3_spec.rb +0 -79
  328. data/spec/aws/shared_credentials_spec.rb +0 -68
  329. data/spec/aws/signers/v4_spec.rb +0 -141
  330. data/spec/aws/structure_spec.rb +0 -166
  331. data/spec/aws/util_spec.rb +0 -60
  332. data/spec/aws/xml/builder_spec.rb +0 -412
  333. data/spec/aws/xml/parser_spec.rb +0 -723
  334. data/spec/aws_spec.rb +0 -94
  335. data/spec/fixtures/api/swf.json +0 -100
  336. data/spec/fixtures/credentials/mock_shared_credentials +0 -14
  337. data/spec/fixtures/operations/cloudfront/list_distributions.yml +0 -199
  338. data/spec/fixtures/operations/cloudfront/max_items.yml +0 -11
  339. data/spec/fixtures/operations/dynamodb/error_parsing.yml +0 -13
  340. data/spec/fixtures/operations/glacier/account_id_param.yml +0 -13
  341. data/spec/fixtures/operations/glacier/custom_account_id.yml +0 -11
  342. data/spec/fixtures/operations/glacier/default_account_id.yml +0 -10
  343. data/spec/fixtures/operations/glacier/error_parsing.yml +0 -10
  344. data/spec/fixtures/operations/glacier/get_job_output.yml +0 -23
  345. data/spec/fixtures/operations/glacier/list_vaults.yml +0 -24
  346. data/spec/fixtures/operations/iam/result_wrapped_elements.yml +0 -31
  347. data/spec/fixtures/operations/route53/change_resource_record_sets.yml +0 -18
  348. data/spec/fixtures/operations/s3/304_response.yml +0 -12
  349. data/spec/fixtures/operations/s3/400_response.yml +0 -12
  350. data/spec/fixtures/operations/s3/403_response.yml +0 -12
  351. data/spec/fixtures/operations/s3/404_response.yml +0 -12
  352. data/spec/fixtures/operations/s3/412_response_head.yml +0 -10
  353. data/spec/fixtures/operations/s3/comlete_multipart_upload_error.yml +0 -18
  354. data/spec/fixtures/operations/s3/content_type_header.yml +0 -12
  355. data/spec/fixtures/operations/s3/create_bucket_with_implied_location_constraint.yml +0 -23
  356. data/spec/fixtures/operations/s3/create_bucket_with_location_constraint.yml +0 -25
  357. data/spec/fixtures/operations/s3/create_bucket_without_location_constraint.yml +0 -9
  358. data/spec/fixtures/operations/s3/delete_objects.yml +0 -54
  359. data/spec/fixtures/operations/s3/error_parsing.yml +0 -17
  360. data/spec/fixtures/operations/s3/get_bucket_location.yml +0 -17
  361. data/spec/fixtures/operations/s3/get_bucket_location_classic.yml +0 -17
  362. data/spec/fixtures/operations/s3/get_bucket_policy.yml +0 -8
  363. data/spec/fixtures/operations/s3/head_bucket_with_dns_incompatible_name.yml +0 -12
  364. data/spec/fixtures/operations/s3/head_object.yml +0 -50
  365. data/spec/fixtures/operations/s3/list_buckets.yml +0 -41
  366. data/spec/fixtures/operations/s3/md5_checksum_disabled.yml +0 -10
  367. data/spec/fixtures/operations/s3/md5_checksum_enabled.yml +0 -8
  368. data/spec/fixtures/operations/swf/list_domains.yml +0 -20
  369. data/spec/fixtures/protocols/input/ec2.json +0 -383
  370. data/spec/fixtures/protocols/input/json.json +0 -47
  371. data/spec/fixtures/protocols/input/query.json +0 -335
  372. data/spec/fixtures/protocols/input/rest-json.json +0 -365
  373. data/spec/fixtures/protocols/input/rest-xml.json +0 -818
  374. data/spec/fixtures/protocols/output/ec2.json +0 -381
  375. data/spec/fixtures/protocols/output/json.json +0 -313
  376. data/spec/fixtures/protocols/output/query.json +0 -424
  377. data/spec/fixtures/protocols/output/rest-json.json +0 -486
  378. data/spec/fixtures/protocols/output/rest-xml.json +0 -486
  379. data/spec/protocols_spec.rb +0 -186
  380. data/spec/spec_helper.rb +0 -66
  381. data/tasks/docs.rake +0 -61
  382. data/tasks/handlers.rake +0 -98
  383. data/tasks/manifest.rake +0 -9
  384. data/tasks/test.rake +0 -30
  385. data/vendor/seahorse/.gitignore +0 -5
  386. data/vendor/seahorse/.simplecov +0 -4
  387. data/vendor/seahorse/.yardopts +0 -10
  388. data/vendor/seahorse/Gemfile +0 -17
  389. data/vendor/seahorse/LICENSE.txt +0 -12
  390. data/vendor/seahorse/README.md +0 -129
  391. data/vendor/seahorse/Rakefile +0 -7
  392. data/vendor/seahorse/lib/seahorse/client/plugins/api.rb +0 -11
  393. data/vendor/seahorse/seahorse.gemspec +0 -20
  394. data/vendor/seahorse/spec/fixtures/plugin.rb +0 -4
  395. data/vendor/seahorse/spec/seahorse/client/base_spec.rb +0 -299
  396. data/vendor/seahorse/spec/seahorse/client/configuration_spec.rb +0 -122
  397. data/vendor/seahorse/spec/seahorse/client/handler_builder_spec.rb +0 -159
  398. data/vendor/seahorse/spec/seahorse/client/handler_list_spec.rb +0 -232
  399. data/vendor/seahorse/spec/seahorse/client/handler_spec.rb +0 -40
  400. data/vendor/seahorse/spec/seahorse/client/http/headers_spec.rb +0 -213
  401. data/vendor/seahorse/spec/seahorse/client/http/request_spec.rb +0 -121
  402. data/vendor/seahorse/spec/seahorse/client/http/response_spec.rb +0 -77
  403. data/vendor/seahorse/spec/seahorse/client/logging/formatter_spec.rb +0 -185
  404. data/vendor/seahorse/spec/seahorse/client/logging/handler_spec.rb +0 -63
  405. data/vendor/seahorse/spec/seahorse/client/net_http/connection_pool_spec.rb +0 -10
  406. data/vendor/seahorse/spec/seahorse/client/net_http/handler_spec.rb +0 -242
  407. data/vendor/seahorse/spec/seahorse/client/param_converter_spec.rb +0 -308
  408. data/vendor/seahorse/spec/seahorse/client/param_validator_spec.rb +0 -275
  409. data/vendor/seahorse/spec/seahorse/client/plugin_list_spec.rb +0 -166
  410. data/vendor/seahorse/spec/seahorse/client/plugin_spec.rb +0 -118
  411. data/vendor/seahorse/spec/seahorse/client/plugins/content_length_spec.rb +0 -19
  412. data/vendor/seahorse/spec/seahorse/client/plugins/endpoint_spec.rb +0 -33
  413. data/vendor/seahorse/spec/seahorse/client/plugins/logging_spec.rb +0 -46
  414. data/vendor/seahorse/spec/seahorse/client/plugins/net_http_spec.rb +0 -70
  415. data/vendor/seahorse/spec/seahorse/client/plugins/operation_methods_spec.rb +0 -76
  416. data/vendor/seahorse/spec/seahorse/client/request_context_spec.rb +0 -105
  417. data/vendor/seahorse/spec/seahorse/client/request_spec.rb +0 -152
  418. data/vendor/seahorse/spec/seahorse/client/response_spec.rb +0 -95
  419. data/vendor/seahorse/spec/seahorse/client/xml/builder/xml_doc_spec.rb +0 -142
  420. data/vendor/seahorse/spec/seahorse/client/xml/builder_spec.rb +0 -10
  421. data/vendor/seahorse/spec/seahorse/model/api_spec.rb +0 -154
  422. data/vendor/seahorse/spec/seahorse/model/operation_spec.rb +0 -162
  423. data/vendor/seahorse/spec/seahorse/model/shape_map_spec.rb +0 -84
  424. data/vendor/seahorse/spec/seahorse/model/shapes_spec.rb +0 -522
  425. data/vendor/seahorse/spec/seahorse/util_spec.rb +0 -54
  426. data/vendor/seahorse/spec/seahorse/version_spec.rb +0 -11
  427. data/vendor/seahorse/spec/spec_helper.rb +0 -34
  428. data/vendor/seahorse/tasks/docs.rake +0 -11
  429. data/vendor/seahorse/tasks/test.rake +0 -15
  430. /data/apis/{autoscaling-2011-01-01.paginators.json → AutoScaling.paginators.json} +0 -0
  431. /data/apis/{cloudformation-2010-05-15.paginators.json → CloudFormation.paginators.json} +0 -0
  432. /data/apis/{cloudfront-2014-01-31.waiters.json → CloudFront.waiters.json} +0 -0
  433. /data/apis/{cloudsearch-2013-01-01.paginators.json → CloudSearch.paginators.json} +0 -0
  434. /data/apis/{cloudtrail-2013-11-01.paginators.json → CloudTrail.paginators.json} +0 -0
  435. /data/apis/{monitoring-2010-08-01.paginators.json → CloudWatch.paginators.json} +0 -0
  436. /data/apis/{logs-2014-03-28.paginators.json → CloudWatchLogs.paginators.json} +0 -0
  437. /data/apis/{datapipeline-2012-10-29.paginators.json → DataPipeline.paginators.json} +0 -0
  438. /data/apis/{directconnect-2012-10-25.paginators.json → DirectConnect.paginators.json} +0 -0
  439. /data/apis/{dynamodb-2012-08-10.waiters.json → DynamoDB.waiters.json} +0 -0
  440. /data/apis/{ec2-2014-06-15.paginators.json → EC2.paginators.json} +0 -0
  441. /data/apis/{ec2-2014-06-15.waiters.json → EC2.waiters.json} +0 -0
  442. /data/apis/{elasticmapreduce-2009-03-31.paginators.json → EMR.paginators.json} +0 -0
  443. /data/apis/{elasticache-2014-03-24.paginators.json → ElastiCache.paginators.json} +0 -0
  444. /data/apis/{elasticbeanstalk-2010-12-01.paginators.json → ElasticBeanstalk.paginators.json} +0 -0
  445. /data/apis/{elasticloadbalancing-2012-06-01.paginators.json → ElasticLoadBalancing.paginators.json} +0 -0
  446. /data/apis/{elastictranscoder-2012-09-25.paginators.json → ElasticTranscoder.paginators.json} +0 -0
  447. /data/apis/{glacier-2012-06-01.paginators.json → Glacier.paginators.json} +0 -0
  448. /data/apis/{glacier-2012-06-01.waiters.json → Glacier.waiters.json} +0 -0
  449. /data/apis/{iam-2010-05-08.paginators.json → IAM.paginators.json} +0 -0
  450. /data/apis/{importexport-2010-06-01.paginators.json → ImportExport.paginators.json} +0 -0
  451. /data/apis/{opsworks-2013-02-18.paginators.json → OpsWorks.paginators.json} +0 -0
  452. /data/apis/{rds-2013-01-10.paginators.json → RDS.paginators.json} +0 -0
  453. /data/apis/{rds-2013-09-09.waiters.json → RDS.waiters.json} +0 -0
  454. /data/apis/{redshift-2012-12-01.paginators.json → Redshift.paginators.json} +0 -0
  455. /data/apis/{redshift-2012-12-01.waiters.json → Redshift.waiters.json} +0 -0
  456. /data/apis/{route53-2013-04-01.paginators.json → Route53.paginators.json} +0 -0
  457. /data/apis/{s3-2006-03-01.waiters.json → S3.waiters.json} +0 -0
  458. /data/apis/{email-2010-12-01.paginators.json → SES.paginators.json} +0 -0
  459. /data/apis/{email-2010-12-01.waiters.json → SES.waiters.json} +0 -0
  460. /data/apis/{sns-2010-03-31.paginators.json → SNS.paginators.json} +0 -0
  461. /data/apis/{sns-2010-03-31.resources.json → SNS.resources.json} +0 -0
  462. /data/apis/{sqs-2012-11-05.paginators.json → SQS.paginators.json} +0 -0
  463. /data/apis/{swf-2012-01-25.paginators.json → SWF.paginators.json} +0 -0
  464. /data/apis/{sdb-2009-04-15.paginators.json → SimpleDB.paginators.json} +0 -0
  465. /data/apis/{storagegateway-2013-06-30.paginators.json → StorageGateway.paginators.json} +0 -0
  466. /data/apis/{support-2013-04-15.paginators.json → Support.paginators.json} +0 -0
  467. /data/lib/{aws → aws-sdk-core}/api/customizer.rb +0 -0
  468. /data/lib/{aws → aws-sdk-core}/credentials.rb +0 -0
  469. /data/lib/{aws → aws-sdk-core}/json/builder.rb +0 -0
  470. /data/lib/{aws → aws-sdk-core}/json/error_handler.rb +0 -0
  471. /data/lib/{aws → aws-sdk-core}/json/parser.rb +0 -0
  472. /data/lib/{aws → aws-sdk-core}/json/rest_handler.rb +0 -0
  473. /data/lib/{aws → aws-sdk-core}/json/rpc_body_handler.rb +0 -0
  474. /data/lib/{aws → aws-sdk-core}/json/rpc_headers_handler.rb +0 -0
  475. /data/lib/{aws → aws-sdk-core}/json/simple_body_handler.rb +0 -0
  476. /data/lib/{aws → aws-sdk-core}/paging/null_pager.rb +0 -0
  477. /data/lib/{aws → aws-sdk-core}/paging/null_provider.rb +0 -0
  478. /data/lib/{aws → aws-sdk-core}/paging/pager.rb +0 -0
  479. /data/lib/{aws → aws-sdk-core}/paging/provider.rb +0 -0
  480. /data/lib/{aws → aws-sdk-core}/plugins/dynamodb_extended_retries.rb +0 -0
  481. /data/lib/{aws → aws-sdk-core}/plugins/ec2_copy_encrypted_snapshot.rb +0 -0
  482. /data/lib/{aws → aws-sdk-core}/plugins/glacier_account_id.rb +0 -0
  483. /data/lib/{aws → aws-sdk-core}/plugins/glacier_api_version.rb +0 -0
  484. /data/lib/{aws → aws-sdk-core}/plugins/glacier_checksums.rb +0 -0
  485. /data/lib/{aws → aws-sdk-core}/plugins/protocols/ec2.rb +0 -0
  486. /data/lib/{aws → aws-sdk-core}/plugins/protocols/query.rb +0 -0
  487. /data/lib/{aws → aws-sdk-core}/plugins/protocols/rest_json.rb +0 -0
  488. /data/lib/{aws → aws-sdk-core}/plugins/protocols/rest_xml.rb +0 -0
  489. /data/lib/{aws → aws-sdk-core}/plugins/s3_bucket_dns.rb +0 -0
  490. /data/lib/{aws → aws-sdk-core}/plugins/s3_complete_multipart_upload_fix.rb +0 -0
  491. /data/lib/{aws → aws-sdk-core}/plugins/s3_get_bucket_location_fix.rb +0 -0
  492. /data/lib/{aws → aws-sdk-core}/plugins/s3_location_constraint.rb +0 -0
  493. /data/lib/{aws → aws-sdk-core}/plugins/s3_md5s.rb +0 -0
  494. /data/lib/{aws → aws-sdk-core}/plugins/s3_redirects.rb +0 -0
  495. /data/lib/{aws → aws-sdk-core}/plugins/sqs_queue_urls.rb +0 -0
  496. /data/lib/{aws → aws-sdk-core}/plugins/swf_read_timeouts.rb +0 -0
  497. /data/lib/{aws → aws-sdk-core}/query/ec2_param_builder.rb +0 -0
  498. /data/lib/{aws → aws-sdk-core}/query/param.rb +0 -0
  499. /data/lib/{aws → aws-sdk-core}/query/param_builder.rb +0 -0
  500. /data/lib/{aws → aws-sdk-core}/query/param_list.rb +0 -0
  501. /data/lib/{aws → aws-sdk-core}/rest_body_handler.rb +0 -0
  502. /data/lib/{aws → aws-sdk-core}/shared_credentials.rb +0 -0
  503. /data/lib/{aws → aws-sdk-core}/signers/base.rb +0 -0
  504. /data/lib/{aws → aws-sdk-core}/signers/handler.rb +0 -0
  505. /data/lib/{aws → aws-sdk-core}/signers/s3.rb +0 -0
  506. /data/lib/{aws → aws-sdk-core}/signers/v2.rb +0 -0
  507. /data/lib/{aws → aws-sdk-core}/signers/v3.rb +0 -0
  508. /data/lib/{aws → aws-sdk-core}/tree_hash.rb +0 -0
  509. /data/lib/{aws → aws-sdk-core}/xml/error_handler.rb +0 -0
  510. /data/lib/{aws → aws-sdk-core}/xml/rest_handler.rb +0 -0
  511. /data/{vendor/seahorse/lib → lib}/seahorse/client/block_io.rb +0 -0
  512. /data/{vendor/seahorse/lib → lib}/seahorse/client/configuration.rb +0 -0
  513. /data/{vendor/seahorse/lib → lib}/seahorse/client/handler.rb +0 -0
  514. /data/{vendor/seahorse/lib → lib}/seahorse/client/handler_builder.rb +0 -0
  515. /data/{vendor/seahorse/lib → lib}/seahorse/client/handler_list_entry.rb +0 -0
  516. /data/{vendor/seahorse/lib → lib}/seahorse/client/http/headers.rb +0 -0
  517. /data/{vendor/seahorse/lib → lib}/seahorse/client/http/response.rb +0 -0
  518. /data/{vendor/seahorse/lib → lib}/seahorse/client/logging/formatter.rb +0 -0
  519. /data/{vendor/seahorse/lib → lib}/seahorse/client/logging/handler.rb +0 -0
  520. /data/{vendor/seahorse/lib → lib}/seahorse/client/managed_file.rb +0 -0
  521. /data/{vendor/seahorse/lib → lib}/seahorse/client/param_validator.rb +0 -0
  522. /data/{vendor/seahorse/lib → lib}/seahorse/client/plugin.rb +0 -0
  523. /data/{vendor/seahorse/lib → lib}/seahorse/client/plugin_list.rb +0 -0
  524. /data/{vendor/seahorse/lib → lib}/seahorse/client/plugins/content_length.rb +0 -0
  525. /data/{vendor/seahorse/lib → lib}/seahorse/client/plugins/json_simple.rb +0 -0
  526. /data/{vendor/seahorse/lib → lib}/seahorse/client/plugins/logging.rb +0 -0
  527. /data/{vendor/seahorse/lib → lib}/seahorse/client/plugins/net_http.rb +0 -0
  528. /data/{vendor/seahorse/lib → lib}/seahorse/client/plugins/operation_methods.rb +0 -0
  529. /data/{vendor/seahorse/lib → lib}/seahorse/client/plugins/param_conversion.rb +0 -0
  530. /data/{vendor/seahorse/lib → lib}/seahorse/client/plugins/param_validation.rb +0 -0
  531. /data/{vendor/seahorse/lib → lib}/seahorse/client/plugins/raise_response_errors.rb +0 -0
  532. /data/{vendor/seahorse/lib → lib}/seahorse/client/request_context.rb +0 -0
  533. /data/{vendor/seahorse/lib → lib}/seahorse/model/api.rb +0 -0
  534. /data/{vendor/seahorse/lib → lib}/seahorse/model/operation.rb +0 -0
  535. /data/{vendor/seahorse/lib → lib}/seahorse/util.rb +0 -0
  536. /data/{vendor/seahorse/lib → lib}/seahorse/version.rb +0 -0
@@ -0,0 +1,37 @@
1
+ module Aws
2
+ module Plugins
3
+
4
+ # Makes it possible to conditional sign {Aws::CloudSearchDomain::Client}
5
+ # requests. When credentials are configured, requests are signed.
6
+ # When they are omitted, the request is sent anonymously.
7
+ #
8
+ # @seahorse.client.option [String] :sigv4_region Only needed when sending
9
+ # authenticated/signed requests to a Cloud Search domain and the
10
+ # endpoint does not contain the region name.
11
+ #
12
+ class CSDConditionalSigning < Seahorse::Client::Plugin
13
+
14
+ # Adding region as an option to avoid an issue when `Aws.config[:region]`
15
+ # is populated and the global configuration plugin merges options onto
16
+ # this client.
17
+ option(:region)
18
+
19
+ option(:sigv4_region) do |cfg|
20
+ # extract the region name from the cloud search domain endpoint
21
+ if cfg.endpoint
22
+ cfg.endpoint.to_s.split('.')[1]
23
+ else
24
+ raise ArgumentError, 'missing required option :endpoint'
25
+ end
26
+ end
27
+
28
+ def after_initialize(client)
29
+ # disable request singing when credentials are not set
30
+ if client.config.credentials.nil? or !client.config.credentials.set?
31
+ client.config.signature_version = nil
32
+ end
33
+ end
34
+
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,179 @@
1
+ module Aws
2
+ module Plugins
3
+
4
+ # Simplifies working with Amazon DynamoDB attribute values.
5
+ # Translates attribute values for requests and responses to sensible
6
+ # Ruby natives.
7
+ #
8
+ # This plugin is enabled by default for all {DynamoDB::Client}
9
+ # objects. You can disable this plugin by passing
10
+ # `simple_attributes: false` to the client constructor:
11
+ #
12
+ # ddb = Aws::DynamoDB::Client.new(simple_attributes: false)
13
+ #
14
+ # ## Input Examples
15
+ #
16
+ # With this plugin **enabled**, `simple_attributes: true`:
17
+ #
18
+ # dynamodb.put_item(
19
+ # table_name: 'aws-sdk',
20
+ # item: {
21
+ # id: 'uuid',
22
+ # age: 35,
23
+ # tags: Set.new(%w(simple attributes)),
24
+ # data: StringIO.new('data')
25
+ # }
26
+ # )
27
+ #
28
+ # With this plugin **disabled**, `simple_attributes: false`:
29
+ #
30
+ # # note that all types are prefixed in a hash and that
31
+ # # numeric types must be serialized as strings
32
+ # dynamodb.put_item(
33
+ # table_name: 'aws-sdk',
34
+ # item: {
35
+ # 'id' => { s: 'uuid' },
36
+ # 'age' => { n: '35' },
37
+ # 'tags' => { ss: ['simple', 'attributes'] },
38
+ # 'data' => { b: 'data' },
39
+ # }
40
+ # )
41
+ #
42
+ # ## Output Examples
43
+ #
44
+ # With this plugin **enabled**, `simple_attributes: true`:
45
+ #
46
+ # resp = dynamodb.get(table_name: 'aws-sdk', key: { id: 'uuid' })
47
+ # resp.item
48
+ # {
49
+ # id: 'uuid',
50
+ # age: 35,
51
+ # tags: Set.new(%w(simple attributes)),
52
+ # data: StringIO.new('data')
53
+ # }
54
+ #
55
+ # With this plugin **disabled**, `simple_attributes: false`:
56
+ #
57
+ # # note that the request `:key` had to be type prefixed
58
+ # resp = dynamodb.get(table_name: 'aws-sdk', key: { 'id' => { s: 'uuid' }})
59
+ # resp.item
60
+ # # {
61
+ # # "id"=> <struct s='uuid', n=nil, b=nil, ss=nil, ns=nil, bs=nil>,
62
+ # # "age"=> <struct s=nil, n="35", b=nil, ss=nil, ns=nil, bs=nil>,
63
+ # # "tags"=> <struct s=nil, n=nil, b=nil, ss=['simple', 'attributes'], ns=nil, bs=nil>,
64
+ # # "data"=> <struct s=nil, n=nil, b="data", ss=nil, ns=nil, bs=nil>,
65
+ # # }
66
+ #
67
+ # @seahorse.client.option [Boolean] :simple_attributes (true)
68
+ # Enables working with DynamoDB attribute values using simple
69
+ # Ruby natives.
70
+ #
71
+ # Disabling this option requires that all attribute values have
72
+ # their types specified, e.g. `{ s: 'abc' }` instead of simply
73
+ # `'abc'`.
74
+ #
75
+ class DynamoDBSimpleAttributes < Seahorse::Client::Plugin
76
+
77
+ option(:simple_attributes) { |config| !config.simple_json }
78
+
79
+ def add_handlers(handlers, config)
80
+ if config.simple_attributes
81
+ handlers.add(Handler, step: :initialize)
82
+ end
83
+ end
84
+
85
+ class Handler < Seahorse::Client::Handler
86
+
87
+ def call(context)
88
+ context.params = translate_input(context)
89
+ @handler.call(context).on(200) do |response|
90
+ response.data = translate_output(response)
91
+ end
92
+ end
93
+
94
+ private
95
+
96
+ def translate_input(context)
97
+ if shape = context.operation.input
98
+ ValueTranslator.new(shape, :marshal).apply(context.params)
99
+ else
100
+ context.params
101
+ end
102
+ end
103
+
104
+ def translate_output(response)
105
+ if shape = response.context.operation.output
106
+ ValueTranslator.new(shape, :unmarshal).apply(response.data)
107
+ else
108
+ response.data
109
+ end
110
+ end
111
+
112
+ end
113
+
114
+ # @api private
115
+ class ValueTranslator
116
+
117
+ # @param [Seahorse::Model::Shapes::Shape] shape
118
+ # @param [Symbol<:marshal,:unmarshal>] mode
119
+ def initialize(shape, mode)
120
+ @shape = shape
121
+ @mode = mode
122
+ end
123
+
124
+ def apply(values)
125
+ structure(@shape, values) if @shape
126
+ end
127
+
128
+ private
129
+
130
+ def structure(shape, values)
131
+ if values.is_a?(Struct)
132
+ values.members.each do |key|
133
+ values[key] = translate(shape.member(key), values[key])
134
+ end
135
+ values
136
+ elsif values.is_a?(Hash)
137
+ values.each.with_object({}) do |(key, value), hash|
138
+ hash[key] = translate(shape.member(key), value)
139
+ end
140
+ else
141
+ values
142
+ end
143
+ end
144
+
145
+ def list(shape, values)
146
+ return values unless values.is_a?(Array)
147
+ values.inject([]) do |list, value|
148
+ list << translate(shape.member, value)
149
+ end
150
+ end
151
+
152
+ def map(shape, values)
153
+ return values unless values.is_a?(Hash)
154
+ values.each.with_object({}) do |(key, value), hash|
155
+ hash[key] = translate(shape.value, value)
156
+ end
157
+ end
158
+
159
+ def translate(shape, value)
160
+ if shape.name == 'AttributeValue'
161
+ DynamoDB::AttributeValue.new.send(@mode, value)
162
+ else
163
+ translate_complex(shape, value)
164
+ end
165
+ end
166
+
167
+ def translate_complex(shape, value)
168
+ case shape
169
+ when Seahorse::Model::Shapes::Structure then structure(shape, value)
170
+ when Seahorse::Model::Shapes::List then list(shape, value)
171
+ when Seahorse::Model::Shapes::Map then map(shape, value)
172
+ else value
173
+ end
174
+ end
175
+
176
+ end
177
+ end
178
+ end
179
+ end
@@ -1,3 +1,5 @@
1
+ require 'set'
2
+
1
3
  module Aws
2
4
  module Plugins
3
5
 
@@ -38,6 +40,9 @@ module Aws
38
40
  #
39
41
  class GlobalConfiguration < Seahorse::Client::Plugin
40
42
 
43
+ # @api private
44
+ IDENTIFIERS = Set.new
45
+
41
46
  # @api private
42
47
  def before_initialize(client_class, options)
43
48
  # apply service specific defaults before the global aws defaults
@@ -48,20 +53,16 @@ module Aws
48
53
  private
49
54
 
50
55
  def apply_service_defaults(client_class, options)
51
- if defaults = Aws.config[client_class::IDENTIFIER]
56
+ if defaults = Aws.config[client_class.identifier]
52
57
  defaults.each do |option_name, default|
53
- next if option_name == :api_version
54
- next if options.key?(option_name)
55
- options[option_name] = default
58
+ options[option_name] = default unless options.key?(option_name)
56
59
  end
57
60
  end
58
61
  end
59
62
 
60
63
  def apply_aws_defaults(client_class, options)
61
64
  Aws.config.each do |option_name, default|
62
- next if client_class::IDENTIFIER == option_name
63
- next if Aws.service_modules.key?(option_name)
64
- next if option_name == :api_version
65
+ next if IDENTIFIERS.include?(option_name)
65
66
  next if options.key?(option_name)
66
67
  options[option_name] = default
67
68
  end
@@ -69,4 +70,10 @@ module Aws
69
70
 
70
71
  end
71
72
  end
73
+
74
+ service_added do |name, _, _|
75
+ Plugins::GlobalConfiguration::IDENTIFIERS << name.downcase.to_sym
76
+ end
77
+
72
78
  end
79
+
@@ -3,13 +3,15 @@ module Aws
3
3
  module Protocols
4
4
 
5
5
  # @seahorse.client.option [Boolean] :simple_json (false)
6
- # Enables simple mode where the request body becomes a simple
7
- # JSON dump of the request paramters. The response data will also
8
- # be a simple JSON load of the response body. Enabling
9
- # simple mode avoids the overhead of request parameter valdiation,
10
- # request parameter type conversion, and structuring response
11
- # data. You must provide request params in the format expected
12
- # by the remote service.
6
+ # Disables request parameter conversion, validation, and formatting.
7
+ # Also disable response data type conversions. This option is useful
8
+ # when you want to ensure the highest level of performance by
9
+ # avoiding overhead of walking request parameters and response data
10
+ # structures.
11
+ #
12
+ # When `:simple_json` is enabled, the request parameters hash must
13
+ # be formatted exactly as the DynamoDB API expects.
14
+ #
13
15
  class JsonRpc < Seahorse::Client::Plugin
14
16
 
15
17
  option(:simple_json, false)
@@ -1,7 +1,7 @@
1
1
  module Aws
2
2
  module Plugins
3
3
 
4
- # @seahorse.client.option [String] :region
4
+ # @seahorse.client.option [required, String] :region
5
5
  # The AWS region to connect to. The region is used to construct
6
6
  # the client endpoint. Defaults to `ENV['AWS_DEFAULT_REGION']`.
7
7
  # Also checks `AWS_REGION` and `AMAZON_REGION`.
@@ -19,10 +19,8 @@ module Aws
19
19
  ENV.values_at(*keys).compact.first
20
20
  }
21
21
 
22
- option(:endpoint_provider) { EndpointProvider.default_provider }
23
-
24
22
  option(:endpoint) do |cfg|
25
- cfg.endpoint_provider.resolve(
23
+ EndpointProvider.default_provider.resolve(
26
24
  service: cfg.api.metadata('endpointPrefix'),
27
25
  region: cfg.region,
28
26
  scheme: 'https'
@@ -40,8 +40,11 @@ module Aws
40
40
  # Intentionally not documented - this should go away when all
41
41
  # services support signature version 4 in every region.
42
42
  option(:signature_version) do |cfg|
43
- if cfg.region.to_s.match(/^cn-/)
44
- 'v4'
43
+ if
44
+ cfg.api.metadata('endpointPrefix') == 's3' &&
45
+ cfg.api.metadata('v3Regions').include?(cfg.region)
46
+ then
47
+ 's3'
45
48
  else
46
49
  cfg.api.metadata('signatureVersion')
47
50
  end
@@ -76,22 +79,29 @@ module Aws
76
79
  @handler.call(context)
77
80
  end
78
81
 
82
+ private
83
+
79
84
  def sign_authenticated_requests(context)
80
85
  if signer = SIGNERS[context.config.signature_version]
86
+ require_credentials(context)
81
87
  signer.sign(context)
82
88
  end
83
89
  end
84
90
 
91
+ def require_credentials(context)
92
+ if
93
+ context.config.credentials.nil? or
94
+ !context.config.credentials.set?
95
+ then
96
+ msg = 'unable to sign request without credentials set'
97
+ raise Errors::MissingCredentialsError, msg
98
+ end
99
+ end
100
+
85
101
  end
86
102
 
87
103
  handler(Handler, step: :sign)
88
104
 
89
- def after_initialize(client)
90
- if client.config.credentials.nil? or !client.config.credentials.set?
91
- raise Errors::MissingCredentialsError
92
- end
93
- end
94
-
95
105
  end
96
106
  end
97
107
  end
@@ -0,0 +1,25 @@
1
+ module Aws
2
+ module Plugins
3
+ class ResponsePaging < Seahorse::Client::Plugin
4
+
5
+ # @api private
6
+ class Handler < Seahorse::Client::Handler
7
+
8
+ def call(context)
9
+ context[:original_params] = context.params
10
+ PageableResponse.new(@handler.call(context), pager(context))
11
+ end
12
+
13
+ private
14
+
15
+ def pager(context)
16
+ context.client.class.paginators.pager(context.operation.name)
17
+ end
18
+
19
+ end
20
+
21
+ handler(Handler, step: :initialize, priority: 90)
22
+
23
+ end
24
+ end
25
+ end
@@ -44,7 +44,7 @@ module Aws
44
44
 
45
45
  def initialize(error, http_status_code)
46
46
  @error = error
47
- @name = error.class.name.split('::').last
47
+ @name = extract_name(error)
48
48
  @http_status_code = http_status_code
49
49
  end
50
50
 
@@ -70,6 +70,16 @@ module Aws
70
70
  (500..599).include?(@http_status_code)
71
71
  end
72
72
 
73
+ private
74
+
75
+ def extract_name(error)
76
+ if error.is_a?(Errors::ServiceError)
77
+ error.class.code
78
+ else
79
+ error.class.name.to_s
80
+ end
81
+ end
82
+
73
83
  end
74
84
 
75
85
  class Handler < Seahorse::Client::Handler
@@ -0,0 +1,55 @@
1
+ module Aws
2
+ module Plugins
3
+
4
+ # The Amazon Route 53 API returns hosted zones and request Ids as strings
5
+ # formatted like:
6
+ #
7
+ # '/hostedzone/ID'
8
+ # '/change/ID'
9
+ #
10
+ # However, their API does not accept Ids with the '/hostedzone/' or
11
+ # '/change/' prefixes. This plugin removes those prefixes before
12
+ # serializing their Ids onto the request. This allows a user to
13
+ # use the prefixed Ids returned in {Aws::Route53::Client} responses.
14
+ class Route53IdFix < Seahorse::Client::Plugin
15
+
16
+ class Handler < Seahorse::Client::Handler
17
+
18
+ def call(context)
19
+ remove_id_prefixes(context.params)
20
+ @handler.call(context)
21
+ end
22
+
23
+ private
24
+
25
+ def remove_id_prefixes(params)
26
+ # Many operations accept of :id or :hosted_zone_id as a root-level
27
+ # param, pruning prefixes from those.
28
+ [:id, :hosted_zone_id].each do |key|
29
+ params[key] = remove_prefix(params[key]) if params[key]
30
+ end
31
+
32
+ # The `#change_resource_record_sets operation` has a deeply nested
33
+ # target with a :hosted_zone_id that needs to be pruned.
34
+ if params[:change_batch]
35
+ params[:change_batch][:changes].each do |batch|
36
+ if target = batch[:resource_record_set][:alias_target]
37
+ target[:hosted_zone_id] = remove_prefix(target[:hosted_zone_id])
38
+ end
39
+ end
40
+ end
41
+ end
42
+
43
+ def remove_prefix(str)
44
+ str.sub(/^\/(hostedzone|change)\//, '')
45
+ end
46
+
47
+ end
48
+
49
+ # Run this handler after params have been validated, but before
50
+ # they are serialized onto the request
51
+ handler(Handler, priority: 99, step: :build)
52
+
53
+ end
54
+ end
55
+ end
@@ -0,0 +1,27 @@
1
+ module Aws
2
+ module Plugins
3
+ class S3Expect100Continue < Seahorse::Client::Plugin
4
+
5
+ def add_handlers(handlers, config)
6
+ if config.http_continue_timeout && config.http_continue_timeout > 0
7
+ handlers.add(Handler)
8
+ end
9
+ end
10
+
11
+ # @api private
12
+ class Handler < Seahorse::Client::Handler
13
+
14
+ def call(context)
15
+ if
16
+ context.http_request.body &&
17
+ context.http_request.body.size > 0
18
+ then
19
+ context.http_request.headers['expect'] = '100-continue'
20
+ end
21
+ @handler.call(context)
22
+ end
23
+
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,63 @@
1
+ require 'uri'
2
+
3
+ module Aws
4
+ module Plugins
5
+
6
+ # @seahorse.client.option [Boolean] :require_https_for_sse_cpk (true)
7
+ # When `true`, the endpoint **must** be HTTPS for all operations
8
+ # where server-side-encryption is used with customer-provided keys.
9
+ # This should only be disabled for local testing.
10
+ class S3SseCpk < Seahorse::Client::Plugin
11
+
12
+ option(:require_https_for_sse_cpk, true)
13
+
14
+ class Handler < Seahorse::Client::Handler
15
+
16
+ def call(context)
17
+ compute_key_md5(context)
18
+ @handler.call(context)
19
+ end
20
+
21
+ private
22
+
23
+ def compute_key_md5(context)
24
+ params = context.params
25
+ if key = params[:sse_customer_key]
26
+ require_https(context)
27
+ params[:sse_customer_key] = base64(key)
28
+ params[:sse_customer_key_md5] = base64(md5(key))
29
+ end
30
+ if key = params[:copy_source_sse_customer_key]
31
+ require_https(context)
32
+ params[:copy_source_sse_customer_key] = base64(key)
33
+ params[:copy_source_sse_customer_key_md5] = base64(md5(key))
34
+ end
35
+ end
36
+
37
+ def require_https(context)
38
+ unless URI::HTTPS === context.config.endpoint
39
+ msg = <<-MSG.strip.gsub("\n", ' ')
40
+ Attempting to send customer-provided-keys for S3
41
+ server-side-encryption over HTTP; Please configure a HTTPS
42
+ endpoint. If you are attempting to use a test endpoint,
43
+ you can disable this check via `:require_https_for_sse_cpk`
44
+ MSG
45
+ raise ArgumentError, msg
46
+ end
47
+ end
48
+
49
+ def md5(str)
50
+ OpenSSL::Digest::MD5.digest(str)
51
+ end
52
+
53
+ def base64(str)
54
+ Base64.encode64(str).strip
55
+ end
56
+
57
+ end
58
+
59
+ handler(Handler, step: :initialize)
60
+
61
+ end
62
+ end
63
+ end
@@ -0,0 +1,92 @@
1
+ require 'cgi'
2
+
3
+ module Aws
4
+ module Plugins
5
+
6
+ # This plugin auto-populates the `:encoding_type` request parameter
7
+ # to all calls made to Amazon S3 that accept it.
8
+ #
9
+ # This enables Amazon S3 to return object keys that might contain
10
+ # invalid XML characters as URL encoded strings. This plugin also
11
+ # automatically decodes these keys so that the key management is
12
+ # transparent to the user.
13
+ #
14
+ # If you specify the `:encoding_type` parameter, then this plugin
15
+ # will be disabled, and you will need to decode the keys yourself.
16
+ #
17
+ # The following operations are managed:
18
+ #
19
+ # * {S3::Client#list_objects}
20
+ # * {S3::Client#list_multipart_uploads}
21
+ # * {S3::Client#list_object_versions}
22
+ #
23
+ class S3UrlEncodedKeys < Seahorse::Client::Plugin
24
+
25
+ class Handler < Seahorse::Client::Handler
26
+
27
+ def call(context)
28
+ if context.params.key?(:encoding_type)
29
+ @handler.call(context) # user managed
30
+ else
31
+ manage_keys(context)
32
+ end
33
+ end
34
+
35
+ private
36
+
37
+ def manage_keys(context)
38
+ context.params[:encoding_type] = 'url'
39
+ @handler.call(context).on_success do |resp|
40
+ send("decode_#{resp.context.operation_name}_keys", resp.data)
41
+ end
42
+ end
43
+
44
+ def decode_list_objects_keys(data)
45
+ decode(:marker, data)
46
+ decode(:next_marker, data)
47
+ decode(:prefix, data)
48
+ decode(:delimiter, data)
49
+ data.contents.each { |o| decode(:key, o) } if data.contents
50
+ data.common_prefixes.each { |o| decode(:prefix, o) } if data.common_prefixes
51
+ end
52
+
53
+ def decode_list_object_versions_keys(data)
54
+ decode(:key_marker, data)
55
+ decode(:next_key_marker, data)
56
+ decode(:prefix, data)
57
+ decode(:delimiter, data)
58
+ data.versions.each { |o| decode(:key, o) } if data.versions
59
+ data.delete_markers.each { |o| decode(:key, o) } if data.delete_markers
60
+ data.common_prefixes.each { |o| decode(:prefix, o) } if data.common_prefixes
61
+ end
62
+
63
+ def decode_list_multipart_uploads_keys(data)
64
+ decode(:key_marker, data)
65
+ decode(:next_key_marker, data)
66
+ decode(:prefix, data)
67
+ decode(:delimiter, data)
68
+ data.uploads.each { |o| decode(:key, o) } if data.uploads
69
+ data.common_prefixes.each { |o| decode(:prefix, o) } if data.common_prefixes
70
+ end
71
+
72
+ def decode(member, struct)
73
+ if struct[member]
74
+ struct[member] = CGI.unescape(struct[member])
75
+ end
76
+ end
77
+
78
+ end
79
+
80
+ handler(Handler,
81
+ step: :build,
82
+ priority: 60, # run this just before/after the XML builder/parser
83
+ operations: [
84
+ :list_objects,
85
+ :list_object_versions,
86
+ :list_multipart_uploads,
87
+ ]
88
+ )
89
+
90
+ end
91
+ end
92
+ end
@@ -13,11 +13,10 @@ module Aws
13
13
  end
14
14
 
15
15
  def set_user_agent(context)
16
- ua = "aws-sdk-ruby2/#{VERSION} %s/%s %s Seahorse/%s %s" % [
16
+ ua = "aws-sdk-ruby2/#{VERSION} %s/%s %s %s" % [
17
17
  (RUBY_ENGINE rescue nil or "ruby"),
18
18
  RUBY_VERSION,
19
19
  RUBY_PLATFORM,
20
- Seahorse::VERSION,
21
20
  context.config.user_agent_suffix,
22
21
  ]
23
22
  context.http_request.headers['User-Agent'] = ua.strip
@@ -33,9 +33,8 @@ module Aws
33
33
 
34
34
  def parse_xml(context)
35
35
  if rules = context.operation.output
36
- rules = apply_wrapper(rules)
37
- data = Xml::Parser.new(rules).parse(xml(context))
38
- remove_wrapper(data, context)
36
+ data = Xml::Parser.new(apply_wrapper(rules)).parse(xml(context))
37
+ remove_wrapper(data, context, rules)
39
38
  else
40
39
  EmptyStructure.new
41
40
  end
@@ -59,10 +58,10 @@ module Aws
59
58
  }, shape_map: shape.shape_map)
60
59
  end
61
60
 
62
- def remove_wrapper(data, context)
61
+ def remove_wrapper(data, context, rules)
63
62
  if context.operation.output.metadata('resultWrapper')
64
63
  context[:request_id] = data.response_metadata.request_id
65
- data[data.members.first]
64
+ data[data.members.first] || Structure.new(rules.member_names)
66
65
  else
67
66
  data
68
67
  end