rest-xml.json 37 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633
  1. [
  2. {
  3. "description": "Basic XML serialization",
  4. "metadata": {
  5. "protocol": "rest-xml",
  6. "apiVersion": "2014-01-01"
  7. },
  8. "shapes": {
  9. "InputShape": {
  10. "type": "structure",
  11. "members": {
  12. "Name": {
  13. "shape": "StringType"
  14. },
  15. "Description": {
  16. "shape": "StringType"
  17. }
  18. }
  19. },
  20. "StringType": {
  21. "type": "string"
  22. }
  23. },
  24. "cases": [
  25. {
  26. "given": {
  27. "http": {
  28. "method": "POST",
  29. "requestUri": "/2014-01-01/hostedzone"
  30. },
  31. "input": {
  32. "shape": "InputShape",
  33. "locationName": "OperationRequest",
  34. "xmlNamespace": {"uri": "https://foo/"}
  35. },
  36. "name": "OperationName"
  37. },
  38. "params": {
  39. "Name": "foo",
  40. "Description": "bar"
  41. },
  42. "serialized": {
  43. "method": "POST",
  44. "body": "<OperationRequest xmlns=\"https://foo/\"><Name>foo</Name><Description>bar</Description></OperationRequest>",
  45. "uri": "/2014-01-01/hostedzone",
  46. "headers": {}
  47. }
  48. },
  49. {
  50. "given": {
  51. "http": {
  52. "method": "PUT",
  53. "requestUri": "/2014-01-01/hostedzone"
  54. },
  55. "input": {
  56. "shape": "InputShape",
  57. "locationName": "OperationRequest",
  58. "xmlNamespace": {"uri": "https://foo/"}
  59. },
  60. "name": "OperationName"
  61. },
  62. "params": {
  63. "Name": "foo",
  64. "Description": "bar"
  65. },
  66. "serialized": {
  67. "method": "PUT",
  68. "body": "<OperationRequest xmlns=\"https://foo/\"><Name>foo</Name><Description>bar</Description></OperationRequest>",
  69. "uri": "/2014-01-01/hostedzone",
  70. "headers": {}
  71. }
  72. },
  73. {
  74. "given": {
  75. "http": {
  76. "method": "GET",
  77. "requestUri": "/2014-01-01/hostedzone"
  78. },
  79. "name": "OperationName"
  80. },
  81. "params": {},
  82. "serialized": {
  83. "method": "GET",
  84. "body": "",
  85. "uri": "/2014-01-01/hostedzone",
  86. "headers": {}
  87. }
  88. }
  89. ]
  90. },
  91. {
  92. "description": "Serialize other scalar types",
  93. "metadata": {
  94. "protocol": "rest-xml",
  95. "apiVersion": "2014-01-01"
  96. },
  97. "shapes": {
  98. "InputShape": {
  99. "type": "structure",
  100. "members": {
  101. "First": {
  102. "shape": "BoolType"
  103. },
  104. "Second": {
  105. "shape": "BoolType"
  106. },
  107. "Third": {
  108. "shape": "FloatType"
  109. },
  110. "Fourth": {
  111. "shape": "IntegerType"
  112. }
  113. }
  114. },
  115. "BoolType": {
  116. "type": "boolean"
  117. },
  118. "FloatType": {
  119. "type": "float"
  120. },
  121. "IntegerType": {
  122. "type": "integer"
  123. }
  124. },
  125. "cases": [
  126. {
  127. "given": {
  128. "http": {
  129. "method": "POST",
  130. "requestUri": "/2014-01-01/hostedzone"
  131. },
  132. "input": {
  133. "shape": "InputShape",
  134. "locationName": "OperationRequest",
  135. "xmlNamespace": {"uri": "https://foo/"}
  136. },
  137. "name": "OperationName"
  138. },
  139. "params": {
  140. "First": true,
  141. "Second": false,
  142. "Third": 1.2,
  143. "Fourth": 3
  144. },
  145. "serialized": {
  146. "method": "POST",
  147. "body": "<OperationRequest xmlns=\"https://foo/\"><First>true</First><Second>false</Second><Third>1.2</Third><Fourth>3</Fourth></OperationRequest>",
  148. "uri": "/2014-01-01/hostedzone",
  149. "headers": {}
  150. }
  151. }
  152. ]
  153. },
  154. {
  155. "description": "Nested structures",
  156. "metadata": {
  157. "protocol": "rest-xml",
  158. "apiVersion": "2014-01-01"
  159. },
  160. "shapes": {
  161. "InputShape": {
  162. "type": "structure",
  163. "members": {
  164. "SubStructure": {
  165. "shape": "SubStructure"
  166. },
  167. "Description": {
  168. "shape": "StringType"
  169. }
  170. }
  171. },
  172. "SubStructure": {
  173. "type": "structure",
  174. "members": {
  175. "Foo": {
  176. "shape": "StringType"
  177. },
  178. "Bar": {
  179. "shape": "StringType"
  180. }
  181. }
  182. },
  183. "StringType": {
  184. "type": "string"
  185. }
  186. },
  187. "cases": [
  188. {
  189. "given": {
  190. "http": {
  191. "method": "POST",
  192. "requestUri": "/2014-01-01/hostedzone"
  193. },
  194. "input": {
  195. "shape": "InputShape",
  196. "locationName": "OperationRequest",
  197. "xmlNamespace": {"uri": "https://foo/"}
  198. },
  199. "name": "OperationName"
  200. },
  201. "params": {
  202. "SubStructure": {
  203. "Foo": "a",
  204. "Bar": "b"
  205. },
  206. "Description": "baz"
  207. },
  208. "serialized": {
  209. "method": "POST",
  210. "body": "<OperationRequest xmlns=\"https://foo/\"><SubStructure><Foo>a</Foo><Bar>b</Bar></SubStructure><Description>baz</Description></OperationRequest>",
  211. "uri": "/2014-01-01/hostedzone",
  212. "headers": {}
  213. }
  214. },
  215. {
  216. "given": {
  217. "http": {
  218. "method": "POST",
  219. "requestUri": "/2014-01-01/hostedzone"
  220. },
  221. "input": {
  222. "shape": "InputShape",
  223. "locationName": "OperationRequest",
  224. "xmlNamespace": {"uri": "https://foo/"}
  225. },
  226. "name": "OperationName"
  227. },
  228. "params": {
  229. "SubStructure": {
  230. "Foo": "a",
  231. "Bar": null
  232. },
  233. "Description": "baz"
  234. },
  235. "serialized": {
  236. "method": "POST",
  237. "body": "<OperationRequest xmlns=\"https://foo/\"><SubStructure><Foo>a</Foo></SubStructure><Description>baz</Description></OperationRequest>",
  238. "uri": "/2014-01-01/hostedzone",
  239. "headers": {}
  240. }
  241. }
  242. ]
  243. },
  244. {
  245. "description": "Nested structures",
  246. "metadata": {
  247. "protocol": "rest-xml",
  248. "apiVersion": "2014-01-01"
  249. },
  250. "shapes": {
  251. "InputShape": {
  252. "type": "structure",
  253. "members": {
  254. "SubStructure": {
  255. "shape": "SubStructure"
  256. },
  257. "Description": {
  258. "shape": "StringType"
  259. }
  260. }
  261. },
  262. "SubStructure": {
  263. "type": "structure",
  264. "members": {
  265. "Foo": {
  266. "shape": "StringType"
  267. },
  268. "Bar": {
  269. "shape": "StringType"
  270. }
  271. }
  272. },
  273. "StringType": {
  274. "type": "string"
  275. }
  276. },
  277. "cases": [
  278. {
  279. "given": {
  280. "http": {
  281. "method": "POST",
  282. "requestUri": "/2014-01-01/hostedzone"
  283. },
  284. "input": {
  285. "shape": "InputShape",
  286. "locationName": "OperationRequest",
  287. "xmlNamespace": {"uri": "https://foo/"}
  288. },
  289. "name": "OperationName"
  290. },
  291. "params": {
  292. "SubStructure": {},
  293. "Description": "baz"
  294. },
  295. "serialized": {
  296. "method": "POST",
  297. "body": "<OperationRequest xmlns=\"https://foo/\"><SubStructure /><Description>baz</Description></OperationRequest>",
  298. "uri": "/2014-01-01/hostedzone",
  299. "headers": {}
  300. }
  301. }
  302. ]
  303. },
  304. {
  305. "description": "Non flattened lists",
  306. "metadata": {
  307. "protocol": "rest-xml",
  308. "apiVersion": "2014-01-01"
  309. },
  310. "shapes": {
  311. "InputShape": {
  312. "type": "structure",
  313. "members": {
  314. "ListParam": {
  315. "shape": "ListShape"
  316. }
  317. }
  318. },
  319. "ListShape": {
  320. "type": "list",
  321. "member": {
  322. "shape": "StringType"
  323. }
  324. },
  325. "StringType": {
  326. "type": "string"
  327. }
  328. },
  329. "cases": [
  330. {
  331. "given": {
  332. "http": {
  333. "method": "POST",
  334. "requestUri": "/2014-01-01/hostedzone"
  335. },
  336. "input": {
  337. "shape": "InputShape",
  338. "locationName": "OperationRequest",
  339. "xmlNamespace": {"uri": "https://foo/"}
  340. },
  341. "name": "OperationName"
  342. },
  343. "params": {
  344. "ListParam": [
  345. "one",
  346. "two",
  347. "three"
  348. ]
  349. },
  350. "serialized": {
  351. "method": "POST",
  352. "body": "<OperationRequest xmlns=\"https://foo/\"><ListParam><member>one</member><member>two</member><member>three</member></ListParam></OperationRequest>",
  353. "uri": "/2014-01-01/hostedzone",
  354. "headers": {}
  355. }
  356. }
  357. ]
  358. },
  359. {
  360. "description": "Non flattened lists with locationName",
  361. "metadata": {
  362. "protocol": "rest-xml",
  363. "apiVersion": "2014-01-01"
  364. },
  365. "shapes": {
  366. "InputShape": {
  367. "type": "structure",
  368. "members": {
  369. "ListParam": {
  370. "shape": "ListShape",
  371. "locationName": "AlternateName"
  372. }
  373. }
  374. },
  375. "ListShape": {
  376. "type": "list",
  377. "member": {
  378. "shape": "StringType",
  379. "locationName": "NotMember"
  380. }
  381. },
  382. "StringType": {
  383. "type": "string"
  384. }
  385. },
  386. "cases": [
  387. {
  388. "given": {
  389. "http": {
  390. "method": "POST",
  391. "requestUri": "/2014-01-01/hostedzone"
  392. },
  393. "input": {
  394. "shape": "InputShape",
  395. "locationName": "OperationRequest",
  396. "xmlNamespace": {"uri": "https://foo/"}
  397. },
  398. "name": "OperationName"
  399. },
  400. "params": {
  401. "ListParam": [
  402. "one",
  403. "two",
  404. "three"
  405. ]
  406. },
  407. "serialized": {
  408. "method": "POST",
  409. "body": "<OperationRequest xmlns=\"https://foo/\"><AlternateName><NotMember>one</NotMember><NotMember>two</NotMember><NotMember>three</NotMember></AlternateName></OperationRequest>",
  410. "uri": "/2014-01-01/hostedzone",
  411. "headers": {}
  412. }
  413. }
  414. ]
  415. },
  416. {
  417. "description": "Flattened lists",
  418. "metadata": {
  419. "protocol": "rest-xml",
  420. "apiVersion": "2014-01-01"
  421. },
  422. "shapes": {
  423. "InputShape": {
  424. "type": "structure",
  425. "members": {
  426. "ListParam": {
  427. "shape": "ListShape"
  428. }
  429. }
  430. },
  431. "ListShape": {
  432. "type": "list",
  433. "member": {
  434. "shape": "StringType"
  435. },
  436. "flattened": true
  437. },
  438. "StringType": {
  439. "type": "string"
  440. }
  441. },
  442. "cases": [
  443. {
  444. "given": {
  445. "http": {
  446. "method": "POST",
  447. "requestUri": "/2014-01-01/hostedzone"
  448. },
  449. "input": {
  450. "shape": "InputShape",
  451. "locationName": "OperationRequest",
  452. "xmlNamespace": {"uri": "https://foo/"}
  453. },
  454. "name": "OperationName"
  455. },
  456. "params": {
  457. "ListParam": [
  458. "one",
  459. "two",
  460. "three"
  461. ]
  462. },
  463. "serialized": {
  464. "method": "POST",
  465. "body": "<OperationRequest xmlns=\"https://foo/\"><ListParam>one</ListParam><ListParam>two</ListParam><ListParam>three</ListParam></OperationRequest>",
  466. "uri": "/2014-01-01/hostedzone",
  467. "headers": {}
  468. }
  469. }
  470. ]
  471. },
  472. {
  473. "description": "Flattened lists with locationName",
  474. "metadata": {
  475. "protocol": "rest-xml",
  476. "apiVersion": "2014-01-01"
  477. },
  478. "shapes": {
  479. "InputShape": {
  480. "type": "structure",
  481. "members": {
  482. "ListParam": {
  483. "shape": "ListShape",
  484. "locationName": "item"
  485. }
  486. }
  487. },
  488. "ListShape": {
  489. "type": "list",
  490. "member": {
  491. "shape": "StringType"
  492. },
  493. "flattened": true
  494. },
  495. "StringType": {
  496. "type": "string"
  497. }
  498. },
  499. "cases": [
  500. {
  501. "given": {
  502. "http": {
  503. "method": "POST",
  504. "requestUri": "/2014-01-01/hostedzone"
  505. },
  506. "input": {
  507. "shape": "InputShape",
  508. "locationName": "OperationRequest",
  509. "xmlNamespace": {"uri": "https://foo/"}
  510. },
  511. "name": "OperationName"
  512. },
  513. "params": {
  514. "ListParam": [
  515. "one",
  516. "two",
  517. "three"
  518. ]
  519. },
  520. "serialized": {
  521. "method": "POST",
  522. "body": "<OperationRequest xmlns=\"https://foo/\"><item>one</item><item>two</item><item>three</item></OperationRequest>",
  523. "uri": "/2014-01-01/hostedzone",
  524. "headers": {}
  525. }
  526. }
  527. ]
  528. },
  529. {
  530. "description": "List of structures",
  531. "metadata": {
  532. "protocol": "rest-xml",
  533. "apiVersion": "2014-01-01"
  534. },
  535. "shapes": {
  536. "InputShape": {
  537. "type": "structure",
  538. "members": {
  539. "ListParam": {
  540. "shape": "ListShape",
  541. "locationName": "item"
  542. }
  543. }
  544. },
  545. "ListShape": {
  546. "type": "list",
  547. "member": {
  548. "shape": "SingleFieldStruct"
  549. },
  550. "flattened": true
  551. },
  552. "StringType": {
  553. "type": "string"
  554. },
  555. "SingleFieldStruct": {
  556. "type": "structure",
  557. "members": {
  558. "Element": {
  559. "shape": "StringType",
  560. "locationName": "value"
  561. }
  562. }
  563. }
  564. },
  565. "cases": [
  566. {
  567. "given": {
  568. "http": {
  569. "method": "POST",
  570. "requestUri": "/2014-01-01/hostedzone"
  571. },
  572. "input": {
  573. "shape": "InputShape",
  574. "locationName": "OperationRequest",
  575. "xmlNamespace": {"uri": "https://foo/"}
  576. },
  577. "name": "OperationName"
  578. },
  579. "params": {
  580. "ListParam": [
  581. {
  582. "Element": "one"
  583. },
  584. {
  585. "Element": "two"
  586. },
  587. {
  588. "Element": "three"
  589. }
  590. ]
  591. },
  592. "serialized": {
  593. "method": "POST",
  594. "body": "<OperationRequest xmlns=\"https://foo/\"><item><value>one</value></item><item><value>two</value></item><item><value>three</value></item></OperationRequest>",
  595. "uri": "/2014-01-01/hostedzone",
  596. "headers": {}
  597. }
  598. }
  599. ]
  600. },
  601. {
  602. "description": "Blob and timestamp shapes",
  603. "metadata": {
  604. "protocol": "rest-xml",
  605. "apiVersion": "2014-01-01"
  606. },
  607. "shapes": {
  608. "InputShape": {
  609. "type": "structure",
  610. "members": {
  611. "StructureParam": {
  612. "shape": "StructureShape"
  613. }
  614. }
  615. },
  616. "StructureShape": {
  617. "type": "structure",
  618. "members": {
  619. "t": {
  620. "shape": "TShape"
  621. },
  622. "b": {
  623. "shape": "BShape"
  624. }
  625. }
  626. },
  627. "TShape": {
  628. "type": "timestamp"
  629. },
  630. "BShape": {
  631. "type": "blob"
  632. }
  633. },
  634. "cases": [
  635. {
  636. "given": {
  637. "http": {
  638. "method": "POST",
  639. "requestUri": "/2014-01-01/hostedzone"
  640. },
  641. "input": {
  642. "shape": "InputShape",
  643. "locationName": "OperationRequest",
  644. "xmlNamespace": {"uri": "https://foo/"}
  645. },
  646. "name": "OperationName"
  647. },
  648. "params": {
  649. "StructureParam": {
  650. "t": 1422172800,
  651. "b": "foo"
  652. }
  653. },
  654. "serialized": {
  655. "method": "POST",
  656. "body": "<OperationRequest xmlns=\"https://foo/\"><StructureParam><t>2015-01-25T08:00:00Z</t><b>Zm9v</b></StructureParam></OperationRequest>",
  657. "uri": "/2014-01-01/hostedzone",
  658. "headers": {}
  659. }
  660. }
  661. ]
  662. },
  663. {
  664. "description": "Header maps",
  665. "metadata": {
  666. "protocol": "rest-xml",
  667. "apiVersion": "2014-01-01"
  668. },
  669. "shapes": {
  670. "InputShape": {
  671. "type": "structure",
  672. "members": {
  673. "foo": {
  674. "shape": "FooShape"
  675. }
  676. }
  677. },
  678. "FooShape": {
  679. "type": "map",
  680. "location": "headers",
  681. "locationName": "x-foo-",
  682. "key": {
  683. "shape": "FooKeyValue"
  684. },
  685. "value": {
  686. "shape": "FooKeyValue"
  687. }
  688. },
  689. "FooKeyValue": {
  690. "type": "string"
  691. }
  692. },
  693. "cases": [
  694. {
  695. "given": {
  696. "http": {
  697. "method": "POST",
  698. "requestUri": "/"
  699. },
  700. "input": {
  701. "shape": "InputShape",
  702. "locationName": "OperationRequest",
  703. "xmlNamespace": {"uri": "https://foo/"}
  704. },
  705. "name": "OperationName"
  706. },
  707. "params": {
  708. "foo": {
  709. "a": "b",
  710. "c": "d"
  711. }
  712. },
  713. "serialized": {
  714. "method": "POST",
  715. "body": "",
  716. "uri": "/",
  717. "headers": {
  718. "x-foo-a": "b",
  719. "x-foo-c": "d"
  720. }
  721. }
  722. }
  723. ]
  724. },
  725. {
  726. "description": "Querystring list of strings",
  727. "metadata": {
  728. "protocol": "rest-xml",
  729. "apiVersion": "2014-01-01"
  730. },
  731. "shapes": {
  732. "InputShape": {
  733. "type": "structure",
  734. "members": {
  735. "Items": {
  736. "shape": "StringList",
  737. "location": "querystring",
  738. "locationName": "item"
  739. }
  740. }
  741. },
  742. "StringList": {
  743. "type": "list",
  744. "member": {
  745. "shape": "String"
  746. }
  747. },
  748. "String": {
  749. "type": "string"
  750. }
  751. },
  752. "cases": [
  753. {
  754. "given": {
  755. "http": {
  756. "method": "GET",
  757. "requestUri": "/path"
  758. },
  759. "input": {
  760. "shape": "InputShape"
  761. },
  762. "name": "OperationName"
  763. },
  764. "params": {
  765. "Items": ["value1", "value2"]
  766. },
  767. "serialized": {
  768. "body": "",
  769. "uri": "/path?item=value1&item=value2",
  770. "headers": {}
  771. }
  772. }
  773. ]
  774. },
  775. {
  776. "description": "String to string maps in querystring",
  777. "metadata": {
  778. "protocol": "rest-xml",
  779. "apiVersion": "2014-01-01"
  780. },
  781. "shapes": {
  782. "InputShape": {
  783. "type": "structure",
  784. "members": {
  785. "PipelineId": {
  786. "shape": "StringType",
  787. "location": "uri"
  788. },
  789. "QueryDoc": {
  790. "shape": "MapStringStringType",
  791. "location": "querystring"
  792. }
  793. }
  794. },
  795. "MapStringStringType": {
  796. "type": "map",
  797. "key": {
  798. "shape": "StringType"
  799. },
  800. "value": {
  801. "shape": "StringType"
  802. }
  803. },
  804. "StringType": {
  805. "type": "string"
  806. }
  807. },
  808. "cases": [
  809. {
  810. "given": {
  811. "http": {
  812. "method": "GET",
  813. "requestUri": "/2014-01-01/jobsByPipeline/{PipelineId}"
  814. },
  815. "input": {
  816. "shape": "InputShape"
  817. },
  818. "name": "OperationName"
  819. },
  820. "params": {
  821. "PipelineId": "foo",
  822. "QueryDoc": {
  823. "bar": "baz",
  824. "fizz": "buzz"
  825. }
  826. },
  827. "serialized": {
  828. "body": "",
  829. "uri": "/2014-01-01/jobsByPipeline/foo?bar=baz&fizz=buzz",
  830. "headers": {}
  831. }
  832. }
  833. ]
  834. },
  835. {
  836. "description": "String to string list maps in querystring",
  837. "metadata": {
  838. "protocol": "rest-xml",
  839. "apiVersion": "2014-01-01"
  840. },
  841. "shapes": {
  842. "InputShape": {
  843. "type": "structure",
  844. "members": {
  845. "PipelineId": {
  846. "shape": "StringType",
  847. "location": "uri"
  848. },
  849. "QueryDoc": {
  850. "shape": "MapStringStringListType",
  851. "location": "querystring"
  852. }
  853. }
  854. },
  855. "MapStringStringListType": {
  856. "type": "map",
  857. "key": {
  858. "shape": "StringType"
  859. },
  860. "value": {
  861. "shape": "StringListType"
  862. }
  863. },
  864. "StringListType": {
  865. "type": "list",
  866. "member": {
  867. "shape": "StringType"
  868. }
  869. },
  870. "StringType": {
  871. "type": "string"
  872. }
  873. },
  874. "cases": [
  875. {
  876. "given": {
  877. "http": {
  878. "method": "GET",
  879. "requestUri": "/2014-01-01/jobsByPipeline/{PipelineId}"
  880. },
  881. "input": {
  882. "shape": "InputShape"
  883. },
  884. "name": "OperationName"
  885. },
  886. "params": {
  887. "PipelineId": "id",
  888. "QueryDoc": {
  889. "foo": ["bar", "baz"],
  890. "fizz": ["buzz", "pop"]
  891. }
  892. },
  893. "serialized": {
  894. "body": "",
  895. "uri": "/2014-01-01/jobsByPipeline/id?foo=bar&foo=baz&fizz=buzz&fizz=pop",
  896. "headers": {}
  897. }
  898. }
  899. ]
  900. },
  901. {
  902. "description": "String payload",
  903. "metadata": {
  904. "protocol": "rest-xml",
  905. "apiVersion": "2014-01-01"
  906. },
  907. "shapes": {
  908. "InputShape": {
  909. "type": "structure",
  910. "members": {
  911. "foo": {
  912. "shape": "FooShape"
  913. }
  914. },
  915. "payload": "foo"
  916. },
  917. "FooShape": {
  918. "type": "string"
  919. }
  920. },
  921. "cases": [
  922. {
  923. "given": {
  924. "http": {
  925. "method": "POST",
  926. "requestUri": "/"
  927. },
  928. "input": {
  929. "shape": "InputShape"
  930. },
  931. "name": "OperationName"
  932. },
  933. "params": {
  934. "foo": "bar"
  935. },
  936. "serialized": {
  937. "method": "POST",
  938. "body": "bar",
  939. "uri": "/"
  940. }
  941. }
  942. ]
  943. },
  944. {
  945. "description": "Blob payload",
  946. "metadata": {
  947. "protocol": "rest-xml",
  948. "apiVersion": "2014-01-01"
  949. },
  950. "shapes": {
  951. "InputShape": {
  952. "type": "structure",
  953. "members": {
  954. "foo": {
  955. "shape": "FooShape"
  956. }
  957. },
  958. "payload": "foo"
  959. },
  960. "FooShape": {
  961. "type": "blob"
  962. }
  963. },
  964. "cases": [
  965. {
  966. "given": {
  967. "http": {
  968. "method": "POST",
  969. "requestUri": "/"
  970. },
  971. "input": {
  972. "shape": "InputShape"
  973. },
  974. "name": "OperationName"
  975. },
  976. "params": {
  977. "foo": "bar"
  978. },
  979. "serialized": {
  980. "method": "POST",
  981. "body": "bar",
  982. "uri": "/"
  983. }
  984. },
  985. {
  986. "given": {
  987. "http": {
  988. "method": "POST",
  989. "requestUri": "/"
  990. },
  991. "input": {
  992. "shape": "InputShape"
  993. },
  994. "name": "OperationName"
  995. },
  996. "params": {
  997. },
  998. "serialized": {
  999. "method": "POST",
  1000. "body": "",
  1001. "uri": "/"
  1002. }
  1003. }
  1004. ]
  1005. },
  1006. {
  1007. "description": "Structure payload",
  1008. "metadata": {
  1009. "protocol": "rest-xml",
  1010. "apiVersion": "2014-01-01"
  1011. },
  1012. "shapes": {
  1013. "InputShape": {
  1014. "type": "structure",
  1015. "members": {
  1016. "foo": {
  1017. "shape": "FooShape"
  1018. }
  1019. },
  1020. "payload": "foo"
  1021. },
  1022. "FooShape": {
  1023. "locationName": "foo",
  1024. "type": "structure",
  1025. "members": {
  1026. "baz": {
  1027. "shape": "BazShape"
  1028. }
  1029. }
  1030. },
  1031. "BazShape": {
  1032. "type": "string"
  1033. }
  1034. },
  1035. "cases": [
  1036. {
  1037. "given": {
  1038. "http": {
  1039. "method": "POST",
  1040. "requestUri": "/"
  1041. },
  1042. "input": {
  1043. "shape": "InputShape"
  1044. },
  1045. "name": "OperationName"
  1046. },
  1047. "params": {
  1048. "foo": {
  1049. "baz": "bar"
  1050. }
  1051. },
  1052. "serialized": {
  1053. "method": "POST",
  1054. "body": "<foo><baz>bar</baz></foo>",
  1055. "uri": "/"
  1056. }
  1057. },
  1058. {
  1059. "given": {
  1060. "http": {
  1061. "method": "POST",
  1062. "requestUri": "/"
  1063. },
  1064. "input": {
  1065. "shape": "InputShape"
  1066. },
  1067. "name": "OperationName"
  1068. },
  1069. "params": {},
  1070. "serialized": {
  1071. "method": "POST",
  1072. "body": "",
  1073. "uri": "/"
  1074. }
  1075. },
  1076. {
  1077. "given": {
  1078. "http": {
  1079. "method": "POST",
  1080. "requestUri": "/"
  1081. },
  1082. "input": {
  1083. "shape": "InputShape"
  1084. },
  1085. "name": "OperationName"
  1086. },
  1087. "params": {
  1088. "foo": {}
  1089. },
  1090. "serialized": {
  1091. "method": "POST",
  1092. "body": "<foo />",
  1093. "uri": "/"
  1094. }
  1095. },
  1096. {
  1097. "given": {
  1098. "http": {
  1099. "method": "POST",
  1100. "requestUri": "/"
  1101. },
  1102. "input": {
  1103. "shape": "InputShape"
  1104. },
  1105. "name": "OperationName"
  1106. },
  1107. "params": {
  1108. "foo": null
  1109. },
  1110. "serialized": {
  1111. "method": "POST",
  1112. "body": "",
  1113. "uri": "/"
  1114. }
  1115. }
  1116. ]
  1117. },
  1118. {
  1119. "description": "XML Attribute",
  1120. "metadata": {
  1121. "protocol": "rest-xml",
  1122. "apiVersion": "2014-01-01"
  1123. },
  1124. "shapes": {
  1125. "InputShape": {
  1126. "type": "structure",
  1127. "members": {
  1128. "Grant": {
  1129. "shape": "Grant"
  1130. }
  1131. },
  1132. "payload": "Grant"
  1133. },
  1134. "Grant": {
  1135. "type": "structure",
  1136. "locationName": "Grant",
  1137. "members": {
  1138. "Grantee": {
  1139. "shape": "Grantee"
  1140. }
  1141. }
  1142. },
  1143. "Grantee": {
  1144. "type": "structure",
  1145. "members": {
  1146. "Type": {
  1147. "shape": "Type",
  1148. "locationName": "xsi:type",
  1149. "xmlAttribute": true
  1150. },
  1151. "EmailAddress": {
  1152. "shape": "StringType"
  1153. }
  1154. },
  1155. "xmlNamespace": {
  1156. "prefix": "xsi",
  1157. "uri":"http://www.w3.org/2001/XMLSchema-instance"
  1158. }
  1159. },
  1160. "Type": {
  1161. "type": "string"
  1162. },
  1163. "StringType": {
  1164. "type": "string"
  1165. }
  1166. },
  1167. "cases": [
  1168. {
  1169. "given": {
  1170. "http": {
  1171. "method": "POST",
  1172. "requestUri": "/"
  1173. },
  1174. "input": {
  1175. "shape": "InputShape"
  1176. },
  1177. "name": "OperationName"
  1178. },
  1179. "params": {
  1180. "Grant": {
  1181. "Grantee": {
  1182. "EmailAddress": "foo@example.com",
  1183. "Type": "CanonicalUser"
  1184. }
  1185. }
  1186. },
  1187. "serialized": {
  1188. "method": "POST",
  1189. "body": "<Grant><Grantee xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:type=\"CanonicalUser\"><EmailAddress>foo@example.com</EmailAddress></Grantee></Grant>",
  1190. "uri": "/"
  1191. }
  1192. }
  1193. ]
  1194. },
  1195. {
  1196. "description": "Greedy keys",
  1197. "metadata": {
  1198. "protocol": "rest-xml",
  1199. "apiVersion": "2014-01-01"
  1200. },
  1201. "shapes": {
  1202. "InputShape": {
  1203. "type": "structure",
  1204. "members": {
  1205. "Bucket": {
  1206. "shape": "BucketShape",
  1207. "location": "uri"
  1208. },
  1209. "Key": {
  1210. "shape": "KeyShape",
  1211. "location": "uri"
  1212. }
  1213. }
  1214. },
  1215. "BucketShape": {
  1216. "type": "string"
  1217. },
  1218. "KeyShape": {
  1219. "type": "string"
  1220. }
  1221. },
  1222. "cases": [
  1223. {
  1224. "given": {
  1225. "http": {
  1226. "method": "GET",
  1227. "requestUri": "/{Bucket}/{Key+}"
  1228. },
  1229. "input": {
  1230. "shape": "InputShape"
  1231. },
  1232. "name": "OperationName"
  1233. },
  1234. "params": {
  1235. "Key": "testing /123",
  1236. "Bucket": "my/bucket"
  1237. },
  1238. "serialized": {
  1239. "method": "GET",
  1240. "body": "",
  1241. "uri": "/my%2Fbucket/testing%20/123"
  1242. }
  1243. }
  1244. ]
  1245. },
  1246. {
  1247. "description": "Omits null query params, but serializes empty strings",
  1248. "metadata": {
  1249. "protocol": "rest-xml",
  1250. "apiVersion": "2014-01-01"
  1251. },
  1252. "shapes": {
  1253. "InputShape": {
  1254. "type": "structure",
  1255. "members": {
  1256. "foo": {
  1257. "location":"querystring",
  1258. "locationName":"param-name",
  1259. "shape": "Foo"
  1260. }
  1261. }
  1262. },
  1263. "Foo": {
  1264. "type": "string"
  1265. }
  1266. },
  1267. "cases": [
  1268. {
  1269. "given": {
  1270. "name": "OperationName",
  1271. "http": {
  1272. "method": "POST",
  1273. "requestUri": "/path"
  1274. },
  1275. "input": { "shape": "InputShape" }
  1276. },
  1277. "params": { "foo": null },
  1278. "serialized": {
  1279. "method": "POST",
  1280. "body": "",
  1281. "uri": "/path"
  1282. }
  1283. },
  1284. {
  1285. "given": {
  1286. "name": "OperationName",
  1287. "http": {
  1288. "method": "POST",
  1289. "requestUri": "/path?abc=mno"
  1290. },
  1291. "input": { "shape": "InputShape" }
  1292. },
  1293. "params": { "foo": "" },
  1294. "serialized": {
  1295. "method": "POST",
  1296. "body": "",
  1297. "uri": "/path?abc=mno&param-name="
  1298. }
  1299. }
  1300. ]
  1301. },
  1302. {
  1303. "description": "Recursive shapes",
  1304. "metadata": {
  1305. "protocol": "rest-xml",
  1306. "apiVersion": "2014-01-01"
  1307. },
  1308. "shapes": {
  1309. "InputShape": {
  1310. "type": "structure",
  1311. "members": {
  1312. "RecursiveStruct": {
  1313. "shape": "RecursiveStructType"
  1314. }
  1315. }
  1316. },
  1317. "RecursiveStructType": {
  1318. "type": "structure",
  1319. "members": {
  1320. "NoRecurse": {
  1321. "shape": "StringType"
  1322. },
  1323. "RecursiveStruct": {
  1324. "shape": "RecursiveStructType"
  1325. },
  1326. "RecursiveList": {
  1327. "shape": "RecursiveListType"
  1328. },
  1329. "RecursiveMap": {
  1330. "shape": "RecursiveMapType"
  1331. }
  1332. }
  1333. },
  1334. "RecursiveListType": {
  1335. "type": "list",
  1336. "member": {
  1337. "shape": "RecursiveStructType"
  1338. }
  1339. },
  1340. "RecursiveMapType": {
  1341. "type": "map",
  1342. "key": {
  1343. "shape": "StringType"
  1344. },
  1345. "value": {
  1346. "shape": "RecursiveStructType"
  1347. }
  1348. },
  1349. "StringType": {
  1350. "type": "string"
  1351. }
  1352. },
  1353. "cases": [
  1354. {
  1355. "given": {
  1356. "input": {
  1357. "shape": "InputShape",
  1358. "locationName": "OperationRequest",
  1359. "xmlNamespace": {"uri": "https://foo/"}
  1360. },
  1361. "http": {
  1362. "method": "POST",
  1363. "requestUri": "/path"
  1364. },
  1365. "name": "OperationName"
  1366. },
  1367. "params": {
  1368. "RecursiveStruct": {
  1369. "NoRecurse": "foo"
  1370. }
  1371. },
  1372. "serialized": {
  1373. "uri": "/path",
  1374. "body": "<OperationRequest xmlns=\"https://foo/\"><RecursiveStruct><NoRecurse>foo</NoRecurse></RecursiveStruct></OperationRequest>"
  1375. }
  1376. },
  1377. {
  1378. "given": {
  1379. "input": {
  1380. "shape": "InputShape",
  1381. "locationName": "OperationRequest",
  1382. "xmlNamespace": {"uri": "https://foo/"}
  1383. },
  1384. "http": {
  1385. "method": "POST",
  1386. "requestUri": "/path"
  1387. },
  1388. "name": "OperationName"
  1389. },
  1390. "params": {
  1391. "RecursiveStruct": {
  1392. "RecursiveStruct": {
  1393. "NoRecurse": "foo"
  1394. }
  1395. }
  1396. },
  1397. "serialized": {
  1398. "uri": "/path",
  1399. "body": "<OperationRequest xmlns=\"https://foo/\"><RecursiveStruct><RecursiveStruct><NoRecurse>foo</NoRecurse></RecursiveStruct></RecursiveStruct></OperationRequest>"
  1400. }
  1401. },
  1402. {
  1403. "given": {
  1404. "input": {
  1405. "shape": "InputShape",
  1406. "locationName": "OperationRequest",
  1407. "xmlNamespace": {"uri": "https://foo/"}
  1408. },
  1409. "http": {
  1410. "method": "POST",
  1411. "requestUri": "/path"
  1412. },
  1413. "name": "OperationName"
  1414. },
  1415. "params": {
  1416. "RecursiveStruct": {
  1417. "RecursiveStruct": {
  1418. "RecursiveStruct": {
  1419. "RecursiveStruct": {
  1420. "NoRecurse": "foo"
  1421. }
  1422. }
  1423. }
  1424. }
  1425. },
  1426. "serialized": {
  1427. "uri": "/path",
  1428. "body": "<OperationRequest xmlns=\"https://foo/\"><RecursiveStruct><RecursiveStruct><RecursiveStruct><RecursiveStruct><NoRecurse>foo</NoRecurse></RecursiveStruct></RecursiveStruct></RecursiveStruct></RecursiveStruct></OperationRequest>"
  1429. }
  1430. },
  1431. {
  1432. "given": {
  1433. "input": {
  1434. "shape": "InputShape",
  1435. "locationName": "OperationRequest",
  1436. "xmlNamespace": {"uri": "https://foo/"}
  1437. },
  1438. "http": {
  1439. "method": "POST",
  1440. "requestUri": "/path"
  1441. },
  1442. "name": "OperationName"
  1443. },
  1444. "params": {
  1445. "RecursiveStruct": {
  1446. "RecursiveList": [
  1447. {
  1448. "NoRecurse": "foo"
  1449. },
  1450. {
  1451. "NoRecurse": "bar"
  1452. }
  1453. ]
  1454. }
  1455. },
  1456. "serialized": {
  1457. "uri": "/path",
  1458. "body": "<OperationRequest xmlns=\"https://foo/\"><RecursiveStruct><RecursiveList><member><NoRecurse>foo</NoRecurse></member><member><NoRecurse>bar</NoRecurse></member></RecursiveList></RecursiveStruct></OperationRequest>"
  1459. }
  1460. },
  1461. {
  1462. "given": {
  1463. "input": {
  1464. "shape": "InputShape",
  1465. "locationName": "OperationRequest",
  1466. "xmlNamespace": {"uri": "https://foo/"}
  1467. },
  1468. "http": {
  1469. "method": "POST",
  1470. "requestUri": "/path"
  1471. },
  1472. "name": "OperationName"
  1473. },
  1474. "params": {
  1475. "RecursiveStruct": {
  1476. "RecursiveList": [
  1477. {
  1478. "NoRecurse": "foo"
  1479. },
  1480. {
  1481. "RecursiveStruct": {
  1482. "NoRecurse": "bar"
  1483. }
  1484. }
  1485. ]
  1486. }
  1487. },
  1488. "serialized": {
  1489. "uri": "/path",
  1490. "body": "<OperationRequest xmlns=\"https://foo/\"><RecursiveStruct><RecursiveList><member><NoRecurse>foo</NoRecurse></member><member><RecursiveStruct><NoRecurse>bar</NoRecurse></RecursiveStruct></member></RecursiveList></RecursiveStruct></OperationRequest>"
  1491. }
  1492. },
  1493. {
  1494. "given": {
  1495. "input": {
  1496. "shape": "InputShape",
  1497. "locationName": "OperationRequest",
  1498. "xmlNamespace": {"uri": "https://foo/"}
  1499. },
  1500. "http": {
  1501. "method": "POST",
  1502. "requestUri": "/path"
  1503. },
  1504. "name": "OperationName"
  1505. },
  1506. "params": {
  1507. "RecursiveStruct": {
  1508. "RecursiveMap": {
  1509. "foo": {
  1510. "NoRecurse": "foo"
  1511. },
  1512. "bar": {
  1513. "NoRecurse": "bar"
  1514. }
  1515. }
  1516. }
  1517. },
  1518. "serialized": {
  1519. "uri": "/path",
  1520. "body": "<OperationRequest xmlns=\"https://foo/\"><RecursiveStruct><RecursiveMap><entry><key>foo</key><value><NoRecurse>foo</NoRecurse></value></entry><entry><key>bar</key><value><NoRecurse>bar</NoRecurse></value></entry></RecursiveMap></RecursiveStruct></OperationRequest>"
  1521. }
  1522. }
  1523. ]
  1524. },
  1525. {
  1526. "description": "Timestamp in header",
  1527. "metadata": {
  1528. "protocol": "rest-xml",
  1529. "apiVersion": "2014-01-01"
  1530. },
  1531. "shapes": {
  1532. "InputShape": {
  1533. "type": "structure",
  1534. "members": {
  1535. "TimeArgInHeader": {
  1536. "shape": "TimestampType",
  1537. "location": "header",
  1538. "locationName": "x-amz-timearg"
  1539. }
  1540. }
  1541. },
  1542. "TimestampType": {
  1543. "type": "timestamp"
  1544. }
  1545. },
  1546. "cases": [
  1547. {
  1548. "given": {
  1549. "input": {
  1550. "shape": "InputShape"
  1551. },
  1552. "http": {
  1553. "method": "POST",
  1554. "requestUri": "/path"
  1555. },
  1556. "name": "OperationName"
  1557. },
  1558. "params": {
  1559. "TimeArgInHeader": 1422172800
  1560. },
  1561. "serialized": {
  1562. "method": "POST",
  1563. "body": "",
  1564. "uri": "/path",
  1565. "headers": {"x-amz-timearg": "Sun, 25 Jan 2015 08:00:00 GMT"}
  1566. }
  1567. }
  1568. ]
  1569. },
  1570. {
  1571. "description": "Idempotency token auto fill",
  1572. "metadata": {
  1573. "protocol": "rest-xml",
  1574. "apiVersion": "2014-01-01"
  1575. },
  1576. "shapes": {
  1577. "InputShape": {
  1578. "type": "structure",
  1579. "members": {
  1580. "Token": {
  1581. "shape": "StringType",
  1582. "idempotencyToken": true
  1583. }
  1584. }
  1585. },
  1586. "StringType": {
  1587. "type": "string"
  1588. }
  1589. },
  1590. "cases": [
  1591. {
  1592. "given": {
  1593. "input": {
  1594. "shape": "InputShape"
  1595. },
  1596. "http": {
  1597. "method": "POST",
  1598. "requestUri": "/path"
  1599. },
  1600. "name": "OperationName"
  1601. },
  1602. "params": {
  1603. "Token": "abc123"
  1604. },
  1605. "serialized": {
  1606. "uri": "/path",
  1607. "headers": {},
  1608. "body": "<Token>abc123</Token>"
  1609. }
  1610. },
  1611. {
  1612. "given": {
  1613. "input": {
  1614. "shape": "InputShape"
  1615. },
  1616. "http": {
  1617. "method": "POST",
  1618. "requestUri": "/path"
  1619. },
  1620. "name": "OperationName"
  1621. },
  1622. "params": {
  1623. },
  1624. "serialized": {
  1625. "uri": "/path",
  1626. "headers": {},
  1627. "body": "<Token>00000000-0000-4000-8000-000000000000</Token>"
  1628. }
  1629. }
  1630. ]
  1631. }
  1632. ]