api.go 125 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381
  1. // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
  2. // Package lambda provides a client for AWS Lambda.
  3. package lambda
  4. import (
  5. "io"
  6. "time"
  7. "github.com/aws/aws-sdk-go/aws/awsutil"
  8. "github.com/aws/aws-sdk-go/aws/request"
  9. "github.com/aws/aws-sdk-go/private/protocol"
  10. "github.com/aws/aws-sdk-go/private/protocol/restjson"
  11. )
  12. const opAddPermission = "AddPermission"
  13. // AddPermissionRequest generates a "aws/request.Request" representing the
  14. // client's request for the AddPermission operation. The "output" return
  15. // value can be used to capture response data after the request's "Send" method
  16. // is called.
  17. //
  18. // Creating a request object using this method should be used when you want to inject
  19. // custom logic into the request's lifecycle using a custom handler, or if you want to
  20. // access properties on the request object before or after sending the request. If
  21. // you just want the service response, call the AddPermission method directly
  22. // instead.
  23. //
  24. // Note: You must call the "Send" method on the returned request object in order
  25. // to execute the request.
  26. //
  27. // // Example sending a request using the AddPermissionRequest method.
  28. // req, resp := client.AddPermissionRequest(params)
  29. //
  30. // err := req.Send()
  31. // if err == nil { // resp is now filled
  32. // fmt.Println(resp)
  33. // }
  34. //
  35. func (c *Lambda) AddPermissionRequest(input *AddPermissionInput) (req *request.Request, output *AddPermissionOutput) {
  36. op := &request.Operation{
  37. Name: opAddPermission,
  38. HTTPMethod: "POST",
  39. HTTPPath: "/2015-03-31/functions/{FunctionName}/policy",
  40. }
  41. if input == nil {
  42. input = &AddPermissionInput{}
  43. }
  44. req = c.newRequest(op, input, output)
  45. output = &AddPermissionOutput{}
  46. req.Data = output
  47. return
  48. }
  49. // Adds a permission to the resource policy associated with the specified AWS
  50. // Lambda function. You use resource policies to grant permissions to event
  51. // sources that use push model. In a push model, event sources (such as Amazon
  52. // S3 and custom applications) invoke your Lambda function. Each permission
  53. // you add to the resource policy allows an event source, permission to invoke
  54. // the Lambda function.
  55. //
  56. // For information about the push model, see AWS Lambda: How it Works (http://docs.aws.amazon.com/lambda/latest/dg/lambda-introduction.html).
  57. //
  58. // If you are using versioning, the permissions you add are specific to the
  59. // Lambda function version or alias you specify in the AddPermission request
  60. // via the Qualifier parameter. For more information about versioning, see AWS
  61. // Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).
  62. //
  63. // This operation requires permission for the lambda:AddPermission action.
  64. func (c *Lambda) AddPermission(input *AddPermissionInput) (*AddPermissionOutput, error) {
  65. req, out := c.AddPermissionRequest(input)
  66. err := req.Send()
  67. return out, err
  68. }
  69. const opCreateAlias = "CreateAlias"
  70. // CreateAliasRequest generates a "aws/request.Request" representing the
  71. // client's request for the CreateAlias operation. The "output" return
  72. // value can be used to capture response data after the request's "Send" method
  73. // is called.
  74. //
  75. // Creating a request object using this method should be used when you want to inject
  76. // custom logic into the request's lifecycle using a custom handler, or if you want to
  77. // access properties on the request object before or after sending the request. If
  78. // you just want the service response, call the CreateAlias method directly
  79. // instead.
  80. //
  81. // Note: You must call the "Send" method on the returned request object in order
  82. // to execute the request.
  83. //
  84. // // Example sending a request using the CreateAliasRequest method.
  85. // req, resp := client.CreateAliasRequest(params)
  86. //
  87. // err := req.Send()
  88. // if err == nil { // resp is now filled
  89. // fmt.Println(resp)
  90. // }
  91. //
  92. func (c *Lambda) CreateAliasRequest(input *CreateAliasInput) (req *request.Request, output *AliasConfiguration) {
  93. op := &request.Operation{
  94. Name: opCreateAlias,
  95. HTTPMethod: "POST",
  96. HTTPPath: "/2015-03-31/functions/{FunctionName}/aliases",
  97. }
  98. if input == nil {
  99. input = &CreateAliasInput{}
  100. }
  101. req = c.newRequest(op, input, output)
  102. output = &AliasConfiguration{}
  103. req.Data = output
  104. return
  105. }
  106. // Creates an alias that points to the specified Lambda function version. For
  107. // more information, see Introduction to AWS Lambda Aliases (http://docs.aws.amazon.com/lambda/latest/dg/aliases-intro.html).
  108. //
  109. // Alias names are unique for a given function. This requires permission for
  110. // the lambda:CreateAlias action.
  111. func (c *Lambda) CreateAlias(input *CreateAliasInput) (*AliasConfiguration, error) {
  112. req, out := c.CreateAliasRequest(input)
  113. err := req.Send()
  114. return out, err
  115. }
  116. const opCreateEventSourceMapping = "CreateEventSourceMapping"
  117. // CreateEventSourceMappingRequest generates a "aws/request.Request" representing the
  118. // client's request for the CreateEventSourceMapping operation. The "output" return
  119. // value can be used to capture response data after the request's "Send" method
  120. // is called.
  121. //
  122. // Creating a request object using this method should be used when you want to inject
  123. // custom logic into the request's lifecycle using a custom handler, or if you want to
  124. // access properties on the request object before or after sending the request. If
  125. // you just want the service response, call the CreateEventSourceMapping method directly
  126. // instead.
  127. //
  128. // Note: You must call the "Send" method on the returned request object in order
  129. // to execute the request.
  130. //
  131. // // Example sending a request using the CreateEventSourceMappingRequest method.
  132. // req, resp := client.CreateEventSourceMappingRequest(params)
  133. //
  134. // err := req.Send()
  135. // if err == nil { // resp is now filled
  136. // fmt.Println(resp)
  137. // }
  138. //
  139. func (c *Lambda) CreateEventSourceMappingRequest(input *CreateEventSourceMappingInput) (req *request.Request, output *EventSourceMappingConfiguration) {
  140. op := &request.Operation{
  141. Name: opCreateEventSourceMapping,
  142. HTTPMethod: "POST",
  143. HTTPPath: "/2015-03-31/event-source-mappings/",
  144. }
  145. if input == nil {
  146. input = &CreateEventSourceMappingInput{}
  147. }
  148. req = c.newRequest(op, input, output)
  149. output = &EventSourceMappingConfiguration{}
  150. req.Data = output
  151. return
  152. }
  153. // Identifies a stream as an event source for a Lambda function. It can be either
  154. // an Amazon Kinesis stream or an Amazon DynamoDB stream. AWS Lambda invokes
  155. // the specified function when records are posted to the stream.
  156. //
  157. // This association between a stream source and a Lambda function is called
  158. // the event source mapping.
  159. //
  160. // This event source mapping is relevant only in the AWS Lambda pull model,
  161. // where AWS Lambda invokes the function. For more information, go to AWS Lambda:
  162. // How it Works (http://docs.aws.amazon.com/lambda/latest/dg/lambda-introduction.html)
  163. // in the AWS Lambda Developer Guide.
  164. //
  165. // You provide mapping information (for example, which stream to read from
  166. // and which Lambda function to invoke) in the request body.
  167. //
  168. // Each event source, such as an Amazon Kinesis or a DynamoDB stream, can be
  169. // associated with multiple AWS Lambda function. A given Lambda function can
  170. // be associated with multiple AWS event sources.
  171. //
  172. // If you are using versioning, you can specify a specific function version
  173. // or an alias via the function name parameter. For more information about versioning,
  174. // see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).
  175. //
  176. // This operation requires permission for the lambda:CreateEventSourceMapping
  177. // action.
  178. func (c *Lambda) CreateEventSourceMapping(input *CreateEventSourceMappingInput) (*EventSourceMappingConfiguration, error) {
  179. req, out := c.CreateEventSourceMappingRequest(input)
  180. err := req.Send()
  181. return out, err
  182. }
  183. const opCreateFunction = "CreateFunction"
  184. // CreateFunctionRequest generates a "aws/request.Request" representing the
  185. // client's request for the CreateFunction operation. The "output" return
  186. // value can be used to capture response data after the request's "Send" method
  187. // is called.
  188. //
  189. // Creating a request object using this method should be used when you want to inject
  190. // custom logic into the request's lifecycle using a custom handler, or if you want to
  191. // access properties on the request object before or after sending the request. If
  192. // you just want the service response, call the CreateFunction method directly
  193. // instead.
  194. //
  195. // Note: You must call the "Send" method on the returned request object in order
  196. // to execute the request.
  197. //
  198. // // Example sending a request using the CreateFunctionRequest method.
  199. // req, resp := client.CreateFunctionRequest(params)
  200. //
  201. // err := req.Send()
  202. // if err == nil { // resp is now filled
  203. // fmt.Println(resp)
  204. // }
  205. //
  206. func (c *Lambda) CreateFunctionRequest(input *CreateFunctionInput) (req *request.Request, output *FunctionConfiguration) {
  207. op := &request.Operation{
  208. Name: opCreateFunction,
  209. HTTPMethod: "POST",
  210. HTTPPath: "/2015-03-31/functions",
  211. }
  212. if input == nil {
  213. input = &CreateFunctionInput{}
  214. }
  215. req = c.newRequest(op, input, output)
  216. output = &FunctionConfiguration{}
  217. req.Data = output
  218. return
  219. }
  220. // Creates a new Lambda function. The function metadata is created from the
  221. // request parameters, and the code for the function is provided by a .zip file
  222. // in the request body. If the function name already exists, the operation will
  223. // fail. Note that the function name is case-sensitive.
  224. //
  225. // If you are using versioning, you can also publish a version of the Lambda
  226. // function you are creating using the Publish parameter. For more information
  227. // about versioning, see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).
  228. //
  229. // This operation requires permission for the lambda:CreateFunction action.
  230. func (c *Lambda) CreateFunction(input *CreateFunctionInput) (*FunctionConfiguration, error) {
  231. req, out := c.CreateFunctionRequest(input)
  232. err := req.Send()
  233. return out, err
  234. }
  235. const opDeleteAlias = "DeleteAlias"
  236. // DeleteAliasRequest generates a "aws/request.Request" representing the
  237. // client's request for the DeleteAlias operation. The "output" return
  238. // value can be used to capture response data after the request's "Send" method
  239. // is called.
  240. //
  241. // Creating a request object using this method should be used when you want to inject
  242. // custom logic into the request's lifecycle using a custom handler, or if you want to
  243. // access properties on the request object before or after sending the request. If
  244. // you just want the service response, call the DeleteAlias method directly
  245. // instead.
  246. //
  247. // Note: You must call the "Send" method on the returned request object in order
  248. // to execute the request.
  249. //
  250. // // Example sending a request using the DeleteAliasRequest method.
  251. // req, resp := client.DeleteAliasRequest(params)
  252. //
  253. // err := req.Send()
  254. // if err == nil { // resp is now filled
  255. // fmt.Println(resp)
  256. // }
  257. //
  258. func (c *Lambda) DeleteAliasRequest(input *DeleteAliasInput) (req *request.Request, output *DeleteAliasOutput) {
  259. op := &request.Operation{
  260. Name: opDeleteAlias,
  261. HTTPMethod: "DELETE",
  262. HTTPPath: "/2015-03-31/functions/{FunctionName}/aliases/{Name}",
  263. }
  264. if input == nil {
  265. input = &DeleteAliasInput{}
  266. }
  267. req = c.newRequest(op, input, output)
  268. req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
  269. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  270. output = &DeleteAliasOutput{}
  271. req.Data = output
  272. return
  273. }
  274. // Deletes the specified Lambda function alias. For more information, see Introduction
  275. // to AWS Lambda Aliases (http://docs.aws.amazon.com/lambda/latest/dg/aliases-intro.html).
  276. //
  277. // This requires permission for the lambda:DeleteAlias action.
  278. func (c *Lambda) DeleteAlias(input *DeleteAliasInput) (*DeleteAliasOutput, error) {
  279. req, out := c.DeleteAliasRequest(input)
  280. err := req.Send()
  281. return out, err
  282. }
  283. const opDeleteEventSourceMapping = "DeleteEventSourceMapping"
  284. // DeleteEventSourceMappingRequest generates a "aws/request.Request" representing the
  285. // client's request for the DeleteEventSourceMapping operation. The "output" return
  286. // value can be used to capture response data after the request's "Send" method
  287. // is called.
  288. //
  289. // Creating a request object using this method should be used when you want to inject
  290. // custom logic into the request's lifecycle using a custom handler, or if you want to
  291. // access properties on the request object before or after sending the request. If
  292. // you just want the service response, call the DeleteEventSourceMapping method directly
  293. // instead.
  294. //
  295. // Note: You must call the "Send" method on the returned request object in order
  296. // to execute the request.
  297. //
  298. // // Example sending a request using the DeleteEventSourceMappingRequest method.
  299. // req, resp := client.DeleteEventSourceMappingRequest(params)
  300. //
  301. // err := req.Send()
  302. // if err == nil { // resp is now filled
  303. // fmt.Println(resp)
  304. // }
  305. //
  306. func (c *Lambda) DeleteEventSourceMappingRequest(input *DeleteEventSourceMappingInput) (req *request.Request, output *EventSourceMappingConfiguration) {
  307. op := &request.Operation{
  308. Name: opDeleteEventSourceMapping,
  309. HTTPMethod: "DELETE",
  310. HTTPPath: "/2015-03-31/event-source-mappings/{UUID}",
  311. }
  312. if input == nil {
  313. input = &DeleteEventSourceMappingInput{}
  314. }
  315. req = c.newRequest(op, input, output)
  316. output = &EventSourceMappingConfiguration{}
  317. req.Data = output
  318. return
  319. }
  320. // Removes an event source mapping. This means AWS Lambda will no longer invoke
  321. // the function for events in the associated source.
  322. //
  323. // This operation requires permission for the lambda:DeleteEventSourceMapping
  324. // action.
  325. func (c *Lambda) DeleteEventSourceMapping(input *DeleteEventSourceMappingInput) (*EventSourceMappingConfiguration, error) {
  326. req, out := c.DeleteEventSourceMappingRequest(input)
  327. err := req.Send()
  328. return out, err
  329. }
  330. const opDeleteFunction = "DeleteFunction"
  331. // DeleteFunctionRequest generates a "aws/request.Request" representing the
  332. // client's request for the DeleteFunction operation. The "output" return
  333. // value can be used to capture response data after the request's "Send" method
  334. // is called.
  335. //
  336. // Creating a request object using this method should be used when you want to inject
  337. // custom logic into the request's lifecycle using a custom handler, or if you want to
  338. // access properties on the request object before or after sending the request. If
  339. // you just want the service response, call the DeleteFunction method directly
  340. // instead.
  341. //
  342. // Note: You must call the "Send" method on the returned request object in order
  343. // to execute the request.
  344. //
  345. // // Example sending a request using the DeleteFunctionRequest method.
  346. // req, resp := client.DeleteFunctionRequest(params)
  347. //
  348. // err := req.Send()
  349. // if err == nil { // resp is now filled
  350. // fmt.Println(resp)
  351. // }
  352. //
  353. func (c *Lambda) DeleteFunctionRequest(input *DeleteFunctionInput) (req *request.Request, output *DeleteFunctionOutput) {
  354. op := &request.Operation{
  355. Name: opDeleteFunction,
  356. HTTPMethod: "DELETE",
  357. HTTPPath: "/2015-03-31/functions/{FunctionName}",
  358. }
  359. if input == nil {
  360. input = &DeleteFunctionInput{}
  361. }
  362. req = c.newRequest(op, input, output)
  363. req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
  364. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  365. output = &DeleteFunctionOutput{}
  366. req.Data = output
  367. return
  368. }
  369. // Deletes the specified Lambda function code and configuration.
  370. //
  371. // If you are using the versioning feature and you don't specify a function
  372. // version in your DeleteFunction request, AWS Lambda will delete the function,
  373. // including all its versions, and any aliases pointing to the function versions.
  374. // To delete a specific function version, you must provide the function version
  375. // via the Qualifier parameter. For information about function versioning, see
  376. // AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).
  377. //
  378. // When you delete a function the associated resource policy is also deleted.
  379. // You will need to delete the event source mappings explicitly.
  380. //
  381. // This operation requires permission for the lambda:DeleteFunction action.
  382. func (c *Lambda) DeleteFunction(input *DeleteFunctionInput) (*DeleteFunctionOutput, error) {
  383. req, out := c.DeleteFunctionRequest(input)
  384. err := req.Send()
  385. return out, err
  386. }
  387. const opGetAlias = "GetAlias"
  388. // GetAliasRequest generates a "aws/request.Request" representing the
  389. // client's request for the GetAlias operation. The "output" return
  390. // value can be used to capture response data after the request's "Send" method
  391. // is called.
  392. //
  393. // Creating a request object using this method should be used when you want to inject
  394. // custom logic into the request's lifecycle using a custom handler, or if you want to
  395. // access properties on the request object before or after sending the request. If
  396. // you just want the service response, call the GetAlias method directly
  397. // instead.
  398. //
  399. // Note: You must call the "Send" method on the returned request object in order
  400. // to execute the request.
  401. //
  402. // // Example sending a request using the GetAliasRequest method.
  403. // req, resp := client.GetAliasRequest(params)
  404. //
  405. // err := req.Send()
  406. // if err == nil { // resp is now filled
  407. // fmt.Println(resp)
  408. // }
  409. //
  410. func (c *Lambda) GetAliasRequest(input *GetAliasInput) (req *request.Request, output *AliasConfiguration) {
  411. op := &request.Operation{
  412. Name: opGetAlias,
  413. HTTPMethod: "GET",
  414. HTTPPath: "/2015-03-31/functions/{FunctionName}/aliases/{Name}",
  415. }
  416. if input == nil {
  417. input = &GetAliasInput{}
  418. }
  419. req = c.newRequest(op, input, output)
  420. output = &AliasConfiguration{}
  421. req.Data = output
  422. return
  423. }
  424. // Returns the specified alias information such as the alias ARN, description,
  425. // and function version it is pointing to. For more information, see Introduction
  426. // to AWS Lambda Aliases (http://docs.aws.amazon.com/lambda/latest/dg/aliases-intro.html).
  427. //
  428. // This requires permission for the lambda:GetAlias action.
  429. func (c *Lambda) GetAlias(input *GetAliasInput) (*AliasConfiguration, error) {
  430. req, out := c.GetAliasRequest(input)
  431. err := req.Send()
  432. return out, err
  433. }
  434. const opGetEventSourceMapping = "GetEventSourceMapping"
  435. // GetEventSourceMappingRequest generates a "aws/request.Request" representing the
  436. // client's request for the GetEventSourceMapping operation. The "output" return
  437. // value can be used to capture response data after the request's "Send" method
  438. // is called.
  439. //
  440. // Creating a request object using this method should be used when you want to inject
  441. // custom logic into the request's lifecycle using a custom handler, or if you want to
  442. // access properties on the request object before or after sending the request. If
  443. // you just want the service response, call the GetEventSourceMapping method directly
  444. // instead.
  445. //
  446. // Note: You must call the "Send" method on the returned request object in order
  447. // to execute the request.
  448. //
  449. // // Example sending a request using the GetEventSourceMappingRequest method.
  450. // req, resp := client.GetEventSourceMappingRequest(params)
  451. //
  452. // err := req.Send()
  453. // if err == nil { // resp is now filled
  454. // fmt.Println(resp)
  455. // }
  456. //
  457. func (c *Lambda) GetEventSourceMappingRequest(input *GetEventSourceMappingInput) (req *request.Request, output *EventSourceMappingConfiguration) {
  458. op := &request.Operation{
  459. Name: opGetEventSourceMapping,
  460. HTTPMethod: "GET",
  461. HTTPPath: "/2015-03-31/event-source-mappings/{UUID}",
  462. }
  463. if input == nil {
  464. input = &GetEventSourceMappingInput{}
  465. }
  466. req = c.newRequest(op, input, output)
  467. output = &EventSourceMappingConfiguration{}
  468. req.Data = output
  469. return
  470. }
  471. // Returns configuration information for the specified event source mapping
  472. // (see CreateEventSourceMapping).
  473. //
  474. // This operation requires permission for the lambda:GetEventSourceMapping
  475. // action.
  476. func (c *Lambda) GetEventSourceMapping(input *GetEventSourceMappingInput) (*EventSourceMappingConfiguration, error) {
  477. req, out := c.GetEventSourceMappingRequest(input)
  478. err := req.Send()
  479. return out, err
  480. }
  481. const opGetFunction = "GetFunction"
  482. // GetFunctionRequest generates a "aws/request.Request" representing the
  483. // client's request for the GetFunction operation. The "output" return
  484. // value can be used to capture response data after the request's "Send" method
  485. // is called.
  486. //
  487. // Creating a request object using this method should be used when you want to inject
  488. // custom logic into the request's lifecycle using a custom handler, or if you want to
  489. // access properties on the request object before or after sending the request. If
  490. // you just want the service response, call the GetFunction method directly
  491. // instead.
  492. //
  493. // Note: You must call the "Send" method on the returned request object in order
  494. // to execute the request.
  495. //
  496. // // Example sending a request using the GetFunctionRequest method.
  497. // req, resp := client.GetFunctionRequest(params)
  498. //
  499. // err := req.Send()
  500. // if err == nil { // resp is now filled
  501. // fmt.Println(resp)
  502. // }
  503. //
  504. func (c *Lambda) GetFunctionRequest(input *GetFunctionInput) (req *request.Request, output *GetFunctionOutput) {
  505. op := &request.Operation{
  506. Name: opGetFunction,
  507. HTTPMethod: "GET",
  508. HTTPPath: "/2015-03-31/functions/{FunctionName}",
  509. }
  510. if input == nil {
  511. input = &GetFunctionInput{}
  512. }
  513. req = c.newRequest(op, input, output)
  514. output = &GetFunctionOutput{}
  515. req.Data = output
  516. return
  517. }
  518. // Returns the configuration information of the Lambda function and a presigned
  519. // URL link to the .zip file you uploaded with CreateFunction so you can download
  520. // the .zip file. Note that the URL is valid for up to 10 minutes. The configuration
  521. // information is the same information you provided as parameters when uploading
  522. // the function.
  523. //
  524. // Using the optional Qualifier parameter, you can specify a specific function
  525. // version for which you want this information. If you don't specify this parameter,
  526. // the API uses unqualified function ARN which return information about the
  527. // $LATEST version of the Lambda function. For more information, see AWS Lambda
  528. // Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).
  529. //
  530. // This operation requires permission for the lambda:GetFunction action.
  531. func (c *Lambda) GetFunction(input *GetFunctionInput) (*GetFunctionOutput, error) {
  532. req, out := c.GetFunctionRequest(input)
  533. err := req.Send()
  534. return out, err
  535. }
  536. const opGetFunctionConfiguration = "GetFunctionConfiguration"
  537. // GetFunctionConfigurationRequest generates a "aws/request.Request" representing the
  538. // client's request for the GetFunctionConfiguration operation. The "output" return
  539. // value can be used to capture response data after the request's "Send" method
  540. // is called.
  541. //
  542. // Creating a request object using this method should be used when you want to inject
  543. // custom logic into the request's lifecycle using a custom handler, or if you want to
  544. // access properties on the request object before or after sending the request. If
  545. // you just want the service response, call the GetFunctionConfiguration method directly
  546. // instead.
  547. //
  548. // Note: You must call the "Send" method on the returned request object in order
  549. // to execute the request.
  550. //
  551. // // Example sending a request using the GetFunctionConfigurationRequest method.
  552. // req, resp := client.GetFunctionConfigurationRequest(params)
  553. //
  554. // err := req.Send()
  555. // if err == nil { // resp is now filled
  556. // fmt.Println(resp)
  557. // }
  558. //
  559. func (c *Lambda) GetFunctionConfigurationRequest(input *GetFunctionConfigurationInput) (req *request.Request, output *FunctionConfiguration) {
  560. op := &request.Operation{
  561. Name: opGetFunctionConfiguration,
  562. HTTPMethod: "GET",
  563. HTTPPath: "/2015-03-31/functions/{FunctionName}/configuration",
  564. }
  565. if input == nil {
  566. input = &GetFunctionConfigurationInput{}
  567. }
  568. req = c.newRequest(op, input, output)
  569. output = &FunctionConfiguration{}
  570. req.Data = output
  571. return
  572. }
  573. // Returns the configuration information of the Lambda function. This the same
  574. // information you provided as parameters when uploading the function by using
  575. // CreateFunction.
  576. //
  577. // If you are using the versioning feature, you can retrieve this information
  578. // for a specific function version by using the optional Qualifier parameter
  579. // and specifying the function version or alias that points to it. If you don't
  580. // provide it, the API returns information about the $LATEST version of the
  581. // function. For more information about versioning, see AWS Lambda Function
  582. // Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).
  583. //
  584. // This operation requires permission for the lambda:GetFunctionConfiguration
  585. // operation.
  586. func (c *Lambda) GetFunctionConfiguration(input *GetFunctionConfigurationInput) (*FunctionConfiguration, error) {
  587. req, out := c.GetFunctionConfigurationRequest(input)
  588. err := req.Send()
  589. return out, err
  590. }
  591. const opGetPolicy = "GetPolicy"
  592. // GetPolicyRequest generates a "aws/request.Request" representing the
  593. // client's request for the GetPolicy operation. The "output" return
  594. // value can be used to capture response data after the request's "Send" method
  595. // is called.
  596. //
  597. // Creating a request object using this method should be used when you want to inject
  598. // custom logic into the request's lifecycle using a custom handler, or if you want to
  599. // access properties on the request object before or after sending the request. If
  600. // you just want the service response, call the GetPolicy method directly
  601. // instead.
  602. //
  603. // Note: You must call the "Send" method on the returned request object in order
  604. // to execute the request.
  605. //
  606. // // Example sending a request using the GetPolicyRequest method.
  607. // req, resp := client.GetPolicyRequest(params)
  608. //
  609. // err := req.Send()
  610. // if err == nil { // resp is now filled
  611. // fmt.Println(resp)
  612. // }
  613. //
  614. func (c *Lambda) GetPolicyRequest(input *GetPolicyInput) (req *request.Request, output *GetPolicyOutput) {
  615. op := &request.Operation{
  616. Name: opGetPolicy,
  617. HTTPMethod: "GET",
  618. HTTPPath: "/2015-03-31/functions/{FunctionName}/policy",
  619. }
  620. if input == nil {
  621. input = &GetPolicyInput{}
  622. }
  623. req = c.newRequest(op, input, output)
  624. output = &GetPolicyOutput{}
  625. req.Data = output
  626. return
  627. }
  628. // Returns the resource policy associated with the specified Lambda function.
  629. //
  630. // If you are using the versioning feature, you can get the resource policy
  631. // associated with the specific Lambda function version or alias by specifying
  632. // the version or alias name using the Qualifier parameter. For more information
  633. // about versioning, see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).
  634. //
  635. // For information about adding permissions, see AddPermission.
  636. //
  637. // You need permission for the lambda:GetPolicy action.
  638. func (c *Lambda) GetPolicy(input *GetPolicyInput) (*GetPolicyOutput, error) {
  639. req, out := c.GetPolicyRequest(input)
  640. err := req.Send()
  641. return out, err
  642. }
  643. const opInvoke = "Invoke"
  644. // InvokeRequest generates a "aws/request.Request" representing the
  645. // client's request for the Invoke operation. The "output" return
  646. // value can be used to capture response data after the request's "Send" method
  647. // is called.
  648. //
  649. // Creating a request object using this method should be used when you want to inject
  650. // custom logic into the request's lifecycle using a custom handler, or if you want to
  651. // access properties on the request object before or after sending the request. If
  652. // you just want the service response, call the Invoke method directly
  653. // instead.
  654. //
  655. // Note: You must call the "Send" method on the returned request object in order
  656. // to execute the request.
  657. //
  658. // // Example sending a request using the InvokeRequest method.
  659. // req, resp := client.InvokeRequest(params)
  660. //
  661. // err := req.Send()
  662. // if err == nil { // resp is now filled
  663. // fmt.Println(resp)
  664. // }
  665. //
  666. func (c *Lambda) InvokeRequest(input *InvokeInput) (req *request.Request, output *InvokeOutput) {
  667. op := &request.Operation{
  668. Name: opInvoke,
  669. HTTPMethod: "POST",
  670. HTTPPath: "/2015-03-31/functions/{FunctionName}/invocations",
  671. }
  672. if input == nil {
  673. input = &InvokeInput{}
  674. }
  675. req = c.newRequest(op, input, output)
  676. output = &InvokeOutput{}
  677. req.Data = output
  678. return
  679. }
  680. // Invokes a specific Lambda function.
  681. //
  682. // If you are using the versioning feature, you can invoke the specific function
  683. // version by providing function version or alias name that is pointing to the
  684. // function version using the Qualifier parameter in the request. If you don't
  685. // provide the Qualifier parameter, the $LATEST version of the Lambda function
  686. // is invoked. Invocations occur at least once in response to an event and functions
  687. // must be idempotent to handle this. For information about the versioning feature,
  688. // see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).
  689. //
  690. // This operation requires permission for the lambda:InvokeFunction action.
  691. func (c *Lambda) Invoke(input *InvokeInput) (*InvokeOutput, error) {
  692. req, out := c.InvokeRequest(input)
  693. err := req.Send()
  694. return out, err
  695. }
  696. const opInvokeAsync = "InvokeAsync"
  697. // InvokeAsyncRequest generates a "aws/request.Request" representing the
  698. // client's request for the InvokeAsync operation. The "output" return
  699. // value can be used to capture response data after the request's "Send" method
  700. // is called.
  701. //
  702. // Creating a request object using this method should be used when you want to inject
  703. // custom logic into the request's lifecycle using a custom handler, or if you want to
  704. // access properties on the request object before or after sending the request. If
  705. // you just want the service response, call the InvokeAsync method directly
  706. // instead.
  707. //
  708. // Note: You must call the "Send" method on the returned request object in order
  709. // to execute the request.
  710. //
  711. // // Example sending a request using the InvokeAsyncRequest method.
  712. // req, resp := client.InvokeAsyncRequest(params)
  713. //
  714. // err := req.Send()
  715. // if err == nil { // resp is now filled
  716. // fmt.Println(resp)
  717. // }
  718. //
  719. func (c *Lambda) InvokeAsyncRequest(input *InvokeAsyncInput) (req *request.Request, output *InvokeAsyncOutput) {
  720. if c.Client.Config.Logger != nil {
  721. c.Client.Config.Logger.Log("This operation, InvokeAsync, has been deprecated")
  722. }
  723. op := &request.Operation{
  724. Name: opInvokeAsync,
  725. HTTPMethod: "POST",
  726. HTTPPath: "/2014-11-13/functions/{FunctionName}/invoke-async/",
  727. }
  728. if input == nil {
  729. input = &InvokeAsyncInput{}
  730. }
  731. req = c.newRequest(op, input, output)
  732. output = &InvokeAsyncOutput{}
  733. req.Data = output
  734. return
  735. }
  736. // This API is deprecated. We recommend you use Invoke API (see Invoke).
  737. //
  738. // Submits an invocation request to AWS Lambda. Upon receiving the request,
  739. // Lambda executes the specified function asynchronously. To see the logs generated
  740. // by the Lambda function execution, see the CloudWatch Logs console.
  741. //
  742. // This operation requires permission for the lambda:InvokeFunction action.
  743. func (c *Lambda) InvokeAsync(input *InvokeAsyncInput) (*InvokeAsyncOutput, error) {
  744. req, out := c.InvokeAsyncRequest(input)
  745. err := req.Send()
  746. return out, err
  747. }
  748. const opListAliases = "ListAliases"
  749. // ListAliasesRequest generates a "aws/request.Request" representing the
  750. // client's request for the ListAliases operation. The "output" return
  751. // value can be used to capture response data after the request's "Send" method
  752. // is called.
  753. //
  754. // Creating a request object using this method should be used when you want to inject
  755. // custom logic into the request's lifecycle using a custom handler, or if you want to
  756. // access properties on the request object before or after sending the request. If
  757. // you just want the service response, call the ListAliases method directly
  758. // instead.
  759. //
  760. // Note: You must call the "Send" method on the returned request object in order
  761. // to execute the request.
  762. //
  763. // // Example sending a request using the ListAliasesRequest method.
  764. // req, resp := client.ListAliasesRequest(params)
  765. //
  766. // err := req.Send()
  767. // if err == nil { // resp is now filled
  768. // fmt.Println(resp)
  769. // }
  770. //
  771. func (c *Lambda) ListAliasesRequest(input *ListAliasesInput) (req *request.Request, output *ListAliasesOutput) {
  772. op := &request.Operation{
  773. Name: opListAliases,
  774. HTTPMethod: "GET",
  775. HTTPPath: "/2015-03-31/functions/{FunctionName}/aliases",
  776. }
  777. if input == nil {
  778. input = &ListAliasesInput{}
  779. }
  780. req = c.newRequest(op, input, output)
  781. output = &ListAliasesOutput{}
  782. req.Data = output
  783. return
  784. }
  785. // Returns list of aliases created for a Lambda function. For each alias, the
  786. // response includes information such as the alias ARN, description, alias name,
  787. // and the function version to which it points. For more information, see Introduction
  788. // to AWS Lambda Aliases (http://docs.aws.amazon.com/lambda/latest/dg/aliases-intro.html).
  789. //
  790. // This requires permission for the lambda:ListAliases action.
  791. func (c *Lambda) ListAliases(input *ListAliasesInput) (*ListAliasesOutput, error) {
  792. req, out := c.ListAliasesRequest(input)
  793. err := req.Send()
  794. return out, err
  795. }
  796. const opListEventSourceMappings = "ListEventSourceMappings"
  797. // ListEventSourceMappingsRequest generates a "aws/request.Request" representing the
  798. // client's request for the ListEventSourceMappings operation. The "output" return
  799. // value can be used to capture response data after the request's "Send" method
  800. // is called.
  801. //
  802. // Creating a request object using this method should be used when you want to inject
  803. // custom logic into the request's lifecycle using a custom handler, or if you want to
  804. // access properties on the request object before or after sending the request. If
  805. // you just want the service response, call the ListEventSourceMappings method directly
  806. // instead.
  807. //
  808. // Note: You must call the "Send" method on the returned request object in order
  809. // to execute the request.
  810. //
  811. // // Example sending a request using the ListEventSourceMappingsRequest method.
  812. // req, resp := client.ListEventSourceMappingsRequest(params)
  813. //
  814. // err := req.Send()
  815. // if err == nil { // resp is now filled
  816. // fmt.Println(resp)
  817. // }
  818. //
  819. func (c *Lambda) ListEventSourceMappingsRequest(input *ListEventSourceMappingsInput) (req *request.Request, output *ListEventSourceMappingsOutput) {
  820. op := &request.Operation{
  821. Name: opListEventSourceMappings,
  822. HTTPMethod: "GET",
  823. HTTPPath: "/2015-03-31/event-source-mappings/",
  824. Paginator: &request.Paginator{
  825. InputTokens: []string{"Marker"},
  826. OutputTokens: []string{"NextMarker"},
  827. LimitToken: "MaxItems",
  828. TruncationToken: "",
  829. },
  830. }
  831. if input == nil {
  832. input = &ListEventSourceMappingsInput{}
  833. }
  834. req = c.newRequest(op, input, output)
  835. output = &ListEventSourceMappingsOutput{}
  836. req.Data = output
  837. return
  838. }
  839. // Returns a list of event source mappings you created using the CreateEventSourceMapping
  840. // (see CreateEventSourceMapping).
  841. //
  842. // For each mapping, the API returns configuration information. You can optionally
  843. // specify filters to retrieve specific event source mappings.
  844. //
  845. // If you are using the versioning feature, you can get list of event source
  846. // mappings for a specific Lambda function version or an alias as described
  847. // in the FunctionName parameter. For information about the versioning feature,
  848. // see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).
  849. //
  850. // This operation requires permission for the lambda:ListEventSourceMappings
  851. // action.
  852. func (c *Lambda) ListEventSourceMappings(input *ListEventSourceMappingsInput) (*ListEventSourceMappingsOutput, error) {
  853. req, out := c.ListEventSourceMappingsRequest(input)
  854. err := req.Send()
  855. return out, err
  856. }
  857. // ListEventSourceMappingsPages iterates over the pages of a ListEventSourceMappings operation,
  858. // calling the "fn" function with the response data for each page. To stop
  859. // iterating, return false from the fn function.
  860. //
  861. // See ListEventSourceMappings method for more information on how to use this operation.
  862. //
  863. // Note: This operation can generate multiple requests to a service.
  864. //
  865. // // Example iterating over at most 3 pages of a ListEventSourceMappings operation.
  866. // pageNum := 0
  867. // err := client.ListEventSourceMappingsPages(params,
  868. // func(page *ListEventSourceMappingsOutput, lastPage bool) bool {
  869. // pageNum++
  870. // fmt.Println(page)
  871. // return pageNum <= 3
  872. // })
  873. //
  874. func (c *Lambda) ListEventSourceMappingsPages(input *ListEventSourceMappingsInput, fn func(p *ListEventSourceMappingsOutput, lastPage bool) (shouldContinue bool)) error {
  875. page, _ := c.ListEventSourceMappingsRequest(input)
  876. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  877. return page.EachPage(func(p interface{}, lastPage bool) bool {
  878. return fn(p.(*ListEventSourceMappingsOutput), lastPage)
  879. })
  880. }
  881. const opListFunctions = "ListFunctions"
  882. // ListFunctionsRequest generates a "aws/request.Request" representing the
  883. // client's request for the ListFunctions operation. The "output" return
  884. // value can be used to capture response data after the request's "Send" method
  885. // is called.
  886. //
  887. // Creating a request object using this method should be used when you want to inject
  888. // custom logic into the request's lifecycle using a custom handler, or if you want to
  889. // access properties on the request object before or after sending the request. If
  890. // you just want the service response, call the ListFunctions method directly
  891. // instead.
  892. //
  893. // Note: You must call the "Send" method on the returned request object in order
  894. // to execute the request.
  895. //
  896. // // Example sending a request using the ListFunctionsRequest method.
  897. // req, resp := client.ListFunctionsRequest(params)
  898. //
  899. // err := req.Send()
  900. // if err == nil { // resp is now filled
  901. // fmt.Println(resp)
  902. // }
  903. //
  904. func (c *Lambda) ListFunctionsRequest(input *ListFunctionsInput) (req *request.Request, output *ListFunctionsOutput) {
  905. op := &request.Operation{
  906. Name: opListFunctions,
  907. HTTPMethod: "GET",
  908. HTTPPath: "/2015-03-31/functions/",
  909. Paginator: &request.Paginator{
  910. InputTokens: []string{"Marker"},
  911. OutputTokens: []string{"NextMarker"},
  912. LimitToken: "MaxItems",
  913. TruncationToken: "",
  914. },
  915. }
  916. if input == nil {
  917. input = &ListFunctionsInput{}
  918. }
  919. req = c.newRequest(op, input, output)
  920. output = &ListFunctionsOutput{}
  921. req.Data = output
  922. return
  923. }
  924. // Returns a list of your Lambda functions. For each function, the response
  925. // includes the function configuration information. You must use GetFunction
  926. // to retrieve the code for your function.
  927. //
  928. // This operation requires permission for the lambda:ListFunctions action.
  929. //
  930. // If you are using versioning feature, the response returns list of $LATEST
  931. // versions of your functions. For information about the versioning feature,
  932. // see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).
  933. func (c *Lambda) ListFunctions(input *ListFunctionsInput) (*ListFunctionsOutput, error) {
  934. req, out := c.ListFunctionsRequest(input)
  935. err := req.Send()
  936. return out, err
  937. }
  938. // ListFunctionsPages iterates over the pages of a ListFunctions operation,
  939. // calling the "fn" function with the response data for each page. To stop
  940. // iterating, return false from the fn function.
  941. //
  942. // See ListFunctions method for more information on how to use this operation.
  943. //
  944. // Note: This operation can generate multiple requests to a service.
  945. //
  946. // // Example iterating over at most 3 pages of a ListFunctions operation.
  947. // pageNum := 0
  948. // err := client.ListFunctionsPages(params,
  949. // func(page *ListFunctionsOutput, lastPage bool) bool {
  950. // pageNum++
  951. // fmt.Println(page)
  952. // return pageNum <= 3
  953. // })
  954. //
  955. func (c *Lambda) ListFunctionsPages(input *ListFunctionsInput, fn func(p *ListFunctionsOutput, lastPage bool) (shouldContinue bool)) error {
  956. page, _ := c.ListFunctionsRequest(input)
  957. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  958. return page.EachPage(func(p interface{}, lastPage bool) bool {
  959. return fn(p.(*ListFunctionsOutput), lastPage)
  960. })
  961. }
  962. const opListVersionsByFunction = "ListVersionsByFunction"
  963. // ListVersionsByFunctionRequest generates a "aws/request.Request" representing the
  964. // client's request for the ListVersionsByFunction operation. The "output" return
  965. // value can be used to capture response data after the request's "Send" method
  966. // is called.
  967. //
  968. // Creating a request object using this method should be used when you want to inject
  969. // custom logic into the request's lifecycle using a custom handler, or if you want to
  970. // access properties on the request object before or after sending the request. If
  971. // you just want the service response, call the ListVersionsByFunction method directly
  972. // instead.
  973. //
  974. // Note: You must call the "Send" method on the returned request object in order
  975. // to execute the request.
  976. //
  977. // // Example sending a request using the ListVersionsByFunctionRequest method.
  978. // req, resp := client.ListVersionsByFunctionRequest(params)
  979. //
  980. // err := req.Send()
  981. // if err == nil { // resp is now filled
  982. // fmt.Println(resp)
  983. // }
  984. //
  985. func (c *Lambda) ListVersionsByFunctionRequest(input *ListVersionsByFunctionInput) (req *request.Request, output *ListVersionsByFunctionOutput) {
  986. op := &request.Operation{
  987. Name: opListVersionsByFunction,
  988. HTTPMethod: "GET",
  989. HTTPPath: "/2015-03-31/functions/{FunctionName}/versions",
  990. }
  991. if input == nil {
  992. input = &ListVersionsByFunctionInput{}
  993. }
  994. req = c.newRequest(op, input, output)
  995. output = &ListVersionsByFunctionOutput{}
  996. req.Data = output
  997. return
  998. }
  999. // List all versions of a function. For information about the versioning feature,
  1000. // see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).
  1001. func (c *Lambda) ListVersionsByFunction(input *ListVersionsByFunctionInput) (*ListVersionsByFunctionOutput, error) {
  1002. req, out := c.ListVersionsByFunctionRequest(input)
  1003. err := req.Send()
  1004. return out, err
  1005. }
  1006. const opPublishVersion = "PublishVersion"
  1007. // PublishVersionRequest generates a "aws/request.Request" representing the
  1008. // client's request for the PublishVersion operation. The "output" return
  1009. // value can be used to capture response data after the request's "Send" method
  1010. // is called.
  1011. //
  1012. // Creating a request object using this method should be used when you want to inject
  1013. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1014. // access properties on the request object before or after sending the request. If
  1015. // you just want the service response, call the PublishVersion method directly
  1016. // instead.
  1017. //
  1018. // Note: You must call the "Send" method on the returned request object in order
  1019. // to execute the request.
  1020. //
  1021. // // Example sending a request using the PublishVersionRequest method.
  1022. // req, resp := client.PublishVersionRequest(params)
  1023. //
  1024. // err := req.Send()
  1025. // if err == nil { // resp is now filled
  1026. // fmt.Println(resp)
  1027. // }
  1028. //
  1029. func (c *Lambda) PublishVersionRequest(input *PublishVersionInput) (req *request.Request, output *FunctionConfiguration) {
  1030. op := &request.Operation{
  1031. Name: opPublishVersion,
  1032. HTTPMethod: "POST",
  1033. HTTPPath: "/2015-03-31/functions/{FunctionName}/versions",
  1034. }
  1035. if input == nil {
  1036. input = &PublishVersionInput{}
  1037. }
  1038. req = c.newRequest(op, input, output)
  1039. output = &FunctionConfiguration{}
  1040. req.Data = output
  1041. return
  1042. }
  1043. // Publishes a version of your function from the current snapshot of $LATEST.
  1044. // That is, AWS Lambda takes a snapshot of the function code and configuration
  1045. // information from $LATEST and publishes a new version. The code and configuration
  1046. // cannot be modified after publication. For information about the versioning
  1047. // feature, see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).
  1048. func (c *Lambda) PublishVersion(input *PublishVersionInput) (*FunctionConfiguration, error) {
  1049. req, out := c.PublishVersionRequest(input)
  1050. err := req.Send()
  1051. return out, err
  1052. }
  1053. const opRemovePermission = "RemovePermission"
  1054. // RemovePermissionRequest generates a "aws/request.Request" representing the
  1055. // client's request for the RemovePermission operation. The "output" return
  1056. // value can be used to capture response data after the request's "Send" method
  1057. // is called.
  1058. //
  1059. // Creating a request object using this method should be used when you want to inject
  1060. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1061. // access properties on the request object before or after sending the request. If
  1062. // you just want the service response, call the RemovePermission method directly
  1063. // instead.
  1064. //
  1065. // Note: You must call the "Send" method on the returned request object in order
  1066. // to execute the request.
  1067. //
  1068. // // Example sending a request using the RemovePermissionRequest method.
  1069. // req, resp := client.RemovePermissionRequest(params)
  1070. //
  1071. // err := req.Send()
  1072. // if err == nil { // resp is now filled
  1073. // fmt.Println(resp)
  1074. // }
  1075. //
  1076. func (c *Lambda) RemovePermissionRequest(input *RemovePermissionInput) (req *request.Request, output *RemovePermissionOutput) {
  1077. op := &request.Operation{
  1078. Name: opRemovePermission,
  1079. HTTPMethod: "DELETE",
  1080. HTTPPath: "/2015-03-31/functions/{FunctionName}/policy/{StatementId}",
  1081. }
  1082. if input == nil {
  1083. input = &RemovePermissionInput{}
  1084. }
  1085. req = c.newRequest(op, input, output)
  1086. req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
  1087. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  1088. output = &RemovePermissionOutput{}
  1089. req.Data = output
  1090. return
  1091. }
  1092. // You can remove individual permissions from an resource policy associated
  1093. // with a Lambda function by providing a statement ID that you provided when
  1094. // you added the permission.
  1095. //
  1096. // If you are using versioning, the permissions you remove are specific to
  1097. // the Lambda function version or alias you specify in the AddPermission request
  1098. // via the Qualifier parameter. For more information about versioning, see AWS
  1099. // Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).
  1100. //
  1101. // Note that removal of a permission will cause an active event source to lose
  1102. // permission to the function.
  1103. //
  1104. // You need permission for the lambda:RemovePermission action.
  1105. func (c *Lambda) RemovePermission(input *RemovePermissionInput) (*RemovePermissionOutput, error) {
  1106. req, out := c.RemovePermissionRequest(input)
  1107. err := req.Send()
  1108. return out, err
  1109. }
  1110. const opUpdateAlias = "UpdateAlias"
  1111. // UpdateAliasRequest generates a "aws/request.Request" representing the
  1112. // client's request for the UpdateAlias operation. The "output" return
  1113. // value can be used to capture response data after the request's "Send" method
  1114. // is called.
  1115. //
  1116. // Creating a request object using this method should be used when you want to inject
  1117. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1118. // access properties on the request object before or after sending the request. If
  1119. // you just want the service response, call the UpdateAlias method directly
  1120. // instead.
  1121. //
  1122. // Note: You must call the "Send" method on the returned request object in order
  1123. // to execute the request.
  1124. //
  1125. // // Example sending a request using the UpdateAliasRequest method.
  1126. // req, resp := client.UpdateAliasRequest(params)
  1127. //
  1128. // err := req.Send()
  1129. // if err == nil { // resp is now filled
  1130. // fmt.Println(resp)
  1131. // }
  1132. //
  1133. func (c *Lambda) UpdateAliasRequest(input *UpdateAliasInput) (req *request.Request, output *AliasConfiguration) {
  1134. op := &request.Operation{
  1135. Name: opUpdateAlias,
  1136. HTTPMethod: "PUT",
  1137. HTTPPath: "/2015-03-31/functions/{FunctionName}/aliases/{Name}",
  1138. }
  1139. if input == nil {
  1140. input = &UpdateAliasInput{}
  1141. }
  1142. req = c.newRequest(op, input, output)
  1143. output = &AliasConfiguration{}
  1144. req.Data = output
  1145. return
  1146. }
  1147. // Using this API you can update the function version to which the alias points
  1148. // and the alias description. For more information, see Introduction to AWS
  1149. // Lambda Aliases (http://docs.aws.amazon.com/lambda/latest/dg/aliases-intro.html).
  1150. //
  1151. // This requires permission for the lambda:UpdateAlias action.
  1152. func (c *Lambda) UpdateAlias(input *UpdateAliasInput) (*AliasConfiguration, error) {
  1153. req, out := c.UpdateAliasRequest(input)
  1154. err := req.Send()
  1155. return out, err
  1156. }
  1157. const opUpdateEventSourceMapping = "UpdateEventSourceMapping"
  1158. // UpdateEventSourceMappingRequest generates a "aws/request.Request" representing the
  1159. // client's request for the UpdateEventSourceMapping operation. The "output" return
  1160. // value can be used to capture response data after the request's "Send" method
  1161. // is called.
  1162. //
  1163. // Creating a request object using this method should be used when you want to inject
  1164. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1165. // access properties on the request object before or after sending the request. If
  1166. // you just want the service response, call the UpdateEventSourceMapping method directly
  1167. // instead.
  1168. //
  1169. // Note: You must call the "Send" method on the returned request object in order
  1170. // to execute the request.
  1171. //
  1172. // // Example sending a request using the UpdateEventSourceMappingRequest method.
  1173. // req, resp := client.UpdateEventSourceMappingRequest(params)
  1174. //
  1175. // err := req.Send()
  1176. // if err == nil { // resp is now filled
  1177. // fmt.Println(resp)
  1178. // }
  1179. //
  1180. func (c *Lambda) UpdateEventSourceMappingRequest(input *UpdateEventSourceMappingInput) (req *request.Request, output *EventSourceMappingConfiguration) {
  1181. op := &request.Operation{
  1182. Name: opUpdateEventSourceMapping,
  1183. HTTPMethod: "PUT",
  1184. HTTPPath: "/2015-03-31/event-source-mappings/{UUID}",
  1185. }
  1186. if input == nil {
  1187. input = &UpdateEventSourceMappingInput{}
  1188. }
  1189. req = c.newRequest(op, input, output)
  1190. output = &EventSourceMappingConfiguration{}
  1191. req.Data = output
  1192. return
  1193. }
  1194. // You can update an event source mapping. This is useful if you want to change
  1195. // the parameters of the existing mapping without losing your position in the
  1196. // stream. You can change which function will receive the stream records, but
  1197. // to change the stream itself, you must create a new mapping.
  1198. //
  1199. // If you are using the versioning feature, you can update the event source
  1200. // mapping to map to a specific Lambda function version or alias as described
  1201. // in the FunctionName parameter. For information about the versioning feature,
  1202. // see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).
  1203. //
  1204. // If you disable the event source mapping, AWS Lambda stops polling. If you
  1205. // enable again, it will resume polling from the time it had stopped polling,
  1206. // so you don't lose processing of any records. However, if you delete event
  1207. // source mapping and create it again, it will reset.
  1208. //
  1209. // This operation requires permission for the lambda:UpdateEventSourceMapping
  1210. // action.
  1211. func (c *Lambda) UpdateEventSourceMapping(input *UpdateEventSourceMappingInput) (*EventSourceMappingConfiguration, error) {
  1212. req, out := c.UpdateEventSourceMappingRequest(input)
  1213. err := req.Send()
  1214. return out, err
  1215. }
  1216. const opUpdateFunctionCode = "UpdateFunctionCode"
  1217. // UpdateFunctionCodeRequest generates a "aws/request.Request" representing the
  1218. // client's request for the UpdateFunctionCode operation. The "output" return
  1219. // value can be used to capture response data after the request's "Send" method
  1220. // is called.
  1221. //
  1222. // Creating a request object using this method should be used when you want to inject
  1223. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1224. // access properties on the request object before or after sending the request. If
  1225. // you just want the service response, call the UpdateFunctionCode method directly
  1226. // instead.
  1227. //
  1228. // Note: You must call the "Send" method on the returned request object in order
  1229. // to execute the request.
  1230. //
  1231. // // Example sending a request using the UpdateFunctionCodeRequest method.
  1232. // req, resp := client.UpdateFunctionCodeRequest(params)
  1233. //
  1234. // err := req.Send()
  1235. // if err == nil { // resp is now filled
  1236. // fmt.Println(resp)
  1237. // }
  1238. //
  1239. func (c *Lambda) UpdateFunctionCodeRequest(input *UpdateFunctionCodeInput) (req *request.Request, output *FunctionConfiguration) {
  1240. op := &request.Operation{
  1241. Name: opUpdateFunctionCode,
  1242. HTTPMethod: "PUT",
  1243. HTTPPath: "/2015-03-31/functions/{FunctionName}/code",
  1244. }
  1245. if input == nil {
  1246. input = &UpdateFunctionCodeInput{}
  1247. }
  1248. req = c.newRequest(op, input, output)
  1249. output = &FunctionConfiguration{}
  1250. req.Data = output
  1251. return
  1252. }
  1253. // Updates the code for the specified Lambda function. This operation must only
  1254. // be used on an existing Lambda function and cannot be used to update the function
  1255. // configuration.
  1256. //
  1257. // If you are using the versioning feature, note this API will always update
  1258. // the $LATEST version of your Lambda function. For information about the versioning
  1259. // feature, see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).
  1260. //
  1261. // This operation requires permission for the lambda:UpdateFunctionCode action.
  1262. func (c *Lambda) UpdateFunctionCode(input *UpdateFunctionCodeInput) (*FunctionConfiguration, error) {
  1263. req, out := c.UpdateFunctionCodeRequest(input)
  1264. err := req.Send()
  1265. return out, err
  1266. }
  1267. const opUpdateFunctionConfiguration = "UpdateFunctionConfiguration"
  1268. // UpdateFunctionConfigurationRequest generates a "aws/request.Request" representing the
  1269. // client's request for the UpdateFunctionConfiguration operation. The "output" return
  1270. // value can be used to capture response data after the request's "Send" method
  1271. // is called.
  1272. //
  1273. // Creating a request object using this method should be used when you want to inject
  1274. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1275. // access properties on the request object before or after sending the request. If
  1276. // you just want the service response, call the UpdateFunctionConfiguration method directly
  1277. // instead.
  1278. //
  1279. // Note: You must call the "Send" method on the returned request object in order
  1280. // to execute the request.
  1281. //
  1282. // // Example sending a request using the UpdateFunctionConfigurationRequest method.
  1283. // req, resp := client.UpdateFunctionConfigurationRequest(params)
  1284. //
  1285. // err := req.Send()
  1286. // if err == nil { // resp is now filled
  1287. // fmt.Println(resp)
  1288. // }
  1289. //
  1290. func (c *Lambda) UpdateFunctionConfigurationRequest(input *UpdateFunctionConfigurationInput) (req *request.Request, output *FunctionConfiguration) {
  1291. op := &request.Operation{
  1292. Name: opUpdateFunctionConfiguration,
  1293. HTTPMethod: "PUT",
  1294. HTTPPath: "/2015-03-31/functions/{FunctionName}/configuration",
  1295. }
  1296. if input == nil {
  1297. input = &UpdateFunctionConfigurationInput{}
  1298. }
  1299. req = c.newRequest(op, input, output)
  1300. output = &FunctionConfiguration{}
  1301. req.Data = output
  1302. return
  1303. }
  1304. // Updates the configuration parameters for the specified Lambda function by
  1305. // using the values provided in the request. You provide only the parameters
  1306. // you want to change. This operation must only be used on an existing Lambda
  1307. // function and cannot be used to update the function's code.
  1308. //
  1309. // If you are using the versioning feature, note this API will always update
  1310. // the $LATEST version of your Lambda function. For information about the versioning
  1311. // feature, see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).
  1312. //
  1313. // This operation requires permission for the lambda:UpdateFunctionConfiguration
  1314. // action.
  1315. func (c *Lambda) UpdateFunctionConfiguration(input *UpdateFunctionConfigurationInput) (*FunctionConfiguration, error) {
  1316. req, out := c.UpdateFunctionConfigurationRequest(input)
  1317. err := req.Send()
  1318. return out, err
  1319. }
  1320. type AddPermissionInput struct {
  1321. _ struct{} `type:"structure"`
  1322. // The AWS Lambda action you want to allow in this statement. Each Lambda action
  1323. // is a string starting with lambda: followed by the API name . For example,
  1324. // lambda:CreateFunction. You can use wildcard (lambda:*) to grant permission
  1325. // for all AWS Lambda actions.
  1326. Action *string `type:"string" required:"true"`
  1327. // A unique token that must be supplied by the principal invoking the function.
  1328. // This is currently only used for Alexa Smart Home functions.
  1329. EventSourceToken *string `type:"string"`
  1330. // Name of the Lambda function whose resource policy you are updating by adding
  1331. // a new permission.
  1332. //
  1333. // You can specify a function name (for example, Thumbnail) or you can specify
  1334. // Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail).
  1335. // AWS Lambda also allows you to specify partial ARN (for example, account-id:Thumbnail).
  1336. // Note that the length constraint applies only to the ARN. If you specify only
  1337. // the function name, it is limited to 64 character in length.
  1338. FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
  1339. // The principal who is getting this permission. It can be Amazon S3 service
  1340. // Principal (s3.amazonaws.com) if you want Amazon S3 to invoke the function,
  1341. // an AWS account ID if you are granting cross-account permission, or any valid
  1342. // AWS service principal such as sns.amazonaws.com. For example, you might want
  1343. // to allow a custom application in another AWS account to push events to AWS
  1344. // Lambda by invoking your function.
  1345. Principal *string `type:"string" required:"true"`
  1346. // You can use this optional query parameter to describe a qualified ARN using
  1347. // a function version or an alias name. The permission will then apply to the
  1348. // specific qualified ARN. For example, if you specify function version 2 as
  1349. // the qualifier, then permission applies only when request is made using qualified
  1350. // function ARN:
  1351. //
  1352. // arn:aws:lambda:aws-region:acct-id:function:function-name:2
  1353. //
  1354. // If you specify an alias name, for example PROD, then the permission is valid
  1355. // only for requests made using the alias ARN:
  1356. //
  1357. // arn:aws:lambda:aws-region:acct-id:function:function-name:PROD
  1358. //
  1359. // If the qualifier is not specified, the permission is valid only when requests
  1360. // is made using unqualified function ARN.
  1361. //
  1362. // arn:aws:lambda:aws-region:acct-id:function:function-name
  1363. Qualifier *string `location:"querystring" locationName:"Qualifier" min:"1" type:"string"`
  1364. // This parameter is used for S3 and SES only. The AWS account ID (without a
  1365. // hyphen) of the source owner. For example, if the SourceArn identifies a bucket,
  1366. // then this is the bucket owner's account ID. You can use this additional condition
  1367. // to ensure the bucket you specify is owned by a specific account (it is possible
  1368. // the bucket owner deleted the bucket and some other AWS account created the
  1369. // bucket). You can also use this condition to specify all sources (that is,
  1370. // you don't specify the SourceArn) owned by a specific account.
  1371. SourceAccount *string `type:"string"`
  1372. // This is optional; however, when granting Amazon S3 permission to invoke your
  1373. // function, you should specify this field with the Amazon Resource Name (ARN)
  1374. // as its value. This ensures that only events generated from the specified
  1375. // source can invoke the function.
  1376. //
  1377. // If you add a permission for the Amazon S3 principal without providing the
  1378. // source ARN, any AWS account that creates a mapping to your function ARN can
  1379. // send events to invoke your Lambda function from Amazon S3.
  1380. SourceArn *string `type:"string"`
  1381. // A unique statement identifier.
  1382. StatementId *string `min:"1" type:"string" required:"true"`
  1383. }
  1384. // String returns the string representation
  1385. func (s AddPermissionInput) String() string {
  1386. return awsutil.Prettify(s)
  1387. }
  1388. // GoString returns the string representation
  1389. func (s AddPermissionInput) GoString() string {
  1390. return s.String()
  1391. }
  1392. // Validate inspects the fields of the type to determine if they are valid.
  1393. func (s *AddPermissionInput) Validate() error {
  1394. invalidParams := request.ErrInvalidParams{Context: "AddPermissionInput"}
  1395. if s.Action == nil {
  1396. invalidParams.Add(request.NewErrParamRequired("Action"))
  1397. }
  1398. if s.FunctionName == nil {
  1399. invalidParams.Add(request.NewErrParamRequired("FunctionName"))
  1400. }
  1401. if s.FunctionName != nil && len(*s.FunctionName) < 1 {
  1402. invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
  1403. }
  1404. if s.Principal == nil {
  1405. invalidParams.Add(request.NewErrParamRequired("Principal"))
  1406. }
  1407. if s.Qualifier != nil && len(*s.Qualifier) < 1 {
  1408. invalidParams.Add(request.NewErrParamMinLen("Qualifier", 1))
  1409. }
  1410. if s.StatementId == nil {
  1411. invalidParams.Add(request.NewErrParamRequired("StatementId"))
  1412. }
  1413. if s.StatementId != nil && len(*s.StatementId) < 1 {
  1414. invalidParams.Add(request.NewErrParamMinLen("StatementId", 1))
  1415. }
  1416. if invalidParams.Len() > 0 {
  1417. return invalidParams
  1418. }
  1419. return nil
  1420. }
  1421. type AddPermissionOutput struct {
  1422. _ struct{} `type:"structure"`
  1423. // The permission statement you specified in the request. The response returns
  1424. // the same as a string using a backslash ("\") as an escape character in the
  1425. // JSON.
  1426. Statement *string `type:"string"`
  1427. }
  1428. // String returns the string representation
  1429. func (s AddPermissionOutput) String() string {
  1430. return awsutil.Prettify(s)
  1431. }
  1432. // GoString returns the string representation
  1433. func (s AddPermissionOutput) GoString() string {
  1434. return s.String()
  1435. }
  1436. // Provides configuration information about a Lambda function version alias.
  1437. type AliasConfiguration struct {
  1438. _ struct{} `type:"structure"`
  1439. // Lambda function ARN that is qualified using the alias name as the suffix.
  1440. // For example, if you create an alias called BETA that points to a helloworld
  1441. // function version, the ARN is arn:aws:lambda:aws-regions:acct-id:function:helloworld:BETA.
  1442. AliasArn *string `type:"string"`
  1443. // Alias description.
  1444. Description *string `type:"string"`
  1445. // Function version to which the alias points.
  1446. FunctionVersion *string `min:"1" type:"string"`
  1447. // Alias name.
  1448. Name *string `min:"1" type:"string"`
  1449. }
  1450. // String returns the string representation
  1451. func (s AliasConfiguration) String() string {
  1452. return awsutil.Prettify(s)
  1453. }
  1454. // GoString returns the string representation
  1455. func (s AliasConfiguration) GoString() string {
  1456. return s.String()
  1457. }
  1458. type CreateAliasInput struct {
  1459. _ struct{} `type:"structure"`
  1460. // Description of the alias.
  1461. Description *string `type:"string"`
  1462. // Name of the Lambda function for which you want to create an alias.
  1463. FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
  1464. // Lambda function version for which you are creating the alias.
  1465. FunctionVersion *string `min:"1" type:"string" required:"true"`
  1466. // Name for the alias you are creating.
  1467. Name *string `min:"1" type:"string" required:"true"`
  1468. }
  1469. // String returns the string representation
  1470. func (s CreateAliasInput) String() string {
  1471. return awsutil.Prettify(s)
  1472. }
  1473. // GoString returns the string representation
  1474. func (s CreateAliasInput) GoString() string {
  1475. return s.String()
  1476. }
  1477. // Validate inspects the fields of the type to determine if they are valid.
  1478. func (s *CreateAliasInput) Validate() error {
  1479. invalidParams := request.ErrInvalidParams{Context: "CreateAliasInput"}
  1480. if s.FunctionName == nil {
  1481. invalidParams.Add(request.NewErrParamRequired("FunctionName"))
  1482. }
  1483. if s.FunctionName != nil && len(*s.FunctionName) < 1 {
  1484. invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
  1485. }
  1486. if s.FunctionVersion == nil {
  1487. invalidParams.Add(request.NewErrParamRequired("FunctionVersion"))
  1488. }
  1489. if s.FunctionVersion != nil && len(*s.FunctionVersion) < 1 {
  1490. invalidParams.Add(request.NewErrParamMinLen("FunctionVersion", 1))
  1491. }
  1492. if s.Name == nil {
  1493. invalidParams.Add(request.NewErrParamRequired("Name"))
  1494. }
  1495. if s.Name != nil && len(*s.Name) < 1 {
  1496. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  1497. }
  1498. if invalidParams.Len() > 0 {
  1499. return invalidParams
  1500. }
  1501. return nil
  1502. }
  1503. type CreateEventSourceMappingInput struct {
  1504. _ struct{} `type:"structure"`
  1505. // The largest number of records that AWS Lambda will retrieve from your event
  1506. // source at the time of invoking your function. Your function receives an event
  1507. // with all the retrieved records. The default is 100 records.
  1508. BatchSize *int64 `min:"1" type:"integer"`
  1509. // Indicates whether AWS Lambda should begin polling the event source. By default,
  1510. // Enabled is true.
  1511. Enabled *bool `type:"boolean"`
  1512. // The Amazon Resource Name (ARN) of the Amazon Kinesis or the Amazon DynamoDB
  1513. // stream that is the event source. Any record added to this stream could cause
  1514. // AWS Lambda to invoke your Lambda function, it depends on the BatchSize. AWS
  1515. // Lambda POSTs the Amazon Kinesis event, containing records, to your Lambda
  1516. // function as JSON.
  1517. EventSourceArn *string `type:"string" required:"true"`
  1518. // The Lambda function to invoke when AWS Lambda detects an event on the stream.
  1519. //
  1520. // You can specify the function name (for example, Thumbnail) or you can specify
  1521. // Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail).
  1522. //
  1523. // If you are using versioning, you can also provide a qualified function
  1524. // ARN (ARN that is qualified with function version or alias name as suffix).
  1525. // For more information about versioning, see AWS Lambda Function Versioning
  1526. // and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html)
  1527. //
  1528. // AWS Lambda also allows you to specify only the function name with the account
  1529. // ID qualifier (for example, account-id:Thumbnail).
  1530. //
  1531. // Note that the length constraint applies only to the ARN. If you specify
  1532. // only the function name, it is limited to 64 character in length.
  1533. FunctionName *string `min:"1" type:"string" required:"true"`
  1534. // The position in the stream where AWS Lambda should start reading. For more
  1535. // information, go to ShardIteratorType (http://docs.aws.amazon.com/kinesis/latest/APIReference/API_GetShardIterator.html#Kinesis-GetShardIterator-request-ShardIteratorType)
  1536. // in the Amazon Kinesis API Reference.
  1537. StartingPosition *string `type:"string" required:"true" enum:"EventSourcePosition"`
  1538. }
  1539. // String returns the string representation
  1540. func (s CreateEventSourceMappingInput) String() string {
  1541. return awsutil.Prettify(s)
  1542. }
  1543. // GoString returns the string representation
  1544. func (s CreateEventSourceMappingInput) GoString() string {
  1545. return s.String()
  1546. }
  1547. // Validate inspects the fields of the type to determine if they are valid.
  1548. func (s *CreateEventSourceMappingInput) Validate() error {
  1549. invalidParams := request.ErrInvalidParams{Context: "CreateEventSourceMappingInput"}
  1550. if s.BatchSize != nil && *s.BatchSize < 1 {
  1551. invalidParams.Add(request.NewErrParamMinValue("BatchSize", 1))
  1552. }
  1553. if s.EventSourceArn == nil {
  1554. invalidParams.Add(request.NewErrParamRequired("EventSourceArn"))
  1555. }
  1556. if s.FunctionName == nil {
  1557. invalidParams.Add(request.NewErrParamRequired("FunctionName"))
  1558. }
  1559. if s.FunctionName != nil && len(*s.FunctionName) < 1 {
  1560. invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
  1561. }
  1562. if s.StartingPosition == nil {
  1563. invalidParams.Add(request.NewErrParamRequired("StartingPosition"))
  1564. }
  1565. if invalidParams.Len() > 0 {
  1566. return invalidParams
  1567. }
  1568. return nil
  1569. }
  1570. type CreateFunctionInput struct {
  1571. _ struct{} `type:"structure"`
  1572. // The code for the Lambda function.
  1573. Code *FunctionCode `type:"structure" required:"true"`
  1574. // A short, user-defined function description. Lambda does not use this value.
  1575. // Assign a meaningful description as you see fit.
  1576. Description *string `type:"string"`
  1577. // The name you want to assign to the function you are uploading. The function
  1578. // names appear in the console and are returned in the ListFunctions API. Function
  1579. // names are used to specify functions to other AWS Lambda APIs, such as Invoke.
  1580. FunctionName *string `min:"1" type:"string" required:"true"`
  1581. // The function within your code that Lambda calls to begin execution. For Node.js,
  1582. // it is the module-name.export value in your function. For Java, it can be
  1583. // package.class-name::handler or package.class-name. For more information,
  1584. // see Lambda Function Handler (Java) (http://docs.aws.amazon.com/lambda/latest/dg/java-programming-model-handler-types.html).
  1585. Handler *string `type:"string" required:"true"`
  1586. // The amount of memory, in MB, your Lambda function is given. Lambda uses this
  1587. // memory size to infer the amount of CPU and memory allocated to your function.
  1588. // Your function use-case determines your CPU and memory requirements. For example,
  1589. // a database operation might need less memory compared to an image processing
  1590. // function. The default value is 128 MB. The value must be a multiple of 64
  1591. // MB.
  1592. MemorySize *int64 `min:"128" type:"integer"`
  1593. // This boolean parameter can be used to request AWS Lambda to create the Lambda
  1594. // function and publish a version as an atomic operation.
  1595. Publish *bool `type:"boolean"`
  1596. // The Amazon Resource Name (ARN) of the IAM role that Lambda assumes when it
  1597. // executes your function to access any other Amazon Web Services (AWS) resources.
  1598. // For more information, see AWS Lambda: How it Works (http://docs.aws.amazon.com/lambda/latest/dg/lambda-introduction.html).
  1599. Role *string `type:"string" required:"true"`
  1600. // The runtime environment for the Lambda function you are uploading.
  1601. //
  1602. // To use the Node.js runtime v4.3, set the value to "nodejs4.3". To use earlier
  1603. // runtime (v0.10.42), set the value to "nodejs".
  1604. Runtime *string `type:"string" required:"true" enum:"Runtime"`
  1605. // The function execution time at which Lambda should terminate the function.
  1606. // Because the execution time has cost implications, we recommend you set this
  1607. // value based on your expected execution time. The default is 3 seconds.
  1608. Timeout *int64 `min:"1" type:"integer"`
  1609. // If your Lambda function accesses resources in a VPC, you provide this parameter
  1610. // identifying the list of security group IDs and subnet IDs. These must belong
  1611. // to the same VPC. You must provide at least one security group and one subnet
  1612. // ID.
  1613. VpcConfig *VpcConfig `type:"structure"`
  1614. }
  1615. // String returns the string representation
  1616. func (s CreateFunctionInput) String() string {
  1617. return awsutil.Prettify(s)
  1618. }
  1619. // GoString returns the string representation
  1620. func (s CreateFunctionInput) GoString() string {
  1621. return s.String()
  1622. }
  1623. // Validate inspects the fields of the type to determine if they are valid.
  1624. func (s *CreateFunctionInput) Validate() error {
  1625. invalidParams := request.ErrInvalidParams{Context: "CreateFunctionInput"}
  1626. if s.Code == nil {
  1627. invalidParams.Add(request.NewErrParamRequired("Code"))
  1628. }
  1629. if s.FunctionName == nil {
  1630. invalidParams.Add(request.NewErrParamRequired("FunctionName"))
  1631. }
  1632. if s.FunctionName != nil && len(*s.FunctionName) < 1 {
  1633. invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
  1634. }
  1635. if s.Handler == nil {
  1636. invalidParams.Add(request.NewErrParamRequired("Handler"))
  1637. }
  1638. if s.MemorySize != nil && *s.MemorySize < 128 {
  1639. invalidParams.Add(request.NewErrParamMinValue("MemorySize", 128))
  1640. }
  1641. if s.Role == nil {
  1642. invalidParams.Add(request.NewErrParamRequired("Role"))
  1643. }
  1644. if s.Runtime == nil {
  1645. invalidParams.Add(request.NewErrParamRequired("Runtime"))
  1646. }
  1647. if s.Timeout != nil && *s.Timeout < 1 {
  1648. invalidParams.Add(request.NewErrParamMinValue("Timeout", 1))
  1649. }
  1650. if s.Code != nil {
  1651. if err := s.Code.Validate(); err != nil {
  1652. invalidParams.AddNested("Code", err.(request.ErrInvalidParams))
  1653. }
  1654. }
  1655. if invalidParams.Len() > 0 {
  1656. return invalidParams
  1657. }
  1658. return nil
  1659. }
  1660. type DeleteAliasInput struct {
  1661. _ struct{} `type:"structure"`
  1662. // The Lambda function name for which the alias is created. Deleting an alias
  1663. // does not delete the function version to which it is pointing.
  1664. FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
  1665. // Name of the alias to delete.
  1666. Name *string `location:"uri" locationName:"Name" min:"1" type:"string" required:"true"`
  1667. }
  1668. // String returns the string representation
  1669. func (s DeleteAliasInput) String() string {
  1670. return awsutil.Prettify(s)
  1671. }
  1672. // GoString returns the string representation
  1673. func (s DeleteAliasInput) GoString() string {
  1674. return s.String()
  1675. }
  1676. // Validate inspects the fields of the type to determine if they are valid.
  1677. func (s *DeleteAliasInput) Validate() error {
  1678. invalidParams := request.ErrInvalidParams{Context: "DeleteAliasInput"}
  1679. if s.FunctionName == nil {
  1680. invalidParams.Add(request.NewErrParamRequired("FunctionName"))
  1681. }
  1682. if s.FunctionName != nil && len(*s.FunctionName) < 1 {
  1683. invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
  1684. }
  1685. if s.Name == nil {
  1686. invalidParams.Add(request.NewErrParamRequired("Name"))
  1687. }
  1688. if s.Name != nil && len(*s.Name) < 1 {
  1689. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  1690. }
  1691. if invalidParams.Len() > 0 {
  1692. return invalidParams
  1693. }
  1694. return nil
  1695. }
  1696. type DeleteAliasOutput struct {
  1697. _ struct{} `type:"structure"`
  1698. }
  1699. // String returns the string representation
  1700. func (s DeleteAliasOutput) String() string {
  1701. return awsutil.Prettify(s)
  1702. }
  1703. // GoString returns the string representation
  1704. func (s DeleteAliasOutput) GoString() string {
  1705. return s.String()
  1706. }
  1707. type DeleteEventSourceMappingInput struct {
  1708. _ struct{} `type:"structure"`
  1709. // The event source mapping ID.
  1710. UUID *string `location:"uri" locationName:"UUID" type:"string" required:"true"`
  1711. }
  1712. // String returns the string representation
  1713. func (s DeleteEventSourceMappingInput) String() string {
  1714. return awsutil.Prettify(s)
  1715. }
  1716. // GoString returns the string representation
  1717. func (s DeleteEventSourceMappingInput) GoString() string {
  1718. return s.String()
  1719. }
  1720. // Validate inspects the fields of the type to determine if they are valid.
  1721. func (s *DeleteEventSourceMappingInput) Validate() error {
  1722. invalidParams := request.ErrInvalidParams{Context: "DeleteEventSourceMappingInput"}
  1723. if s.UUID == nil {
  1724. invalidParams.Add(request.NewErrParamRequired("UUID"))
  1725. }
  1726. if invalidParams.Len() > 0 {
  1727. return invalidParams
  1728. }
  1729. return nil
  1730. }
  1731. type DeleteFunctionInput struct {
  1732. _ struct{} `type:"structure"`
  1733. // The Lambda function to delete.
  1734. //
  1735. // You can specify the function name (for example, Thumbnail) or you can specify
  1736. // Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail).
  1737. // If you are using versioning, you can also provide a qualified function ARN
  1738. // (ARN that is qualified with function version or alias name as suffix). AWS
  1739. // Lambda also allows you to specify only the function name with the account
  1740. // ID qualifier (for example, account-id:Thumbnail). Note that the length constraint
  1741. // applies only to the ARN. If you specify only the function name, it is limited
  1742. // to 64 character in length.
  1743. FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
  1744. // Using this optional parameter you can specify a function version (but not
  1745. // the $LATEST version) to direct AWS Lambda to delete a specific function version.
  1746. // If the function version has one or more aliases pointing to it, you will
  1747. // get an error because you cannot have aliases pointing to it. You can delete
  1748. // any function version but not the $LATEST, that is, you cannot specify $LATEST
  1749. // as the value of this parameter. The $LATEST version can be deleted only when
  1750. // you want to delete all the function versions and aliases.
  1751. //
  1752. // You can only specify a function version, not an alias name, using this parameter.
  1753. // You cannot delete a function version using its alias.
  1754. //
  1755. // If you don't specify this parameter, AWS Lambda will delete the function,
  1756. // including all of its versions and aliases.
  1757. Qualifier *string `location:"querystring" locationName:"Qualifier" min:"1" type:"string"`
  1758. }
  1759. // String returns the string representation
  1760. func (s DeleteFunctionInput) String() string {
  1761. return awsutil.Prettify(s)
  1762. }
  1763. // GoString returns the string representation
  1764. func (s DeleteFunctionInput) GoString() string {
  1765. return s.String()
  1766. }
  1767. // Validate inspects the fields of the type to determine if they are valid.
  1768. func (s *DeleteFunctionInput) Validate() error {
  1769. invalidParams := request.ErrInvalidParams{Context: "DeleteFunctionInput"}
  1770. if s.FunctionName == nil {
  1771. invalidParams.Add(request.NewErrParamRequired("FunctionName"))
  1772. }
  1773. if s.FunctionName != nil && len(*s.FunctionName) < 1 {
  1774. invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
  1775. }
  1776. if s.Qualifier != nil && len(*s.Qualifier) < 1 {
  1777. invalidParams.Add(request.NewErrParamMinLen("Qualifier", 1))
  1778. }
  1779. if invalidParams.Len() > 0 {
  1780. return invalidParams
  1781. }
  1782. return nil
  1783. }
  1784. type DeleteFunctionOutput struct {
  1785. _ struct{} `type:"structure"`
  1786. }
  1787. // String returns the string representation
  1788. func (s DeleteFunctionOutput) String() string {
  1789. return awsutil.Prettify(s)
  1790. }
  1791. // GoString returns the string representation
  1792. func (s DeleteFunctionOutput) GoString() string {
  1793. return s.String()
  1794. }
  1795. // Describes mapping between an Amazon Kinesis stream and a Lambda function.
  1796. type EventSourceMappingConfiguration struct {
  1797. _ struct{} `type:"structure"`
  1798. // The largest number of records that AWS Lambda will retrieve from your event
  1799. // source at the time of invoking your function. Your function receives an event
  1800. // with all the retrieved records.
  1801. BatchSize *int64 `min:"1" type:"integer"`
  1802. // The Amazon Resource Name (ARN) of the Amazon Kinesis stream that is the source
  1803. // of events.
  1804. EventSourceArn *string `type:"string"`
  1805. // The Lambda function to invoke when AWS Lambda detects an event on the stream.
  1806. FunctionArn *string `type:"string"`
  1807. // The UTC time string indicating the last time the event mapping was updated.
  1808. LastModified *time.Time `type:"timestamp" timestampFormat:"unix"`
  1809. // The result of the last AWS Lambda invocation of your Lambda function.
  1810. LastProcessingResult *string `type:"string"`
  1811. // The state of the event source mapping. It can be Creating, Enabled, Disabled,
  1812. // Enabling, Disabling, Updating, or Deleting.
  1813. State *string `type:"string"`
  1814. // The reason the event source mapping is in its current state. It is either
  1815. // user-requested or an AWS Lambda-initiated state transition.
  1816. StateTransitionReason *string `type:"string"`
  1817. // The AWS Lambda assigned opaque identifier for the mapping.
  1818. UUID *string `type:"string"`
  1819. }
  1820. // String returns the string representation
  1821. func (s EventSourceMappingConfiguration) String() string {
  1822. return awsutil.Prettify(s)
  1823. }
  1824. // GoString returns the string representation
  1825. func (s EventSourceMappingConfiguration) GoString() string {
  1826. return s.String()
  1827. }
  1828. // The code for the Lambda function.
  1829. type FunctionCode struct {
  1830. _ struct{} `type:"structure"`
  1831. // Amazon S3 bucket name where the .zip file containing your deployment package
  1832. // is stored. This bucket must reside in the same AWS region where you are creating
  1833. // the Lambda function.
  1834. S3Bucket *string `min:"3" type:"string"`
  1835. // The Amazon S3 object (the deployment package) key name you want to upload.
  1836. S3Key *string `min:"1" type:"string"`
  1837. // The Amazon S3 object (the deployment package) version you want to upload.
  1838. S3ObjectVersion *string `min:"1" type:"string"`
  1839. // The contents of your zip file containing your deployment package. If you
  1840. // are using the web API directly, the contents of the zip file must be base64-encoded.
  1841. // If you are using the AWS SDKs or the AWS CLI, the SDKs or CLI will do the
  1842. // encoding for you. For more information about creating a .zip file, go to
  1843. // Execution Permissions (http://docs.aws.amazon.com/lambda/latest/dg/intro-permission-model.html#lambda-intro-execution-role.html)
  1844. // in the AWS Lambda Developer Guide.
  1845. //
  1846. // ZipFile is automatically base64 encoded/decoded by the SDK.
  1847. ZipFile []byte `type:"blob"`
  1848. }
  1849. // String returns the string representation
  1850. func (s FunctionCode) String() string {
  1851. return awsutil.Prettify(s)
  1852. }
  1853. // GoString returns the string representation
  1854. func (s FunctionCode) GoString() string {
  1855. return s.String()
  1856. }
  1857. // Validate inspects the fields of the type to determine if they are valid.
  1858. func (s *FunctionCode) Validate() error {
  1859. invalidParams := request.ErrInvalidParams{Context: "FunctionCode"}
  1860. if s.S3Bucket != nil && len(*s.S3Bucket) < 3 {
  1861. invalidParams.Add(request.NewErrParamMinLen("S3Bucket", 3))
  1862. }
  1863. if s.S3Key != nil && len(*s.S3Key) < 1 {
  1864. invalidParams.Add(request.NewErrParamMinLen("S3Key", 1))
  1865. }
  1866. if s.S3ObjectVersion != nil && len(*s.S3ObjectVersion) < 1 {
  1867. invalidParams.Add(request.NewErrParamMinLen("S3ObjectVersion", 1))
  1868. }
  1869. if invalidParams.Len() > 0 {
  1870. return invalidParams
  1871. }
  1872. return nil
  1873. }
  1874. // The object for the Lambda function location.
  1875. type FunctionCodeLocation struct {
  1876. _ struct{} `type:"structure"`
  1877. // The presigned URL you can use to download the function's .zip file that you
  1878. // previously uploaded. The URL is valid for up to 10 minutes.
  1879. Location *string `type:"string"`
  1880. // The repository from which you can download the function.
  1881. RepositoryType *string `type:"string"`
  1882. }
  1883. // String returns the string representation
  1884. func (s FunctionCodeLocation) String() string {
  1885. return awsutil.Prettify(s)
  1886. }
  1887. // GoString returns the string representation
  1888. func (s FunctionCodeLocation) GoString() string {
  1889. return s.String()
  1890. }
  1891. // A complex type that describes function metadata.
  1892. type FunctionConfiguration struct {
  1893. _ struct{} `type:"structure"`
  1894. // It is the SHA256 hash of your function deployment package.
  1895. CodeSha256 *string `type:"string"`
  1896. // The size, in bytes, of the function .zip file you uploaded.
  1897. CodeSize *int64 `type:"long"`
  1898. // The user-provided description.
  1899. Description *string `type:"string"`
  1900. // The Amazon Resource Name (ARN) assigned to the function.
  1901. FunctionArn *string `type:"string"`
  1902. // The name of the function.
  1903. FunctionName *string `min:"1" type:"string"`
  1904. // The function Lambda calls to begin executing your function.
  1905. Handler *string `type:"string"`
  1906. // The time stamp of the last time you updated the function.
  1907. LastModified *string `type:"string"`
  1908. // The memory size, in MB, you configured for the function. Must be a multiple
  1909. // of 64 MB.
  1910. MemorySize *int64 `min:"128" type:"integer"`
  1911. // The Amazon Resource Name (ARN) of the IAM role that Lambda assumes when it
  1912. // executes your function to access any other Amazon Web Services (AWS) resources.
  1913. Role *string `type:"string"`
  1914. // The runtime environment for the Lambda function.
  1915. //
  1916. // To use the Node.js runtime v4.3, set the value to "nodejs4.3". To use earlier
  1917. // runtime (v0.10.42), set the value to "nodejs".
  1918. Runtime *string `type:"string" enum:"Runtime"`
  1919. // The function execution time at which Lambda should terminate the function.
  1920. // Because the execution time has cost implications, we recommend you set this
  1921. // value based on your expected execution time. The default is 3 seconds.
  1922. Timeout *int64 `min:"1" type:"integer"`
  1923. // The version of the Lambda function.
  1924. Version *string `min:"1" type:"string"`
  1925. // VPC configuration associated with your Lambda function.
  1926. VpcConfig *VpcConfigResponse `type:"structure"`
  1927. }
  1928. // String returns the string representation
  1929. func (s FunctionConfiguration) String() string {
  1930. return awsutil.Prettify(s)
  1931. }
  1932. // GoString returns the string representation
  1933. func (s FunctionConfiguration) GoString() string {
  1934. return s.String()
  1935. }
  1936. type GetAliasInput struct {
  1937. _ struct{} `type:"structure"`
  1938. // Function name for which the alias is created. An alias is a subresource that
  1939. // exists only in the context of an existing Lambda function so you must specify
  1940. // the function name.
  1941. FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
  1942. // Name of the alias for which you want to retrieve information.
  1943. Name *string `location:"uri" locationName:"Name" min:"1" type:"string" required:"true"`
  1944. }
  1945. // String returns the string representation
  1946. func (s GetAliasInput) String() string {
  1947. return awsutil.Prettify(s)
  1948. }
  1949. // GoString returns the string representation
  1950. func (s GetAliasInput) GoString() string {
  1951. return s.String()
  1952. }
  1953. // Validate inspects the fields of the type to determine if they are valid.
  1954. func (s *GetAliasInput) Validate() error {
  1955. invalidParams := request.ErrInvalidParams{Context: "GetAliasInput"}
  1956. if s.FunctionName == nil {
  1957. invalidParams.Add(request.NewErrParamRequired("FunctionName"))
  1958. }
  1959. if s.FunctionName != nil && len(*s.FunctionName) < 1 {
  1960. invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
  1961. }
  1962. if s.Name == nil {
  1963. invalidParams.Add(request.NewErrParamRequired("Name"))
  1964. }
  1965. if s.Name != nil && len(*s.Name) < 1 {
  1966. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  1967. }
  1968. if invalidParams.Len() > 0 {
  1969. return invalidParams
  1970. }
  1971. return nil
  1972. }
  1973. type GetEventSourceMappingInput struct {
  1974. _ struct{} `type:"structure"`
  1975. // The AWS Lambda assigned ID of the event source mapping.
  1976. UUID *string `location:"uri" locationName:"UUID" type:"string" required:"true"`
  1977. }
  1978. // String returns the string representation
  1979. func (s GetEventSourceMappingInput) String() string {
  1980. return awsutil.Prettify(s)
  1981. }
  1982. // GoString returns the string representation
  1983. func (s GetEventSourceMappingInput) GoString() string {
  1984. return s.String()
  1985. }
  1986. // Validate inspects the fields of the type to determine if they are valid.
  1987. func (s *GetEventSourceMappingInput) Validate() error {
  1988. invalidParams := request.ErrInvalidParams{Context: "GetEventSourceMappingInput"}
  1989. if s.UUID == nil {
  1990. invalidParams.Add(request.NewErrParamRequired("UUID"))
  1991. }
  1992. if invalidParams.Len() > 0 {
  1993. return invalidParams
  1994. }
  1995. return nil
  1996. }
  1997. type GetFunctionConfigurationInput struct {
  1998. _ struct{} `type:"structure"`
  1999. // The name of the Lambda function for which you want to retrieve the configuration
  2000. // information.
  2001. //
  2002. // You can specify a function name (for example, Thumbnail) or you can specify
  2003. // Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail).
  2004. // AWS Lambda also allows you to specify a partial ARN (for example, account-id:Thumbnail).
  2005. // Note that the length constraint applies only to the ARN. If you specify only
  2006. // the function name, it is limited to 64 character in length.
  2007. FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
  2008. // Using this optional parameter you can specify a function version or an alias
  2009. // name. If you specify function version, the API uses qualified function ARN
  2010. // and returns information about the specific function version. If you specify
  2011. // an alias name, the API uses the alias ARN and returns information about the
  2012. // function version to which the alias points.
  2013. //
  2014. // If you don't specify this parameter, the API uses unqualified function ARN,
  2015. // and returns information about the $LATEST function version.
  2016. Qualifier *string `location:"querystring" locationName:"Qualifier" min:"1" type:"string"`
  2017. }
  2018. // String returns the string representation
  2019. func (s GetFunctionConfigurationInput) String() string {
  2020. return awsutil.Prettify(s)
  2021. }
  2022. // GoString returns the string representation
  2023. func (s GetFunctionConfigurationInput) GoString() string {
  2024. return s.String()
  2025. }
  2026. // Validate inspects the fields of the type to determine if they are valid.
  2027. func (s *GetFunctionConfigurationInput) Validate() error {
  2028. invalidParams := request.ErrInvalidParams{Context: "GetFunctionConfigurationInput"}
  2029. if s.FunctionName == nil {
  2030. invalidParams.Add(request.NewErrParamRequired("FunctionName"))
  2031. }
  2032. if s.FunctionName != nil && len(*s.FunctionName) < 1 {
  2033. invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
  2034. }
  2035. if s.Qualifier != nil && len(*s.Qualifier) < 1 {
  2036. invalidParams.Add(request.NewErrParamMinLen("Qualifier", 1))
  2037. }
  2038. if invalidParams.Len() > 0 {
  2039. return invalidParams
  2040. }
  2041. return nil
  2042. }
  2043. type GetFunctionInput struct {
  2044. _ struct{} `type:"structure"`
  2045. // The Lambda function name.
  2046. //
  2047. // You can specify a function name (for example, Thumbnail) or you can specify
  2048. // Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail).
  2049. // AWS Lambda also allows you to specify a partial ARN (for example, account-id:Thumbnail).
  2050. // Note that the length constraint applies only to the ARN. If you specify only
  2051. // the function name, it is limited to 64 character in length.
  2052. FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
  2053. // Using this optional parameter to specify a function version or an alias name.
  2054. // If you specify function version, the API uses qualified function ARN for
  2055. // the request and returns information about the specific Lambda function version.
  2056. // If you specify an alias name, the API uses the alias ARN and returns information
  2057. // about the function version to which the alias points. If you don't provide
  2058. // this parameter, the API uses unqualified function ARN and returns information
  2059. // about the $LATEST version of the Lambda function.
  2060. Qualifier *string `location:"querystring" locationName:"Qualifier" min:"1" type:"string"`
  2061. }
  2062. // String returns the string representation
  2063. func (s GetFunctionInput) String() string {
  2064. return awsutil.Prettify(s)
  2065. }
  2066. // GoString returns the string representation
  2067. func (s GetFunctionInput) GoString() string {
  2068. return s.String()
  2069. }
  2070. // Validate inspects the fields of the type to determine if they are valid.
  2071. func (s *GetFunctionInput) Validate() error {
  2072. invalidParams := request.ErrInvalidParams{Context: "GetFunctionInput"}
  2073. if s.FunctionName == nil {
  2074. invalidParams.Add(request.NewErrParamRequired("FunctionName"))
  2075. }
  2076. if s.FunctionName != nil && len(*s.FunctionName) < 1 {
  2077. invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
  2078. }
  2079. if s.Qualifier != nil && len(*s.Qualifier) < 1 {
  2080. invalidParams.Add(request.NewErrParamMinLen("Qualifier", 1))
  2081. }
  2082. if invalidParams.Len() > 0 {
  2083. return invalidParams
  2084. }
  2085. return nil
  2086. }
  2087. // This response contains the object for the Lambda function location (see .
  2088. type GetFunctionOutput struct {
  2089. _ struct{} `type:"structure"`
  2090. // The object for the Lambda function location.
  2091. Code *FunctionCodeLocation `type:"structure"`
  2092. // A complex type that describes function metadata.
  2093. Configuration *FunctionConfiguration `type:"structure"`
  2094. }
  2095. // String returns the string representation
  2096. func (s GetFunctionOutput) String() string {
  2097. return awsutil.Prettify(s)
  2098. }
  2099. // GoString returns the string representation
  2100. func (s GetFunctionOutput) GoString() string {
  2101. return s.String()
  2102. }
  2103. type GetPolicyInput struct {
  2104. _ struct{} `type:"structure"`
  2105. // Function name whose resource policy you want to retrieve.
  2106. //
  2107. // You can specify the function name (for example, Thumbnail) or you can specify
  2108. // Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail).
  2109. // If you are using versioning, you can also provide a qualified function ARN
  2110. // (ARN that is qualified with function version or alias name as suffix). AWS
  2111. // Lambda also allows you to specify only the function name with the account
  2112. // ID qualifier (for example, account-id:Thumbnail). Note that the length constraint
  2113. // applies only to the ARN. If you specify only the function name, it is limited
  2114. // to 64 character in length.
  2115. FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
  2116. // You can specify this optional query parameter to specify a function version
  2117. // or an alias name in which case this API will return all permissions associated
  2118. // with the specific qualified ARN. If you don't provide this parameter, the
  2119. // API will return permissions that apply to the unqualified function ARN.
  2120. Qualifier *string `location:"querystring" locationName:"Qualifier" min:"1" type:"string"`
  2121. }
  2122. // String returns the string representation
  2123. func (s GetPolicyInput) String() string {
  2124. return awsutil.Prettify(s)
  2125. }
  2126. // GoString returns the string representation
  2127. func (s GetPolicyInput) GoString() string {
  2128. return s.String()
  2129. }
  2130. // Validate inspects the fields of the type to determine if they are valid.
  2131. func (s *GetPolicyInput) Validate() error {
  2132. invalidParams := request.ErrInvalidParams{Context: "GetPolicyInput"}
  2133. if s.FunctionName == nil {
  2134. invalidParams.Add(request.NewErrParamRequired("FunctionName"))
  2135. }
  2136. if s.FunctionName != nil && len(*s.FunctionName) < 1 {
  2137. invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
  2138. }
  2139. if s.Qualifier != nil && len(*s.Qualifier) < 1 {
  2140. invalidParams.Add(request.NewErrParamMinLen("Qualifier", 1))
  2141. }
  2142. if invalidParams.Len() > 0 {
  2143. return invalidParams
  2144. }
  2145. return nil
  2146. }
  2147. type GetPolicyOutput struct {
  2148. _ struct{} `type:"structure"`
  2149. // The resource policy associated with the specified function. The response
  2150. // returns the same as a string using a backslash ("\") as an escape character
  2151. // in the JSON.
  2152. Policy *string `type:"string"`
  2153. }
  2154. // String returns the string representation
  2155. func (s GetPolicyOutput) String() string {
  2156. return awsutil.Prettify(s)
  2157. }
  2158. // GoString returns the string representation
  2159. func (s GetPolicyOutput) GoString() string {
  2160. return s.String()
  2161. }
  2162. type InvokeAsyncInput struct {
  2163. _ struct{} `deprecated:"true" type:"structure" payload:"InvokeArgs"`
  2164. // The Lambda function name.
  2165. FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
  2166. // JSON that you want to provide to your Lambda function as input.
  2167. InvokeArgs io.ReadSeeker `type:"blob" required:"true"`
  2168. }
  2169. // String returns the string representation
  2170. func (s InvokeAsyncInput) String() string {
  2171. return awsutil.Prettify(s)
  2172. }
  2173. // GoString returns the string representation
  2174. func (s InvokeAsyncInput) GoString() string {
  2175. return s.String()
  2176. }
  2177. // Validate inspects the fields of the type to determine if they are valid.
  2178. func (s *InvokeAsyncInput) Validate() error {
  2179. invalidParams := request.ErrInvalidParams{Context: "InvokeAsyncInput"}
  2180. if s.FunctionName == nil {
  2181. invalidParams.Add(request.NewErrParamRequired("FunctionName"))
  2182. }
  2183. if s.FunctionName != nil && len(*s.FunctionName) < 1 {
  2184. invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
  2185. }
  2186. if s.InvokeArgs == nil {
  2187. invalidParams.Add(request.NewErrParamRequired("InvokeArgs"))
  2188. }
  2189. if invalidParams.Len() > 0 {
  2190. return invalidParams
  2191. }
  2192. return nil
  2193. }
  2194. // Upon success, it returns empty response. Otherwise, throws an exception.
  2195. type InvokeAsyncOutput struct {
  2196. _ struct{} `deprecated:"true" type:"structure"`
  2197. // It will be 202 upon success.
  2198. Status *int64 `location:"statusCode" type:"integer"`
  2199. }
  2200. // String returns the string representation
  2201. func (s InvokeAsyncOutput) String() string {
  2202. return awsutil.Prettify(s)
  2203. }
  2204. // GoString returns the string representation
  2205. func (s InvokeAsyncOutput) GoString() string {
  2206. return s.String()
  2207. }
  2208. type InvokeInput struct {
  2209. _ struct{} `type:"structure" payload:"Payload"`
  2210. // Using the ClientContext you can pass client-specific information to the Lambda
  2211. // function you are invoking. You can then process the client information in
  2212. // your Lambda function as you choose through the context variable. For an example
  2213. // of a ClientContext JSON, see PutEvents (http://docs.aws.amazon.com/mobileanalytics/latest/ug/PutEvents.html)
  2214. // in the Amazon Mobile Analytics API Reference and User Guide.
  2215. //
  2216. // The ClientContext JSON must be base64-encoded.
  2217. ClientContext *string `location:"header" locationName:"X-Amz-Client-Context" type:"string"`
  2218. // The Lambda function name.
  2219. //
  2220. // You can specify a function name (for example, Thumbnail) or you can specify
  2221. // Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail).
  2222. // AWS Lambda also allows you to specify a partial ARN (for example, account-id:Thumbnail).
  2223. // Note that the length constraint applies only to the ARN. If you specify only
  2224. // the function name, it is limited to 64 character in length.
  2225. FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
  2226. // By default, the Invoke API assumes RequestResponse invocation type. You can
  2227. // optionally request asynchronous execution by specifying Event as the InvocationType.
  2228. // You can also use this parameter to request AWS Lambda to not execute the
  2229. // function but do some verification, such as if the caller is authorized to
  2230. // invoke the function and if the inputs are valid. You request this by specifying
  2231. // DryRun as the InvocationType. This is useful in a cross-account scenario
  2232. // when you want to verify access to a function without running it.
  2233. InvocationType *string `location:"header" locationName:"X-Amz-Invocation-Type" type:"string" enum:"InvocationType"`
  2234. // You can set this optional parameter to Tail in the request only if you specify
  2235. // the InvocationType parameter with value RequestResponse. In this case, AWS
  2236. // Lambda returns the base64-encoded last 4 KB of log data produced by your
  2237. // Lambda function in the x-amz-log-result header.
  2238. LogType *string `location:"header" locationName:"X-Amz-Log-Type" type:"string" enum:"LogType"`
  2239. // JSON that you want to provide to your Lambda function as input.
  2240. Payload []byte `type:"blob"`
  2241. // You can use this optional parameter to specify a Lambda function version
  2242. // or alias name. If you specify a function version, the API uses the qualified
  2243. // function ARN to invoke a specific Lambda function. If you specify an alias
  2244. // name, the API uses the alias ARN to invoke the Lambda function version to
  2245. // which the alias points.
  2246. //
  2247. // If you don't provide this parameter, then the API uses unqualified function
  2248. // ARN which results in invocation of the $LATEST version.
  2249. Qualifier *string `location:"querystring" locationName:"Qualifier" min:"1" type:"string"`
  2250. }
  2251. // String returns the string representation
  2252. func (s InvokeInput) String() string {
  2253. return awsutil.Prettify(s)
  2254. }
  2255. // GoString returns the string representation
  2256. func (s InvokeInput) GoString() string {
  2257. return s.String()
  2258. }
  2259. // Validate inspects the fields of the type to determine if they are valid.
  2260. func (s *InvokeInput) Validate() error {
  2261. invalidParams := request.ErrInvalidParams{Context: "InvokeInput"}
  2262. if s.FunctionName == nil {
  2263. invalidParams.Add(request.NewErrParamRequired("FunctionName"))
  2264. }
  2265. if s.FunctionName != nil && len(*s.FunctionName) < 1 {
  2266. invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
  2267. }
  2268. if s.Qualifier != nil && len(*s.Qualifier) < 1 {
  2269. invalidParams.Add(request.NewErrParamMinLen("Qualifier", 1))
  2270. }
  2271. if invalidParams.Len() > 0 {
  2272. return invalidParams
  2273. }
  2274. return nil
  2275. }
  2276. // Upon success, returns an empty response. Otherwise, throws an exception.
  2277. type InvokeOutput struct {
  2278. _ struct{} `type:"structure" payload:"Payload"`
  2279. // Indicates whether an error occurred while executing the Lambda function.
  2280. // If an error occurred this field will have one of two values; Handled or Unhandled.
  2281. // Handled errors are errors that are reported by the function while the Unhandled
  2282. // errors are those detected and reported by AWS Lambda. Unhandled errors include
  2283. // out of memory errors and function timeouts. For information about how to
  2284. // report an Handled error, see Programming Model (http://docs.aws.amazon.com/lambda/latest/dg/programming-model.html).
  2285. FunctionError *string `location:"header" locationName:"X-Amz-Function-Error" type:"string"`
  2286. // It is the base64-encoded logs for the Lambda function invocation. This is
  2287. // present only if the invocation type is RequestResponse and the logs were
  2288. // requested.
  2289. LogResult *string `location:"header" locationName:"X-Amz-Log-Result" type:"string"`
  2290. // It is the JSON representation of the object returned by the Lambda function.
  2291. // In This is present only if the invocation type is RequestResponse.
  2292. //
  2293. // In the event of a function error this field contains a message describing
  2294. // the error. For the Handled errors the Lambda function will report this message.
  2295. // For Unhandled errors AWS Lambda reports the message.
  2296. Payload []byte `type:"blob"`
  2297. // The HTTP status code will be in the 200 range for successful request. For
  2298. // the RequestResonse invocation type this status code will be 200. For the
  2299. // Event invocation type this status code will be 202. For the DryRun invocation
  2300. // type the status code will be 204.
  2301. StatusCode *int64 `location:"statusCode" type:"integer"`
  2302. }
  2303. // String returns the string representation
  2304. func (s InvokeOutput) String() string {
  2305. return awsutil.Prettify(s)
  2306. }
  2307. // GoString returns the string representation
  2308. func (s InvokeOutput) GoString() string {
  2309. return s.String()
  2310. }
  2311. type ListAliasesInput struct {
  2312. _ struct{} `type:"structure"`
  2313. // Lambda function name for which the alias is created.
  2314. FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
  2315. // If you specify this optional parameter, the API returns only the aliases
  2316. // that are pointing to the specific Lambda function version, otherwise the
  2317. // API returns all of the aliases created for the Lambda function.
  2318. FunctionVersion *string `location:"querystring" locationName:"FunctionVersion" min:"1" type:"string"`
  2319. // Optional string. An opaque pagination token returned from a previous ListAliases
  2320. // operation. If present, indicates where to continue the listing.
  2321. Marker *string `location:"querystring" locationName:"Marker" type:"string"`
  2322. // Optional integer. Specifies the maximum number of aliases to return in response.
  2323. // This parameter value must be greater than 0.
  2324. MaxItems *int64 `location:"querystring" locationName:"MaxItems" min:"1" type:"integer"`
  2325. }
  2326. // String returns the string representation
  2327. func (s ListAliasesInput) String() string {
  2328. return awsutil.Prettify(s)
  2329. }
  2330. // GoString returns the string representation
  2331. func (s ListAliasesInput) GoString() string {
  2332. return s.String()
  2333. }
  2334. // Validate inspects the fields of the type to determine if they are valid.
  2335. func (s *ListAliasesInput) Validate() error {
  2336. invalidParams := request.ErrInvalidParams{Context: "ListAliasesInput"}
  2337. if s.FunctionName == nil {
  2338. invalidParams.Add(request.NewErrParamRequired("FunctionName"))
  2339. }
  2340. if s.FunctionName != nil && len(*s.FunctionName) < 1 {
  2341. invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
  2342. }
  2343. if s.FunctionVersion != nil && len(*s.FunctionVersion) < 1 {
  2344. invalidParams.Add(request.NewErrParamMinLen("FunctionVersion", 1))
  2345. }
  2346. if s.MaxItems != nil && *s.MaxItems < 1 {
  2347. invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1))
  2348. }
  2349. if invalidParams.Len() > 0 {
  2350. return invalidParams
  2351. }
  2352. return nil
  2353. }
  2354. type ListAliasesOutput struct {
  2355. _ struct{} `type:"structure"`
  2356. // A list of aliases.
  2357. Aliases []*AliasConfiguration `type:"list"`
  2358. // A string, present if there are more aliases.
  2359. NextMarker *string `type:"string"`
  2360. }
  2361. // String returns the string representation
  2362. func (s ListAliasesOutput) String() string {
  2363. return awsutil.Prettify(s)
  2364. }
  2365. // GoString returns the string representation
  2366. func (s ListAliasesOutput) GoString() string {
  2367. return s.String()
  2368. }
  2369. type ListEventSourceMappingsInput struct {
  2370. _ struct{} `type:"structure"`
  2371. // The Amazon Resource Name (ARN) of the Amazon Kinesis stream. (This parameter
  2372. // is optional.)
  2373. EventSourceArn *string `location:"querystring" locationName:"EventSourceArn" type:"string"`
  2374. // The name of the Lambda function.
  2375. //
  2376. // You can specify the function name (for example, Thumbnail) or you can specify
  2377. // Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail).
  2378. // If you are using versioning, you can also provide a qualified function ARN
  2379. // (ARN that is qualified with function version or alias name as suffix). AWS
  2380. // Lambda also allows you to specify only the function name with the account
  2381. // ID qualifier (for example, account-id:Thumbnail). Note that the length constraint
  2382. // applies only to the ARN. If you specify only the function name, it is limited
  2383. // to 64 character in length.
  2384. FunctionName *string `location:"querystring" locationName:"FunctionName" min:"1" type:"string"`
  2385. // Optional string. An opaque pagination token returned from a previous ListEventSourceMappings
  2386. // operation. If present, specifies to continue the list from where the returning
  2387. // call left off.
  2388. Marker *string `location:"querystring" locationName:"Marker" type:"string"`
  2389. // Optional integer. Specifies the maximum number of event sources to return
  2390. // in response. This value must be greater than 0.
  2391. MaxItems *int64 `location:"querystring" locationName:"MaxItems" min:"1" type:"integer"`
  2392. }
  2393. // String returns the string representation
  2394. func (s ListEventSourceMappingsInput) String() string {
  2395. return awsutil.Prettify(s)
  2396. }
  2397. // GoString returns the string representation
  2398. func (s ListEventSourceMappingsInput) GoString() string {
  2399. return s.String()
  2400. }
  2401. // Validate inspects the fields of the type to determine if they are valid.
  2402. func (s *ListEventSourceMappingsInput) Validate() error {
  2403. invalidParams := request.ErrInvalidParams{Context: "ListEventSourceMappingsInput"}
  2404. if s.FunctionName != nil && len(*s.FunctionName) < 1 {
  2405. invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
  2406. }
  2407. if s.MaxItems != nil && *s.MaxItems < 1 {
  2408. invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1))
  2409. }
  2410. if invalidParams.Len() > 0 {
  2411. return invalidParams
  2412. }
  2413. return nil
  2414. }
  2415. // Contains a list of event sources (see )
  2416. type ListEventSourceMappingsOutput struct {
  2417. _ struct{} `type:"structure"`
  2418. // An array of EventSourceMappingConfiguration objects.
  2419. EventSourceMappings []*EventSourceMappingConfiguration `type:"list"`
  2420. // A string, present if there are more event source mappings.
  2421. NextMarker *string `type:"string"`
  2422. }
  2423. // String returns the string representation
  2424. func (s ListEventSourceMappingsOutput) String() string {
  2425. return awsutil.Prettify(s)
  2426. }
  2427. // GoString returns the string representation
  2428. func (s ListEventSourceMappingsOutput) GoString() string {
  2429. return s.String()
  2430. }
  2431. type ListFunctionsInput struct {
  2432. _ struct{} `type:"structure"`
  2433. // Optional string. An opaque pagination token returned from a previous ListFunctions
  2434. // operation. If present, indicates where to continue the listing.
  2435. Marker *string `location:"querystring" locationName:"Marker" type:"string"`
  2436. // Optional integer. Specifies the maximum number of AWS Lambda functions to
  2437. // return in response. This parameter value must be greater than 0.
  2438. MaxItems *int64 `location:"querystring" locationName:"MaxItems" min:"1" type:"integer"`
  2439. }
  2440. // String returns the string representation
  2441. func (s ListFunctionsInput) String() string {
  2442. return awsutil.Prettify(s)
  2443. }
  2444. // GoString returns the string representation
  2445. func (s ListFunctionsInput) GoString() string {
  2446. return s.String()
  2447. }
  2448. // Validate inspects the fields of the type to determine if they are valid.
  2449. func (s *ListFunctionsInput) Validate() error {
  2450. invalidParams := request.ErrInvalidParams{Context: "ListFunctionsInput"}
  2451. if s.MaxItems != nil && *s.MaxItems < 1 {
  2452. invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1))
  2453. }
  2454. if invalidParams.Len() > 0 {
  2455. return invalidParams
  2456. }
  2457. return nil
  2458. }
  2459. // Contains a list of AWS Lambda function configurations (see FunctionConfiguration.
  2460. type ListFunctionsOutput struct {
  2461. _ struct{} `type:"structure"`
  2462. // A list of Lambda functions.
  2463. Functions []*FunctionConfiguration `type:"list"`
  2464. // A string, present if there are more functions.
  2465. NextMarker *string `type:"string"`
  2466. }
  2467. // String returns the string representation
  2468. func (s ListFunctionsOutput) String() string {
  2469. return awsutil.Prettify(s)
  2470. }
  2471. // GoString returns the string representation
  2472. func (s ListFunctionsOutput) GoString() string {
  2473. return s.String()
  2474. }
  2475. type ListVersionsByFunctionInput struct {
  2476. _ struct{} `type:"structure"`
  2477. // Function name whose versions to list. You can specify a function name (for
  2478. // example, Thumbnail) or you can specify Amazon Resource Name (ARN) of the
  2479. // function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail).
  2480. // AWS Lambda also allows you to specify a partial ARN (for example, account-id:Thumbnail).
  2481. // Note that the length constraint applies only to the ARN. If you specify only
  2482. // the function name, it is limited to 64 character in length.
  2483. FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
  2484. // Optional string. An opaque pagination token returned from a previous ListVersionsByFunction
  2485. // operation. If present, indicates where to continue the listing.
  2486. Marker *string `location:"querystring" locationName:"Marker" type:"string"`
  2487. // Optional integer. Specifies the maximum number of AWS Lambda function versions
  2488. // to return in response. This parameter value must be greater than 0.
  2489. MaxItems *int64 `location:"querystring" locationName:"MaxItems" min:"1" type:"integer"`
  2490. }
  2491. // String returns the string representation
  2492. func (s ListVersionsByFunctionInput) String() string {
  2493. return awsutil.Prettify(s)
  2494. }
  2495. // GoString returns the string representation
  2496. func (s ListVersionsByFunctionInput) GoString() string {
  2497. return s.String()
  2498. }
  2499. // Validate inspects the fields of the type to determine if they are valid.
  2500. func (s *ListVersionsByFunctionInput) Validate() error {
  2501. invalidParams := request.ErrInvalidParams{Context: "ListVersionsByFunctionInput"}
  2502. if s.FunctionName == nil {
  2503. invalidParams.Add(request.NewErrParamRequired("FunctionName"))
  2504. }
  2505. if s.FunctionName != nil && len(*s.FunctionName) < 1 {
  2506. invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
  2507. }
  2508. if s.MaxItems != nil && *s.MaxItems < 1 {
  2509. invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1))
  2510. }
  2511. if invalidParams.Len() > 0 {
  2512. return invalidParams
  2513. }
  2514. return nil
  2515. }
  2516. type ListVersionsByFunctionOutput struct {
  2517. _ struct{} `type:"structure"`
  2518. // A string, present if there are more function versions.
  2519. NextMarker *string `type:"string"`
  2520. // A list of Lambda function versions.
  2521. Versions []*FunctionConfiguration `type:"list"`
  2522. }
  2523. // String returns the string representation
  2524. func (s ListVersionsByFunctionOutput) String() string {
  2525. return awsutil.Prettify(s)
  2526. }
  2527. // GoString returns the string representation
  2528. func (s ListVersionsByFunctionOutput) GoString() string {
  2529. return s.String()
  2530. }
  2531. type PublishVersionInput struct {
  2532. _ struct{} `type:"structure"`
  2533. // The SHA256 hash of the deployment package you want to publish. This provides
  2534. // validation on the code you are publishing. If you provide this parameter
  2535. // value must match the SHA256 of the $LATEST version for the publication to
  2536. // succeed.
  2537. CodeSha256 *string `type:"string"`
  2538. // The description for the version you are publishing. If not provided, AWS
  2539. // Lambda copies the description from the $LATEST version.
  2540. Description *string `type:"string"`
  2541. // The Lambda function name. You can specify a function name (for example, Thumbnail)
  2542. // or you can specify Amazon Resource Name (ARN) of the function (for example,
  2543. // arn:aws:lambda:us-west-2:account-id:function:ThumbNail). AWS Lambda also
  2544. // allows you to specify a partial ARN (for example, account-id:Thumbnail).
  2545. // Note that the length constraint applies only to the ARN. If you specify only
  2546. // the function name, it is limited to 64 character in length.
  2547. FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
  2548. }
  2549. // String returns the string representation
  2550. func (s PublishVersionInput) String() string {
  2551. return awsutil.Prettify(s)
  2552. }
  2553. // GoString returns the string representation
  2554. func (s PublishVersionInput) GoString() string {
  2555. return s.String()
  2556. }
  2557. // Validate inspects the fields of the type to determine if they are valid.
  2558. func (s *PublishVersionInput) Validate() error {
  2559. invalidParams := request.ErrInvalidParams{Context: "PublishVersionInput"}
  2560. if s.FunctionName == nil {
  2561. invalidParams.Add(request.NewErrParamRequired("FunctionName"))
  2562. }
  2563. if s.FunctionName != nil && len(*s.FunctionName) < 1 {
  2564. invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
  2565. }
  2566. if invalidParams.Len() > 0 {
  2567. return invalidParams
  2568. }
  2569. return nil
  2570. }
  2571. type RemovePermissionInput struct {
  2572. _ struct{} `type:"structure"`
  2573. // Lambda function whose resource policy you want to remove a permission from.
  2574. //
  2575. // You can specify a function name (for example, Thumbnail) or you can specify
  2576. // Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail).
  2577. // AWS Lambda also allows you to specify a partial ARN (for example, account-id:Thumbnail).
  2578. // Note that the length constraint applies only to the ARN. If you specify only
  2579. // the function name, it is limited to 64 character in length.
  2580. FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
  2581. // You can specify this optional parameter to remove permission associated with
  2582. // a specific function version or function alias. If you don't specify this
  2583. // parameter, the API removes permission associated with the unqualified function
  2584. // ARN.
  2585. Qualifier *string `location:"querystring" locationName:"Qualifier" min:"1" type:"string"`
  2586. // Statement ID of the permission to remove.
  2587. StatementId *string `location:"uri" locationName:"StatementId" min:"1" type:"string" required:"true"`
  2588. }
  2589. // String returns the string representation
  2590. func (s RemovePermissionInput) String() string {
  2591. return awsutil.Prettify(s)
  2592. }
  2593. // GoString returns the string representation
  2594. func (s RemovePermissionInput) GoString() string {
  2595. return s.String()
  2596. }
  2597. // Validate inspects the fields of the type to determine if they are valid.
  2598. func (s *RemovePermissionInput) Validate() error {
  2599. invalidParams := request.ErrInvalidParams{Context: "RemovePermissionInput"}
  2600. if s.FunctionName == nil {
  2601. invalidParams.Add(request.NewErrParamRequired("FunctionName"))
  2602. }
  2603. if s.FunctionName != nil && len(*s.FunctionName) < 1 {
  2604. invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
  2605. }
  2606. if s.Qualifier != nil && len(*s.Qualifier) < 1 {
  2607. invalidParams.Add(request.NewErrParamMinLen("Qualifier", 1))
  2608. }
  2609. if s.StatementId == nil {
  2610. invalidParams.Add(request.NewErrParamRequired("StatementId"))
  2611. }
  2612. if s.StatementId != nil && len(*s.StatementId) < 1 {
  2613. invalidParams.Add(request.NewErrParamMinLen("StatementId", 1))
  2614. }
  2615. if invalidParams.Len() > 0 {
  2616. return invalidParams
  2617. }
  2618. return nil
  2619. }
  2620. type RemovePermissionOutput struct {
  2621. _ struct{} `type:"structure"`
  2622. }
  2623. // String returns the string representation
  2624. func (s RemovePermissionOutput) String() string {
  2625. return awsutil.Prettify(s)
  2626. }
  2627. // GoString returns the string representation
  2628. func (s RemovePermissionOutput) GoString() string {
  2629. return s.String()
  2630. }
  2631. type UpdateAliasInput struct {
  2632. _ struct{} `type:"structure"`
  2633. // You can change the description of the alias using this parameter.
  2634. Description *string `type:"string"`
  2635. // The function name for which the alias is created.
  2636. FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
  2637. // Using this parameter you can change the Lambda function version to which
  2638. // the alias points.
  2639. FunctionVersion *string `min:"1" type:"string"`
  2640. // The alias name.
  2641. Name *string `location:"uri" locationName:"Name" min:"1" type:"string" required:"true"`
  2642. }
  2643. // String returns the string representation
  2644. func (s UpdateAliasInput) String() string {
  2645. return awsutil.Prettify(s)
  2646. }
  2647. // GoString returns the string representation
  2648. func (s UpdateAliasInput) GoString() string {
  2649. return s.String()
  2650. }
  2651. // Validate inspects the fields of the type to determine if they are valid.
  2652. func (s *UpdateAliasInput) Validate() error {
  2653. invalidParams := request.ErrInvalidParams{Context: "UpdateAliasInput"}
  2654. if s.FunctionName == nil {
  2655. invalidParams.Add(request.NewErrParamRequired("FunctionName"))
  2656. }
  2657. if s.FunctionName != nil && len(*s.FunctionName) < 1 {
  2658. invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
  2659. }
  2660. if s.FunctionVersion != nil && len(*s.FunctionVersion) < 1 {
  2661. invalidParams.Add(request.NewErrParamMinLen("FunctionVersion", 1))
  2662. }
  2663. if s.Name == nil {
  2664. invalidParams.Add(request.NewErrParamRequired("Name"))
  2665. }
  2666. if s.Name != nil && len(*s.Name) < 1 {
  2667. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  2668. }
  2669. if invalidParams.Len() > 0 {
  2670. return invalidParams
  2671. }
  2672. return nil
  2673. }
  2674. type UpdateEventSourceMappingInput struct {
  2675. _ struct{} `type:"structure"`
  2676. // The maximum number of stream records that can be sent to your Lambda function
  2677. // for a single invocation.
  2678. BatchSize *int64 `min:"1" type:"integer"`
  2679. // Specifies whether AWS Lambda should actively poll the stream or not. If disabled,
  2680. // AWS Lambda will not poll the stream.
  2681. Enabled *bool `type:"boolean"`
  2682. // The Lambda function to which you want the stream records sent.
  2683. //
  2684. // You can specify a function name (for example, Thumbnail) or you can specify
  2685. // Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail).
  2686. // AWS Lambda also allows you to specify a partial ARN (for example, account-id:Thumbnail).
  2687. //
  2688. // If you are using versioning, you can also provide a qualified function ARN
  2689. // (ARN that is qualified with function version or alias name as suffix). For
  2690. // more information about versioning, see AWS Lambda Function Versioning and
  2691. // Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html)
  2692. //
  2693. // Note that the length constraint applies only to the ARN. If you specify
  2694. // only the function name, it is limited to 64 character in length.
  2695. FunctionName *string `min:"1" type:"string"`
  2696. // The event source mapping identifier.
  2697. UUID *string `location:"uri" locationName:"UUID" type:"string" required:"true"`
  2698. }
  2699. // String returns the string representation
  2700. func (s UpdateEventSourceMappingInput) String() string {
  2701. return awsutil.Prettify(s)
  2702. }
  2703. // GoString returns the string representation
  2704. func (s UpdateEventSourceMappingInput) GoString() string {
  2705. return s.String()
  2706. }
  2707. // Validate inspects the fields of the type to determine if they are valid.
  2708. func (s *UpdateEventSourceMappingInput) Validate() error {
  2709. invalidParams := request.ErrInvalidParams{Context: "UpdateEventSourceMappingInput"}
  2710. if s.BatchSize != nil && *s.BatchSize < 1 {
  2711. invalidParams.Add(request.NewErrParamMinValue("BatchSize", 1))
  2712. }
  2713. if s.FunctionName != nil && len(*s.FunctionName) < 1 {
  2714. invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
  2715. }
  2716. if s.UUID == nil {
  2717. invalidParams.Add(request.NewErrParamRequired("UUID"))
  2718. }
  2719. if invalidParams.Len() > 0 {
  2720. return invalidParams
  2721. }
  2722. return nil
  2723. }
  2724. type UpdateFunctionCodeInput struct {
  2725. _ struct{} `type:"structure"`
  2726. // The existing Lambda function name whose code you want to replace.
  2727. //
  2728. // You can specify a function name (for example, Thumbnail) or you can specify
  2729. // Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail).
  2730. // AWS Lambda also allows you to specify a partial ARN (for example, account-id:Thumbnail).
  2731. // Note that the length constraint applies only to the ARN. If you specify only
  2732. // the function name, it is limited to 64 character in length.
  2733. FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
  2734. // This boolean parameter can be used to request AWS Lambda to update the Lambda
  2735. // function and publish a version as an atomic operation.
  2736. Publish *bool `type:"boolean"`
  2737. // Amazon S3 bucket name where the .zip file containing your deployment package
  2738. // is stored. This bucket must reside in the same AWS region where you are creating
  2739. // the Lambda function.
  2740. S3Bucket *string `min:"3" type:"string"`
  2741. // The Amazon S3 object (the deployment package) key name you want to upload.
  2742. S3Key *string `min:"1" type:"string"`
  2743. // The Amazon S3 object (the deployment package) version you want to upload.
  2744. S3ObjectVersion *string `min:"1" type:"string"`
  2745. // The contents of your zip file containing your deployment package. If you
  2746. // are using the web API directly, the contents of the zip file must be base64-encoded.
  2747. // If you are using the AWS SDKs or the AWS CLI, the SDKs or CLI will do the
  2748. // encoding for you. For more information about creating a .zip file, go to
  2749. // Execution Permissions (http://docs.aws.amazon.com/lambda/latest/dg/intro-permission-model.html#lambda-intro-execution-role.html)
  2750. // in the AWS Lambda Developer Guide.
  2751. //
  2752. // ZipFile is automatically base64 encoded/decoded by the SDK.
  2753. ZipFile []byte `type:"blob"`
  2754. }
  2755. // String returns the string representation
  2756. func (s UpdateFunctionCodeInput) String() string {
  2757. return awsutil.Prettify(s)
  2758. }
  2759. // GoString returns the string representation
  2760. func (s UpdateFunctionCodeInput) GoString() string {
  2761. return s.String()
  2762. }
  2763. // Validate inspects the fields of the type to determine if they are valid.
  2764. func (s *UpdateFunctionCodeInput) Validate() error {
  2765. invalidParams := request.ErrInvalidParams{Context: "UpdateFunctionCodeInput"}
  2766. if s.FunctionName == nil {
  2767. invalidParams.Add(request.NewErrParamRequired("FunctionName"))
  2768. }
  2769. if s.FunctionName != nil && len(*s.FunctionName) < 1 {
  2770. invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
  2771. }
  2772. if s.S3Bucket != nil && len(*s.S3Bucket) < 3 {
  2773. invalidParams.Add(request.NewErrParamMinLen("S3Bucket", 3))
  2774. }
  2775. if s.S3Key != nil && len(*s.S3Key) < 1 {
  2776. invalidParams.Add(request.NewErrParamMinLen("S3Key", 1))
  2777. }
  2778. if s.S3ObjectVersion != nil && len(*s.S3ObjectVersion) < 1 {
  2779. invalidParams.Add(request.NewErrParamMinLen("S3ObjectVersion", 1))
  2780. }
  2781. if invalidParams.Len() > 0 {
  2782. return invalidParams
  2783. }
  2784. return nil
  2785. }
  2786. type UpdateFunctionConfigurationInput struct {
  2787. _ struct{} `type:"structure"`
  2788. // A short user-defined function description. AWS Lambda does not use this value.
  2789. // Assign a meaningful description as you see fit.
  2790. Description *string `type:"string"`
  2791. // The name of the Lambda function.
  2792. //
  2793. // You can specify a function name (for example, Thumbnail) or you can specify
  2794. // Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail).
  2795. // AWS Lambda also allows you to specify a partial ARN (for example, account-id:Thumbnail).
  2796. // Note that the length constraint applies only to the ARN. If you specify only
  2797. // the function name, it is limited to 64 character in length.
  2798. FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
  2799. // The function that Lambda calls to begin executing your function. For Node.js,
  2800. // it is the module-name.export value in your function.
  2801. Handler *string `type:"string"`
  2802. // The amount of memory, in MB, your Lambda function is given. AWS Lambda uses
  2803. // this memory size to infer the amount of CPU allocated to your function. Your
  2804. // function use-case determines your CPU and memory requirements. For example,
  2805. // a database operation might need less memory compared to an image processing
  2806. // function. The default value is 128 MB. The value must be a multiple of 64
  2807. // MB.
  2808. MemorySize *int64 `min:"128" type:"integer"`
  2809. // The Amazon Resource Name (ARN) of the IAM role that Lambda will assume when
  2810. // it executes your function.
  2811. Role *string `type:"string"`
  2812. // The runtime environment for the Lambda function.
  2813. //
  2814. // To use the Node.js runtime v4.3, set the value to "nodejs4.3". To use earlier
  2815. // runtime (v0.10.42), set the value to "nodejs".
  2816. Runtime *string `type:"string" enum:"Runtime"`
  2817. // The function execution time at which AWS Lambda should terminate the function.
  2818. // Because the execution time has cost implications, we recommend you set this
  2819. // value based on your expected execution time. The default is 3 seconds.
  2820. Timeout *int64 `min:"1" type:"integer"`
  2821. // If your Lambda function accesses resources in a VPC, you provide this parameter
  2822. // identifying the list of security group IDs and subnet IDs. These must belong
  2823. // to the same VPC. You must provide at least one security group and one subnet
  2824. // ID.
  2825. VpcConfig *VpcConfig `type:"structure"`
  2826. }
  2827. // String returns the string representation
  2828. func (s UpdateFunctionConfigurationInput) String() string {
  2829. return awsutil.Prettify(s)
  2830. }
  2831. // GoString returns the string representation
  2832. func (s UpdateFunctionConfigurationInput) GoString() string {
  2833. return s.String()
  2834. }
  2835. // Validate inspects the fields of the type to determine if they are valid.
  2836. func (s *UpdateFunctionConfigurationInput) Validate() error {
  2837. invalidParams := request.ErrInvalidParams{Context: "UpdateFunctionConfigurationInput"}
  2838. if s.FunctionName == nil {
  2839. invalidParams.Add(request.NewErrParamRequired("FunctionName"))
  2840. }
  2841. if s.FunctionName != nil && len(*s.FunctionName) < 1 {
  2842. invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
  2843. }
  2844. if s.MemorySize != nil && *s.MemorySize < 128 {
  2845. invalidParams.Add(request.NewErrParamMinValue("MemorySize", 128))
  2846. }
  2847. if s.Timeout != nil && *s.Timeout < 1 {
  2848. invalidParams.Add(request.NewErrParamMinValue("Timeout", 1))
  2849. }
  2850. if invalidParams.Len() > 0 {
  2851. return invalidParams
  2852. }
  2853. return nil
  2854. }
  2855. // If your Lambda function accesses resources in a VPC, you provide this parameter
  2856. // identifying the list of security group IDs and subnet IDs. These must belong
  2857. // to the same VPC. You must provide at least one security group and one subnet
  2858. // ID.
  2859. type VpcConfig struct {
  2860. _ struct{} `type:"structure"`
  2861. // A list of one or more security groups IDs in your VPC.
  2862. SecurityGroupIds []*string `type:"list"`
  2863. // A list of one or more subnet IDs in your VPC.
  2864. SubnetIds []*string `type:"list"`
  2865. }
  2866. // String returns the string representation
  2867. func (s VpcConfig) String() string {
  2868. return awsutil.Prettify(s)
  2869. }
  2870. // GoString returns the string representation
  2871. func (s VpcConfig) GoString() string {
  2872. return s.String()
  2873. }
  2874. // VPC configuration associated with your Lambda function.
  2875. type VpcConfigResponse struct {
  2876. _ struct{} `type:"structure"`
  2877. // A list of security group IDs associated with the Lambda function.
  2878. SecurityGroupIds []*string `type:"list"`
  2879. // A list of subnet IDs associated with the Lambda function.
  2880. SubnetIds []*string `type:"list"`
  2881. // The VPC ID associated with you Lambda function.
  2882. VpcId *string `type:"string"`
  2883. }
  2884. // String returns the string representation
  2885. func (s VpcConfigResponse) String() string {
  2886. return awsutil.Prettify(s)
  2887. }
  2888. // GoString returns the string representation
  2889. func (s VpcConfigResponse) GoString() string {
  2890. return s.String()
  2891. }
  2892. const (
  2893. // @enum EventSourcePosition
  2894. EventSourcePositionTrimHorizon = "TRIM_HORIZON"
  2895. // @enum EventSourcePosition
  2896. EventSourcePositionLatest = "LATEST"
  2897. )
  2898. const (
  2899. // @enum InvocationType
  2900. InvocationTypeEvent = "Event"
  2901. // @enum InvocationType
  2902. InvocationTypeRequestResponse = "RequestResponse"
  2903. // @enum InvocationType
  2904. InvocationTypeDryRun = "DryRun"
  2905. )
  2906. const (
  2907. // @enum LogType
  2908. LogTypeNone = "None"
  2909. // @enum LogType
  2910. LogTypeTail = "Tail"
  2911. )
  2912. const (
  2913. // @enum Runtime
  2914. RuntimeNodejs = "nodejs"
  2915. // @enum Runtime
  2916. RuntimeNodejs43 = "nodejs4.3"
  2917. // @enum Runtime
  2918. RuntimeJava8 = "java8"
  2919. // @enum Runtime
  2920. RuntimePython27 = "python2.7"
  2921. )
  2922. const (
  2923. // @enum ThrottleReason
  2924. ThrottleReasonConcurrentInvocationLimitExceeded = "ConcurrentInvocationLimitExceeded"
  2925. // @enum ThrottleReason
  2926. ThrottleReasonFunctionInvocationRateLimitExceeded = "FunctionInvocationRateLimitExceeded"
  2927. // @enum ThrottleReason
  2928. ThrottleReasonCallerRateLimitExceeded = "CallerRateLimitExceeded"
  2929. )