examples-1.json 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614
  1. {
  2. "version": "1.0",
  3. "examples": {
  4. "AddPermission": [
  5. {
  6. "input": {
  7. "Action": "lambda:InvokeFunction",
  8. "FunctionName": "MyFunction",
  9. "Principal": "s3.amazonaws.com",
  10. "SourceAccount": "123456789012",
  11. "SourceArn": "arn:aws:s3:::examplebucket/*",
  12. "StatementId": "ID-1"
  13. },
  14. "output": {
  15. "Statement": "ID-1"
  16. },
  17. "comments": {
  18. "input": {
  19. },
  20. "output": {
  21. }
  22. },
  23. "description": "This example adds a permission for an S3 bucket to invoke a Lambda function.",
  24. "id": "add-permission-1474651469455",
  25. "title": "add-permission"
  26. }
  27. ],
  28. "CreateFunction": [
  29. {
  30. "input": {
  31. "Code": {
  32. },
  33. "Description": "",
  34. "FunctionName": "MyFunction",
  35. "Handler": "souce_file.handler_name",
  36. "MemorySize": 128,
  37. "Publish": true,
  38. "Role": "arn:aws:iam::123456789012:role/service-role/role-name",
  39. "Runtime": "nodejs8.10",
  40. "Timeout": 15,
  41. "VpcConfig": {
  42. }
  43. },
  44. "output": {
  45. "CodeSha256": "",
  46. "CodeSize": 123,
  47. "Description": "",
  48. "FunctionArn": "arn:aws:lambda:us-west-2:123456789012:function:MyFunction",
  49. "FunctionName": "MyFunction",
  50. "Handler": "source_file.handler_name",
  51. "LastModified": "2016-11-21T19:49:20.006+0000",
  52. "MemorySize": 128,
  53. "Role": "arn:aws:iam::123456789012:role/service-role/role-name",
  54. "Runtime": "nodejs8.10",
  55. "Timeout": 123,
  56. "Version": "1",
  57. "VpcConfig": {
  58. }
  59. },
  60. "comments": {
  61. "input": {
  62. "Handler": "is of the form of the name of your source file and then name of your function handler",
  63. "Role": "replace with the actual arn of the execution role you created"
  64. },
  65. "output": {
  66. }
  67. },
  68. "description": "This example creates a Lambda function.",
  69. "id": "create-function-1474653449931",
  70. "title": "create-function"
  71. }
  72. ],
  73. "DeleteAlias": [
  74. {
  75. "input": {
  76. "FunctionName": "myFunction",
  77. "Name": "alias"
  78. },
  79. "comments": {
  80. "input": {
  81. },
  82. "output": {
  83. }
  84. },
  85. "description": "This operation deletes a Lambda function alias",
  86. "id": "to-delete-a-lambda-function-alias-1481660370804",
  87. "title": "To delete a Lambda function alias"
  88. }
  89. ],
  90. "DeleteEventSourceMapping": [
  91. {
  92. "input": {
  93. "UUID": "12345kxodurf3443"
  94. },
  95. "output": {
  96. "BatchSize": 123,
  97. "EventSourceArn": "arn:aws:s3:::examplebucket/*",
  98. "FunctionArn": "arn:aws:lambda:us-west-2:123456789012:function:myFunction",
  99. "LastModified": "2016-11-21T19:49:20.006+0000",
  100. "LastProcessingResult": "",
  101. "State": "",
  102. "StateTransitionReason": "",
  103. "UUID": "12345kxodurf3443"
  104. },
  105. "comments": {
  106. "input": {
  107. },
  108. "output": {
  109. }
  110. },
  111. "description": "This operation deletes a Lambda function event source mapping",
  112. "id": "to-delete-a-lambda-function-event-source-mapping-1481658973862",
  113. "title": "To delete a Lambda function event source mapping"
  114. }
  115. ],
  116. "DeleteFunction": [
  117. {
  118. "input": {
  119. "FunctionName": "myFunction",
  120. "Qualifier": "1"
  121. },
  122. "comments": {
  123. "input": {
  124. },
  125. "output": {
  126. }
  127. },
  128. "description": "This operation deletes a Lambda function",
  129. "id": "to-delete-a-lambda-function-1481648553696",
  130. "title": "To delete a Lambda function"
  131. }
  132. ],
  133. "GetAccountSettings": [
  134. {
  135. "input": {
  136. },
  137. "output": {
  138. "AccountLimit": {
  139. },
  140. "AccountUsage": {
  141. }
  142. },
  143. "comments": {
  144. "input": {
  145. },
  146. "output": {
  147. }
  148. },
  149. "description": "This operation retrieves a Lambda customer's account settings",
  150. "id": "to-retrieves-a-lambda-customers-account-settings-1481657495274",
  151. "title": "To retrieves a Lambda customer's account settings"
  152. }
  153. ],
  154. "GetAlias": [
  155. {
  156. "input": {
  157. "FunctionName": "myFunction",
  158. "Name": "myFunctionAlias"
  159. },
  160. "output": {
  161. "AliasArn": "arn:aws:lambda:us-west-2:123456789012:function:myFunctionAlias",
  162. "Description": "",
  163. "FunctionVersion": "1",
  164. "Name": "myFunctionAlias"
  165. },
  166. "comments": {
  167. "input": {
  168. },
  169. "output": {
  170. }
  171. },
  172. "description": "This operation retrieves a Lambda function alias",
  173. "id": "to-retrieve-a-lambda-function-alias-1481648742254",
  174. "title": "To retrieve a Lambda function alias"
  175. }
  176. ],
  177. "GetEventSourceMapping": [
  178. {
  179. "input": {
  180. "UUID": "123489-xxxxx-kdla8d89d7"
  181. },
  182. "output": {
  183. "BatchSize": 123,
  184. "EventSourceArn": "arn:aws:iam::123456789012:eventsource",
  185. "FunctionArn": "arn:aws:lambda:us-west-2:123456789012:function:myFunction",
  186. "LastModified": "2016-11-21T19:49:20.006+0000",
  187. "LastProcessingResult": "",
  188. "State": "",
  189. "StateTransitionReason": "",
  190. "UUID": "123489-xxxxx-kdla8d89d7"
  191. },
  192. "comments": {
  193. "input": {
  194. },
  195. "output": {
  196. }
  197. },
  198. "description": "This operation retrieves a Lambda function's event source mapping",
  199. "id": "to-retrieve-a-lambda-functions-event-source-mapping-1481661622799",
  200. "title": "To retrieve a Lambda function's event source mapping"
  201. }
  202. ],
  203. "GetFunction": [
  204. {
  205. "input": {
  206. "FunctionName": "myFunction",
  207. "Qualifier": "1"
  208. },
  209. "output": {
  210. "Code": {
  211. "Location": "somelocation",
  212. "RepositoryType": "S3"
  213. },
  214. "Configuration": {
  215. "CodeSha256": "LQT+0DHxxxxcfwLyQjzoEFKZtdqQjHXanlSdfXBlEW0VA=",
  216. "CodeSize": 262,
  217. "Description": "A starter AWS Lambda function.",
  218. "Environment": {
  219. "Variables": {
  220. "S3_BUCKET": "test"
  221. }
  222. },
  223. "FunctionArn": "arn:aws:lambda:us-west-2:123456789012:function:myFunction",
  224. "FunctionName": "myFunction",
  225. "Handler": "index.handler",
  226. "LastModified": "2016-11-21T19:49:20.006+0000",
  227. "MemorySize": 128,
  228. "Role": "arn:aws:iam::123456789012:role/lambda_basic_execution",
  229. "Runtime": "nodejs8.10",
  230. "Timeout": 3,
  231. "Version": "$LATEST",
  232. "VpcConfig": {
  233. "SecurityGroupIds": [
  234. ],
  235. "SubnetIds": [
  236. ]
  237. }
  238. }
  239. },
  240. "comments": {
  241. "input": {
  242. },
  243. "output": {
  244. }
  245. },
  246. "description": "This operation retrieves a Lambda function's event source mapping",
  247. "id": "to-retrieve-a-lambda-functions-event-source-mapping-1481661622799",
  248. "title": "To retrieve a Lambda function's event source mapping"
  249. }
  250. ],
  251. "GetFunctionConfiguration": [
  252. {
  253. "input": {
  254. "FunctionName": "myFunction",
  255. "Qualifier": "1"
  256. },
  257. "output": {
  258. "CodeSha256": "LQT+0DHxxxxcfwLyQjzoEFKZtdqQjHXanlSdfXBlEW0VA=",
  259. "CodeSize": 123,
  260. "DeadLetterConfig": {
  261. },
  262. "Description": "",
  263. "Environment": {
  264. },
  265. "FunctionArn": "arn:aws:lambda:us-west-2:123456789012:function:myFunction",
  266. "FunctionName": "myFunction",
  267. "Handler": "index.handler",
  268. "KMSKeyArn": "",
  269. "LastModified": "2016-11-21T19:49:20.006+0000",
  270. "MemorySize": 128,
  271. "Role": "arn:aws:iam::123456789012:role/lambda_basic_execution",
  272. "Runtime": "python2.7",
  273. "Timeout": 123,
  274. "Version": "1",
  275. "VpcConfig": {
  276. }
  277. },
  278. "comments": {
  279. "input": {
  280. },
  281. "output": {
  282. }
  283. },
  284. "description": "This operation retrieves a Lambda function's event source mapping",
  285. "id": "to-retrieve-a-lambda-functions-event-source-mapping-1481661622799",
  286. "title": "To retrieve a Lambda function's event source mapping"
  287. }
  288. ],
  289. "GetPolicy": [
  290. {
  291. "input": {
  292. "FunctionName": "myFunction",
  293. "Qualifier": "1"
  294. },
  295. "output": {
  296. "Policy": ""
  297. },
  298. "comments": {
  299. "input": {
  300. },
  301. "output": {
  302. }
  303. },
  304. "description": "This operation retrieves a Lambda function policy",
  305. "id": "to-retrieve-a-lambda-function-policy-1481649319053",
  306. "title": "To retrieve a Lambda function policy"
  307. }
  308. ],
  309. "Invoke": [
  310. {
  311. "input": {
  312. "ClientContext": "MyApp",
  313. "FunctionName": "MyFunction",
  314. "InvocationType": "Event",
  315. "LogType": "Tail",
  316. "Payload": "fileb://file-path/input.json",
  317. "Qualifier": "1"
  318. },
  319. "output": {
  320. "FunctionError": "",
  321. "LogResult": "",
  322. "Payload": "?",
  323. "StatusCode": 123
  324. },
  325. "comments": {
  326. "input": {
  327. },
  328. "output": {
  329. }
  330. },
  331. "description": "This operation invokes a Lambda function",
  332. "id": "to-invoke-a-lambda-function-1481659683915",
  333. "title": "To invoke a Lambda function"
  334. }
  335. ],
  336. "InvokeAsync": [
  337. {
  338. "input": {
  339. "FunctionName": "myFunction",
  340. "InvokeArgs": "fileb://file-path/input.json"
  341. },
  342. "output": {
  343. "Status": 123
  344. },
  345. "comments": {
  346. "input": {
  347. },
  348. "output": {
  349. }
  350. },
  351. "description": "This operation invokes a Lambda function asynchronously",
  352. "id": "to-invoke-a-lambda-function-asynchronously-1481649694923",
  353. "title": "To invoke a Lambda function asynchronously"
  354. }
  355. ],
  356. "ListAliases": [
  357. {
  358. "input": {
  359. "FunctionName": "myFunction",
  360. "FunctionVersion": "1",
  361. "Marker": "",
  362. "MaxItems": 123
  363. },
  364. "output": {
  365. "Aliases": [
  366. ],
  367. "NextMarker": ""
  368. },
  369. "comments": {
  370. "input": {
  371. },
  372. "output": {
  373. }
  374. },
  375. "description": "This operation retrieves a Lambda function's aliases",
  376. "id": "to-retrieve-a-lambda-function-aliases-1481650199732",
  377. "title": "To retrieve a Lambda function aliases"
  378. }
  379. ],
  380. "ListFunctions": [
  381. {
  382. "input": {
  383. "Marker": "",
  384. "MaxItems": 123
  385. },
  386. "output": {
  387. "Functions": [
  388. ],
  389. "NextMarker": ""
  390. },
  391. "comments": {
  392. "input": {
  393. },
  394. "output": {
  395. }
  396. },
  397. "description": "This operation retrieves a Lambda functions",
  398. "id": "to-retrieve-a-list-of-lambda-functions-1481650507425",
  399. "title": "To retrieve a list of Lambda functions"
  400. }
  401. ],
  402. "ListVersionsByFunction": [
  403. {
  404. "input": {
  405. "FunctionName": "myFunction",
  406. "Marker": "",
  407. "MaxItems": 123
  408. },
  409. "output": {
  410. "NextMarker": "",
  411. "Versions": [
  412. ]
  413. },
  414. "comments": {
  415. "input": {
  416. },
  417. "output": {
  418. }
  419. },
  420. "description": "This operation retrieves a Lambda function versions",
  421. "id": "to-retrieve-a-list-of-lambda-function-versions-1481650603750",
  422. "title": "To retrieve a list of Lambda function versions"
  423. }
  424. ],
  425. "PublishVersion": [
  426. {
  427. "input": {
  428. "CodeSha256": "",
  429. "Description": "",
  430. "FunctionName": "myFunction"
  431. },
  432. "output": {
  433. "CodeSha256": "",
  434. "CodeSize": 123,
  435. "Description": "",
  436. "FunctionArn": "arn:aws:lambda:us-west-2:123456789012:function:myFunction",
  437. "FunctionName": "myFunction",
  438. "Handler": "index.handler",
  439. "LastModified": "2016-11-21T19:49:20.006+0000",
  440. "MemorySize": 128,
  441. "Role": "arn:aws:iam::123456789012:role/lambda_basic_execution",
  442. "Runtime": "python2.7",
  443. "Timeout": 123,
  444. "Version": "1",
  445. "VpcConfig": {
  446. }
  447. },
  448. "comments": {
  449. "input": {
  450. },
  451. "output": {
  452. }
  453. },
  454. "description": "This operation publishes a version of a Lambda function",
  455. "id": "to-publish-a-version-of-a-lambda-function-1481650704986",
  456. "title": "To publish a version of a Lambda function"
  457. }
  458. ],
  459. "RemovePermission": [
  460. {
  461. "input": {
  462. "FunctionName": "myFunction",
  463. "Qualifier": "1",
  464. "StatementId": "role-statement-id"
  465. },
  466. "comments": {
  467. "input": {
  468. },
  469. "output": {
  470. }
  471. },
  472. "description": "This operation removes a Lambda function's permissions",
  473. "id": "to-remove-a-lambda-functions-permissions-1481661337021",
  474. "title": "To remove a Lambda function's permissions"
  475. }
  476. ],
  477. "UpdateAlias": [
  478. {
  479. "input": {
  480. "Description": "",
  481. "FunctionName": "myFunction",
  482. "FunctionVersion": "1",
  483. "Name": "functionAlias"
  484. },
  485. "output": {
  486. "AliasArn": "arn:aws:lambda:us-west-2:123456789012:function:functionAlias",
  487. "Description": "",
  488. "FunctionVersion": "1",
  489. "Name": "functionAlias"
  490. },
  491. "comments": {
  492. "input": {
  493. },
  494. "output": {
  495. }
  496. },
  497. "description": "This operation updates a Lambda function alias",
  498. "id": "to-update-a-lambda-function-alias-1481650817950",
  499. "title": "To update a Lambda function alias"
  500. }
  501. ],
  502. "UpdateEventSourceMapping": [
  503. {
  504. "input": {
  505. "BatchSize": 123,
  506. "Enabled": true,
  507. "FunctionName": "myFunction",
  508. "UUID": "1234xCy789012"
  509. },
  510. "output": {
  511. "BatchSize": 123,
  512. "EventSourceArn": "arn:aws:s3:::examplebucket/*",
  513. "FunctionArn": "arn:aws:lambda:us-west-2:123456789012:function:myFunction",
  514. "LastModified": "2016-11-21T19:49:20.006+0000",
  515. "LastProcessingResult": "",
  516. "State": "",
  517. "StateTransitionReason": "",
  518. "UUID": "1234xCy789012"
  519. },
  520. "comments": {
  521. "input": {
  522. },
  523. "output": {
  524. }
  525. },
  526. "description": "This operation updates a Lambda function event source mapping",
  527. "id": "to-update-a-lambda-function-event-source-mapping-1481650907413",
  528. "title": "To update a Lambda function event source mapping"
  529. }
  530. ],
  531. "UpdateFunctionCode": [
  532. {
  533. "input": {
  534. "FunctionName": "myFunction",
  535. "Publish": true,
  536. "S3Bucket": "myBucket",
  537. "S3Key": "myKey",
  538. "S3ObjectVersion": "1",
  539. "ZipFile": "fileb://file-path/file.zip"
  540. },
  541. "output": {
  542. "CodeSha256": "LQT+0DHxxxxcfwLyQjzoEFKZtdqQjHXanlSdfXBlEW0VA=",
  543. "CodeSize": 123,
  544. "Description": "",
  545. "FunctionArn": "arn:aws:lambda:us-west-2:123456789012:function:myFunction",
  546. "FunctionName": "myFunction",
  547. "Handler": "index.handler",
  548. "LastModified": "2016-11-21T19:49:20.006+0000",
  549. "MemorySize": 128,
  550. "Role": "arn:aws:iam::123456789012:role/lambda_basic_execution",
  551. "Runtime": "python2.7",
  552. "Timeout": 123,
  553. "Version": "1",
  554. "VpcConfig": {
  555. }
  556. },
  557. "comments": {
  558. "input": {
  559. },
  560. "output": {
  561. }
  562. },
  563. "description": "This operation updates a Lambda function's code",
  564. "id": "to-update-a-lambda-functions-code-1481650992672",
  565. "title": "To update a Lambda function's code"
  566. }
  567. ],
  568. "UpdateFunctionConfiguration": [
  569. {
  570. "input": {
  571. "Description": "",
  572. "FunctionName": "myFunction",
  573. "Handler": "index.handler",
  574. "MemorySize": 128,
  575. "Role": "arn:aws:iam::123456789012:role/lambda_basic_execution",
  576. "Runtime": "python2.7",
  577. "Timeout": 123,
  578. "VpcConfig": {
  579. }
  580. },
  581. "output": {
  582. "CodeSha256": "LQT+0DHxxxxcfwLyQjzoEFKZtdqQjHXanlSdfXBlEW0VA=",
  583. "CodeSize": 123,
  584. "Description": "",
  585. "FunctionArn": "arn:aws:lambda:us-west-2:123456789012:function:myFunction",
  586. "FunctionName": "myFunction",
  587. "Handler": "index.handler",
  588. "LastModified": "2016-11-21T19:49:20.006+0000",
  589. "MemorySize": 128,
  590. "Role": "arn:aws:iam::123456789012:role/lambda_basic_execution",
  591. "Runtime": "python2.7",
  592. "Timeout": 123,
  593. "Version": "1",
  594. "VpcConfig": {
  595. }
  596. },
  597. "comments": {
  598. "input": {
  599. },
  600. "output": {
  601. }
  602. },
  603. "description": "This operation updates a Lambda function's configuration",
  604. "id": "to-update-a-lambda-functions-configuration-1481651096447",
  605. "title": "To update a Lambda function's configuration"
  606. }
  607. ]
  608. }
  609. }