ec2.json 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612
  1. [
  2. {
  3. "description": "Scalar members",
  4. "metadata": {
  5. "protocol": "ec2",
  6. "apiVersion": "2014-01-01"
  7. },
  8. "shapes": {
  9. "InputShape": {
  10. "type": "structure",
  11. "members": {
  12. "Foo": {
  13. "shape": "StringType"
  14. },
  15. "Bar": {
  16. "shape": "StringType"
  17. }
  18. }
  19. },
  20. "StringType": {
  21. "type": "string"
  22. }
  23. },
  24. "cases": [
  25. {
  26. "given": {
  27. "input": {
  28. "shape": "InputShape"
  29. },
  30. "name": "OperationName"
  31. },
  32. "params": {
  33. "Foo": "val1",
  34. "Bar": "val2"
  35. },
  36. "serialized": {
  37. "uri": "/",
  38. "body": "Action=OperationName&Version=2014-01-01&Foo=val1&Bar=val2"
  39. }
  40. }
  41. ]
  42. },
  43. {
  44. "description": "Structure with locationName and queryName applied to members",
  45. "metadata": {
  46. "protocol": "ec2",
  47. "apiVersion": "2014-01-01"
  48. },
  49. "shapes": {
  50. "InputShape": {
  51. "type": "structure",
  52. "members": {
  53. "Foo": {
  54. "shape": "StringType"
  55. },
  56. "Bar": {
  57. "shape": "StringType",
  58. "locationName": "barLocationName"
  59. },
  60. "Yuck": {
  61. "shape": "StringType",
  62. "locationName": "yuckLocationName",
  63. "queryName": "yuckQueryName"
  64. }
  65. }
  66. },
  67. "StringType": {
  68. "type": "string"
  69. }
  70. },
  71. "cases": [
  72. {
  73. "given": {
  74. "input": {
  75. "shape": "InputShape"
  76. },
  77. "name": "OperationName"
  78. },
  79. "params": {
  80. "Foo": "val1",
  81. "Bar": "val2",
  82. "Yuck": "val3"
  83. },
  84. "serialized": {
  85. "uri": "/",
  86. "body": "Action=OperationName&Version=2014-01-01&Foo=val1&BarLocationName=val2&yuckQueryName=val3"
  87. }
  88. }
  89. ]
  90. },
  91. {
  92. "description": "Nested structure members",
  93. "metadata": {
  94. "protocol": "ec2",
  95. "apiVersion": "2014-01-01"
  96. },
  97. "shapes": {
  98. "InputShape": {
  99. "type": "structure",
  100. "members": {
  101. "StructArg": {
  102. "shape": "StructType",
  103. "locationName": "Struct"
  104. }
  105. }
  106. },
  107. "StructType": {
  108. "type": "structure",
  109. "members": {
  110. "ScalarArg": {
  111. "shape": "StringType",
  112. "locationName": "Scalar"
  113. }
  114. }
  115. },
  116. "StringType": {
  117. "type": "string"
  118. }
  119. },
  120. "cases": [
  121. {
  122. "given": {
  123. "input": {
  124. "shape": "InputShape"
  125. },
  126. "name": "OperationName"
  127. },
  128. "params": {
  129. "StructArg": {
  130. "ScalarArg": "foo"
  131. }
  132. },
  133. "serialized": {
  134. "uri": "/",
  135. "body": "Action=OperationName&Version=2014-01-01&Struct.Scalar=foo"
  136. }
  137. }
  138. ]
  139. },
  140. {
  141. "description": "List types",
  142. "metadata": {
  143. "protocol": "ec2",
  144. "apiVersion": "2014-01-01"
  145. },
  146. "shapes": {
  147. "InputShape": {
  148. "type": "structure",
  149. "members": {
  150. "ListStrings": {
  151. "shape": "ListStringType"
  152. },
  153. "ListBools": {
  154. "shape": "ListBoolType"
  155. },
  156. "ListFloats": {
  157. "shape": "ListFloatType"
  158. },
  159. "ListIntegers": {
  160. "shape": "ListIntegerType"
  161. }
  162. }
  163. },
  164. "ListStringType": {
  165. "type": "list",
  166. "member": {
  167. "shape": "StringType"
  168. }
  169. },
  170. "ListBoolType": {
  171. "type": "list",
  172. "member": {
  173. "shape": "BoolType"
  174. }
  175. },
  176. "ListFloatType": {
  177. "type": "list",
  178. "member": {
  179. "shape": "FloatType"
  180. }
  181. },
  182. "ListIntegerType": {
  183. "type": "list",
  184. "member": {
  185. "shape": "IntegerType"
  186. }
  187. },
  188. "StringType": {
  189. "type": "string"
  190. },
  191. "BoolType": {
  192. "type": "boolean"
  193. },
  194. "FloatType": {
  195. "type": "float"
  196. },
  197. "IntegerType": {
  198. "type": "integer"
  199. }
  200. },
  201. "cases": [
  202. {
  203. "given": {
  204. "input": {
  205. "shape": "InputShape"
  206. },
  207. "name": "OperationName"
  208. },
  209. "params": {
  210. "ListStrings": [
  211. "foo",
  212. "bar",
  213. "baz"
  214. ],
  215. "ListBools": [
  216. true,
  217. false,
  218. false
  219. ],
  220. "ListFloats": [
  221. 1.1,
  222. 2.718,
  223. 3.14
  224. ],
  225. "ListIntegers": [
  226. 0,
  227. 1,
  228. 2
  229. ]
  230. },
  231. "serialized": {
  232. "uri": "/",
  233. "body": "Action=OperationName&Version=2014-01-01&ListStrings.1=foo&ListStrings.2=bar&ListStrings.3=baz&ListBools.1=true&ListBools.2=false&ListBools.3=false&ListFloats.1=1.1&ListFloats.2=2.718&ListFloats.3=3.14&ListIntegers.1=0&ListIntegers.2=1&ListIntegers.3=2"
  234. }
  235. }
  236. ]
  237. },
  238. {
  239. "description": "List with location name applied to member",
  240. "metadata": {
  241. "protocol": "ec2",
  242. "apiVersion": "2014-01-01"
  243. },
  244. "shapes": {
  245. "InputShape": {
  246. "type": "structure",
  247. "members": {
  248. "ListArg": {
  249. "shape": "ListType",
  250. "locationName": "ListMemberName"
  251. }
  252. }
  253. },
  254. "ListType": {
  255. "type": "list",
  256. "member": {
  257. "shape": "StringType",
  258. "LocationName": "item"
  259. }
  260. },
  261. "StringType": {
  262. "type": "string"
  263. }
  264. },
  265. "cases": [
  266. {
  267. "given": {
  268. "input": {
  269. "shape": "InputShape"
  270. },
  271. "name": "OperationName"
  272. },
  273. "params": {
  274. "ListArg": [
  275. "a",
  276. "b",
  277. "c"
  278. ]
  279. },
  280. "serialized": {
  281. "uri": "/",
  282. "body": "Action=OperationName&Version=2014-01-01&ListMemberName.1=a&ListMemberName.2=b&ListMemberName.3=c"
  283. }
  284. }
  285. ]
  286. },
  287. {
  288. "description": "List with locationName and queryName",
  289. "metadata": {
  290. "protocol": "ec2",
  291. "apiVersion": "2014-01-01"
  292. },
  293. "shapes": {
  294. "InputShape": {
  295. "type": "structure",
  296. "members": {
  297. "ListArg": {
  298. "shape": "ListType",
  299. "locationName": "ListMemberName",
  300. "queryName": "ListQueryName"
  301. }
  302. }
  303. },
  304. "ListType": {
  305. "type": "list",
  306. "member": {
  307. "shape": "StringType",
  308. "LocationName": "item"
  309. }
  310. },
  311. "StringType": {
  312. "type": "string"
  313. }
  314. },
  315. "cases": [
  316. {
  317. "given": {
  318. "input": {
  319. "shape": "InputShape"
  320. },
  321. "name": "OperationName"
  322. },
  323. "params": {
  324. "ListArg": [
  325. "a",
  326. "b",
  327. "c"
  328. ]
  329. },
  330. "serialized": {
  331. "uri": "/",
  332. "body": "Action=OperationName&Version=2014-01-01&ListQueryName.1=a&ListQueryName.2=b&ListQueryName.3=c"
  333. }
  334. }
  335. ]
  336. },
  337. {
  338. "description": "Base64 encoded Blobs",
  339. "metadata": {
  340. "protocol": "ec2",
  341. "apiVersion": "2014-01-01"
  342. },
  343. "shapes": {
  344. "InputShape": {
  345. "type": "structure",
  346. "members": {
  347. "BlobArg": {
  348. "shape": "BlobType"
  349. }
  350. }
  351. },
  352. "BlobType": {
  353. "type": "blob"
  354. }
  355. },
  356. "cases": [
  357. {
  358. "given": {
  359. "input": {
  360. "shape": "InputShape"
  361. },
  362. "name": "OperationName"
  363. },
  364. "params": {
  365. "BlobArg": "foo"
  366. },
  367. "serialized": {
  368. "uri": "/",
  369. "body": "Action=OperationName&Version=2014-01-01&BlobArg=Zm9v"
  370. }
  371. }
  372. ]
  373. },
  374. {
  375. "description": "Timestamp values",
  376. "metadata": {
  377. "protocol": "ec2",
  378. "apiVersion": "2014-01-01"
  379. },
  380. "shapes": {
  381. "InputShape": {
  382. "type": "structure",
  383. "members": {
  384. "TimeArg": {
  385. "shape": "TimestampType"
  386. },
  387. "TimeCustom": {
  388. "timestampFormat": "unixTimestamp",
  389. "shape": "TimestampType"
  390. },
  391. "TimeFormat": {
  392. "shape": "TimestampFormatType"
  393. }
  394. }
  395. },
  396. "TimestampFormatType": {
  397. "timestampFormat": "unixTimestamp",
  398. "type": "timestamp"
  399. },
  400. "TimestampType": {
  401. "type": "timestamp"
  402. }
  403. },
  404. "cases": [
  405. {
  406. "given": {
  407. "input": {
  408. "shape": "InputShape"
  409. },
  410. "name": "OperationName"
  411. },
  412. "params": {
  413. "TimeArg": 1422172800,
  414. "TimeCustom": 1422172800,
  415. "TimeFormat": 1422172800
  416. },
  417. "serialized": {
  418. "uri": "/",
  419. "body": "Action=OperationName&Version=2014-01-01&TimeArg=2015-01-25T08%3A00%3A00Z&TimeCustom=1422172800&TimeFormat=1422172800"
  420. }
  421. }
  422. ]
  423. },
  424. {
  425. "description": "Idempotency token auto fill",
  426. "metadata": {
  427. "protocol": "ec2",
  428. "apiVersion": "2014-01-01"
  429. },
  430. "shapes": {
  431. "InputShape": {
  432. "type": "structure",
  433. "members": {
  434. "Token": {
  435. "shape": "StringType",
  436. "idempotencyToken": true
  437. }
  438. }
  439. },
  440. "StringType": {
  441. "type": "string"
  442. }
  443. },
  444. "cases": [
  445. {
  446. "given": {
  447. "input": {
  448. "shape": "InputShape"
  449. },
  450. "name": "OperationName"
  451. },
  452. "params": {
  453. "Token": "abc123"
  454. },
  455. "serialized": {
  456. "uri": "/",
  457. "headers": {},
  458. "body": "Action=OperationName&Version=2014-01-01&Token=abc123"
  459. }
  460. },
  461. {
  462. "given": {
  463. "input": {
  464. "shape": "InputShape"
  465. },
  466. "name": "OperationName"
  467. },
  468. "params": {
  469. },
  470. "serialized": {
  471. "uri": "/",
  472. "headers": {},
  473. "body": "Action=OperationName&Version=2014-01-01&Token=00000000-0000-4000-8000-000000000000"
  474. }
  475. }
  476. ]
  477. },
  478. {
  479. "description": "Enum",
  480. "metadata": {
  481. "protocol": "ec2",
  482. "apiVersion": "2014-01-01"
  483. },
  484. "shapes": {
  485. "InputShape": {
  486. "type": "structure",
  487. "members": {
  488. "FooEnum": {
  489. "shape": "EnumType"
  490. },
  491. "ListEnums": {
  492. "shape": "EnumList"
  493. }
  494. }
  495. },
  496. "EnumType":{
  497. "type":"string",
  498. "enum":[
  499. "foo",
  500. "bar"
  501. ]
  502. },
  503. "EnumList":{
  504. "type":"list",
  505. "member": {"shape": "EnumType"}
  506. }
  507. },
  508. "cases": [
  509. {
  510. "given": {
  511. "input": {
  512. "shape": "InputShape"
  513. },
  514. "name": "OperationName"
  515. },
  516. "params": {
  517. "ListEnums": ["foo", "", "bar"]
  518. },
  519. "serialized": {
  520. "uri": "/",
  521. "headers": {},
  522. "body": "Action=OperationName&Version=2014-01-01&ListEnums.1=foo&ListEnums.2=&ListEnums.3=bar"
  523. }
  524. },
  525. {
  526. "given": {
  527. "input": {
  528. "shape": "InputShape"
  529. },
  530. "name": "OperationName"
  531. },
  532. "params": {
  533. },
  534. "serialized": {
  535. "uri": "/",
  536. "headers": {},
  537. "body": "Action=OperationName&Version=2014-01-01"
  538. }
  539. }
  540. ]
  541. },
  542. {
  543. "description": "Endpoint host trait",
  544. "metadata": {
  545. "protocol": "ec2",
  546. "apiVersion": "2014-01-01"
  547. },
  548. "clientEndpoint": "https://service.region.amazonaws.com",
  549. "shapes": {
  550. "StaticInputShape": {
  551. "type": "structure",
  552. "members": {
  553. "Name": {
  554. "shape": "StringType"
  555. }
  556. }
  557. },
  558. "MemberRefInputShape": {
  559. "type": "structure",
  560. "members": {
  561. "Name": {
  562. "shape": "StringType",
  563. "hostLabel": true
  564. }
  565. }
  566. },
  567. "StringType": {
  568. "type": "string"
  569. }
  570. },
  571. "cases": [
  572. {
  573. "given": {
  574. "name": "StaticOp",
  575. "input": {
  576. "shape": "StaticInputShape"
  577. },
  578. "endpoint":{
  579. "hostPrefix": "data-"
  580. }
  581. },
  582. "params": {
  583. "Name": "myname"
  584. },
  585. "serialized": {
  586. "uri": "/",
  587. "body": "Action=StaticOp&Version=2014-01-01&Name=myname",
  588. "host": "data-service.region.amazonaws.com"
  589. }
  590. },
  591. {
  592. "given": {
  593. "name": "MemberRefOp",
  594. "input": {
  595. "shape": "MemberRefInputShape"
  596. },
  597. "endpoint":{
  598. "hostPrefix": "foo-{Name}."
  599. }
  600. },
  601. "params": {
  602. "Name": "myname"
  603. },
  604. "serialized": {
  605. "uri": "/",
  606. "body": "Action=MemberRefOp&Version=2014-01-01&Name=myname",
  607. "host": "foo-myname.service.region.amazonaws.com"
  608. }
  609. }
  610. ]
  611. }
  612. ]