api.go 313 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076
  1. // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
  2. package lambda
  3. import (
  4. "io"
  5. "time"
  6. "github.com/aws/aws-sdk-go/aws"
  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 opAddLayerVersionPermission = "AddLayerVersionPermission"
  13. // AddLayerVersionPermissionRequest generates a "aws/request.Request" representing the
  14. // client's request for the AddLayerVersionPermission operation. The "output" return
  15. // value will be populated with the request's response once the request completes
  16. // successfully.
  17. //
  18. // Use "Send" method on the returned Request to send the API call to the service.
  19. // the "output" return value is not valid until after Send returns without error.
  20. //
  21. // See AddLayerVersionPermission for more information on using the AddLayerVersionPermission
  22. // API call, and error handling.
  23. //
  24. // This method is useful when you want to inject custom logic or configuration
  25. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  26. //
  27. //
  28. // // Example sending a request using the AddLayerVersionPermissionRequest method.
  29. // req, resp := client.AddLayerVersionPermissionRequest(params)
  30. //
  31. // err := req.Send()
  32. // if err == nil { // resp is now filled
  33. // fmt.Println(resp)
  34. // }
  35. //
  36. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/AddLayerVersionPermission
  37. func (c *Lambda) AddLayerVersionPermissionRequest(input *AddLayerVersionPermissionInput) (req *request.Request, output *AddLayerVersionPermissionOutput) {
  38. op := &request.Operation{
  39. Name: opAddLayerVersionPermission,
  40. HTTPMethod: "POST",
  41. HTTPPath: "/2018-10-31/layers/{LayerName}/versions/{VersionNumber}/policy",
  42. }
  43. if input == nil {
  44. input = &AddLayerVersionPermissionInput{}
  45. }
  46. output = &AddLayerVersionPermissionOutput{}
  47. req = c.newRequest(op, input, output)
  48. return
  49. }
  50. // AddLayerVersionPermission API operation for AWS Lambda.
  51. //
  52. // Adds permissions to the resource-based policy of a version of an AWS Lambda
  53. // layer (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html).
  54. // Use this action to grant layer usage permission to other accounts. You can
  55. // grant permission to a single account, all AWS accounts, or all accounts in
  56. // an organization.
  57. //
  58. // To revoke permission, call RemoveLayerVersionPermission with the statement
  59. // ID that you specified when you added it.
  60. //
  61. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  62. // with awserr.Error's Code and Message methods to get detailed information about
  63. // the error.
  64. //
  65. // See the AWS API reference guide for AWS Lambda's
  66. // API operation AddLayerVersionPermission for usage and error information.
  67. //
  68. // Returned Error Codes:
  69. // * ErrCodeServiceException "ServiceException"
  70. // The AWS Lambda service encountered an internal error.
  71. //
  72. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  73. // The resource (for example, a Lambda function or access policy statement)
  74. // specified in the request does not exist.
  75. //
  76. // * ErrCodeResourceConflictException "ResourceConflictException"
  77. // The resource already exists.
  78. //
  79. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  80. // Request throughput limit exceeded.
  81. //
  82. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  83. // One of the parameters in the request is invalid. For example, if you provided
  84. // an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
  85. // API, that AWS Lambda is unable to assume you will get this exception.
  86. //
  87. // * ErrCodePolicyLengthExceededException "PolicyLengthExceededException"
  88. // Lambda function access policy is limited to 20 KB.
  89. //
  90. // * ErrCodePreconditionFailedException "PreconditionFailedException"
  91. // The RevisionId provided does not match the latest RevisionId for the Lambda
  92. // function or alias. Call the GetFunction or the GetAlias API to retrieve the
  93. // latest RevisionId for your resource.
  94. //
  95. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/AddLayerVersionPermission
  96. func (c *Lambda) AddLayerVersionPermission(input *AddLayerVersionPermissionInput) (*AddLayerVersionPermissionOutput, error) {
  97. req, out := c.AddLayerVersionPermissionRequest(input)
  98. return out, req.Send()
  99. }
  100. // AddLayerVersionPermissionWithContext is the same as AddLayerVersionPermission with the addition of
  101. // the ability to pass a context and additional request options.
  102. //
  103. // See AddLayerVersionPermission for details on how to use this API operation.
  104. //
  105. // The context must be non-nil and will be used for request cancellation. If
  106. // the context is nil a panic will occur. In the future the SDK may create
  107. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  108. // for more information on using Contexts.
  109. func (c *Lambda) AddLayerVersionPermissionWithContext(ctx aws.Context, input *AddLayerVersionPermissionInput, opts ...request.Option) (*AddLayerVersionPermissionOutput, error) {
  110. req, out := c.AddLayerVersionPermissionRequest(input)
  111. req.SetContext(ctx)
  112. req.ApplyOptions(opts...)
  113. return out, req.Send()
  114. }
  115. const opAddPermission = "AddPermission"
  116. // AddPermissionRequest generates a "aws/request.Request" representing the
  117. // client's request for the AddPermission operation. The "output" return
  118. // value will be populated with the request's response once the request completes
  119. // successfully.
  120. //
  121. // Use "Send" method on the returned Request to send the API call to the service.
  122. // the "output" return value is not valid until after Send returns without error.
  123. //
  124. // See AddPermission for more information on using the AddPermission
  125. // API call, and error handling.
  126. //
  127. // This method is useful when you want to inject custom logic or configuration
  128. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  129. //
  130. //
  131. // // Example sending a request using the AddPermissionRequest method.
  132. // req, resp := client.AddPermissionRequest(params)
  133. //
  134. // err := req.Send()
  135. // if err == nil { // resp is now filled
  136. // fmt.Println(resp)
  137. // }
  138. //
  139. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/AddPermission
  140. func (c *Lambda) AddPermissionRequest(input *AddPermissionInput) (req *request.Request, output *AddPermissionOutput) {
  141. op := &request.Operation{
  142. Name: opAddPermission,
  143. HTTPMethod: "POST",
  144. HTTPPath: "/2015-03-31/functions/{FunctionName}/policy",
  145. }
  146. if input == nil {
  147. input = &AddPermissionInput{}
  148. }
  149. output = &AddPermissionOutput{}
  150. req = c.newRequest(op, input, output)
  151. return
  152. }
  153. // AddPermission API operation for AWS Lambda.
  154. //
  155. // Grants an AWS service or another account permission to use a function. You
  156. // can apply the policy at the function level, or specify a qualifier to restrict
  157. // access to a single version or alias. If you use a qualifier, the invoker
  158. // must use the full Amazon Resource Name (ARN) of that version or alias to
  159. // invoke the function.
  160. //
  161. // To grant permission to another account, specify the account ID as the Principal.
  162. // For AWS services, the principal is a domain-style identifier defined by the
  163. // service, like s3.amazonaws.com or sns.amazonaws.com. For AWS services, you
  164. // can also specify the ARN or owning account of the associated resource as
  165. // the SourceArn or SourceAccount. If you grant permission to a service principal
  166. // without specifying the source, other accounts could potentially configure
  167. // resources in their account to invoke your Lambda function.
  168. //
  169. // This action adds a statement to a resource-based permission policy for the
  170. // function. For more information about function policies, see Lambda Function
  171. // Policies (http://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html).
  172. //
  173. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  174. // with awserr.Error's Code and Message methods to get detailed information about
  175. // the error.
  176. //
  177. // See the AWS API reference guide for AWS Lambda's
  178. // API operation AddPermission for usage and error information.
  179. //
  180. // Returned Error Codes:
  181. // * ErrCodeServiceException "ServiceException"
  182. // The AWS Lambda service encountered an internal error.
  183. //
  184. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  185. // The resource (for example, a Lambda function or access policy statement)
  186. // specified in the request does not exist.
  187. //
  188. // * ErrCodeResourceConflictException "ResourceConflictException"
  189. // The resource already exists.
  190. //
  191. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  192. // One of the parameters in the request is invalid. For example, if you provided
  193. // an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
  194. // API, that AWS Lambda is unable to assume you will get this exception.
  195. //
  196. // * ErrCodePolicyLengthExceededException "PolicyLengthExceededException"
  197. // Lambda function access policy is limited to 20 KB.
  198. //
  199. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  200. // Request throughput limit exceeded.
  201. //
  202. // * ErrCodePreconditionFailedException "PreconditionFailedException"
  203. // The RevisionId provided does not match the latest RevisionId for the Lambda
  204. // function or alias. Call the GetFunction or the GetAlias API to retrieve the
  205. // latest RevisionId for your resource.
  206. //
  207. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/AddPermission
  208. func (c *Lambda) AddPermission(input *AddPermissionInput) (*AddPermissionOutput, error) {
  209. req, out := c.AddPermissionRequest(input)
  210. return out, req.Send()
  211. }
  212. // AddPermissionWithContext is the same as AddPermission with the addition of
  213. // the ability to pass a context and additional request options.
  214. //
  215. // See AddPermission for details on how to use this API operation.
  216. //
  217. // The context must be non-nil and will be used for request cancellation. If
  218. // the context is nil a panic will occur. In the future the SDK may create
  219. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  220. // for more information on using Contexts.
  221. func (c *Lambda) AddPermissionWithContext(ctx aws.Context, input *AddPermissionInput, opts ...request.Option) (*AddPermissionOutput, error) {
  222. req, out := c.AddPermissionRequest(input)
  223. req.SetContext(ctx)
  224. req.ApplyOptions(opts...)
  225. return out, req.Send()
  226. }
  227. const opCreateAlias = "CreateAlias"
  228. // CreateAliasRequest generates a "aws/request.Request" representing the
  229. // client's request for the CreateAlias operation. The "output" return
  230. // value will be populated with the request's response once the request completes
  231. // successfully.
  232. //
  233. // Use "Send" method on the returned Request to send the API call to the service.
  234. // the "output" return value is not valid until after Send returns without error.
  235. //
  236. // See CreateAlias for more information on using the CreateAlias
  237. // API call, and error handling.
  238. //
  239. // This method is useful when you want to inject custom logic or configuration
  240. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  241. //
  242. //
  243. // // Example sending a request using the CreateAliasRequest method.
  244. // req, resp := client.CreateAliasRequest(params)
  245. //
  246. // err := req.Send()
  247. // if err == nil { // resp is now filled
  248. // fmt.Println(resp)
  249. // }
  250. //
  251. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/CreateAlias
  252. func (c *Lambda) CreateAliasRequest(input *CreateAliasInput) (req *request.Request, output *AliasConfiguration) {
  253. op := &request.Operation{
  254. Name: opCreateAlias,
  255. HTTPMethod: "POST",
  256. HTTPPath: "/2015-03-31/functions/{FunctionName}/aliases",
  257. }
  258. if input == nil {
  259. input = &CreateAliasInput{}
  260. }
  261. output = &AliasConfiguration{}
  262. req = c.newRequest(op, input, output)
  263. return
  264. }
  265. // CreateAlias API operation for AWS Lambda.
  266. //
  267. // Creates an alias (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html)
  268. // for a Lambda function version. Use aliases to provide clients with a function
  269. // identifier that you can update to invoke a different version.
  270. //
  271. // You can also map an alias to split invocation requests between two versions.
  272. // Use the RoutingConfig parameter to specify a second version and the percentage
  273. // of invocation requests that it receives.
  274. //
  275. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  276. // with awserr.Error's Code and Message methods to get detailed information about
  277. // the error.
  278. //
  279. // See the AWS API reference guide for AWS Lambda's
  280. // API operation CreateAlias for usage and error information.
  281. //
  282. // Returned Error Codes:
  283. // * ErrCodeServiceException "ServiceException"
  284. // The AWS Lambda service encountered an internal error.
  285. //
  286. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  287. // The resource (for example, a Lambda function or access policy statement)
  288. // specified in the request does not exist.
  289. //
  290. // * ErrCodeResourceConflictException "ResourceConflictException"
  291. // The resource already exists.
  292. //
  293. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  294. // One of the parameters in the request is invalid. For example, if you provided
  295. // an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
  296. // API, that AWS Lambda is unable to assume you will get this exception.
  297. //
  298. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  299. // Request throughput limit exceeded.
  300. //
  301. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/CreateAlias
  302. func (c *Lambda) CreateAlias(input *CreateAliasInput) (*AliasConfiguration, error) {
  303. req, out := c.CreateAliasRequest(input)
  304. return out, req.Send()
  305. }
  306. // CreateAliasWithContext is the same as CreateAlias with the addition of
  307. // the ability to pass a context and additional request options.
  308. //
  309. // See CreateAlias for details on how to use this API operation.
  310. //
  311. // The context must be non-nil and will be used for request cancellation. If
  312. // the context is nil a panic will occur. In the future the SDK may create
  313. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  314. // for more information on using Contexts.
  315. func (c *Lambda) CreateAliasWithContext(ctx aws.Context, input *CreateAliasInput, opts ...request.Option) (*AliasConfiguration, error) {
  316. req, out := c.CreateAliasRequest(input)
  317. req.SetContext(ctx)
  318. req.ApplyOptions(opts...)
  319. return out, req.Send()
  320. }
  321. const opCreateEventSourceMapping = "CreateEventSourceMapping"
  322. // CreateEventSourceMappingRequest generates a "aws/request.Request" representing the
  323. // client's request for the CreateEventSourceMapping operation. The "output" return
  324. // value will be populated with the request's response once the request completes
  325. // successfully.
  326. //
  327. // Use "Send" method on the returned Request to send the API call to the service.
  328. // the "output" return value is not valid until after Send returns without error.
  329. //
  330. // See CreateEventSourceMapping for more information on using the CreateEventSourceMapping
  331. // API call, and error handling.
  332. //
  333. // This method is useful when you want to inject custom logic or configuration
  334. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  335. //
  336. //
  337. // // Example sending a request using the CreateEventSourceMappingRequest method.
  338. // req, resp := client.CreateEventSourceMappingRequest(params)
  339. //
  340. // err := req.Send()
  341. // if err == nil { // resp is now filled
  342. // fmt.Println(resp)
  343. // }
  344. //
  345. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/CreateEventSourceMapping
  346. func (c *Lambda) CreateEventSourceMappingRequest(input *CreateEventSourceMappingInput) (req *request.Request, output *EventSourceMappingConfiguration) {
  347. op := &request.Operation{
  348. Name: opCreateEventSourceMapping,
  349. HTTPMethod: "POST",
  350. HTTPPath: "/2015-03-31/event-source-mappings/",
  351. }
  352. if input == nil {
  353. input = &CreateEventSourceMappingInput{}
  354. }
  355. output = &EventSourceMappingConfiguration{}
  356. req = c.newRequest(op, input, output)
  357. return
  358. }
  359. // CreateEventSourceMapping API operation for AWS Lambda.
  360. //
  361. // Creates a mapping between an event source and an AWS Lambda function. Lambda
  362. // reads items from the event source and triggers the function.
  363. //
  364. // For details about each event source type, see the following topics.
  365. //
  366. // * Using AWS Lambda with Amazon Kinesis (http://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html)
  367. //
  368. // * Using AWS Lambda with Amazon SQS (http://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html)
  369. //
  370. // * Using AWS Lambda with Amazon DynamoDB (http://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html)
  371. //
  372. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  373. // with awserr.Error's Code and Message methods to get detailed information about
  374. // the error.
  375. //
  376. // See the AWS API reference guide for AWS Lambda's
  377. // API operation CreateEventSourceMapping for usage and error information.
  378. //
  379. // Returned Error Codes:
  380. // * ErrCodeServiceException "ServiceException"
  381. // The AWS Lambda service encountered an internal error.
  382. //
  383. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  384. // One of the parameters in the request is invalid. For example, if you provided
  385. // an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
  386. // API, that AWS Lambda is unable to assume you will get this exception.
  387. //
  388. // * ErrCodeResourceConflictException "ResourceConflictException"
  389. // The resource already exists.
  390. //
  391. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  392. // Request throughput limit exceeded.
  393. //
  394. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  395. // The resource (for example, a Lambda function or access policy statement)
  396. // specified in the request does not exist.
  397. //
  398. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/CreateEventSourceMapping
  399. func (c *Lambda) CreateEventSourceMapping(input *CreateEventSourceMappingInput) (*EventSourceMappingConfiguration, error) {
  400. req, out := c.CreateEventSourceMappingRequest(input)
  401. return out, req.Send()
  402. }
  403. // CreateEventSourceMappingWithContext is the same as CreateEventSourceMapping with the addition of
  404. // the ability to pass a context and additional request options.
  405. //
  406. // See CreateEventSourceMapping for details on how to use this API operation.
  407. //
  408. // The context must be non-nil and will be used for request cancellation. If
  409. // the context is nil a panic will occur. In the future the SDK may create
  410. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  411. // for more information on using Contexts.
  412. func (c *Lambda) CreateEventSourceMappingWithContext(ctx aws.Context, input *CreateEventSourceMappingInput, opts ...request.Option) (*EventSourceMappingConfiguration, error) {
  413. req, out := c.CreateEventSourceMappingRequest(input)
  414. req.SetContext(ctx)
  415. req.ApplyOptions(opts...)
  416. return out, req.Send()
  417. }
  418. const opCreateFunction = "CreateFunction"
  419. // CreateFunctionRequest generates a "aws/request.Request" representing the
  420. // client's request for the CreateFunction operation. The "output" return
  421. // value will be populated with the request's response once the request completes
  422. // successfully.
  423. //
  424. // Use "Send" method on the returned Request to send the API call to the service.
  425. // the "output" return value is not valid until after Send returns without error.
  426. //
  427. // See CreateFunction for more information on using the CreateFunction
  428. // API call, and error handling.
  429. //
  430. // This method is useful when you want to inject custom logic or configuration
  431. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  432. //
  433. //
  434. // // Example sending a request using the CreateFunctionRequest method.
  435. // req, resp := client.CreateFunctionRequest(params)
  436. //
  437. // err := req.Send()
  438. // if err == nil { // resp is now filled
  439. // fmt.Println(resp)
  440. // }
  441. //
  442. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/CreateFunction
  443. func (c *Lambda) CreateFunctionRequest(input *CreateFunctionInput) (req *request.Request, output *FunctionConfiguration) {
  444. op := &request.Operation{
  445. Name: opCreateFunction,
  446. HTTPMethod: "POST",
  447. HTTPPath: "/2015-03-31/functions",
  448. }
  449. if input == nil {
  450. input = &CreateFunctionInput{}
  451. }
  452. output = &FunctionConfiguration{}
  453. req = c.newRequest(op, input, output)
  454. return
  455. }
  456. // CreateFunction API operation for AWS Lambda.
  457. //
  458. // Creates a Lambda function. To create a function, you need a deployment package
  459. // (http://docs.aws.amazon.com/lambda/latest/dg/deployment-package-v2.html)
  460. // and an execution role (http://docs.aws.amazon.com/lambda/latest/dg/intro-permission-model.html#lambda-intro-execution-role).
  461. // The deployment package contains your function code. The execution role grants
  462. // the function permission to use AWS services such as Amazon CloudWatch Logs
  463. // for log streaming and AWS X-Ray for request tracing.
  464. //
  465. // A function has an unpublished version, and can have published versions and
  466. // aliases. A published version is a snapshot of your function code and configuration
  467. // that can not be changed. An alias is a named resource that maps to a version,
  468. // and can be changed to map to a different version. Use the Publish parameter
  469. // to create version 1 of your function from its initial configuration.
  470. //
  471. // The other parameters let you configure version-specific and function-level
  472. // settings. You can modify version-specific settings later with UpdateFunctionConfiguration.
  473. // Function-level settings apply to both the unpublished and published versions
  474. // of the function and include tags (TagResource) and per-function concurrency
  475. // limits (PutFunctionConcurrency).
  476. //
  477. // If another account or a AWS service invokes your function, use AddPermission
  478. // to grant permission by creating a resource-based IAM policy. You can grant
  479. // permissions at the function level, on a version, or on an alias.
  480. //
  481. // To invoke your function directly, use Invoke. To invoke your function in
  482. // response to events in other AWS services, create an event source mapping
  483. // (CreateEventSourceMapping), or configure a function trigger in the other
  484. // service. For more information, see Invoking Functions (http://docs.aws.amazon.com/lambda/latest/dg/invoking-lambda-functions.html).
  485. //
  486. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  487. // with awserr.Error's Code and Message methods to get detailed information about
  488. // the error.
  489. //
  490. // See the AWS API reference guide for AWS Lambda's
  491. // API operation CreateFunction for usage and error information.
  492. //
  493. // Returned Error Codes:
  494. // * ErrCodeServiceException "ServiceException"
  495. // The AWS Lambda service encountered an internal error.
  496. //
  497. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  498. // One of the parameters in the request is invalid. For example, if you provided
  499. // an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
  500. // API, that AWS Lambda is unable to assume you will get this exception.
  501. //
  502. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  503. // The resource (for example, a Lambda function or access policy statement)
  504. // specified in the request does not exist.
  505. //
  506. // * ErrCodeResourceConflictException "ResourceConflictException"
  507. // The resource already exists.
  508. //
  509. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  510. // Request throughput limit exceeded.
  511. //
  512. // * ErrCodeCodeStorageExceededException "CodeStorageExceededException"
  513. // You have exceeded your maximum total code size per account. Limits (http://docs.aws.amazon.com/lambda/latest/dg/limits.html)
  514. //
  515. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/CreateFunction
  516. func (c *Lambda) CreateFunction(input *CreateFunctionInput) (*FunctionConfiguration, error) {
  517. req, out := c.CreateFunctionRequest(input)
  518. return out, req.Send()
  519. }
  520. // CreateFunctionWithContext is the same as CreateFunction with the addition of
  521. // the ability to pass a context and additional request options.
  522. //
  523. // See CreateFunction for details on how to use this API operation.
  524. //
  525. // The context must be non-nil and will be used for request cancellation. If
  526. // the context is nil a panic will occur. In the future the SDK may create
  527. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  528. // for more information on using Contexts.
  529. func (c *Lambda) CreateFunctionWithContext(ctx aws.Context, input *CreateFunctionInput, opts ...request.Option) (*FunctionConfiguration, error) {
  530. req, out := c.CreateFunctionRequest(input)
  531. req.SetContext(ctx)
  532. req.ApplyOptions(opts...)
  533. return out, req.Send()
  534. }
  535. const opDeleteAlias = "DeleteAlias"
  536. // DeleteAliasRequest generates a "aws/request.Request" representing the
  537. // client's request for the DeleteAlias operation. The "output" return
  538. // value will be populated with the request's response once the request completes
  539. // successfully.
  540. //
  541. // Use "Send" method on the returned Request to send the API call to the service.
  542. // the "output" return value is not valid until after Send returns without error.
  543. //
  544. // See DeleteAlias for more information on using the DeleteAlias
  545. // API call, and error handling.
  546. //
  547. // This method is useful when you want to inject custom logic or configuration
  548. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  549. //
  550. //
  551. // // Example sending a request using the DeleteAliasRequest method.
  552. // req, resp := client.DeleteAliasRequest(params)
  553. //
  554. // err := req.Send()
  555. // if err == nil { // resp is now filled
  556. // fmt.Println(resp)
  557. // }
  558. //
  559. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteAlias
  560. func (c *Lambda) DeleteAliasRequest(input *DeleteAliasInput) (req *request.Request, output *DeleteAliasOutput) {
  561. op := &request.Operation{
  562. Name: opDeleteAlias,
  563. HTTPMethod: "DELETE",
  564. HTTPPath: "/2015-03-31/functions/{FunctionName}/aliases/{Name}",
  565. }
  566. if input == nil {
  567. input = &DeleteAliasInput{}
  568. }
  569. output = &DeleteAliasOutput{}
  570. req = c.newRequest(op, input, output)
  571. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  572. return
  573. }
  574. // DeleteAlias API operation for AWS Lambda.
  575. //
  576. // Deletes a Lambda function alias (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).
  577. //
  578. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  579. // with awserr.Error's Code and Message methods to get detailed information about
  580. // the error.
  581. //
  582. // See the AWS API reference guide for AWS Lambda's
  583. // API operation DeleteAlias for usage and error information.
  584. //
  585. // Returned Error Codes:
  586. // * ErrCodeServiceException "ServiceException"
  587. // The AWS Lambda service encountered an internal error.
  588. //
  589. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  590. // One of the parameters in the request is invalid. For example, if you provided
  591. // an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
  592. // API, that AWS Lambda is unable to assume you will get this exception.
  593. //
  594. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  595. // Request throughput limit exceeded.
  596. //
  597. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteAlias
  598. func (c *Lambda) DeleteAlias(input *DeleteAliasInput) (*DeleteAliasOutput, error) {
  599. req, out := c.DeleteAliasRequest(input)
  600. return out, req.Send()
  601. }
  602. // DeleteAliasWithContext is the same as DeleteAlias with the addition of
  603. // the ability to pass a context and additional request options.
  604. //
  605. // See DeleteAlias for details on how to use this API operation.
  606. //
  607. // The context must be non-nil and will be used for request cancellation. If
  608. // the context is nil a panic will occur. In the future the SDK may create
  609. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  610. // for more information on using Contexts.
  611. func (c *Lambda) DeleteAliasWithContext(ctx aws.Context, input *DeleteAliasInput, opts ...request.Option) (*DeleteAliasOutput, error) {
  612. req, out := c.DeleteAliasRequest(input)
  613. req.SetContext(ctx)
  614. req.ApplyOptions(opts...)
  615. return out, req.Send()
  616. }
  617. const opDeleteEventSourceMapping = "DeleteEventSourceMapping"
  618. // DeleteEventSourceMappingRequest generates a "aws/request.Request" representing the
  619. // client's request for the DeleteEventSourceMapping operation. The "output" return
  620. // value will be populated with the request's response once the request completes
  621. // successfully.
  622. //
  623. // Use "Send" method on the returned Request to send the API call to the service.
  624. // the "output" return value is not valid until after Send returns without error.
  625. //
  626. // See DeleteEventSourceMapping for more information on using the DeleteEventSourceMapping
  627. // API call, and error handling.
  628. //
  629. // This method is useful when you want to inject custom logic or configuration
  630. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  631. //
  632. //
  633. // // Example sending a request using the DeleteEventSourceMappingRequest method.
  634. // req, resp := client.DeleteEventSourceMappingRequest(params)
  635. //
  636. // err := req.Send()
  637. // if err == nil { // resp is now filled
  638. // fmt.Println(resp)
  639. // }
  640. //
  641. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteEventSourceMapping
  642. func (c *Lambda) DeleteEventSourceMappingRequest(input *DeleteEventSourceMappingInput) (req *request.Request, output *EventSourceMappingConfiguration) {
  643. op := &request.Operation{
  644. Name: opDeleteEventSourceMapping,
  645. HTTPMethod: "DELETE",
  646. HTTPPath: "/2015-03-31/event-source-mappings/{UUID}",
  647. }
  648. if input == nil {
  649. input = &DeleteEventSourceMappingInput{}
  650. }
  651. output = &EventSourceMappingConfiguration{}
  652. req = c.newRequest(op, input, output)
  653. return
  654. }
  655. // DeleteEventSourceMapping API operation for AWS Lambda.
  656. //
  657. // Deletes an event source mapping (http://docs.aws.amazon.com/lambda/latest/dg/intro-invocation-modes.html).
  658. // You can get the identifier of a mapping from the output of ListEventSourceMappings.
  659. //
  660. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  661. // with awserr.Error's Code and Message methods to get detailed information about
  662. // the error.
  663. //
  664. // See the AWS API reference guide for AWS Lambda's
  665. // API operation DeleteEventSourceMapping for usage and error information.
  666. //
  667. // Returned Error Codes:
  668. // * ErrCodeServiceException "ServiceException"
  669. // The AWS Lambda service encountered an internal error.
  670. //
  671. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  672. // The resource (for example, a Lambda function or access policy statement)
  673. // specified in the request does not exist.
  674. //
  675. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  676. // One of the parameters in the request is invalid. For example, if you provided
  677. // an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
  678. // API, that AWS Lambda is unable to assume you will get this exception.
  679. //
  680. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  681. // Request throughput limit exceeded.
  682. //
  683. // * ErrCodeResourceInUseException "ResourceInUseException"
  684. // The operation conflicts with the resource's availability. For example, you
  685. // attempted to update an EventSource Mapping in CREATING, or tried to delete
  686. // a EventSource mapping currently in the UPDATING state.
  687. //
  688. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteEventSourceMapping
  689. func (c *Lambda) DeleteEventSourceMapping(input *DeleteEventSourceMappingInput) (*EventSourceMappingConfiguration, error) {
  690. req, out := c.DeleteEventSourceMappingRequest(input)
  691. return out, req.Send()
  692. }
  693. // DeleteEventSourceMappingWithContext is the same as DeleteEventSourceMapping with the addition of
  694. // the ability to pass a context and additional request options.
  695. //
  696. // See DeleteEventSourceMapping for details on how to use this API operation.
  697. //
  698. // The context must be non-nil and will be used for request cancellation. If
  699. // the context is nil a panic will occur. In the future the SDK may create
  700. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  701. // for more information on using Contexts.
  702. func (c *Lambda) DeleteEventSourceMappingWithContext(ctx aws.Context, input *DeleteEventSourceMappingInput, opts ...request.Option) (*EventSourceMappingConfiguration, error) {
  703. req, out := c.DeleteEventSourceMappingRequest(input)
  704. req.SetContext(ctx)
  705. req.ApplyOptions(opts...)
  706. return out, req.Send()
  707. }
  708. const opDeleteFunction = "DeleteFunction"
  709. // DeleteFunctionRequest generates a "aws/request.Request" representing the
  710. // client's request for the DeleteFunction operation. The "output" return
  711. // value will be populated with the request's response once the request completes
  712. // successfully.
  713. //
  714. // Use "Send" method on the returned Request to send the API call to the service.
  715. // the "output" return value is not valid until after Send returns without error.
  716. //
  717. // See DeleteFunction for more information on using the DeleteFunction
  718. // API call, and error handling.
  719. //
  720. // This method is useful when you want to inject custom logic or configuration
  721. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  722. //
  723. //
  724. // // Example sending a request using the DeleteFunctionRequest method.
  725. // req, resp := client.DeleteFunctionRequest(params)
  726. //
  727. // err := req.Send()
  728. // if err == nil { // resp is now filled
  729. // fmt.Println(resp)
  730. // }
  731. //
  732. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteFunction
  733. func (c *Lambda) DeleteFunctionRequest(input *DeleteFunctionInput) (req *request.Request, output *DeleteFunctionOutput) {
  734. op := &request.Operation{
  735. Name: opDeleteFunction,
  736. HTTPMethod: "DELETE",
  737. HTTPPath: "/2015-03-31/functions/{FunctionName}",
  738. }
  739. if input == nil {
  740. input = &DeleteFunctionInput{}
  741. }
  742. output = &DeleteFunctionOutput{}
  743. req = c.newRequest(op, input, output)
  744. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  745. return
  746. }
  747. // DeleteFunction API operation for AWS Lambda.
  748. //
  749. // Deletes a Lambda function. To delete a specific function version, use the
  750. // Qualifier parameter. Otherwise, all versions and aliases are deleted.
  751. //
  752. // To delete Lambda event source mappings that invoke a function, use DeleteEventSourceMapping.
  753. // For AWS services and resources that invoke your function directly, delete
  754. // the trigger in the service where you originally configured it.
  755. //
  756. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  757. // with awserr.Error's Code and Message methods to get detailed information about
  758. // the error.
  759. //
  760. // See the AWS API reference guide for AWS Lambda's
  761. // API operation DeleteFunction for usage and error information.
  762. //
  763. // Returned Error Codes:
  764. // * ErrCodeServiceException "ServiceException"
  765. // The AWS Lambda service encountered an internal error.
  766. //
  767. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  768. // The resource (for example, a Lambda function or access policy statement)
  769. // specified in the request does not exist.
  770. //
  771. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  772. // Request throughput limit exceeded.
  773. //
  774. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  775. // One of the parameters in the request is invalid. For example, if you provided
  776. // an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
  777. // API, that AWS Lambda is unable to assume you will get this exception.
  778. //
  779. // * ErrCodeResourceConflictException "ResourceConflictException"
  780. // The resource already exists.
  781. //
  782. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteFunction
  783. func (c *Lambda) DeleteFunction(input *DeleteFunctionInput) (*DeleteFunctionOutput, error) {
  784. req, out := c.DeleteFunctionRequest(input)
  785. return out, req.Send()
  786. }
  787. // DeleteFunctionWithContext is the same as DeleteFunction with the addition of
  788. // the ability to pass a context and additional request options.
  789. //
  790. // See DeleteFunction for details on how to use this API operation.
  791. //
  792. // The context must be non-nil and will be used for request cancellation. If
  793. // the context is nil a panic will occur. In the future the SDK may create
  794. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  795. // for more information on using Contexts.
  796. func (c *Lambda) DeleteFunctionWithContext(ctx aws.Context, input *DeleteFunctionInput, opts ...request.Option) (*DeleteFunctionOutput, error) {
  797. req, out := c.DeleteFunctionRequest(input)
  798. req.SetContext(ctx)
  799. req.ApplyOptions(opts...)
  800. return out, req.Send()
  801. }
  802. const opDeleteFunctionConcurrency = "DeleteFunctionConcurrency"
  803. // DeleteFunctionConcurrencyRequest generates a "aws/request.Request" representing the
  804. // client's request for the DeleteFunctionConcurrency operation. The "output" return
  805. // value will be populated with the request's response once the request completes
  806. // successfully.
  807. //
  808. // Use "Send" method on the returned Request to send the API call to the service.
  809. // the "output" return value is not valid until after Send returns without error.
  810. //
  811. // See DeleteFunctionConcurrency for more information on using the DeleteFunctionConcurrency
  812. // API call, and error handling.
  813. //
  814. // This method is useful when you want to inject custom logic or configuration
  815. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  816. //
  817. //
  818. // // Example sending a request using the DeleteFunctionConcurrencyRequest method.
  819. // req, resp := client.DeleteFunctionConcurrencyRequest(params)
  820. //
  821. // err := req.Send()
  822. // if err == nil { // resp is now filled
  823. // fmt.Println(resp)
  824. // }
  825. //
  826. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteFunctionConcurrency
  827. func (c *Lambda) DeleteFunctionConcurrencyRequest(input *DeleteFunctionConcurrencyInput) (req *request.Request, output *DeleteFunctionConcurrencyOutput) {
  828. op := &request.Operation{
  829. Name: opDeleteFunctionConcurrency,
  830. HTTPMethod: "DELETE",
  831. HTTPPath: "/2017-10-31/functions/{FunctionName}/concurrency",
  832. }
  833. if input == nil {
  834. input = &DeleteFunctionConcurrencyInput{}
  835. }
  836. output = &DeleteFunctionConcurrencyOutput{}
  837. req = c.newRequest(op, input, output)
  838. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  839. return
  840. }
  841. // DeleteFunctionConcurrency API operation for AWS Lambda.
  842. //
  843. // Removes a concurrent execution limit from a function.
  844. //
  845. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  846. // with awserr.Error's Code and Message methods to get detailed information about
  847. // the error.
  848. //
  849. // See the AWS API reference guide for AWS Lambda's
  850. // API operation DeleteFunctionConcurrency for usage and error information.
  851. //
  852. // Returned Error Codes:
  853. // * ErrCodeServiceException "ServiceException"
  854. // The AWS Lambda service encountered an internal error.
  855. //
  856. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  857. // The resource (for example, a Lambda function or access policy statement)
  858. // specified in the request does not exist.
  859. //
  860. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  861. // Request throughput limit exceeded.
  862. //
  863. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  864. // One of the parameters in the request is invalid. For example, if you provided
  865. // an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
  866. // API, that AWS Lambda is unable to assume you will get this exception.
  867. //
  868. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteFunctionConcurrency
  869. func (c *Lambda) DeleteFunctionConcurrency(input *DeleteFunctionConcurrencyInput) (*DeleteFunctionConcurrencyOutput, error) {
  870. req, out := c.DeleteFunctionConcurrencyRequest(input)
  871. return out, req.Send()
  872. }
  873. // DeleteFunctionConcurrencyWithContext is the same as DeleteFunctionConcurrency with the addition of
  874. // the ability to pass a context and additional request options.
  875. //
  876. // See DeleteFunctionConcurrency for details on how to use this API operation.
  877. //
  878. // The context must be non-nil and will be used for request cancellation. If
  879. // the context is nil a panic will occur. In the future the SDK may create
  880. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  881. // for more information on using Contexts.
  882. func (c *Lambda) DeleteFunctionConcurrencyWithContext(ctx aws.Context, input *DeleteFunctionConcurrencyInput, opts ...request.Option) (*DeleteFunctionConcurrencyOutput, error) {
  883. req, out := c.DeleteFunctionConcurrencyRequest(input)
  884. req.SetContext(ctx)
  885. req.ApplyOptions(opts...)
  886. return out, req.Send()
  887. }
  888. const opDeleteLayerVersion = "DeleteLayerVersion"
  889. // DeleteLayerVersionRequest generates a "aws/request.Request" representing the
  890. // client's request for the DeleteLayerVersion operation. The "output" return
  891. // value will be populated with the request's response once the request completes
  892. // successfully.
  893. //
  894. // Use "Send" method on the returned Request to send the API call to the service.
  895. // the "output" return value is not valid until after Send returns without error.
  896. //
  897. // See DeleteLayerVersion for more information on using the DeleteLayerVersion
  898. // API call, and error handling.
  899. //
  900. // This method is useful when you want to inject custom logic or configuration
  901. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  902. //
  903. //
  904. // // Example sending a request using the DeleteLayerVersionRequest method.
  905. // req, resp := client.DeleteLayerVersionRequest(params)
  906. //
  907. // err := req.Send()
  908. // if err == nil { // resp is now filled
  909. // fmt.Println(resp)
  910. // }
  911. //
  912. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteLayerVersion
  913. func (c *Lambda) DeleteLayerVersionRequest(input *DeleteLayerVersionInput) (req *request.Request, output *DeleteLayerVersionOutput) {
  914. op := &request.Operation{
  915. Name: opDeleteLayerVersion,
  916. HTTPMethod: "DELETE",
  917. HTTPPath: "/2018-10-31/layers/{LayerName}/versions/{VersionNumber}",
  918. }
  919. if input == nil {
  920. input = &DeleteLayerVersionInput{}
  921. }
  922. output = &DeleteLayerVersionOutput{}
  923. req = c.newRequest(op, input, output)
  924. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  925. return
  926. }
  927. // DeleteLayerVersion API operation for AWS Lambda.
  928. //
  929. // Deletes a version of an AWS Lambda layer (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html).
  930. // Deleted versions can no longer be viewed or added to functions. To avoid
  931. // breaking functions, a copy of the version remains in Lambda until no functions
  932. // refer to it.
  933. //
  934. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  935. // with awserr.Error's Code and Message methods to get detailed information about
  936. // the error.
  937. //
  938. // See the AWS API reference guide for AWS Lambda's
  939. // API operation DeleteLayerVersion for usage and error information.
  940. //
  941. // Returned Error Codes:
  942. // * ErrCodeServiceException "ServiceException"
  943. // The AWS Lambda service encountered an internal error.
  944. //
  945. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  946. // Request throughput limit exceeded.
  947. //
  948. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteLayerVersion
  949. func (c *Lambda) DeleteLayerVersion(input *DeleteLayerVersionInput) (*DeleteLayerVersionOutput, error) {
  950. req, out := c.DeleteLayerVersionRequest(input)
  951. return out, req.Send()
  952. }
  953. // DeleteLayerVersionWithContext is the same as DeleteLayerVersion with the addition of
  954. // the ability to pass a context and additional request options.
  955. //
  956. // See DeleteLayerVersion for details on how to use this API operation.
  957. //
  958. // The context must be non-nil and will be used for request cancellation. If
  959. // the context is nil a panic will occur. In the future the SDK may create
  960. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  961. // for more information on using Contexts.
  962. func (c *Lambda) DeleteLayerVersionWithContext(ctx aws.Context, input *DeleteLayerVersionInput, opts ...request.Option) (*DeleteLayerVersionOutput, error) {
  963. req, out := c.DeleteLayerVersionRequest(input)
  964. req.SetContext(ctx)
  965. req.ApplyOptions(opts...)
  966. return out, req.Send()
  967. }
  968. const opGetAccountSettings = "GetAccountSettings"
  969. // GetAccountSettingsRequest generates a "aws/request.Request" representing the
  970. // client's request for the GetAccountSettings operation. The "output" return
  971. // value will be populated with the request's response once the request completes
  972. // successfully.
  973. //
  974. // Use "Send" method on the returned Request to send the API call to the service.
  975. // the "output" return value is not valid until after Send returns without error.
  976. //
  977. // See GetAccountSettings for more information on using the GetAccountSettings
  978. // API call, and error handling.
  979. //
  980. // This method is useful when you want to inject custom logic or configuration
  981. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  982. //
  983. //
  984. // // Example sending a request using the GetAccountSettingsRequest method.
  985. // req, resp := client.GetAccountSettingsRequest(params)
  986. //
  987. // err := req.Send()
  988. // if err == nil { // resp is now filled
  989. // fmt.Println(resp)
  990. // }
  991. //
  992. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetAccountSettings
  993. func (c *Lambda) GetAccountSettingsRequest(input *GetAccountSettingsInput) (req *request.Request, output *GetAccountSettingsOutput) {
  994. op := &request.Operation{
  995. Name: opGetAccountSettings,
  996. HTTPMethod: "GET",
  997. HTTPPath: "/2016-08-19/account-settings/",
  998. }
  999. if input == nil {
  1000. input = &GetAccountSettingsInput{}
  1001. }
  1002. output = &GetAccountSettingsOutput{}
  1003. req = c.newRequest(op, input, output)
  1004. return
  1005. }
  1006. // GetAccountSettings API operation for AWS Lambda.
  1007. //
  1008. // Retrieves details about your account's limits (http://docs.aws.amazon.com/lambda/latest/dg/limits.html)
  1009. // and usage in a region.
  1010. //
  1011. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1012. // with awserr.Error's Code and Message methods to get detailed information about
  1013. // the error.
  1014. //
  1015. // See the AWS API reference guide for AWS Lambda's
  1016. // API operation GetAccountSettings for usage and error information.
  1017. //
  1018. // Returned Error Codes:
  1019. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  1020. // Request throughput limit exceeded.
  1021. //
  1022. // * ErrCodeServiceException "ServiceException"
  1023. // The AWS Lambda service encountered an internal error.
  1024. //
  1025. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetAccountSettings
  1026. func (c *Lambda) GetAccountSettings(input *GetAccountSettingsInput) (*GetAccountSettingsOutput, error) {
  1027. req, out := c.GetAccountSettingsRequest(input)
  1028. return out, req.Send()
  1029. }
  1030. // GetAccountSettingsWithContext is the same as GetAccountSettings with the addition of
  1031. // the ability to pass a context and additional request options.
  1032. //
  1033. // See GetAccountSettings for details on how to use this API operation.
  1034. //
  1035. // The context must be non-nil and will be used for request cancellation. If
  1036. // the context is nil a panic will occur. In the future the SDK may create
  1037. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1038. // for more information on using Contexts.
  1039. func (c *Lambda) GetAccountSettingsWithContext(ctx aws.Context, input *GetAccountSettingsInput, opts ...request.Option) (*GetAccountSettingsOutput, error) {
  1040. req, out := c.GetAccountSettingsRequest(input)
  1041. req.SetContext(ctx)
  1042. req.ApplyOptions(opts...)
  1043. return out, req.Send()
  1044. }
  1045. const opGetAlias = "GetAlias"
  1046. // GetAliasRequest generates a "aws/request.Request" representing the
  1047. // client's request for the GetAlias operation. The "output" return
  1048. // value will be populated with the request's response once the request completes
  1049. // successfully.
  1050. //
  1051. // Use "Send" method on the returned Request to send the API call to the service.
  1052. // the "output" return value is not valid until after Send returns without error.
  1053. //
  1054. // See GetAlias for more information on using the GetAlias
  1055. // API call, and error handling.
  1056. //
  1057. // This method is useful when you want to inject custom logic or configuration
  1058. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1059. //
  1060. //
  1061. // // Example sending a request using the GetAliasRequest method.
  1062. // req, resp := client.GetAliasRequest(params)
  1063. //
  1064. // err := req.Send()
  1065. // if err == nil { // resp is now filled
  1066. // fmt.Println(resp)
  1067. // }
  1068. //
  1069. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetAlias
  1070. func (c *Lambda) GetAliasRequest(input *GetAliasInput) (req *request.Request, output *AliasConfiguration) {
  1071. op := &request.Operation{
  1072. Name: opGetAlias,
  1073. HTTPMethod: "GET",
  1074. HTTPPath: "/2015-03-31/functions/{FunctionName}/aliases/{Name}",
  1075. }
  1076. if input == nil {
  1077. input = &GetAliasInput{}
  1078. }
  1079. output = &AliasConfiguration{}
  1080. req = c.newRequest(op, input, output)
  1081. return
  1082. }
  1083. // GetAlias API operation for AWS Lambda.
  1084. //
  1085. // Returns details about a Lambda function alias (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).
  1086. //
  1087. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1088. // with awserr.Error's Code and Message methods to get detailed information about
  1089. // the error.
  1090. //
  1091. // See the AWS API reference guide for AWS Lambda's
  1092. // API operation GetAlias for usage and error information.
  1093. //
  1094. // Returned Error Codes:
  1095. // * ErrCodeServiceException "ServiceException"
  1096. // The AWS Lambda service encountered an internal error.
  1097. //
  1098. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1099. // The resource (for example, a Lambda function or access policy statement)
  1100. // specified in the request does not exist.
  1101. //
  1102. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  1103. // One of the parameters in the request is invalid. For example, if you provided
  1104. // an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
  1105. // API, that AWS Lambda is unable to assume you will get this exception.
  1106. //
  1107. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  1108. // Request throughput limit exceeded.
  1109. //
  1110. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetAlias
  1111. func (c *Lambda) GetAlias(input *GetAliasInput) (*AliasConfiguration, error) {
  1112. req, out := c.GetAliasRequest(input)
  1113. return out, req.Send()
  1114. }
  1115. // GetAliasWithContext is the same as GetAlias with the addition of
  1116. // the ability to pass a context and additional request options.
  1117. //
  1118. // See GetAlias for details on how to use this API operation.
  1119. //
  1120. // The context must be non-nil and will be used for request cancellation. If
  1121. // the context is nil a panic will occur. In the future the SDK may create
  1122. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1123. // for more information on using Contexts.
  1124. func (c *Lambda) GetAliasWithContext(ctx aws.Context, input *GetAliasInput, opts ...request.Option) (*AliasConfiguration, error) {
  1125. req, out := c.GetAliasRequest(input)
  1126. req.SetContext(ctx)
  1127. req.ApplyOptions(opts...)
  1128. return out, req.Send()
  1129. }
  1130. const opGetEventSourceMapping = "GetEventSourceMapping"
  1131. // GetEventSourceMappingRequest generates a "aws/request.Request" representing the
  1132. // client's request for the GetEventSourceMapping operation. The "output" return
  1133. // value will be populated with the request's response once the request completes
  1134. // successfully.
  1135. //
  1136. // Use "Send" method on the returned Request to send the API call to the service.
  1137. // the "output" return value is not valid until after Send returns without error.
  1138. //
  1139. // See GetEventSourceMapping for more information on using the GetEventSourceMapping
  1140. // API call, and error handling.
  1141. //
  1142. // This method is useful when you want to inject custom logic or configuration
  1143. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1144. //
  1145. //
  1146. // // Example sending a request using the GetEventSourceMappingRequest method.
  1147. // req, resp := client.GetEventSourceMappingRequest(params)
  1148. //
  1149. // err := req.Send()
  1150. // if err == nil { // resp is now filled
  1151. // fmt.Println(resp)
  1152. // }
  1153. //
  1154. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetEventSourceMapping
  1155. func (c *Lambda) GetEventSourceMappingRequest(input *GetEventSourceMappingInput) (req *request.Request, output *EventSourceMappingConfiguration) {
  1156. op := &request.Operation{
  1157. Name: opGetEventSourceMapping,
  1158. HTTPMethod: "GET",
  1159. HTTPPath: "/2015-03-31/event-source-mappings/{UUID}",
  1160. }
  1161. if input == nil {
  1162. input = &GetEventSourceMappingInput{}
  1163. }
  1164. output = &EventSourceMappingConfiguration{}
  1165. req = c.newRequest(op, input, output)
  1166. return
  1167. }
  1168. // GetEventSourceMapping API operation for AWS Lambda.
  1169. //
  1170. // Returns details about an event source mapping. You can get the identifier
  1171. // of a mapping from the output of ListEventSourceMappings.
  1172. //
  1173. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1174. // with awserr.Error's Code and Message methods to get detailed information about
  1175. // the error.
  1176. //
  1177. // See the AWS API reference guide for AWS Lambda's
  1178. // API operation GetEventSourceMapping for usage and error information.
  1179. //
  1180. // Returned Error Codes:
  1181. // * ErrCodeServiceException "ServiceException"
  1182. // The AWS Lambda service encountered an internal error.
  1183. //
  1184. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1185. // The resource (for example, a Lambda function or access policy statement)
  1186. // specified in the request does not exist.
  1187. //
  1188. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  1189. // One of the parameters in the request is invalid. For example, if you provided
  1190. // an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
  1191. // API, that AWS Lambda is unable to assume you will get this exception.
  1192. //
  1193. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  1194. // Request throughput limit exceeded.
  1195. //
  1196. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetEventSourceMapping
  1197. func (c *Lambda) GetEventSourceMapping(input *GetEventSourceMappingInput) (*EventSourceMappingConfiguration, error) {
  1198. req, out := c.GetEventSourceMappingRequest(input)
  1199. return out, req.Send()
  1200. }
  1201. // GetEventSourceMappingWithContext is the same as GetEventSourceMapping with the addition of
  1202. // the ability to pass a context and additional request options.
  1203. //
  1204. // See GetEventSourceMapping for details on how to use this API operation.
  1205. //
  1206. // The context must be non-nil and will be used for request cancellation. If
  1207. // the context is nil a panic will occur. In the future the SDK may create
  1208. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1209. // for more information on using Contexts.
  1210. func (c *Lambda) GetEventSourceMappingWithContext(ctx aws.Context, input *GetEventSourceMappingInput, opts ...request.Option) (*EventSourceMappingConfiguration, error) {
  1211. req, out := c.GetEventSourceMappingRequest(input)
  1212. req.SetContext(ctx)
  1213. req.ApplyOptions(opts...)
  1214. return out, req.Send()
  1215. }
  1216. const opGetFunction = "GetFunction"
  1217. // GetFunctionRequest generates a "aws/request.Request" representing the
  1218. // client's request for the GetFunction operation. The "output" return
  1219. // value will be populated with the request's response once the request completes
  1220. // successfully.
  1221. //
  1222. // Use "Send" method on the returned Request to send the API call to the service.
  1223. // the "output" return value is not valid until after Send returns without error.
  1224. //
  1225. // See GetFunction for more information on using the GetFunction
  1226. // API call, and error handling.
  1227. //
  1228. // This method is useful when you want to inject custom logic or configuration
  1229. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1230. //
  1231. //
  1232. // // Example sending a request using the GetFunctionRequest method.
  1233. // req, resp := client.GetFunctionRequest(params)
  1234. //
  1235. // err := req.Send()
  1236. // if err == nil { // resp is now filled
  1237. // fmt.Println(resp)
  1238. // }
  1239. //
  1240. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetFunction
  1241. func (c *Lambda) GetFunctionRequest(input *GetFunctionInput) (req *request.Request, output *GetFunctionOutput) {
  1242. op := &request.Operation{
  1243. Name: opGetFunction,
  1244. HTTPMethod: "GET",
  1245. HTTPPath: "/2015-03-31/functions/{FunctionName}",
  1246. }
  1247. if input == nil {
  1248. input = &GetFunctionInput{}
  1249. }
  1250. output = &GetFunctionOutput{}
  1251. req = c.newRequest(op, input, output)
  1252. return
  1253. }
  1254. // GetFunction API operation for AWS Lambda.
  1255. //
  1256. // Returns information about function or function version, with a link to download
  1257. // the deployment package that's valid for 10 minutes. If you specify a function
  1258. // version, only details specific to that version are returned.
  1259. //
  1260. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1261. // with awserr.Error's Code and Message methods to get detailed information about
  1262. // the error.
  1263. //
  1264. // See the AWS API reference guide for AWS Lambda's
  1265. // API operation GetFunction for usage and error information.
  1266. //
  1267. // Returned Error Codes:
  1268. // * ErrCodeServiceException "ServiceException"
  1269. // The AWS Lambda service encountered an internal error.
  1270. //
  1271. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1272. // The resource (for example, a Lambda function or access policy statement)
  1273. // specified in the request does not exist.
  1274. //
  1275. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  1276. // Request throughput limit exceeded.
  1277. //
  1278. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  1279. // One of the parameters in the request is invalid. For example, if you provided
  1280. // an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
  1281. // API, that AWS Lambda is unable to assume you will get this exception.
  1282. //
  1283. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetFunction
  1284. func (c *Lambda) GetFunction(input *GetFunctionInput) (*GetFunctionOutput, error) {
  1285. req, out := c.GetFunctionRequest(input)
  1286. return out, req.Send()
  1287. }
  1288. // GetFunctionWithContext is the same as GetFunction with the addition of
  1289. // the ability to pass a context and additional request options.
  1290. //
  1291. // See GetFunction for details on how to use this API operation.
  1292. //
  1293. // The context must be non-nil and will be used for request cancellation. If
  1294. // the context is nil a panic will occur. In the future the SDK may create
  1295. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1296. // for more information on using Contexts.
  1297. func (c *Lambda) GetFunctionWithContext(ctx aws.Context, input *GetFunctionInput, opts ...request.Option) (*GetFunctionOutput, error) {
  1298. req, out := c.GetFunctionRequest(input)
  1299. req.SetContext(ctx)
  1300. req.ApplyOptions(opts...)
  1301. return out, req.Send()
  1302. }
  1303. const opGetFunctionConfiguration = "GetFunctionConfiguration"
  1304. // GetFunctionConfigurationRequest generates a "aws/request.Request" representing the
  1305. // client's request for the GetFunctionConfiguration operation. The "output" return
  1306. // value will be populated with the request's response once the request completes
  1307. // successfully.
  1308. //
  1309. // Use "Send" method on the returned Request to send the API call to the service.
  1310. // the "output" return value is not valid until after Send returns without error.
  1311. //
  1312. // See GetFunctionConfiguration for more information on using the GetFunctionConfiguration
  1313. // API call, and error handling.
  1314. //
  1315. // This method is useful when you want to inject custom logic or configuration
  1316. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1317. //
  1318. //
  1319. // // Example sending a request using the GetFunctionConfigurationRequest method.
  1320. // req, resp := client.GetFunctionConfigurationRequest(params)
  1321. //
  1322. // err := req.Send()
  1323. // if err == nil { // resp is now filled
  1324. // fmt.Println(resp)
  1325. // }
  1326. //
  1327. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetFunctionConfiguration
  1328. func (c *Lambda) GetFunctionConfigurationRequest(input *GetFunctionConfigurationInput) (req *request.Request, output *FunctionConfiguration) {
  1329. op := &request.Operation{
  1330. Name: opGetFunctionConfiguration,
  1331. HTTPMethod: "GET",
  1332. HTTPPath: "/2015-03-31/functions/{FunctionName}/configuration",
  1333. }
  1334. if input == nil {
  1335. input = &GetFunctionConfigurationInput{}
  1336. }
  1337. output = &FunctionConfiguration{}
  1338. req = c.newRequest(op, input, output)
  1339. return
  1340. }
  1341. // GetFunctionConfiguration API operation for AWS Lambda.
  1342. //
  1343. // Returns a the version-specific settings of a Lambda function or version.
  1344. // The output includes only options that can vary between versions of a function.
  1345. // To modify these settings, use UpdateFunctionConfiguration.
  1346. //
  1347. // To get all of a function's details, including function-level settings, use
  1348. // GetFunction.
  1349. //
  1350. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1351. // with awserr.Error's Code and Message methods to get detailed information about
  1352. // the error.
  1353. //
  1354. // See the AWS API reference guide for AWS Lambda's
  1355. // API operation GetFunctionConfiguration for usage and error information.
  1356. //
  1357. // Returned Error Codes:
  1358. // * ErrCodeServiceException "ServiceException"
  1359. // The AWS Lambda service encountered an internal error.
  1360. //
  1361. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1362. // The resource (for example, a Lambda function or access policy statement)
  1363. // specified in the request does not exist.
  1364. //
  1365. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  1366. // Request throughput limit exceeded.
  1367. //
  1368. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  1369. // One of the parameters in the request is invalid. For example, if you provided
  1370. // an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
  1371. // API, that AWS Lambda is unable to assume you will get this exception.
  1372. //
  1373. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetFunctionConfiguration
  1374. func (c *Lambda) GetFunctionConfiguration(input *GetFunctionConfigurationInput) (*FunctionConfiguration, error) {
  1375. req, out := c.GetFunctionConfigurationRequest(input)
  1376. return out, req.Send()
  1377. }
  1378. // GetFunctionConfigurationWithContext is the same as GetFunctionConfiguration with the addition of
  1379. // the ability to pass a context and additional request options.
  1380. //
  1381. // See GetFunctionConfiguration for details on how to use this API operation.
  1382. //
  1383. // The context must be non-nil and will be used for request cancellation. If
  1384. // the context is nil a panic will occur. In the future the SDK may create
  1385. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1386. // for more information on using Contexts.
  1387. func (c *Lambda) GetFunctionConfigurationWithContext(ctx aws.Context, input *GetFunctionConfigurationInput, opts ...request.Option) (*FunctionConfiguration, error) {
  1388. req, out := c.GetFunctionConfigurationRequest(input)
  1389. req.SetContext(ctx)
  1390. req.ApplyOptions(opts...)
  1391. return out, req.Send()
  1392. }
  1393. const opGetLayerVersion = "GetLayerVersion"
  1394. // GetLayerVersionRequest generates a "aws/request.Request" representing the
  1395. // client's request for the GetLayerVersion operation. The "output" return
  1396. // value will be populated with the request's response once the request completes
  1397. // successfully.
  1398. //
  1399. // Use "Send" method on the returned Request to send the API call to the service.
  1400. // the "output" return value is not valid until after Send returns without error.
  1401. //
  1402. // See GetLayerVersion for more information on using the GetLayerVersion
  1403. // API call, and error handling.
  1404. //
  1405. // This method is useful when you want to inject custom logic or configuration
  1406. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1407. //
  1408. //
  1409. // // Example sending a request using the GetLayerVersionRequest method.
  1410. // req, resp := client.GetLayerVersionRequest(params)
  1411. //
  1412. // err := req.Send()
  1413. // if err == nil { // resp is now filled
  1414. // fmt.Println(resp)
  1415. // }
  1416. //
  1417. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetLayerVersion
  1418. func (c *Lambda) GetLayerVersionRequest(input *GetLayerVersionInput) (req *request.Request, output *GetLayerVersionOutput) {
  1419. op := &request.Operation{
  1420. Name: opGetLayerVersion,
  1421. HTTPMethod: "GET",
  1422. HTTPPath: "/2018-10-31/layers/{LayerName}/versions/{VersionNumber}",
  1423. }
  1424. if input == nil {
  1425. input = &GetLayerVersionInput{}
  1426. }
  1427. output = &GetLayerVersionOutput{}
  1428. req = c.newRequest(op, input, output)
  1429. return
  1430. }
  1431. // GetLayerVersion API operation for AWS Lambda.
  1432. //
  1433. // Returns information about a version of an AWS Lambda layer (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html),
  1434. // with a link to download the layer archive that's valid for 10 minutes.
  1435. //
  1436. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1437. // with awserr.Error's Code and Message methods to get detailed information about
  1438. // the error.
  1439. //
  1440. // See the AWS API reference guide for AWS Lambda's
  1441. // API operation GetLayerVersion for usage and error information.
  1442. //
  1443. // Returned Error Codes:
  1444. // * ErrCodeServiceException "ServiceException"
  1445. // The AWS Lambda service encountered an internal error.
  1446. //
  1447. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  1448. // One of the parameters in the request is invalid. For example, if you provided
  1449. // an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
  1450. // API, that AWS Lambda is unable to assume you will get this exception.
  1451. //
  1452. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  1453. // Request throughput limit exceeded.
  1454. //
  1455. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1456. // The resource (for example, a Lambda function or access policy statement)
  1457. // specified in the request does not exist.
  1458. //
  1459. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetLayerVersion
  1460. func (c *Lambda) GetLayerVersion(input *GetLayerVersionInput) (*GetLayerVersionOutput, error) {
  1461. req, out := c.GetLayerVersionRequest(input)
  1462. return out, req.Send()
  1463. }
  1464. // GetLayerVersionWithContext is the same as GetLayerVersion with the addition of
  1465. // the ability to pass a context and additional request options.
  1466. //
  1467. // See GetLayerVersion for details on how to use this API operation.
  1468. //
  1469. // The context must be non-nil and will be used for request cancellation. If
  1470. // the context is nil a panic will occur. In the future the SDK may create
  1471. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1472. // for more information on using Contexts.
  1473. func (c *Lambda) GetLayerVersionWithContext(ctx aws.Context, input *GetLayerVersionInput, opts ...request.Option) (*GetLayerVersionOutput, error) {
  1474. req, out := c.GetLayerVersionRequest(input)
  1475. req.SetContext(ctx)
  1476. req.ApplyOptions(opts...)
  1477. return out, req.Send()
  1478. }
  1479. const opGetLayerVersionPolicy = "GetLayerVersionPolicy"
  1480. // GetLayerVersionPolicyRequest generates a "aws/request.Request" representing the
  1481. // client's request for the GetLayerVersionPolicy operation. The "output" return
  1482. // value will be populated with the request's response once the request completes
  1483. // successfully.
  1484. //
  1485. // Use "Send" method on the returned Request to send the API call to the service.
  1486. // the "output" return value is not valid until after Send returns without error.
  1487. //
  1488. // See GetLayerVersionPolicy for more information on using the GetLayerVersionPolicy
  1489. // API call, and error handling.
  1490. //
  1491. // This method is useful when you want to inject custom logic or configuration
  1492. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1493. //
  1494. //
  1495. // // Example sending a request using the GetLayerVersionPolicyRequest method.
  1496. // req, resp := client.GetLayerVersionPolicyRequest(params)
  1497. //
  1498. // err := req.Send()
  1499. // if err == nil { // resp is now filled
  1500. // fmt.Println(resp)
  1501. // }
  1502. //
  1503. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetLayerVersionPolicy
  1504. func (c *Lambda) GetLayerVersionPolicyRequest(input *GetLayerVersionPolicyInput) (req *request.Request, output *GetLayerVersionPolicyOutput) {
  1505. op := &request.Operation{
  1506. Name: opGetLayerVersionPolicy,
  1507. HTTPMethod: "GET",
  1508. HTTPPath: "/2018-10-31/layers/{LayerName}/versions/{VersionNumber}/policy",
  1509. }
  1510. if input == nil {
  1511. input = &GetLayerVersionPolicyInput{}
  1512. }
  1513. output = &GetLayerVersionPolicyOutput{}
  1514. req = c.newRequest(op, input, output)
  1515. return
  1516. }
  1517. // GetLayerVersionPolicy API operation for AWS Lambda.
  1518. //
  1519. // Returns the permission policy for a version of an AWS Lambda layer (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html).
  1520. // For more information, see AddLayerVersionPermission.
  1521. //
  1522. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1523. // with awserr.Error's Code and Message methods to get detailed information about
  1524. // the error.
  1525. //
  1526. // See the AWS API reference guide for AWS Lambda's
  1527. // API operation GetLayerVersionPolicy for usage and error information.
  1528. //
  1529. // Returned Error Codes:
  1530. // * ErrCodeServiceException "ServiceException"
  1531. // The AWS Lambda service encountered an internal error.
  1532. //
  1533. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1534. // The resource (for example, a Lambda function or access policy statement)
  1535. // specified in the request does not exist.
  1536. //
  1537. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  1538. // Request throughput limit exceeded.
  1539. //
  1540. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  1541. // One of the parameters in the request is invalid. For example, if you provided
  1542. // an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
  1543. // API, that AWS Lambda is unable to assume you will get this exception.
  1544. //
  1545. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetLayerVersionPolicy
  1546. func (c *Lambda) GetLayerVersionPolicy(input *GetLayerVersionPolicyInput) (*GetLayerVersionPolicyOutput, error) {
  1547. req, out := c.GetLayerVersionPolicyRequest(input)
  1548. return out, req.Send()
  1549. }
  1550. // GetLayerVersionPolicyWithContext is the same as GetLayerVersionPolicy with the addition of
  1551. // the ability to pass a context and additional request options.
  1552. //
  1553. // See GetLayerVersionPolicy for details on how to use this API operation.
  1554. //
  1555. // The context must be non-nil and will be used for request cancellation. If
  1556. // the context is nil a panic will occur. In the future the SDK may create
  1557. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1558. // for more information on using Contexts.
  1559. func (c *Lambda) GetLayerVersionPolicyWithContext(ctx aws.Context, input *GetLayerVersionPolicyInput, opts ...request.Option) (*GetLayerVersionPolicyOutput, error) {
  1560. req, out := c.GetLayerVersionPolicyRequest(input)
  1561. req.SetContext(ctx)
  1562. req.ApplyOptions(opts...)
  1563. return out, req.Send()
  1564. }
  1565. const opGetPolicy = "GetPolicy"
  1566. // GetPolicyRequest generates a "aws/request.Request" representing the
  1567. // client's request for the GetPolicy operation. The "output" return
  1568. // value will be populated with the request's response once the request completes
  1569. // successfully.
  1570. //
  1571. // Use "Send" method on the returned Request to send the API call to the service.
  1572. // the "output" return value is not valid until after Send returns without error.
  1573. //
  1574. // See GetPolicy for more information on using the GetPolicy
  1575. // API call, and error handling.
  1576. //
  1577. // This method is useful when you want to inject custom logic or configuration
  1578. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1579. //
  1580. //
  1581. // // Example sending a request using the GetPolicyRequest method.
  1582. // req, resp := client.GetPolicyRequest(params)
  1583. //
  1584. // err := req.Send()
  1585. // if err == nil { // resp is now filled
  1586. // fmt.Println(resp)
  1587. // }
  1588. //
  1589. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetPolicy
  1590. func (c *Lambda) GetPolicyRequest(input *GetPolicyInput) (req *request.Request, output *GetPolicyOutput) {
  1591. op := &request.Operation{
  1592. Name: opGetPolicy,
  1593. HTTPMethod: "GET",
  1594. HTTPPath: "/2015-03-31/functions/{FunctionName}/policy",
  1595. }
  1596. if input == nil {
  1597. input = &GetPolicyInput{}
  1598. }
  1599. output = &GetPolicyOutput{}
  1600. req = c.newRequest(op, input, output)
  1601. return
  1602. }
  1603. // GetPolicy API operation for AWS Lambda.
  1604. //
  1605. // Returns the resource-based IAM policy (http://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html)
  1606. // for a function, version, or alias.
  1607. //
  1608. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1609. // with awserr.Error's Code and Message methods to get detailed information about
  1610. // the error.
  1611. //
  1612. // See the AWS API reference guide for AWS Lambda's
  1613. // API operation GetPolicy for usage and error information.
  1614. //
  1615. // Returned Error Codes:
  1616. // * ErrCodeServiceException "ServiceException"
  1617. // The AWS Lambda service encountered an internal error.
  1618. //
  1619. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1620. // The resource (for example, a Lambda function or access policy statement)
  1621. // specified in the request does not exist.
  1622. //
  1623. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  1624. // Request throughput limit exceeded.
  1625. //
  1626. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  1627. // One of the parameters in the request is invalid. For example, if you provided
  1628. // an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
  1629. // API, that AWS Lambda is unable to assume you will get this exception.
  1630. //
  1631. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetPolicy
  1632. func (c *Lambda) GetPolicy(input *GetPolicyInput) (*GetPolicyOutput, error) {
  1633. req, out := c.GetPolicyRequest(input)
  1634. return out, req.Send()
  1635. }
  1636. // GetPolicyWithContext is the same as GetPolicy with the addition of
  1637. // the ability to pass a context and additional request options.
  1638. //
  1639. // See GetPolicy for details on how to use this API operation.
  1640. //
  1641. // The context must be non-nil and will be used for request cancellation. If
  1642. // the context is nil a panic will occur. In the future the SDK may create
  1643. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1644. // for more information on using Contexts.
  1645. func (c *Lambda) GetPolicyWithContext(ctx aws.Context, input *GetPolicyInput, opts ...request.Option) (*GetPolicyOutput, error) {
  1646. req, out := c.GetPolicyRequest(input)
  1647. req.SetContext(ctx)
  1648. req.ApplyOptions(opts...)
  1649. return out, req.Send()
  1650. }
  1651. const opInvoke = "Invoke"
  1652. // InvokeRequest generates a "aws/request.Request" representing the
  1653. // client's request for the Invoke operation. The "output" return
  1654. // value will be populated with the request's response once the request completes
  1655. // successfully.
  1656. //
  1657. // Use "Send" method on the returned Request to send the API call to the service.
  1658. // the "output" return value is not valid until after Send returns without error.
  1659. //
  1660. // See Invoke for more information on using the Invoke
  1661. // API call, and error handling.
  1662. //
  1663. // This method is useful when you want to inject custom logic or configuration
  1664. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1665. //
  1666. //
  1667. // // Example sending a request using the InvokeRequest method.
  1668. // req, resp := client.InvokeRequest(params)
  1669. //
  1670. // err := req.Send()
  1671. // if err == nil { // resp is now filled
  1672. // fmt.Println(resp)
  1673. // }
  1674. //
  1675. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/Invoke
  1676. func (c *Lambda) InvokeRequest(input *InvokeInput) (req *request.Request, output *InvokeOutput) {
  1677. op := &request.Operation{
  1678. Name: opInvoke,
  1679. HTTPMethod: "POST",
  1680. HTTPPath: "/2015-03-31/functions/{FunctionName}/invocations",
  1681. }
  1682. if input == nil {
  1683. input = &InvokeInput{}
  1684. }
  1685. output = &InvokeOutput{}
  1686. req = c.newRequest(op, input, output)
  1687. return
  1688. }
  1689. // Invoke API operation for AWS Lambda.
  1690. //
  1691. // Invokes a Lambda function. You can invoke a function synchronously and wait
  1692. // for the response, or asynchronously. To invoke a function asynchronously,
  1693. // set InvocationType to Event.
  1694. //
  1695. // For synchronous invocation, details about the function response, including
  1696. // errors, are included in the response body and headers. For either invocation
  1697. // type, you can find more information in the execution log (http://docs.aws.amazon.com/lambda/latest/dg/monitoring-functions.html)
  1698. // and trace (http://docs.aws.amazon.com/lambda/latest/dg/dlq.html). To record
  1699. // function errors for asynchronous invocations, configure your function with
  1700. // a dead letter queue (http://docs.aws.amazon.com/lambda/latest/dg/dlq.html).
  1701. //
  1702. // The status code in the API response does not reflect function errors. Error
  1703. // codes are reserved for errors that prevent your function from executing,
  1704. // such as permissions errors, limit errors (http://docs.aws.amazon.com/lambda/latest/dg/limits.html),
  1705. // or issues with your function's code and configuration. For example, Lambda
  1706. // returns TooManyRequestsException if executing the function would cause you
  1707. // to exceed a concurrency limit at either the account level (ConcurrentInvocationLimitExceeded)
  1708. // or function level (ReservedFunctionConcurrentInvocationLimitExceeded).
  1709. //
  1710. // For functions with a long timeout, your client may be disconnected during
  1711. // synchronous invocation while it waits for a response. Configure your HTTP
  1712. // client, SDK, firewall, proxy, or operating system to allow for long connections
  1713. // with timeout or keep-alive settings.
  1714. //
  1715. // This operation requires permission for the lambda:InvokeFunction action.
  1716. //
  1717. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1718. // with awserr.Error's Code and Message methods to get detailed information about
  1719. // the error.
  1720. //
  1721. // See the AWS API reference guide for AWS Lambda's
  1722. // API operation Invoke for usage and error information.
  1723. //
  1724. // Returned Error Codes:
  1725. // * ErrCodeServiceException "ServiceException"
  1726. // The AWS Lambda service encountered an internal error.
  1727. //
  1728. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1729. // The resource (for example, a Lambda function or access policy statement)
  1730. // specified in the request does not exist.
  1731. //
  1732. // * ErrCodeInvalidRequestContentException "InvalidRequestContentException"
  1733. // The request body could not be parsed as JSON.
  1734. //
  1735. // * ErrCodeRequestTooLargeException "RequestTooLargeException"
  1736. // The request payload exceeded the Invoke request body JSON input limit. For
  1737. // more information, see Limits (http://docs.aws.amazon.com/lambda/latest/dg/limits.html).
  1738. //
  1739. // * ErrCodeUnsupportedMediaTypeException "UnsupportedMediaTypeException"
  1740. // The content type of the Invoke request body is not JSON.
  1741. //
  1742. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  1743. // Request throughput limit exceeded.
  1744. //
  1745. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  1746. // One of the parameters in the request is invalid. For example, if you provided
  1747. // an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
  1748. // API, that AWS Lambda is unable to assume you will get this exception.
  1749. //
  1750. // * ErrCodeEC2UnexpectedException "EC2UnexpectedException"
  1751. // AWS Lambda received an unexpected EC2 client exception while setting up for
  1752. // the Lambda function.
  1753. //
  1754. // * ErrCodeSubnetIPAddressLimitReachedException "SubnetIPAddressLimitReachedException"
  1755. // AWS Lambda was not able to set up VPC access for the Lambda function because
  1756. // one or more configured subnets has no available IP addresses.
  1757. //
  1758. // * ErrCodeENILimitReachedException "ENILimitReachedException"
  1759. // AWS Lambda was not able to create an Elastic Network Interface (ENI) in the
  1760. // VPC, specified as part of Lambda function configuration, because the limit
  1761. // for network interfaces has been reached.
  1762. //
  1763. // * ErrCodeEC2ThrottledException "EC2ThrottledException"
  1764. // AWS Lambda was throttled by Amazon EC2 during Lambda function initialization
  1765. // using the execution role provided for the Lambda function.
  1766. //
  1767. // * ErrCodeEC2AccessDeniedException "EC2AccessDeniedException"
  1768. // Need additional permissions to configure VPC settings.
  1769. //
  1770. // * ErrCodeInvalidSubnetIDException "InvalidSubnetIDException"
  1771. // The Subnet ID provided in the Lambda function VPC configuration is invalid.
  1772. //
  1773. // * ErrCodeInvalidSecurityGroupIDException "InvalidSecurityGroupIDException"
  1774. // The Security Group ID provided in the Lambda function VPC configuration is
  1775. // invalid.
  1776. //
  1777. // * ErrCodeInvalidZipFileException "InvalidZipFileException"
  1778. // AWS Lambda could not unzip the deployment package.
  1779. //
  1780. // * ErrCodeKMSDisabledException "KMSDisabledException"
  1781. // Lambda was unable to decrypt the environment variables because the KMS key
  1782. // used is disabled. Check the Lambda function's KMS key settings.
  1783. //
  1784. // * ErrCodeKMSInvalidStateException "KMSInvalidStateException"
  1785. // Lambda was unable to decrypt the environment variables because the KMS key
  1786. // used is in an invalid state for Decrypt. Check the function's KMS key settings.
  1787. //
  1788. // * ErrCodeKMSAccessDeniedException "KMSAccessDeniedException"
  1789. // Lambda was unable to decrypt the environment variables because KMS access
  1790. // was denied. Check the Lambda function's KMS permissions.
  1791. //
  1792. // * ErrCodeKMSNotFoundException "KMSNotFoundException"
  1793. // Lambda was unable to decrypt the environment variables because the KMS key
  1794. // was not found. Check the function's KMS key settings.
  1795. //
  1796. // * ErrCodeInvalidRuntimeException "InvalidRuntimeException"
  1797. // The runtime or runtime version specified is not supported.
  1798. //
  1799. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/Invoke
  1800. func (c *Lambda) Invoke(input *InvokeInput) (*InvokeOutput, error) {
  1801. req, out := c.InvokeRequest(input)
  1802. return out, req.Send()
  1803. }
  1804. // InvokeWithContext is the same as Invoke with the addition of
  1805. // the ability to pass a context and additional request options.
  1806. //
  1807. // See Invoke for details on how to use this API operation.
  1808. //
  1809. // The context must be non-nil and will be used for request cancellation. If
  1810. // the context is nil a panic will occur. In the future the SDK may create
  1811. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1812. // for more information on using Contexts.
  1813. func (c *Lambda) InvokeWithContext(ctx aws.Context, input *InvokeInput, opts ...request.Option) (*InvokeOutput, error) {
  1814. req, out := c.InvokeRequest(input)
  1815. req.SetContext(ctx)
  1816. req.ApplyOptions(opts...)
  1817. return out, req.Send()
  1818. }
  1819. const opInvokeAsync = "InvokeAsync"
  1820. // InvokeAsyncRequest generates a "aws/request.Request" representing the
  1821. // client's request for the InvokeAsync operation. The "output" return
  1822. // value will be populated with the request's response once the request completes
  1823. // successfully.
  1824. //
  1825. // Use "Send" method on the returned Request to send the API call to the service.
  1826. // the "output" return value is not valid until after Send returns without error.
  1827. //
  1828. // See InvokeAsync for more information on using the InvokeAsync
  1829. // API call, and error handling.
  1830. //
  1831. // This method is useful when you want to inject custom logic or configuration
  1832. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1833. //
  1834. //
  1835. // // Example sending a request using the InvokeAsyncRequest method.
  1836. // req, resp := client.InvokeAsyncRequest(params)
  1837. //
  1838. // err := req.Send()
  1839. // if err == nil { // resp is now filled
  1840. // fmt.Println(resp)
  1841. // }
  1842. //
  1843. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/InvokeAsync
  1844. //
  1845. // Deprecated: InvokeAsync has been deprecated
  1846. func (c *Lambda) InvokeAsyncRequest(input *InvokeAsyncInput) (req *request.Request, output *InvokeAsyncOutput) {
  1847. if c.Client.Config.Logger != nil {
  1848. c.Client.Config.Logger.Log("This operation, InvokeAsync, has been deprecated")
  1849. }
  1850. op := &request.Operation{
  1851. Name: opInvokeAsync,
  1852. HTTPMethod: "POST",
  1853. HTTPPath: "/2014-11-13/functions/{FunctionName}/invoke-async/",
  1854. }
  1855. if input == nil {
  1856. input = &InvokeAsyncInput{}
  1857. }
  1858. output = &InvokeAsyncOutput{}
  1859. req = c.newRequest(op, input, output)
  1860. return
  1861. }
  1862. // InvokeAsync API operation for AWS Lambda.
  1863. //
  1864. // For asynchronous function invocation, use Invoke.
  1865. //
  1866. // Invokes a function asynchronously.
  1867. //
  1868. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1869. // with awserr.Error's Code and Message methods to get detailed information about
  1870. // the error.
  1871. //
  1872. // See the AWS API reference guide for AWS Lambda's
  1873. // API operation InvokeAsync for usage and error information.
  1874. //
  1875. // Returned Error Codes:
  1876. // * ErrCodeServiceException "ServiceException"
  1877. // The AWS Lambda service encountered an internal error.
  1878. //
  1879. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1880. // The resource (for example, a Lambda function or access policy statement)
  1881. // specified in the request does not exist.
  1882. //
  1883. // * ErrCodeInvalidRequestContentException "InvalidRequestContentException"
  1884. // The request body could not be parsed as JSON.
  1885. //
  1886. // * ErrCodeInvalidRuntimeException "InvalidRuntimeException"
  1887. // The runtime or runtime version specified is not supported.
  1888. //
  1889. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/InvokeAsync
  1890. //
  1891. // Deprecated: InvokeAsync has been deprecated
  1892. func (c *Lambda) InvokeAsync(input *InvokeAsyncInput) (*InvokeAsyncOutput, error) {
  1893. req, out := c.InvokeAsyncRequest(input)
  1894. return out, req.Send()
  1895. }
  1896. // InvokeAsyncWithContext is the same as InvokeAsync with the addition of
  1897. // the ability to pass a context and additional request options.
  1898. //
  1899. // See InvokeAsync for details on how to use this API operation.
  1900. //
  1901. // The context must be non-nil and will be used for request cancellation. If
  1902. // the context is nil a panic will occur. In the future the SDK may create
  1903. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1904. // for more information on using Contexts.
  1905. //
  1906. // Deprecated: InvokeAsyncWithContext has been deprecated
  1907. func (c *Lambda) InvokeAsyncWithContext(ctx aws.Context, input *InvokeAsyncInput, opts ...request.Option) (*InvokeAsyncOutput, error) {
  1908. req, out := c.InvokeAsyncRequest(input)
  1909. req.SetContext(ctx)
  1910. req.ApplyOptions(opts...)
  1911. return out, req.Send()
  1912. }
  1913. const opListAliases = "ListAliases"
  1914. // ListAliasesRequest generates a "aws/request.Request" representing the
  1915. // client's request for the ListAliases operation. The "output" return
  1916. // value will be populated with the request's response once the request completes
  1917. // successfully.
  1918. //
  1919. // Use "Send" method on the returned Request to send the API call to the service.
  1920. // the "output" return value is not valid until after Send returns without error.
  1921. //
  1922. // See ListAliases for more information on using the ListAliases
  1923. // API call, and error handling.
  1924. //
  1925. // This method is useful when you want to inject custom logic or configuration
  1926. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1927. //
  1928. //
  1929. // // Example sending a request using the ListAliasesRequest method.
  1930. // req, resp := client.ListAliasesRequest(params)
  1931. //
  1932. // err := req.Send()
  1933. // if err == nil { // resp is now filled
  1934. // fmt.Println(resp)
  1935. // }
  1936. //
  1937. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListAliases
  1938. func (c *Lambda) ListAliasesRequest(input *ListAliasesInput) (req *request.Request, output *ListAliasesOutput) {
  1939. op := &request.Operation{
  1940. Name: opListAliases,
  1941. HTTPMethod: "GET",
  1942. HTTPPath: "/2015-03-31/functions/{FunctionName}/aliases",
  1943. }
  1944. if input == nil {
  1945. input = &ListAliasesInput{}
  1946. }
  1947. output = &ListAliasesOutput{}
  1948. req = c.newRequest(op, input, output)
  1949. return
  1950. }
  1951. // ListAliases API operation for AWS Lambda.
  1952. //
  1953. // Returns a list of aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html)
  1954. // for a Lambda function.
  1955. //
  1956. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1957. // with awserr.Error's Code and Message methods to get detailed information about
  1958. // the error.
  1959. //
  1960. // See the AWS API reference guide for AWS Lambda's
  1961. // API operation ListAliases for usage and error information.
  1962. //
  1963. // Returned Error Codes:
  1964. // * ErrCodeServiceException "ServiceException"
  1965. // The AWS Lambda service encountered an internal error.
  1966. //
  1967. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1968. // The resource (for example, a Lambda function or access policy statement)
  1969. // specified in the request does not exist.
  1970. //
  1971. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  1972. // One of the parameters in the request is invalid. For example, if you provided
  1973. // an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
  1974. // API, that AWS Lambda is unable to assume you will get this exception.
  1975. //
  1976. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  1977. // Request throughput limit exceeded.
  1978. //
  1979. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListAliases
  1980. func (c *Lambda) ListAliases(input *ListAliasesInput) (*ListAliasesOutput, error) {
  1981. req, out := c.ListAliasesRequest(input)
  1982. return out, req.Send()
  1983. }
  1984. // ListAliasesWithContext is the same as ListAliases with the addition of
  1985. // the ability to pass a context and additional request options.
  1986. //
  1987. // See ListAliases for details on how to use this API operation.
  1988. //
  1989. // The context must be non-nil and will be used for request cancellation. If
  1990. // the context is nil a panic will occur. In the future the SDK may create
  1991. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1992. // for more information on using Contexts.
  1993. func (c *Lambda) ListAliasesWithContext(ctx aws.Context, input *ListAliasesInput, opts ...request.Option) (*ListAliasesOutput, error) {
  1994. req, out := c.ListAliasesRequest(input)
  1995. req.SetContext(ctx)
  1996. req.ApplyOptions(opts...)
  1997. return out, req.Send()
  1998. }
  1999. const opListEventSourceMappings = "ListEventSourceMappings"
  2000. // ListEventSourceMappingsRequest generates a "aws/request.Request" representing the
  2001. // client's request for the ListEventSourceMappings operation. The "output" return
  2002. // value will be populated with the request's response once the request completes
  2003. // successfully.
  2004. //
  2005. // Use "Send" method on the returned Request to send the API call to the service.
  2006. // the "output" return value is not valid until after Send returns without error.
  2007. //
  2008. // See ListEventSourceMappings for more information on using the ListEventSourceMappings
  2009. // API call, and error handling.
  2010. //
  2011. // This method is useful when you want to inject custom logic or configuration
  2012. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2013. //
  2014. //
  2015. // // Example sending a request using the ListEventSourceMappingsRequest method.
  2016. // req, resp := client.ListEventSourceMappingsRequest(params)
  2017. //
  2018. // err := req.Send()
  2019. // if err == nil { // resp is now filled
  2020. // fmt.Println(resp)
  2021. // }
  2022. //
  2023. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListEventSourceMappings
  2024. func (c *Lambda) ListEventSourceMappingsRequest(input *ListEventSourceMappingsInput) (req *request.Request, output *ListEventSourceMappingsOutput) {
  2025. op := &request.Operation{
  2026. Name: opListEventSourceMappings,
  2027. HTTPMethod: "GET",
  2028. HTTPPath: "/2015-03-31/event-source-mappings/",
  2029. Paginator: &request.Paginator{
  2030. InputTokens: []string{"Marker"},
  2031. OutputTokens: []string{"NextMarker"},
  2032. LimitToken: "MaxItems",
  2033. TruncationToken: "",
  2034. },
  2035. }
  2036. if input == nil {
  2037. input = &ListEventSourceMappingsInput{}
  2038. }
  2039. output = &ListEventSourceMappingsOutput{}
  2040. req = c.newRequest(op, input, output)
  2041. return
  2042. }
  2043. // ListEventSourceMappings API operation for AWS Lambda.
  2044. //
  2045. // Lists event source mappings. Specify an EventSourceArn to only show event
  2046. // source mappings for a single event source.
  2047. //
  2048. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2049. // with awserr.Error's Code and Message methods to get detailed information about
  2050. // the error.
  2051. //
  2052. // See the AWS API reference guide for AWS Lambda's
  2053. // API operation ListEventSourceMappings for usage and error information.
  2054. //
  2055. // Returned Error Codes:
  2056. // * ErrCodeServiceException "ServiceException"
  2057. // The AWS Lambda service encountered an internal error.
  2058. //
  2059. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  2060. // The resource (for example, a Lambda function or access policy statement)
  2061. // specified in the request does not exist.
  2062. //
  2063. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  2064. // One of the parameters in the request is invalid. For example, if you provided
  2065. // an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
  2066. // API, that AWS Lambda is unable to assume you will get this exception.
  2067. //
  2068. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  2069. // Request throughput limit exceeded.
  2070. //
  2071. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListEventSourceMappings
  2072. func (c *Lambda) ListEventSourceMappings(input *ListEventSourceMappingsInput) (*ListEventSourceMappingsOutput, error) {
  2073. req, out := c.ListEventSourceMappingsRequest(input)
  2074. return out, req.Send()
  2075. }
  2076. // ListEventSourceMappingsWithContext is the same as ListEventSourceMappings with the addition of
  2077. // the ability to pass a context and additional request options.
  2078. //
  2079. // See ListEventSourceMappings for details on how to use this API operation.
  2080. //
  2081. // The context must be non-nil and will be used for request cancellation. If
  2082. // the context is nil a panic will occur. In the future the SDK may create
  2083. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2084. // for more information on using Contexts.
  2085. func (c *Lambda) ListEventSourceMappingsWithContext(ctx aws.Context, input *ListEventSourceMappingsInput, opts ...request.Option) (*ListEventSourceMappingsOutput, error) {
  2086. req, out := c.ListEventSourceMappingsRequest(input)
  2087. req.SetContext(ctx)
  2088. req.ApplyOptions(opts...)
  2089. return out, req.Send()
  2090. }
  2091. // ListEventSourceMappingsPages iterates over the pages of a ListEventSourceMappings operation,
  2092. // calling the "fn" function with the response data for each page. To stop
  2093. // iterating, return false from the fn function.
  2094. //
  2095. // See ListEventSourceMappings method for more information on how to use this operation.
  2096. //
  2097. // Note: This operation can generate multiple requests to a service.
  2098. //
  2099. // // Example iterating over at most 3 pages of a ListEventSourceMappings operation.
  2100. // pageNum := 0
  2101. // err := client.ListEventSourceMappingsPages(params,
  2102. // func(page *ListEventSourceMappingsOutput, lastPage bool) bool {
  2103. // pageNum++
  2104. // fmt.Println(page)
  2105. // return pageNum <= 3
  2106. // })
  2107. //
  2108. func (c *Lambda) ListEventSourceMappingsPages(input *ListEventSourceMappingsInput, fn func(*ListEventSourceMappingsOutput, bool) bool) error {
  2109. return c.ListEventSourceMappingsPagesWithContext(aws.BackgroundContext(), input, fn)
  2110. }
  2111. // ListEventSourceMappingsPagesWithContext same as ListEventSourceMappingsPages except
  2112. // it takes a Context and allows setting request options on the pages.
  2113. //
  2114. // The context must be non-nil and will be used for request cancellation. If
  2115. // the context is nil a panic will occur. In the future the SDK may create
  2116. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2117. // for more information on using Contexts.
  2118. func (c *Lambda) ListEventSourceMappingsPagesWithContext(ctx aws.Context, input *ListEventSourceMappingsInput, fn func(*ListEventSourceMappingsOutput, bool) bool, opts ...request.Option) error {
  2119. p := request.Pagination{
  2120. NewRequest: func() (*request.Request, error) {
  2121. var inCpy *ListEventSourceMappingsInput
  2122. if input != nil {
  2123. tmp := *input
  2124. inCpy = &tmp
  2125. }
  2126. req, _ := c.ListEventSourceMappingsRequest(inCpy)
  2127. req.SetContext(ctx)
  2128. req.ApplyOptions(opts...)
  2129. return req, nil
  2130. },
  2131. }
  2132. cont := true
  2133. for p.Next() && cont {
  2134. cont = fn(p.Page().(*ListEventSourceMappingsOutput), !p.HasNextPage())
  2135. }
  2136. return p.Err()
  2137. }
  2138. const opListFunctions = "ListFunctions"
  2139. // ListFunctionsRequest generates a "aws/request.Request" representing the
  2140. // client's request for the ListFunctions operation. The "output" return
  2141. // value will be populated with the request's response once the request completes
  2142. // successfully.
  2143. //
  2144. // Use "Send" method on the returned Request to send the API call to the service.
  2145. // the "output" return value is not valid until after Send returns without error.
  2146. //
  2147. // See ListFunctions for more information on using the ListFunctions
  2148. // API call, and error handling.
  2149. //
  2150. // This method is useful when you want to inject custom logic or configuration
  2151. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2152. //
  2153. //
  2154. // // Example sending a request using the ListFunctionsRequest method.
  2155. // req, resp := client.ListFunctionsRequest(params)
  2156. //
  2157. // err := req.Send()
  2158. // if err == nil { // resp is now filled
  2159. // fmt.Println(resp)
  2160. // }
  2161. //
  2162. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListFunctions
  2163. func (c *Lambda) ListFunctionsRequest(input *ListFunctionsInput) (req *request.Request, output *ListFunctionsOutput) {
  2164. op := &request.Operation{
  2165. Name: opListFunctions,
  2166. HTTPMethod: "GET",
  2167. HTTPPath: "/2015-03-31/functions/",
  2168. Paginator: &request.Paginator{
  2169. InputTokens: []string{"Marker"},
  2170. OutputTokens: []string{"NextMarker"},
  2171. LimitToken: "MaxItems",
  2172. TruncationToken: "",
  2173. },
  2174. }
  2175. if input == nil {
  2176. input = &ListFunctionsInput{}
  2177. }
  2178. output = &ListFunctionsOutput{}
  2179. req = c.newRequest(op, input, output)
  2180. return
  2181. }
  2182. // ListFunctions API operation for AWS Lambda.
  2183. //
  2184. // Returns a list of Lambda functions, with the version-specific configuration
  2185. // of each.
  2186. //
  2187. // Set FunctionVersion to ALL to include all published versions of each function
  2188. // in addition to the unpublished version. To get more information about a function
  2189. // or version, use GetFunction.
  2190. //
  2191. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2192. // with awserr.Error's Code and Message methods to get detailed information about
  2193. // the error.
  2194. //
  2195. // See the AWS API reference guide for AWS Lambda's
  2196. // API operation ListFunctions for usage and error information.
  2197. //
  2198. // Returned Error Codes:
  2199. // * ErrCodeServiceException "ServiceException"
  2200. // The AWS Lambda service encountered an internal error.
  2201. //
  2202. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  2203. // Request throughput limit exceeded.
  2204. //
  2205. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  2206. // One of the parameters in the request is invalid. For example, if you provided
  2207. // an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
  2208. // API, that AWS Lambda is unable to assume you will get this exception.
  2209. //
  2210. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListFunctions
  2211. func (c *Lambda) ListFunctions(input *ListFunctionsInput) (*ListFunctionsOutput, error) {
  2212. req, out := c.ListFunctionsRequest(input)
  2213. return out, req.Send()
  2214. }
  2215. // ListFunctionsWithContext is the same as ListFunctions with the addition of
  2216. // the ability to pass a context and additional request options.
  2217. //
  2218. // See ListFunctions for details on how to use this API operation.
  2219. //
  2220. // The context must be non-nil and will be used for request cancellation. If
  2221. // the context is nil a panic will occur. In the future the SDK may create
  2222. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2223. // for more information on using Contexts.
  2224. func (c *Lambda) ListFunctionsWithContext(ctx aws.Context, input *ListFunctionsInput, opts ...request.Option) (*ListFunctionsOutput, error) {
  2225. req, out := c.ListFunctionsRequest(input)
  2226. req.SetContext(ctx)
  2227. req.ApplyOptions(opts...)
  2228. return out, req.Send()
  2229. }
  2230. // ListFunctionsPages iterates over the pages of a ListFunctions operation,
  2231. // calling the "fn" function with the response data for each page. To stop
  2232. // iterating, return false from the fn function.
  2233. //
  2234. // See ListFunctions method for more information on how to use this operation.
  2235. //
  2236. // Note: This operation can generate multiple requests to a service.
  2237. //
  2238. // // Example iterating over at most 3 pages of a ListFunctions operation.
  2239. // pageNum := 0
  2240. // err := client.ListFunctionsPages(params,
  2241. // func(page *ListFunctionsOutput, lastPage bool) bool {
  2242. // pageNum++
  2243. // fmt.Println(page)
  2244. // return pageNum <= 3
  2245. // })
  2246. //
  2247. func (c *Lambda) ListFunctionsPages(input *ListFunctionsInput, fn func(*ListFunctionsOutput, bool) bool) error {
  2248. return c.ListFunctionsPagesWithContext(aws.BackgroundContext(), input, fn)
  2249. }
  2250. // ListFunctionsPagesWithContext same as ListFunctionsPages except
  2251. // it takes a Context and allows setting request options on the pages.
  2252. //
  2253. // The context must be non-nil and will be used for request cancellation. If
  2254. // the context is nil a panic will occur. In the future the SDK may create
  2255. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2256. // for more information on using Contexts.
  2257. func (c *Lambda) ListFunctionsPagesWithContext(ctx aws.Context, input *ListFunctionsInput, fn func(*ListFunctionsOutput, bool) bool, opts ...request.Option) error {
  2258. p := request.Pagination{
  2259. NewRequest: func() (*request.Request, error) {
  2260. var inCpy *ListFunctionsInput
  2261. if input != nil {
  2262. tmp := *input
  2263. inCpy = &tmp
  2264. }
  2265. req, _ := c.ListFunctionsRequest(inCpy)
  2266. req.SetContext(ctx)
  2267. req.ApplyOptions(opts...)
  2268. return req, nil
  2269. },
  2270. }
  2271. cont := true
  2272. for p.Next() && cont {
  2273. cont = fn(p.Page().(*ListFunctionsOutput), !p.HasNextPage())
  2274. }
  2275. return p.Err()
  2276. }
  2277. const opListLayerVersions = "ListLayerVersions"
  2278. // ListLayerVersionsRequest generates a "aws/request.Request" representing the
  2279. // client's request for the ListLayerVersions operation. The "output" return
  2280. // value will be populated with the request's response once the request completes
  2281. // successfully.
  2282. //
  2283. // Use "Send" method on the returned Request to send the API call to the service.
  2284. // the "output" return value is not valid until after Send returns without error.
  2285. //
  2286. // See ListLayerVersions for more information on using the ListLayerVersions
  2287. // API call, and error handling.
  2288. //
  2289. // This method is useful when you want to inject custom logic or configuration
  2290. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2291. //
  2292. //
  2293. // // Example sending a request using the ListLayerVersionsRequest method.
  2294. // req, resp := client.ListLayerVersionsRequest(params)
  2295. //
  2296. // err := req.Send()
  2297. // if err == nil { // resp is now filled
  2298. // fmt.Println(resp)
  2299. // }
  2300. //
  2301. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListLayerVersions
  2302. func (c *Lambda) ListLayerVersionsRequest(input *ListLayerVersionsInput) (req *request.Request, output *ListLayerVersionsOutput) {
  2303. op := &request.Operation{
  2304. Name: opListLayerVersions,
  2305. HTTPMethod: "GET",
  2306. HTTPPath: "/2018-10-31/layers/{LayerName}/versions",
  2307. }
  2308. if input == nil {
  2309. input = &ListLayerVersionsInput{}
  2310. }
  2311. output = &ListLayerVersionsOutput{}
  2312. req = c.newRequest(op, input, output)
  2313. return
  2314. }
  2315. // ListLayerVersions API operation for AWS Lambda.
  2316. //
  2317. // Lists the versions of an AWS Lambda layer (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html).
  2318. // Versions that have been deleted aren't listed. Specify a runtime identifier
  2319. // (http://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html) to list
  2320. // only versions that indicate that they're compatible with that runtime.
  2321. //
  2322. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2323. // with awserr.Error's Code and Message methods to get detailed information about
  2324. // the error.
  2325. //
  2326. // See the AWS API reference guide for AWS Lambda's
  2327. // API operation ListLayerVersions for usage and error information.
  2328. //
  2329. // Returned Error Codes:
  2330. // * ErrCodeServiceException "ServiceException"
  2331. // The AWS Lambda service encountered an internal error.
  2332. //
  2333. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  2334. // One of the parameters in the request is invalid. For example, if you provided
  2335. // an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
  2336. // API, that AWS Lambda is unable to assume you will get this exception.
  2337. //
  2338. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  2339. // The resource (for example, a Lambda function or access policy statement)
  2340. // specified in the request does not exist.
  2341. //
  2342. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  2343. // Request throughput limit exceeded.
  2344. //
  2345. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListLayerVersions
  2346. func (c *Lambda) ListLayerVersions(input *ListLayerVersionsInput) (*ListLayerVersionsOutput, error) {
  2347. req, out := c.ListLayerVersionsRequest(input)
  2348. return out, req.Send()
  2349. }
  2350. // ListLayerVersionsWithContext is the same as ListLayerVersions with the addition of
  2351. // the ability to pass a context and additional request options.
  2352. //
  2353. // See ListLayerVersions for details on how to use this API operation.
  2354. //
  2355. // The context must be non-nil and will be used for request cancellation. If
  2356. // the context is nil a panic will occur. In the future the SDK may create
  2357. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2358. // for more information on using Contexts.
  2359. func (c *Lambda) ListLayerVersionsWithContext(ctx aws.Context, input *ListLayerVersionsInput, opts ...request.Option) (*ListLayerVersionsOutput, error) {
  2360. req, out := c.ListLayerVersionsRequest(input)
  2361. req.SetContext(ctx)
  2362. req.ApplyOptions(opts...)
  2363. return out, req.Send()
  2364. }
  2365. const opListLayers = "ListLayers"
  2366. // ListLayersRequest generates a "aws/request.Request" representing the
  2367. // client's request for the ListLayers operation. The "output" return
  2368. // value will be populated with the request's response once the request completes
  2369. // successfully.
  2370. //
  2371. // Use "Send" method on the returned Request to send the API call to the service.
  2372. // the "output" return value is not valid until after Send returns without error.
  2373. //
  2374. // See ListLayers for more information on using the ListLayers
  2375. // API call, and error handling.
  2376. //
  2377. // This method is useful when you want to inject custom logic or configuration
  2378. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2379. //
  2380. //
  2381. // // Example sending a request using the ListLayersRequest method.
  2382. // req, resp := client.ListLayersRequest(params)
  2383. //
  2384. // err := req.Send()
  2385. // if err == nil { // resp is now filled
  2386. // fmt.Println(resp)
  2387. // }
  2388. //
  2389. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListLayers
  2390. func (c *Lambda) ListLayersRequest(input *ListLayersInput) (req *request.Request, output *ListLayersOutput) {
  2391. op := &request.Operation{
  2392. Name: opListLayers,
  2393. HTTPMethod: "GET",
  2394. HTTPPath: "/2018-10-31/layers",
  2395. }
  2396. if input == nil {
  2397. input = &ListLayersInput{}
  2398. }
  2399. output = &ListLayersOutput{}
  2400. req = c.newRequest(op, input, output)
  2401. return
  2402. }
  2403. // ListLayers API operation for AWS Lambda.
  2404. //
  2405. // Lists AWS Lambda layers (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html)
  2406. // and shows information about the latest version of each. Specify a runtime
  2407. // identifier (http://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html)
  2408. // to list only layers that indicate that they're compatible with that runtime.
  2409. //
  2410. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2411. // with awserr.Error's Code and Message methods to get detailed information about
  2412. // the error.
  2413. //
  2414. // See the AWS API reference guide for AWS Lambda's
  2415. // API operation ListLayers for usage and error information.
  2416. //
  2417. // Returned Error Codes:
  2418. // * ErrCodeServiceException "ServiceException"
  2419. // The AWS Lambda service encountered an internal error.
  2420. //
  2421. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  2422. // One of the parameters in the request is invalid. For example, if you provided
  2423. // an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
  2424. // API, that AWS Lambda is unable to assume you will get this exception.
  2425. //
  2426. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  2427. // Request throughput limit exceeded.
  2428. //
  2429. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListLayers
  2430. func (c *Lambda) ListLayers(input *ListLayersInput) (*ListLayersOutput, error) {
  2431. req, out := c.ListLayersRequest(input)
  2432. return out, req.Send()
  2433. }
  2434. // ListLayersWithContext is the same as ListLayers with the addition of
  2435. // the ability to pass a context and additional request options.
  2436. //
  2437. // See ListLayers for details on how to use this API operation.
  2438. //
  2439. // The context must be non-nil and will be used for request cancellation. If
  2440. // the context is nil a panic will occur. In the future the SDK may create
  2441. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2442. // for more information on using Contexts.
  2443. func (c *Lambda) ListLayersWithContext(ctx aws.Context, input *ListLayersInput, opts ...request.Option) (*ListLayersOutput, error) {
  2444. req, out := c.ListLayersRequest(input)
  2445. req.SetContext(ctx)
  2446. req.ApplyOptions(opts...)
  2447. return out, req.Send()
  2448. }
  2449. const opListTags = "ListTags"
  2450. // ListTagsRequest generates a "aws/request.Request" representing the
  2451. // client's request for the ListTags operation. The "output" return
  2452. // value will be populated with the request's response once the request completes
  2453. // successfully.
  2454. //
  2455. // Use "Send" method on the returned Request to send the API call to the service.
  2456. // the "output" return value is not valid until after Send returns without error.
  2457. //
  2458. // See ListTags for more information on using the ListTags
  2459. // API call, and error handling.
  2460. //
  2461. // This method is useful when you want to inject custom logic or configuration
  2462. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2463. //
  2464. //
  2465. // // Example sending a request using the ListTagsRequest method.
  2466. // req, resp := client.ListTagsRequest(params)
  2467. //
  2468. // err := req.Send()
  2469. // if err == nil { // resp is now filled
  2470. // fmt.Println(resp)
  2471. // }
  2472. //
  2473. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListTags
  2474. func (c *Lambda) ListTagsRequest(input *ListTagsInput) (req *request.Request, output *ListTagsOutput) {
  2475. op := &request.Operation{
  2476. Name: opListTags,
  2477. HTTPMethod: "GET",
  2478. HTTPPath: "/2017-03-31/tags/{ARN}",
  2479. }
  2480. if input == nil {
  2481. input = &ListTagsInput{}
  2482. }
  2483. output = &ListTagsOutput{}
  2484. req = c.newRequest(op, input, output)
  2485. return
  2486. }
  2487. // ListTags API operation for AWS Lambda.
  2488. //
  2489. // Returns a function's tags (http://docs.aws.amazon.com/lambda/latest/dg/tagging.html).
  2490. // You can also view tags with GetFunction.
  2491. //
  2492. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2493. // with awserr.Error's Code and Message methods to get detailed information about
  2494. // the error.
  2495. //
  2496. // See the AWS API reference guide for AWS Lambda's
  2497. // API operation ListTags for usage and error information.
  2498. //
  2499. // Returned Error Codes:
  2500. // * ErrCodeServiceException "ServiceException"
  2501. // The AWS Lambda service encountered an internal error.
  2502. //
  2503. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  2504. // The resource (for example, a Lambda function or access policy statement)
  2505. // specified in the request does not exist.
  2506. //
  2507. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  2508. // One of the parameters in the request is invalid. For example, if you provided
  2509. // an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
  2510. // API, that AWS Lambda is unable to assume you will get this exception.
  2511. //
  2512. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  2513. // Request throughput limit exceeded.
  2514. //
  2515. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListTags
  2516. func (c *Lambda) ListTags(input *ListTagsInput) (*ListTagsOutput, error) {
  2517. req, out := c.ListTagsRequest(input)
  2518. return out, req.Send()
  2519. }
  2520. // ListTagsWithContext is the same as ListTags with the addition of
  2521. // the ability to pass a context and additional request options.
  2522. //
  2523. // See ListTags for details on how to use this API operation.
  2524. //
  2525. // The context must be non-nil and will be used for request cancellation. If
  2526. // the context is nil a panic will occur. In the future the SDK may create
  2527. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2528. // for more information on using Contexts.
  2529. func (c *Lambda) ListTagsWithContext(ctx aws.Context, input *ListTagsInput, opts ...request.Option) (*ListTagsOutput, error) {
  2530. req, out := c.ListTagsRequest(input)
  2531. req.SetContext(ctx)
  2532. req.ApplyOptions(opts...)
  2533. return out, req.Send()
  2534. }
  2535. const opListVersionsByFunction = "ListVersionsByFunction"
  2536. // ListVersionsByFunctionRequest generates a "aws/request.Request" representing the
  2537. // client's request for the ListVersionsByFunction operation. The "output" return
  2538. // value will be populated with the request's response once the request completes
  2539. // successfully.
  2540. //
  2541. // Use "Send" method on the returned Request to send the API call to the service.
  2542. // the "output" return value is not valid until after Send returns without error.
  2543. //
  2544. // See ListVersionsByFunction for more information on using the ListVersionsByFunction
  2545. // API call, and error handling.
  2546. //
  2547. // This method is useful when you want to inject custom logic or configuration
  2548. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2549. //
  2550. //
  2551. // // Example sending a request using the ListVersionsByFunctionRequest method.
  2552. // req, resp := client.ListVersionsByFunctionRequest(params)
  2553. //
  2554. // err := req.Send()
  2555. // if err == nil { // resp is now filled
  2556. // fmt.Println(resp)
  2557. // }
  2558. //
  2559. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListVersionsByFunction
  2560. func (c *Lambda) ListVersionsByFunctionRequest(input *ListVersionsByFunctionInput) (req *request.Request, output *ListVersionsByFunctionOutput) {
  2561. op := &request.Operation{
  2562. Name: opListVersionsByFunction,
  2563. HTTPMethod: "GET",
  2564. HTTPPath: "/2015-03-31/functions/{FunctionName}/versions",
  2565. }
  2566. if input == nil {
  2567. input = &ListVersionsByFunctionInput{}
  2568. }
  2569. output = &ListVersionsByFunctionOutput{}
  2570. req = c.newRequest(op, input, output)
  2571. return
  2572. }
  2573. // ListVersionsByFunction API operation for AWS Lambda.
  2574. //
  2575. // Returns a list of versions (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html),
  2576. // with the version-specific configuration of each.
  2577. //
  2578. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2579. // with awserr.Error's Code and Message methods to get detailed information about
  2580. // the error.
  2581. //
  2582. // See the AWS API reference guide for AWS Lambda's
  2583. // API operation ListVersionsByFunction for usage and error information.
  2584. //
  2585. // Returned Error Codes:
  2586. // * ErrCodeServiceException "ServiceException"
  2587. // The AWS Lambda service encountered an internal error.
  2588. //
  2589. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  2590. // The resource (for example, a Lambda function or access policy statement)
  2591. // specified in the request does not exist.
  2592. //
  2593. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  2594. // One of the parameters in the request is invalid. For example, if you provided
  2595. // an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
  2596. // API, that AWS Lambda is unable to assume you will get this exception.
  2597. //
  2598. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  2599. // Request throughput limit exceeded.
  2600. //
  2601. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListVersionsByFunction
  2602. func (c *Lambda) ListVersionsByFunction(input *ListVersionsByFunctionInput) (*ListVersionsByFunctionOutput, error) {
  2603. req, out := c.ListVersionsByFunctionRequest(input)
  2604. return out, req.Send()
  2605. }
  2606. // ListVersionsByFunctionWithContext is the same as ListVersionsByFunction with the addition of
  2607. // the ability to pass a context and additional request options.
  2608. //
  2609. // See ListVersionsByFunction for details on how to use this API operation.
  2610. //
  2611. // The context must be non-nil and will be used for request cancellation. If
  2612. // the context is nil a panic will occur. In the future the SDK may create
  2613. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2614. // for more information on using Contexts.
  2615. func (c *Lambda) ListVersionsByFunctionWithContext(ctx aws.Context, input *ListVersionsByFunctionInput, opts ...request.Option) (*ListVersionsByFunctionOutput, error) {
  2616. req, out := c.ListVersionsByFunctionRequest(input)
  2617. req.SetContext(ctx)
  2618. req.ApplyOptions(opts...)
  2619. return out, req.Send()
  2620. }
  2621. const opPublishLayerVersion = "PublishLayerVersion"
  2622. // PublishLayerVersionRequest generates a "aws/request.Request" representing the
  2623. // client's request for the PublishLayerVersion operation. The "output" return
  2624. // value will be populated with the request's response once the request completes
  2625. // successfully.
  2626. //
  2627. // Use "Send" method on the returned Request to send the API call to the service.
  2628. // the "output" return value is not valid until after Send returns without error.
  2629. //
  2630. // See PublishLayerVersion for more information on using the PublishLayerVersion
  2631. // API call, and error handling.
  2632. //
  2633. // This method is useful when you want to inject custom logic or configuration
  2634. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2635. //
  2636. //
  2637. // // Example sending a request using the PublishLayerVersionRequest method.
  2638. // req, resp := client.PublishLayerVersionRequest(params)
  2639. //
  2640. // err := req.Send()
  2641. // if err == nil { // resp is now filled
  2642. // fmt.Println(resp)
  2643. // }
  2644. //
  2645. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/PublishLayerVersion
  2646. func (c *Lambda) PublishLayerVersionRequest(input *PublishLayerVersionInput) (req *request.Request, output *PublishLayerVersionOutput) {
  2647. op := &request.Operation{
  2648. Name: opPublishLayerVersion,
  2649. HTTPMethod: "POST",
  2650. HTTPPath: "/2018-10-31/layers/{LayerName}/versions",
  2651. }
  2652. if input == nil {
  2653. input = &PublishLayerVersionInput{}
  2654. }
  2655. output = &PublishLayerVersionOutput{}
  2656. req = c.newRequest(op, input, output)
  2657. return
  2658. }
  2659. // PublishLayerVersion API operation for AWS Lambda.
  2660. //
  2661. // Creates an AWS Lambda layer (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html)
  2662. // from a ZIP archive. Each time you call PublishLayerVersion with the same
  2663. // version name, a new version is created.
  2664. //
  2665. // Add layers to your function with CreateFunction or UpdateFunctionConfiguration.
  2666. //
  2667. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2668. // with awserr.Error's Code and Message methods to get detailed information about
  2669. // the error.
  2670. //
  2671. // See the AWS API reference guide for AWS Lambda's
  2672. // API operation PublishLayerVersion for usage and error information.
  2673. //
  2674. // Returned Error Codes:
  2675. // * ErrCodeServiceException "ServiceException"
  2676. // The AWS Lambda service encountered an internal error.
  2677. //
  2678. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  2679. // The resource (for example, a Lambda function or access policy statement)
  2680. // specified in the request does not exist.
  2681. //
  2682. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  2683. // Request throughput limit exceeded.
  2684. //
  2685. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  2686. // One of the parameters in the request is invalid. For example, if you provided
  2687. // an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
  2688. // API, that AWS Lambda is unable to assume you will get this exception.
  2689. //
  2690. // * ErrCodeCodeStorageExceededException "CodeStorageExceededException"
  2691. // You have exceeded your maximum total code size per account. Limits (http://docs.aws.amazon.com/lambda/latest/dg/limits.html)
  2692. //
  2693. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/PublishLayerVersion
  2694. func (c *Lambda) PublishLayerVersion(input *PublishLayerVersionInput) (*PublishLayerVersionOutput, error) {
  2695. req, out := c.PublishLayerVersionRequest(input)
  2696. return out, req.Send()
  2697. }
  2698. // PublishLayerVersionWithContext is the same as PublishLayerVersion with the addition of
  2699. // the ability to pass a context and additional request options.
  2700. //
  2701. // See PublishLayerVersion for details on how to use this API operation.
  2702. //
  2703. // The context must be non-nil and will be used for request cancellation. If
  2704. // the context is nil a panic will occur. In the future the SDK may create
  2705. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2706. // for more information on using Contexts.
  2707. func (c *Lambda) PublishLayerVersionWithContext(ctx aws.Context, input *PublishLayerVersionInput, opts ...request.Option) (*PublishLayerVersionOutput, error) {
  2708. req, out := c.PublishLayerVersionRequest(input)
  2709. req.SetContext(ctx)
  2710. req.ApplyOptions(opts...)
  2711. return out, req.Send()
  2712. }
  2713. const opPublishVersion = "PublishVersion"
  2714. // PublishVersionRequest generates a "aws/request.Request" representing the
  2715. // client's request for the PublishVersion operation. The "output" return
  2716. // value will be populated with the request's response once the request completes
  2717. // successfully.
  2718. //
  2719. // Use "Send" method on the returned Request to send the API call to the service.
  2720. // the "output" return value is not valid until after Send returns without error.
  2721. //
  2722. // See PublishVersion for more information on using the PublishVersion
  2723. // API call, and error handling.
  2724. //
  2725. // This method is useful when you want to inject custom logic or configuration
  2726. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2727. //
  2728. //
  2729. // // Example sending a request using the PublishVersionRequest method.
  2730. // req, resp := client.PublishVersionRequest(params)
  2731. //
  2732. // err := req.Send()
  2733. // if err == nil { // resp is now filled
  2734. // fmt.Println(resp)
  2735. // }
  2736. //
  2737. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/PublishVersion
  2738. func (c *Lambda) PublishVersionRequest(input *PublishVersionInput) (req *request.Request, output *FunctionConfiguration) {
  2739. op := &request.Operation{
  2740. Name: opPublishVersion,
  2741. HTTPMethod: "POST",
  2742. HTTPPath: "/2015-03-31/functions/{FunctionName}/versions",
  2743. }
  2744. if input == nil {
  2745. input = &PublishVersionInput{}
  2746. }
  2747. output = &FunctionConfiguration{}
  2748. req = c.newRequest(op, input, output)
  2749. return
  2750. }
  2751. // PublishVersion API operation for AWS Lambda.
  2752. //
  2753. // Creates a version (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html)
  2754. // from the current code and configuration of a function. Use versions to create
  2755. // a snapshot of your function code and configuration that doesn't change.
  2756. //
  2757. // AWS Lambda does not publish a version if the function's configuration and
  2758. // code hasn't changed since the last version. Use UpdateFunctionCode or UpdateFunctionConfiguration
  2759. // to update the function prior to publishing a version.
  2760. //
  2761. // Clients can invoke versions directly or with an alias. To create an alias,
  2762. // use CreateAlias.
  2763. //
  2764. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2765. // with awserr.Error's Code and Message methods to get detailed information about
  2766. // the error.
  2767. //
  2768. // See the AWS API reference guide for AWS Lambda's
  2769. // API operation PublishVersion for usage and error information.
  2770. //
  2771. // Returned Error Codes:
  2772. // * ErrCodeServiceException "ServiceException"
  2773. // The AWS Lambda service encountered an internal error.
  2774. //
  2775. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  2776. // The resource (for example, a Lambda function or access policy statement)
  2777. // specified in the request does not exist.
  2778. //
  2779. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  2780. // One of the parameters in the request is invalid. For example, if you provided
  2781. // an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
  2782. // API, that AWS Lambda is unable to assume you will get this exception.
  2783. //
  2784. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  2785. // Request throughput limit exceeded.
  2786. //
  2787. // * ErrCodeCodeStorageExceededException "CodeStorageExceededException"
  2788. // You have exceeded your maximum total code size per account. Limits (http://docs.aws.amazon.com/lambda/latest/dg/limits.html)
  2789. //
  2790. // * ErrCodePreconditionFailedException "PreconditionFailedException"
  2791. // The RevisionId provided does not match the latest RevisionId for the Lambda
  2792. // function or alias. Call the GetFunction or the GetAlias API to retrieve the
  2793. // latest RevisionId for your resource.
  2794. //
  2795. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/PublishVersion
  2796. func (c *Lambda) PublishVersion(input *PublishVersionInput) (*FunctionConfiguration, error) {
  2797. req, out := c.PublishVersionRequest(input)
  2798. return out, req.Send()
  2799. }
  2800. // PublishVersionWithContext is the same as PublishVersion with the addition of
  2801. // the ability to pass a context and additional request options.
  2802. //
  2803. // See PublishVersion for details on how to use this API operation.
  2804. //
  2805. // The context must be non-nil and will be used for request cancellation. If
  2806. // the context is nil a panic will occur. In the future the SDK may create
  2807. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2808. // for more information on using Contexts.
  2809. func (c *Lambda) PublishVersionWithContext(ctx aws.Context, input *PublishVersionInput, opts ...request.Option) (*FunctionConfiguration, error) {
  2810. req, out := c.PublishVersionRequest(input)
  2811. req.SetContext(ctx)
  2812. req.ApplyOptions(opts...)
  2813. return out, req.Send()
  2814. }
  2815. const opPutFunctionConcurrency = "PutFunctionConcurrency"
  2816. // PutFunctionConcurrencyRequest generates a "aws/request.Request" representing the
  2817. // client's request for the PutFunctionConcurrency operation. The "output" return
  2818. // value will be populated with the request's response once the request completes
  2819. // successfully.
  2820. //
  2821. // Use "Send" method on the returned Request to send the API call to the service.
  2822. // the "output" return value is not valid until after Send returns without error.
  2823. //
  2824. // See PutFunctionConcurrency for more information on using the PutFunctionConcurrency
  2825. // API call, and error handling.
  2826. //
  2827. // This method is useful when you want to inject custom logic or configuration
  2828. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2829. //
  2830. //
  2831. // // Example sending a request using the PutFunctionConcurrencyRequest method.
  2832. // req, resp := client.PutFunctionConcurrencyRequest(params)
  2833. //
  2834. // err := req.Send()
  2835. // if err == nil { // resp is now filled
  2836. // fmt.Println(resp)
  2837. // }
  2838. //
  2839. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/PutFunctionConcurrency
  2840. func (c *Lambda) PutFunctionConcurrencyRequest(input *PutFunctionConcurrencyInput) (req *request.Request, output *PutFunctionConcurrencyOutput) {
  2841. op := &request.Operation{
  2842. Name: opPutFunctionConcurrency,
  2843. HTTPMethod: "PUT",
  2844. HTTPPath: "/2017-10-31/functions/{FunctionName}/concurrency",
  2845. }
  2846. if input == nil {
  2847. input = &PutFunctionConcurrencyInput{}
  2848. }
  2849. output = &PutFunctionConcurrencyOutput{}
  2850. req = c.newRequest(op, input, output)
  2851. return
  2852. }
  2853. // PutFunctionConcurrency API operation for AWS Lambda.
  2854. //
  2855. // Sets the maximum number of simultaneous executions for a function, and reserves
  2856. // capacity for that concurrency level.
  2857. //
  2858. // Concurrency settings apply to the function as a whole, including all published
  2859. // versions and the unpublished version. Reserving concurrency both guarantees
  2860. // that your function has capacity to process the specified number of events
  2861. // simultaneously, and prevents it from scaling beyond that level. Use GetFunction
  2862. // to see the current setting for a function.
  2863. //
  2864. // Use GetAccountSettings to see your regional concurrency limit. You can reserve
  2865. // concurrency for as many functions as you like, as long as you leave at least
  2866. // 100 simultaneous executions unreserved for functions that aren't configured
  2867. // with a per-function limit. For more information, see Managing Concurrency
  2868. // (http://docs.aws.amazon.com/lambda/latest/dg/concurrent-executions.html).
  2869. //
  2870. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2871. // with awserr.Error's Code and Message methods to get detailed information about
  2872. // the error.
  2873. //
  2874. // See the AWS API reference guide for AWS Lambda's
  2875. // API operation PutFunctionConcurrency for usage and error information.
  2876. //
  2877. // Returned Error Codes:
  2878. // * ErrCodeServiceException "ServiceException"
  2879. // The AWS Lambda service encountered an internal error.
  2880. //
  2881. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  2882. // One of the parameters in the request is invalid. For example, if you provided
  2883. // an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
  2884. // API, that AWS Lambda is unable to assume you will get this exception.
  2885. //
  2886. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  2887. // The resource (for example, a Lambda function or access policy statement)
  2888. // specified in the request does not exist.
  2889. //
  2890. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  2891. // Request throughput limit exceeded.
  2892. //
  2893. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/PutFunctionConcurrency
  2894. func (c *Lambda) PutFunctionConcurrency(input *PutFunctionConcurrencyInput) (*PutFunctionConcurrencyOutput, error) {
  2895. req, out := c.PutFunctionConcurrencyRequest(input)
  2896. return out, req.Send()
  2897. }
  2898. // PutFunctionConcurrencyWithContext is the same as PutFunctionConcurrency with the addition of
  2899. // the ability to pass a context and additional request options.
  2900. //
  2901. // See PutFunctionConcurrency for details on how to use this API operation.
  2902. //
  2903. // The context must be non-nil and will be used for request cancellation. If
  2904. // the context is nil a panic will occur. In the future the SDK may create
  2905. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2906. // for more information on using Contexts.
  2907. func (c *Lambda) PutFunctionConcurrencyWithContext(ctx aws.Context, input *PutFunctionConcurrencyInput, opts ...request.Option) (*PutFunctionConcurrencyOutput, error) {
  2908. req, out := c.PutFunctionConcurrencyRequest(input)
  2909. req.SetContext(ctx)
  2910. req.ApplyOptions(opts...)
  2911. return out, req.Send()
  2912. }
  2913. const opRemoveLayerVersionPermission = "RemoveLayerVersionPermission"
  2914. // RemoveLayerVersionPermissionRequest generates a "aws/request.Request" representing the
  2915. // client's request for the RemoveLayerVersionPermission operation. The "output" return
  2916. // value will be populated with the request's response once the request completes
  2917. // successfully.
  2918. //
  2919. // Use "Send" method on the returned Request to send the API call to the service.
  2920. // the "output" return value is not valid until after Send returns without error.
  2921. //
  2922. // See RemoveLayerVersionPermission for more information on using the RemoveLayerVersionPermission
  2923. // API call, and error handling.
  2924. //
  2925. // This method is useful when you want to inject custom logic or configuration
  2926. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2927. //
  2928. //
  2929. // // Example sending a request using the RemoveLayerVersionPermissionRequest method.
  2930. // req, resp := client.RemoveLayerVersionPermissionRequest(params)
  2931. //
  2932. // err := req.Send()
  2933. // if err == nil { // resp is now filled
  2934. // fmt.Println(resp)
  2935. // }
  2936. //
  2937. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/RemoveLayerVersionPermission
  2938. func (c *Lambda) RemoveLayerVersionPermissionRequest(input *RemoveLayerVersionPermissionInput) (req *request.Request, output *RemoveLayerVersionPermissionOutput) {
  2939. op := &request.Operation{
  2940. Name: opRemoveLayerVersionPermission,
  2941. HTTPMethod: "DELETE",
  2942. HTTPPath: "/2018-10-31/layers/{LayerName}/versions/{VersionNumber}/policy/{StatementId}",
  2943. }
  2944. if input == nil {
  2945. input = &RemoveLayerVersionPermissionInput{}
  2946. }
  2947. output = &RemoveLayerVersionPermissionOutput{}
  2948. req = c.newRequest(op, input, output)
  2949. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  2950. return
  2951. }
  2952. // RemoveLayerVersionPermission API operation for AWS Lambda.
  2953. //
  2954. // Removes a statement from the permissions policy for a version of an AWS Lambda
  2955. // layer (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html).
  2956. // For more information, see AddLayerVersionPermission.
  2957. //
  2958. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2959. // with awserr.Error's Code and Message methods to get detailed information about
  2960. // the error.
  2961. //
  2962. // See the AWS API reference guide for AWS Lambda's
  2963. // API operation RemoveLayerVersionPermission for usage and error information.
  2964. //
  2965. // Returned Error Codes:
  2966. // * ErrCodeServiceException "ServiceException"
  2967. // The AWS Lambda service encountered an internal error.
  2968. //
  2969. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  2970. // The resource (for example, a Lambda function or access policy statement)
  2971. // specified in the request does not exist.
  2972. //
  2973. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  2974. // One of the parameters in the request is invalid. For example, if you provided
  2975. // an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
  2976. // API, that AWS Lambda is unable to assume you will get this exception.
  2977. //
  2978. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  2979. // Request throughput limit exceeded.
  2980. //
  2981. // * ErrCodePreconditionFailedException "PreconditionFailedException"
  2982. // The RevisionId provided does not match the latest RevisionId for the Lambda
  2983. // function or alias. Call the GetFunction or the GetAlias API to retrieve the
  2984. // latest RevisionId for your resource.
  2985. //
  2986. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/RemoveLayerVersionPermission
  2987. func (c *Lambda) RemoveLayerVersionPermission(input *RemoveLayerVersionPermissionInput) (*RemoveLayerVersionPermissionOutput, error) {
  2988. req, out := c.RemoveLayerVersionPermissionRequest(input)
  2989. return out, req.Send()
  2990. }
  2991. // RemoveLayerVersionPermissionWithContext is the same as RemoveLayerVersionPermission with the addition of
  2992. // the ability to pass a context and additional request options.
  2993. //
  2994. // See RemoveLayerVersionPermission for details on how to use this API operation.
  2995. //
  2996. // The context must be non-nil and will be used for request cancellation. If
  2997. // the context is nil a panic will occur. In the future the SDK may create
  2998. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2999. // for more information on using Contexts.
  3000. func (c *Lambda) RemoveLayerVersionPermissionWithContext(ctx aws.Context, input *RemoveLayerVersionPermissionInput, opts ...request.Option) (*RemoveLayerVersionPermissionOutput, error) {
  3001. req, out := c.RemoveLayerVersionPermissionRequest(input)
  3002. req.SetContext(ctx)
  3003. req.ApplyOptions(opts...)
  3004. return out, req.Send()
  3005. }
  3006. const opRemovePermission = "RemovePermission"
  3007. // RemovePermissionRequest generates a "aws/request.Request" representing the
  3008. // client's request for the RemovePermission operation. The "output" return
  3009. // value will be populated with the request's response once the request completes
  3010. // successfully.
  3011. //
  3012. // Use "Send" method on the returned Request to send the API call to the service.
  3013. // the "output" return value is not valid until after Send returns without error.
  3014. //
  3015. // See RemovePermission for more information on using the RemovePermission
  3016. // API call, and error handling.
  3017. //
  3018. // This method is useful when you want to inject custom logic or configuration
  3019. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3020. //
  3021. //
  3022. // // Example sending a request using the RemovePermissionRequest method.
  3023. // req, resp := client.RemovePermissionRequest(params)
  3024. //
  3025. // err := req.Send()
  3026. // if err == nil { // resp is now filled
  3027. // fmt.Println(resp)
  3028. // }
  3029. //
  3030. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/RemovePermission
  3031. func (c *Lambda) RemovePermissionRequest(input *RemovePermissionInput) (req *request.Request, output *RemovePermissionOutput) {
  3032. op := &request.Operation{
  3033. Name: opRemovePermission,
  3034. HTTPMethod: "DELETE",
  3035. HTTPPath: "/2015-03-31/functions/{FunctionName}/policy/{StatementId}",
  3036. }
  3037. if input == nil {
  3038. input = &RemovePermissionInput{}
  3039. }
  3040. output = &RemovePermissionOutput{}
  3041. req = c.newRequest(op, input, output)
  3042. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  3043. return
  3044. }
  3045. // RemovePermission API operation for AWS Lambda.
  3046. //
  3047. // Revokes function use permission from an AWS service or another account. You
  3048. // can get the ID of the statement from the output of GetPolicy.
  3049. //
  3050. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3051. // with awserr.Error's Code and Message methods to get detailed information about
  3052. // the error.
  3053. //
  3054. // See the AWS API reference guide for AWS Lambda's
  3055. // API operation RemovePermission for usage and error information.
  3056. //
  3057. // Returned Error Codes:
  3058. // * ErrCodeServiceException "ServiceException"
  3059. // The AWS Lambda service encountered an internal error.
  3060. //
  3061. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  3062. // The resource (for example, a Lambda function or access policy statement)
  3063. // specified in the request does not exist.
  3064. //
  3065. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  3066. // One of the parameters in the request is invalid. For example, if you provided
  3067. // an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
  3068. // API, that AWS Lambda is unable to assume you will get this exception.
  3069. //
  3070. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  3071. // Request throughput limit exceeded.
  3072. //
  3073. // * ErrCodePreconditionFailedException "PreconditionFailedException"
  3074. // The RevisionId provided does not match the latest RevisionId for the Lambda
  3075. // function or alias. Call the GetFunction or the GetAlias API to retrieve the
  3076. // latest RevisionId for your resource.
  3077. //
  3078. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/RemovePermission
  3079. func (c *Lambda) RemovePermission(input *RemovePermissionInput) (*RemovePermissionOutput, error) {
  3080. req, out := c.RemovePermissionRequest(input)
  3081. return out, req.Send()
  3082. }
  3083. // RemovePermissionWithContext is the same as RemovePermission with the addition of
  3084. // the ability to pass a context and additional request options.
  3085. //
  3086. // See RemovePermission for details on how to use this API operation.
  3087. //
  3088. // The context must be non-nil and will be used for request cancellation. If
  3089. // the context is nil a panic will occur. In the future the SDK may create
  3090. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3091. // for more information on using Contexts.
  3092. func (c *Lambda) RemovePermissionWithContext(ctx aws.Context, input *RemovePermissionInput, opts ...request.Option) (*RemovePermissionOutput, error) {
  3093. req, out := c.RemovePermissionRequest(input)
  3094. req.SetContext(ctx)
  3095. req.ApplyOptions(opts...)
  3096. return out, req.Send()
  3097. }
  3098. const opTagResource = "TagResource"
  3099. // TagResourceRequest generates a "aws/request.Request" representing the
  3100. // client's request for the TagResource operation. The "output" return
  3101. // value will be populated with the request's response once the request completes
  3102. // successfully.
  3103. //
  3104. // Use "Send" method on the returned Request to send the API call to the service.
  3105. // the "output" return value is not valid until after Send returns without error.
  3106. //
  3107. // See TagResource for more information on using the TagResource
  3108. // API call, and error handling.
  3109. //
  3110. // This method is useful when you want to inject custom logic or configuration
  3111. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3112. //
  3113. //
  3114. // // Example sending a request using the TagResourceRequest method.
  3115. // req, resp := client.TagResourceRequest(params)
  3116. //
  3117. // err := req.Send()
  3118. // if err == nil { // resp is now filled
  3119. // fmt.Println(resp)
  3120. // }
  3121. //
  3122. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/TagResource
  3123. func (c *Lambda) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) {
  3124. op := &request.Operation{
  3125. Name: opTagResource,
  3126. HTTPMethod: "POST",
  3127. HTTPPath: "/2017-03-31/tags/{ARN}",
  3128. }
  3129. if input == nil {
  3130. input = &TagResourceInput{}
  3131. }
  3132. output = &TagResourceOutput{}
  3133. req = c.newRequest(op, input, output)
  3134. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  3135. return
  3136. }
  3137. // TagResource API operation for AWS Lambda.
  3138. //
  3139. // Adds tags (http://docs.aws.amazon.com/lambda/latest/dg/tagging.html) to a
  3140. // function.
  3141. //
  3142. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3143. // with awserr.Error's Code and Message methods to get detailed information about
  3144. // the error.
  3145. //
  3146. // See the AWS API reference guide for AWS Lambda's
  3147. // API operation TagResource for usage and error information.
  3148. //
  3149. // Returned Error Codes:
  3150. // * ErrCodeServiceException "ServiceException"
  3151. // The AWS Lambda service encountered an internal error.
  3152. //
  3153. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  3154. // The resource (for example, a Lambda function or access policy statement)
  3155. // specified in the request does not exist.
  3156. //
  3157. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  3158. // One of the parameters in the request is invalid. For example, if you provided
  3159. // an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
  3160. // API, that AWS Lambda is unable to assume you will get this exception.
  3161. //
  3162. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  3163. // Request throughput limit exceeded.
  3164. //
  3165. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/TagResource
  3166. func (c *Lambda) TagResource(input *TagResourceInput) (*TagResourceOutput, error) {
  3167. req, out := c.TagResourceRequest(input)
  3168. return out, req.Send()
  3169. }
  3170. // TagResourceWithContext is the same as TagResource with the addition of
  3171. // the ability to pass a context and additional request options.
  3172. //
  3173. // See TagResource for details on how to use this API operation.
  3174. //
  3175. // The context must be non-nil and will be used for request cancellation. If
  3176. // the context is nil a panic will occur. In the future the SDK may create
  3177. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3178. // for more information on using Contexts.
  3179. func (c *Lambda) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) {
  3180. req, out := c.TagResourceRequest(input)
  3181. req.SetContext(ctx)
  3182. req.ApplyOptions(opts...)
  3183. return out, req.Send()
  3184. }
  3185. const opUntagResource = "UntagResource"
  3186. // UntagResourceRequest generates a "aws/request.Request" representing the
  3187. // client's request for the UntagResource operation. The "output" return
  3188. // value will be populated with the request's response once the request completes
  3189. // successfully.
  3190. //
  3191. // Use "Send" method on the returned Request to send the API call to the service.
  3192. // the "output" return value is not valid until after Send returns without error.
  3193. //
  3194. // See UntagResource for more information on using the UntagResource
  3195. // API call, and error handling.
  3196. //
  3197. // This method is useful when you want to inject custom logic or configuration
  3198. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3199. //
  3200. //
  3201. // // Example sending a request using the UntagResourceRequest method.
  3202. // req, resp := client.UntagResourceRequest(params)
  3203. //
  3204. // err := req.Send()
  3205. // if err == nil { // resp is now filled
  3206. // fmt.Println(resp)
  3207. // }
  3208. //
  3209. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UntagResource
  3210. func (c *Lambda) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) {
  3211. op := &request.Operation{
  3212. Name: opUntagResource,
  3213. HTTPMethod: "DELETE",
  3214. HTTPPath: "/2017-03-31/tags/{ARN}",
  3215. }
  3216. if input == nil {
  3217. input = &UntagResourceInput{}
  3218. }
  3219. output = &UntagResourceOutput{}
  3220. req = c.newRequest(op, input, output)
  3221. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  3222. return
  3223. }
  3224. // UntagResource API operation for AWS Lambda.
  3225. //
  3226. // Removes tags (http://docs.aws.amazon.com/lambda/latest/dg/tagging.html) from
  3227. // a function.
  3228. //
  3229. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3230. // with awserr.Error's Code and Message methods to get detailed information about
  3231. // the error.
  3232. //
  3233. // See the AWS API reference guide for AWS Lambda's
  3234. // API operation UntagResource for usage and error information.
  3235. //
  3236. // Returned Error Codes:
  3237. // * ErrCodeServiceException "ServiceException"
  3238. // The AWS Lambda service encountered an internal error.
  3239. //
  3240. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  3241. // The resource (for example, a Lambda function or access policy statement)
  3242. // specified in the request does not exist.
  3243. //
  3244. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  3245. // One of the parameters in the request is invalid. For example, if you provided
  3246. // an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
  3247. // API, that AWS Lambda is unable to assume you will get this exception.
  3248. //
  3249. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  3250. // Request throughput limit exceeded.
  3251. //
  3252. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UntagResource
  3253. func (c *Lambda) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) {
  3254. req, out := c.UntagResourceRequest(input)
  3255. return out, req.Send()
  3256. }
  3257. // UntagResourceWithContext is the same as UntagResource with the addition of
  3258. // the ability to pass a context and additional request options.
  3259. //
  3260. // See UntagResource for details on how to use this API operation.
  3261. //
  3262. // The context must be non-nil and will be used for request cancellation. If
  3263. // the context is nil a panic will occur. In the future the SDK may create
  3264. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3265. // for more information on using Contexts.
  3266. func (c *Lambda) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) {
  3267. req, out := c.UntagResourceRequest(input)
  3268. req.SetContext(ctx)
  3269. req.ApplyOptions(opts...)
  3270. return out, req.Send()
  3271. }
  3272. const opUpdateAlias = "UpdateAlias"
  3273. // UpdateAliasRequest generates a "aws/request.Request" representing the
  3274. // client's request for the UpdateAlias operation. The "output" return
  3275. // value will be populated with the request's response once the request completes
  3276. // successfully.
  3277. //
  3278. // Use "Send" method on the returned Request to send the API call to the service.
  3279. // the "output" return value is not valid until after Send returns without error.
  3280. //
  3281. // See UpdateAlias for more information on using the UpdateAlias
  3282. // API call, and error handling.
  3283. //
  3284. // This method is useful when you want to inject custom logic or configuration
  3285. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3286. //
  3287. //
  3288. // // Example sending a request using the UpdateAliasRequest method.
  3289. // req, resp := client.UpdateAliasRequest(params)
  3290. //
  3291. // err := req.Send()
  3292. // if err == nil { // resp is now filled
  3293. // fmt.Println(resp)
  3294. // }
  3295. //
  3296. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateAlias
  3297. func (c *Lambda) UpdateAliasRequest(input *UpdateAliasInput) (req *request.Request, output *AliasConfiguration) {
  3298. op := &request.Operation{
  3299. Name: opUpdateAlias,
  3300. HTTPMethod: "PUT",
  3301. HTTPPath: "/2015-03-31/functions/{FunctionName}/aliases/{Name}",
  3302. }
  3303. if input == nil {
  3304. input = &UpdateAliasInput{}
  3305. }
  3306. output = &AliasConfiguration{}
  3307. req = c.newRequest(op, input, output)
  3308. return
  3309. }
  3310. // UpdateAlias API operation for AWS Lambda.
  3311. //
  3312. // Updates the configuration of a Lambda function alias (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).
  3313. //
  3314. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3315. // with awserr.Error's Code and Message methods to get detailed information about
  3316. // the error.
  3317. //
  3318. // See the AWS API reference guide for AWS Lambda's
  3319. // API operation UpdateAlias for usage and error information.
  3320. //
  3321. // Returned Error Codes:
  3322. // * ErrCodeServiceException "ServiceException"
  3323. // The AWS Lambda service encountered an internal error.
  3324. //
  3325. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  3326. // The resource (for example, a Lambda function or access policy statement)
  3327. // specified in the request does not exist.
  3328. //
  3329. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  3330. // One of the parameters in the request is invalid. For example, if you provided
  3331. // an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
  3332. // API, that AWS Lambda is unable to assume you will get this exception.
  3333. //
  3334. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  3335. // Request throughput limit exceeded.
  3336. //
  3337. // * ErrCodePreconditionFailedException "PreconditionFailedException"
  3338. // The RevisionId provided does not match the latest RevisionId for the Lambda
  3339. // function or alias. Call the GetFunction or the GetAlias API to retrieve the
  3340. // latest RevisionId for your resource.
  3341. //
  3342. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateAlias
  3343. func (c *Lambda) UpdateAlias(input *UpdateAliasInput) (*AliasConfiguration, error) {
  3344. req, out := c.UpdateAliasRequest(input)
  3345. return out, req.Send()
  3346. }
  3347. // UpdateAliasWithContext is the same as UpdateAlias with the addition of
  3348. // the ability to pass a context and additional request options.
  3349. //
  3350. // See UpdateAlias for details on how to use this API operation.
  3351. //
  3352. // The context must be non-nil and will be used for request cancellation. If
  3353. // the context is nil a panic will occur. In the future the SDK may create
  3354. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3355. // for more information on using Contexts.
  3356. func (c *Lambda) UpdateAliasWithContext(ctx aws.Context, input *UpdateAliasInput, opts ...request.Option) (*AliasConfiguration, error) {
  3357. req, out := c.UpdateAliasRequest(input)
  3358. req.SetContext(ctx)
  3359. req.ApplyOptions(opts...)
  3360. return out, req.Send()
  3361. }
  3362. const opUpdateEventSourceMapping = "UpdateEventSourceMapping"
  3363. // UpdateEventSourceMappingRequest generates a "aws/request.Request" representing the
  3364. // client's request for the UpdateEventSourceMapping operation. The "output" return
  3365. // value will be populated with the request's response once the request completes
  3366. // successfully.
  3367. //
  3368. // Use "Send" method on the returned Request to send the API call to the service.
  3369. // the "output" return value is not valid until after Send returns without error.
  3370. //
  3371. // See UpdateEventSourceMapping for more information on using the UpdateEventSourceMapping
  3372. // API call, and error handling.
  3373. //
  3374. // This method is useful when you want to inject custom logic or configuration
  3375. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3376. //
  3377. //
  3378. // // Example sending a request using the UpdateEventSourceMappingRequest method.
  3379. // req, resp := client.UpdateEventSourceMappingRequest(params)
  3380. //
  3381. // err := req.Send()
  3382. // if err == nil { // resp is now filled
  3383. // fmt.Println(resp)
  3384. // }
  3385. //
  3386. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateEventSourceMapping
  3387. func (c *Lambda) UpdateEventSourceMappingRequest(input *UpdateEventSourceMappingInput) (req *request.Request, output *EventSourceMappingConfiguration) {
  3388. op := &request.Operation{
  3389. Name: opUpdateEventSourceMapping,
  3390. HTTPMethod: "PUT",
  3391. HTTPPath: "/2015-03-31/event-source-mappings/{UUID}",
  3392. }
  3393. if input == nil {
  3394. input = &UpdateEventSourceMappingInput{}
  3395. }
  3396. output = &EventSourceMappingConfiguration{}
  3397. req = c.newRequest(op, input, output)
  3398. return
  3399. }
  3400. // UpdateEventSourceMapping API operation for AWS Lambda.
  3401. //
  3402. // Updates an event source mapping. You can change the function that AWS Lambda
  3403. // invokes, or pause invocation and resume later from the same location.
  3404. //
  3405. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3406. // with awserr.Error's Code and Message methods to get detailed information about
  3407. // the error.
  3408. //
  3409. // See the AWS API reference guide for AWS Lambda's
  3410. // API operation UpdateEventSourceMapping for usage and error information.
  3411. //
  3412. // Returned Error Codes:
  3413. // * ErrCodeServiceException "ServiceException"
  3414. // The AWS Lambda service encountered an internal error.
  3415. //
  3416. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  3417. // The resource (for example, a Lambda function or access policy statement)
  3418. // specified in the request does not exist.
  3419. //
  3420. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  3421. // One of the parameters in the request is invalid. For example, if you provided
  3422. // an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
  3423. // API, that AWS Lambda is unable to assume you will get this exception.
  3424. //
  3425. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  3426. // Request throughput limit exceeded.
  3427. //
  3428. // * ErrCodeResourceConflictException "ResourceConflictException"
  3429. // The resource already exists.
  3430. //
  3431. // * ErrCodeResourceInUseException "ResourceInUseException"
  3432. // The operation conflicts with the resource's availability. For example, you
  3433. // attempted to update an EventSource Mapping in CREATING, or tried to delete
  3434. // a EventSource mapping currently in the UPDATING state.
  3435. //
  3436. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateEventSourceMapping
  3437. func (c *Lambda) UpdateEventSourceMapping(input *UpdateEventSourceMappingInput) (*EventSourceMappingConfiguration, error) {
  3438. req, out := c.UpdateEventSourceMappingRequest(input)
  3439. return out, req.Send()
  3440. }
  3441. // UpdateEventSourceMappingWithContext is the same as UpdateEventSourceMapping with the addition of
  3442. // the ability to pass a context and additional request options.
  3443. //
  3444. // See UpdateEventSourceMapping for details on how to use this API operation.
  3445. //
  3446. // The context must be non-nil and will be used for request cancellation. If
  3447. // the context is nil a panic will occur. In the future the SDK may create
  3448. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3449. // for more information on using Contexts.
  3450. func (c *Lambda) UpdateEventSourceMappingWithContext(ctx aws.Context, input *UpdateEventSourceMappingInput, opts ...request.Option) (*EventSourceMappingConfiguration, error) {
  3451. req, out := c.UpdateEventSourceMappingRequest(input)
  3452. req.SetContext(ctx)
  3453. req.ApplyOptions(opts...)
  3454. return out, req.Send()
  3455. }
  3456. const opUpdateFunctionCode = "UpdateFunctionCode"
  3457. // UpdateFunctionCodeRequest generates a "aws/request.Request" representing the
  3458. // client's request for the UpdateFunctionCode operation. The "output" return
  3459. // value will be populated with the request's response once the request completes
  3460. // successfully.
  3461. //
  3462. // Use "Send" method on the returned Request to send the API call to the service.
  3463. // the "output" return value is not valid until after Send returns without error.
  3464. //
  3465. // See UpdateFunctionCode for more information on using the UpdateFunctionCode
  3466. // API call, and error handling.
  3467. //
  3468. // This method is useful when you want to inject custom logic or configuration
  3469. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3470. //
  3471. //
  3472. // // Example sending a request using the UpdateFunctionCodeRequest method.
  3473. // req, resp := client.UpdateFunctionCodeRequest(params)
  3474. //
  3475. // err := req.Send()
  3476. // if err == nil { // resp is now filled
  3477. // fmt.Println(resp)
  3478. // }
  3479. //
  3480. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateFunctionCode
  3481. func (c *Lambda) UpdateFunctionCodeRequest(input *UpdateFunctionCodeInput) (req *request.Request, output *FunctionConfiguration) {
  3482. op := &request.Operation{
  3483. Name: opUpdateFunctionCode,
  3484. HTTPMethod: "PUT",
  3485. HTTPPath: "/2015-03-31/functions/{FunctionName}/code",
  3486. }
  3487. if input == nil {
  3488. input = &UpdateFunctionCodeInput{}
  3489. }
  3490. output = &FunctionConfiguration{}
  3491. req = c.newRequest(op, input, output)
  3492. return
  3493. }
  3494. // UpdateFunctionCode API operation for AWS Lambda.
  3495. //
  3496. // Updates a Lambda function's code.
  3497. //
  3498. // The function's code is locked when you publish a version. You cannot modify
  3499. // the code of a published version, only the unpublished version.
  3500. //
  3501. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3502. // with awserr.Error's Code and Message methods to get detailed information about
  3503. // the error.
  3504. //
  3505. // See the AWS API reference guide for AWS Lambda's
  3506. // API operation UpdateFunctionCode for usage and error information.
  3507. //
  3508. // Returned Error Codes:
  3509. // * ErrCodeServiceException "ServiceException"
  3510. // The AWS Lambda service encountered an internal error.
  3511. //
  3512. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  3513. // The resource (for example, a Lambda function or access policy statement)
  3514. // specified in the request does not exist.
  3515. //
  3516. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  3517. // One of the parameters in the request is invalid. For example, if you provided
  3518. // an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
  3519. // API, that AWS Lambda is unable to assume you will get this exception.
  3520. //
  3521. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  3522. // Request throughput limit exceeded.
  3523. //
  3524. // * ErrCodeCodeStorageExceededException "CodeStorageExceededException"
  3525. // You have exceeded your maximum total code size per account. Limits (http://docs.aws.amazon.com/lambda/latest/dg/limits.html)
  3526. //
  3527. // * ErrCodePreconditionFailedException "PreconditionFailedException"
  3528. // The RevisionId provided does not match the latest RevisionId for the Lambda
  3529. // function or alias. Call the GetFunction or the GetAlias API to retrieve the
  3530. // latest RevisionId for your resource.
  3531. //
  3532. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateFunctionCode
  3533. func (c *Lambda) UpdateFunctionCode(input *UpdateFunctionCodeInput) (*FunctionConfiguration, error) {
  3534. req, out := c.UpdateFunctionCodeRequest(input)
  3535. return out, req.Send()
  3536. }
  3537. // UpdateFunctionCodeWithContext is the same as UpdateFunctionCode with the addition of
  3538. // the ability to pass a context and additional request options.
  3539. //
  3540. // See UpdateFunctionCode for details on how to use this API operation.
  3541. //
  3542. // The context must be non-nil and will be used for request cancellation. If
  3543. // the context is nil a panic will occur. In the future the SDK may create
  3544. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3545. // for more information on using Contexts.
  3546. func (c *Lambda) UpdateFunctionCodeWithContext(ctx aws.Context, input *UpdateFunctionCodeInput, opts ...request.Option) (*FunctionConfiguration, error) {
  3547. req, out := c.UpdateFunctionCodeRequest(input)
  3548. req.SetContext(ctx)
  3549. req.ApplyOptions(opts...)
  3550. return out, req.Send()
  3551. }
  3552. const opUpdateFunctionConfiguration = "UpdateFunctionConfiguration"
  3553. // UpdateFunctionConfigurationRequest generates a "aws/request.Request" representing the
  3554. // client's request for the UpdateFunctionConfiguration operation. The "output" return
  3555. // value will be populated with the request's response once the request completes
  3556. // successfully.
  3557. //
  3558. // Use "Send" method on the returned Request to send the API call to the service.
  3559. // the "output" return value is not valid until after Send returns without error.
  3560. //
  3561. // See UpdateFunctionConfiguration for more information on using the UpdateFunctionConfiguration
  3562. // API call, and error handling.
  3563. //
  3564. // This method is useful when you want to inject custom logic or configuration
  3565. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3566. //
  3567. //
  3568. // // Example sending a request using the UpdateFunctionConfigurationRequest method.
  3569. // req, resp := client.UpdateFunctionConfigurationRequest(params)
  3570. //
  3571. // err := req.Send()
  3572. // if err == nil { // resp is now filled
  3573. // fmt.Println(resp)
  3574. // }
  3575. //
  3576. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateFunctionConfiguration
  3577. func (c *Lambda) UpdateFunctionConfigurationRequest(input *UpdateFunctionConfigurationInput) (req *request.Request, output *FunctionConfiguration) {
  3578. op := &request.Operation{
  3579. Name: opUpdateFunctionConfiguration,
  3580. HTTPMethod: "PUT",
  3581. HTTPPath: "/2015-03-31/functions/{FunctionName}/configuration",
  3582. }
  3583. if input == nil {
  3584. input = &UpdateFunctionConfigurationInput{}
  3585. }
  3586. output = &FunctionConfiguration{}
  3587. req = c.newRequest(op, input, output)
  3588. return
  3589. }
  3590. // UpdateFunctionConfiguration API operation for AWS Lambda.
  3591. //
  3592. // Modify the version-specifc settings of a Lambda function.
  3593. //
  3594. // These settings can vary between versions of a function and are locked when
  3595. // you publish a version. You cannot modify the configuration of a published
  3596. // version, only the unpublished version.
  3597. //
  3598. // To configure function concurrency, use PutFunctionConcurrency. To grant invoke
  3599. // permissions to an account or AWS service, use AddPermission.
  3600. //
  3601. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3602. // with awserr.Error's Code and Message methods to get detailed information about
  3603. // the error.
  3604. //
  3605. // See the AWS API reference guide for AWS Lambda's
  3606. // API operation UpdateFunctionConfiguration for usage and error information.
  3607. //
  3608. // Returned Error Codes:
  3609. // * ErrCodeServiceException "ServiceException"
  3610. // The AWS Lambda service encountered an internal error.
  3611. //
  3612. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  3613. // The resource (for example, a Lambda function or access policy statement)
  3614. // specified in the request does not exist.
  3615. //
  3616. // * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
  3617. // One of the parameters in the request is invalid. For example, if you provided
  3618. // an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
  3619. // API, that AWS Lambda is unable to assume you will get this exception.
  3620. //
  3621. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  3622. // Request throughput limit exceeded.
  3623. //
  3624. // * ErrCodeResourceConflictException "ResourceConflictException"
  3625. // The resource already exists.
  3626. //
  3627. // * ErrCodePreconditionFailedException "PreconditionFailedException"
  3628. // The RevisionId provided does not match the latest RevisionId for the Lambda
  3629. // function or alias. Call the GetFunction or the GetAlias API to retrieve the
  3630. // latest RevisionId for your resource.
  3631. //
  3632. // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateFunctionConfiguration
  3633. func (c *Lambda) UpdateFunctionConfiguration(input *UpdateFunctionConfigurationInput) (*FunctionConfiguration, error) {
  3634. req, out := c.UpdateFunctionConfigurationRequest(input)
  3635. return out, req.Send()
  3636. }
  3637. // UpdateFunctionConfigurationWithContext is the same as UpdateFunctionConfiguration with the addition of
  3638. // the ability to pass a context and additional request options.
  3639. //
  3640. // See UpdateFunctionConfiguration for details on how to use this API operation.
  3641. //
  3642. // The context must be non-nil and will be used for request cancellation. If
  3643. // the context is nil a panic will occur. In the future the SDK may create
  3644. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3645. // for more information on using Contexts.
  3646. func (c *Lambda) UpdateFunctionConfigurationWithContext(ctx aws.Context, input *UpdateFunctionConfigurationInput, opts ...request.Option) (*FunctionConfiguration, error) {
  3647. req, out := c.UpdateFunctionConfigurationRequest(input)
  3648. req.SetContext(ctx)
  3649. req.ApplyOptions(opts...)
  3650. return out, req.Send()
  3651. }
  3652. // Limits related to concurrency and code storage. All file and storage sizes
  3653. // are in bytes.
  3654. type AccountLimit struct {
  3655. _ struct{} `type:"structure"`
  3656. // The maximum size of your function's code and layers when extracted.
  3657. CodeSizeUnzipped *int64 `type:"long"`
  3658. // The maximum size of a deployment package when uploaded direcly to AWS Lambda.
  3659. // Use Amazon S3 for larger files.
  3660. CodeSizeZipped *int64 `type:"long"`
  3661. // The maximum number of simultaneous function executions.
  3662. ConcurrentExecutions *int64 `type:"integer"`
  3663. // The amount of storage space that you can use for all deployment packages
  3664. // and layer archives.
  3665. TotalCodeSize *int64 `type:"long"`
  3666. // The maximum number of simultaneous function executions, less the concurrency
  3667. // reserved for individual functions with PutFunctionConcurrency.
  3668. UnreservedConcurrentExecutions *int64 `type:"integer"`
  3669. }
  3670. // String returns the string representation
  3671. func (s AccountLimit) String() string {
  3672. return awsutil.Prettify(s)
  3673. }
  3674. // GoString returns the string representation
  3675. func (s AccountLimit) GoString() string {
  3676. return s.String()
  3677. }
  3678. // SetCodeSizeUnzipped sets the CodeSizeUnzipped field's value.
  3679. func (s *AccountLimit) SetCodeSizeUnzipped(v int64) *AccountLimit {
  3680. s.CodeSizeUnzipped = &v
  3681. return s
  3682. }
  3683. // SetCodeSizeZipped sets the CodeSizeZipped field's value.
  3684. func (s *AccountLimit) SetCodeSizeZipped(v int64) *AccountLimit {
  3685. s.CodeSizeZipped = &v
  3686. return s
  3687. }
  3688. // SetConcurrentExecutions sets the ConcurrentExecutions field's value.
  3689. func (s *AccountLimit) SetConcurrentExecutions(v int64) *AccountLimit {
  3690. s.ConcurrentExecutions = &v
  3691. return s
  3692. }
  3693. // SetTotalCodeSize sets the TotalCodeSize field's value.
  3694. func (s *AccountLimit) SetTotalCodeSize(v int64) *AccountLimit {
  3695. s.TotalCodeSize = &v
  3696. return s
  3697. }
  3698. // SetUnreservedConcurrentExecutions sets the UnreservedConcurrentExecutions field's value.
  3699. func (s *AccountLimit) SetUnreservedConcurrentExecutions(v int64) *AccountLimit {
  3700. s.UnreservedConcurrentExecutions = &v
  3701. return s
  3702. }
  3703. // The number of functions and amount of storage in use.
  3704. type AccountUsage struct {
  3705. _ struct{} `type:"structure"`
  3706. // The number of Lambda functions.
  3707. FunctionCount *int64 `type:"long"`
  3708. // The amount of storage space, in bytes, in use by deployment packages and
  3709. // layer archives.
  3710. TotalCodeSize *int64 `type:"long"`
  3711. }
  3712. // String returns the string representation
  3713. func (s AccountUsage) String() string {
  3714. return awsutil.Prettify(s)
  3715. }
  3716. // GoString returns the string representation
  3717. func (s AccountUsage) GoString() string {
  3718. return s.String()
  3719. }
  3720. // SetFunctionCount sets the FunctionCount field's value.
  3721. func (s *AccountUsage) SetFunctionCount(v int64) *AccountUsage {
  3722. s.FunctionCount = &v
  3723. return s
  3724. }
  3725. // SetTotalCodeSize sets the TotalCodeSize field's value.
  3726. func (s *AccountUsage) SetTotalCodeSize(v int64) *AccountUsage {
  3727. s.TotalCodeSize = &v
  3728. return s
  3729. }
  3730. type AddLayerVersionPermissionInput struct {
  3731. _ struct{} `type:"structure"`
  3732. // The API action that grants access to the layer. For example, lambda:GetLayerVersion.
  3733. //
  3734. // Action is a required field
  3735. Action *string `type:"string" required:"true"`
  3736. // The name or Amazon Resource Name (ARN) of the layer.
  3737. //
  3738. // LayerName is a required field
  3739. LayerName *string `location:"uri" locationName:"LayerName" min:"1" type:"string" required:"true"`
  3740. // With the principal set to *, grant permission to all accounts in the specified
  3741. // organization.
  3742. OrganizationId *string `type:"string"`
  3743. // An account ID, or * to grant permission to all AWS accounts.
  3744. //
  3745. // Principal is a required field
  3746. Principal *string `type:"string" required:"true"`
  3747. // Only update the policy if the revision ID matches the ID specified. Use this
  3748. // option to avoid modifying a policy that has changed since you last read it.
  3749. RevisionId *string `location:"querystring" locationName:"RevisionId" type:"string"`
  3750. // An identifier that distinguishes the policy from others on the same layer
  3751. // version.
  3752. //
  3753. // StatementId is a required field
  3754. StatementId *string `min:"1" type:"string" required:"true"`
  3755. // The version number.
  3756. //
  3757. // VersionNumber is a required field
  3758. VersionNumber *int64 `location:"uri" locationName:"VersionNumber" type:"long" required:"true"`
  3759. }
  3760. // String returns the string representation
  3761. func (s AddLayerVersionPermissionInput) String() string {
  3762. return awsutil.Prettify(s)
  3763. }
  3764. // GoString returns the string representation
  3765. func (s AddLayerVersionPermissionInput) GoString() string {
  3766. return s.String()
  3767. }
  3768. // Validate inspects the fields of the type to determine if they are valid.
  3769. func (s *AddLayerVersionPermissionInput) Validate() error {
  3770. invalidParams := request.ErrInvalidParams{Context: "AddLayerVersionPermissionInput"}
  3771. if s.Action == nil {
  3772. invalidParams.Add(request.NewErrParamRequired("Action"))
  3773. }
  3774. if s.LayerName == nil {
  3775. invalidParams.Add(request.NewErrParamRequired("LayerName"))
  3776. }
  3777. if s.LayerName != nil && len(*s.LayerName) < 1 {
  3778. invalidParams.Add(request.NewErrParamMinLen("LayerName", 1))
  3779. }
  3780. if s.Principal == nil {
  3781. invalidParams.Add(request.NewErrParamRequired("Principal"))
  3782. }
  3783. if s.StatementId == nil {
  3784. invalidParams.Add(request.NewErrParamRequired("StatementId"))
  3785. }
  3786. if s.StatementId != nil && len(*s.StatementId) < 1 {
  3787. invalidParams.Add(request.NewErrParamMinLen("StatementId", 1))
  3788. }
  3789. if s.VersionNumber == nil {
  3790. invalidParams.Add(request.NewErrParamRequired("VersionNumber"))
  3791. }
  3792. if invalidParams.Len() > 0 {
  3793. return invalidParams
  3794. }
  3795. return nil
  3796. }
  3797. // SetAction sets the Action field's value.
  3798. func (s *AddLayerVersionPermissionInput) SetAction(v string) *AddLayerVersionPermissionInput {
  3799. s.Action = &v
  3800. return s
  3801. }
  3802. // SetLayerName sets the LayerName field's value.
  3803. func (s *AddLayerVersionPermissionInput) SetLayerName(v string) *AddLayerVersionPermissionInput {
  3804. s.LayerName = &v
  3805. return s
  3806. }
  3807. // SetOrganizationId sets the OrganizationId field's value.
  3808. func (s *AddLayerVersionPermissionInput) SetOrganizationId(v string) *AddLayerVersionPermissionInput {
  3809. s.OrganizationId = &v
  3810. return s
  3811. }
  3812. // SetPrincipal sets the Principal field's value.
  3813. func (s *AddLayerVersionPermissionInput) SetPrincipal(v string) *AddLayerVersionPermissionInput {
  3814. s.Principal = &v
  3815. return s
  3816. }
  3817. // SetRevisionId sets the RevisionId field's value.
  3818. func (s *AddLayerVersionPermissionInput) SetRevisionId(v string) *AddLayerVersionPermissionInput {
  3819. s.RevisionId = &v
  3820. return s
  3821. }
  3822. // SetStatementId sets the StatementId field's value.
  3823. func (s *AddLayerVersionPermissionInput) SetStatementId(v string) *AddLayerVersionPermissionInput {
  3824. s.StatementId = &v
  3825. return s
  3826. }
  3827. // SetVersionNumber sets the VersionNumber field's value.
  3828. func (s *AddLayerVersionPermissionInput) SetVersionNumber(v int64) *AddLayerVersionPermissionInput {
  3829. s.VersionNumber = &v
  3830. return s
  3831. }
  3832. type AddLayerVersionPermissionOutput struct {
  3833. _ struct{} `type:"structure"`
  3834. // A unique identifier for the current revision of the policy.
  3835. RevisionId *string `type:"string"`
  3836. // The permission statement.
  3837. Statement *string `type:"string"`
  3838. }
  3839. // String returns the string representation
  3840. func (s AddLayerVersionPermissionOutput) String() string {
  3841. return awsutil.Prettify(s)
  3842. }
  3843. // GoString returns the string representation
  3844. func (s AddLayerVersionPermissionOutput) GoString() string {
  3845. return s.String()
  3846. }
  3847. // SetRevisionId sets the RevisionId field's value.
  3848. func (s *AddLayerVersionPermissionOutput) SetRevisionId(v string) *AddLayerVersionPermissionOutput {
  3849. s.RevisionId = &v
  3850. return s
  3851. }
  3852. // SetStatement sets the Statement field's value.
  3853. func (s *AddLayerVersionPermissionOutput) SetStatement(v string) *AddLayerVersionPermissionOutput {
  3854. s.Statement = &v
  3855. return s
  3856. }
  3857. type AddPermissionInput struct {
  3858. _ struct{} `type:"structure"`
  3859. // The action that the principal can use on the function. For example, lambda:InvokeFunction
  3860. // or lambda:GetFunction.
  3861. //
  3862. // Action is a required field
  3863. Action *string `type:"string" required:"true"`
  3864. // For Alexa Smart Home functions, a token that must be supplied by the invoker.
  3865. EventSourceToken *string `type:"string"`
  3866. // The name of the Lambda function, version, or alias.
  3867. //
  3868. // Name formats
  3869. //
  3870. // * Function name - my-function (name-only), my-function:v1 (with alias).
  3871. //
  3872. // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function.
  3873. //
  3874. // * Partial ARN - 123456789012:function:my-function.
  3875. //
  3876. // You can append a version number or alias to any of the formats. The length
  3877. // constraint applies only to the full ARN. If you specify only the function
  3878. // name, it is limited to 64 characters in length.
  3879. //
  3880. // FunctionName is a required field
  3881. FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
  3882. // The AWS service or account that invokes the function. If you specify a service,
  3883. // use SourceArn or SourceAccount to limit who can invoke the function through
  3884. // that service.
  3885. //
  3886. // Principal is a required field
  3887. Principal *string `type:"string" required:"true"`
  3888. // Specify a version or alias to add permissions to a published version of the
  3889. // function.
  3890. Qualifier *string `location:"querystring" locationName:"Qualifier" min:"1" type:"string"`
  3891. // Only update the policy if the revision ID matches the ID specified. Use this
  3892. // option to avoid modifying a policy that has changed since you last read it.
  3893. RevisionId *string `type:"string"`
  3894. // For AWS services, the ID of the account that owns the resource. Use instead
  3895. // of SourceArn to grant permission to resources owned by another account (e.g.
  3896. // all of an account's Amazon S3 buckets). Or use together with SourceArn to
  3897. // ensure that the resource is owned by the specified account. For example,
  3898. // an Amazon S3 bucket could be deleted by its owner and recreated by another
  3899. // account.
  3900. SourceAccount *string `type:"string"`
  3901. // For AWS services, the ARN of the AWS resource that invokes the function.
  3902. // For example, an Amazon S3 bucket or Amazon SNS topic.
  3903. SourceArn *string `type:"string"`
  3904. // A statement identifier that differentiates the statement from others in the
  3905. // same policy.
  3906. //
  3907. // StatementId is a required field
  3908. StatementId *string `min:"1" type:"string" required:"true"`
  3909. }
  3910. // String returns the string representation
  3911. func (s AddPermissionInput) String() string {
  3912. return awsutil.Prettify(s)
  3913. }
  3914. // GoString returns the string representation
  3915. func (s AddPermissionInput) GoString() string {
  3916. return s.String()
  3917. }
  3918. // Validate inspects the fields of the type to determine if they are valid.
  3919. func (s *AddPermissionInput) Validate() error {
  3920. invalidParams := request.ErrInvalidParams{Context: "AddPermissionInput"}
  3921. if s.Action == nil {
  3922. invalidParams.Add(request.NewErrParamRequired("Action"))
  3923. }
  3924. if s.FunctionName == nil {
  3925. invalidParams.Add(request.NewErrParamRequired("FunctionName"))
  3926. }
  3927. if s.FunctionName != nil && len(*s.FunctionName) < 1 {
  3928. invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
  3929. }
  3930. if s.Principal == nil {
  3931. invalidParams.Add(request.NewErrParamRequired("Principal"))
  3932. }
  3933. if s.Qualifier != nil && len(*s.Qualifier) < 1 {
  3934. invalidParams.Add(request.NewErrParamMinLen("Qualifier", 1))
  3935. }
  3936. if s.StatementId == nil {
  3937. invalidParams.Add(request.NewErrParamRequired("StatementId"))
  3938. }
  3939. if s.StatementId != nil && len(*s.StatementId) < 1 {
  3940. invalidParams.Add(request.NewErrParamMinLen("StatementId", 1))
  3941. }
  3942. if invalidParams.Len() > 0 {
  3943. return invalidParams
  3944. }
  3945. return nil
  3946. }
  3947. // SetAction sets the Action field's value.
  3948. func (s *AddPermissionInput) SetAction(v string) *AddPermissionInput {
  3949. s.Action = &v
  3950. return s
  3951. }
  3952. // SetEventSourceToken sets the EventSourceToken field's value.
  3953. func (s *AddPermissionInput) SetEventSourceToken(v string) *AddPermissionInput {
  3954. s.EventSourceToken = &v
  3955. return s
  3956. }
  3957. // SetFunctionName sets the FunctionName field's value.
  3958. func (s *AddPermissionInput) SetFunctionName(v string) *AddPermissionInput {
  3959. s.FunctionName = &v
  3960. return s
  3961. }
  3962. // SetPrincipal sets the Principal field's value.
  3963. func (s *AddPermissionInput) SetPrincipal(v string) *AddPermissionInput {
  3964. s.Principal = &v
  3965. return s
  3966. }
  3967. // SetQualifier sets the Qualifier field's value.
  3968. func (s *AddPermissionInput) SetQualifier(v string) *AddPermissionInput {
  3969. s.Qualifier = &v
  3970. return s
  3971. }
  3972. // SetRevisionId sets the RevisionId field's value.
  3973. func (s *AddPermissionInput) SetRevisionId(v string) *AddPermissionInput {
  3974. s.RevisionId = &v
  3975. return s
  3976. }
  3977. // SetSourceAccount sets the SourceAccount field's value.
  3978. func (s *AddPermissionInput) SetSourceAccount(v string) *AddPermissionInput {
  3979. s.SourceAccount = &v
  3980. return s
  3981. }
  3982. // SetSourceArn sets the SourceArn field's value.
  3983. func (s *AddPermissionInput) SetSourceArn(v string) *AddPermissionInput {
  3984. s.SourceArn = &v
  3985. return s
  3986. }
  3987. // SetStatementId sets the StatementId field's value.
  3988. func (s *AddPermissionInput) SetStatementId(v string) *AddPermissionInput {
  3989. s.StatementId = &v
  3990. return s
  3991. }
  3992. type AddPermissionOutput struct {
  3993. _ struct{} `type:"structure"`
  3994. // The permission statement added to the function policy.
  3995. Statement *string `type:"string"`
  3996. }
  3997. // String returns the string representation
  3998. func (s AddPermissionOutput) String() string {
  3999. return awsutil.Prettify(s)
  4000. }
  4001. // GoString returns the string representation
  4002. func (s AddPermissionOutput) GoString() string {
  4003. return s.String()
  4004. }
  4005. // SetStatement sets the Statement field's value.
  4006. func (s *AddPermissionOutput) SetStatement(v string) *AddPermissionOutput {
  4007. s.Statement = &v
  4008. return s
  4009. }
  4010. // Provides configuration information about a Lambda function alias (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).
  4011. type AliasConfiguration struct {
  4012. _ struct{} `type:"structure"`
  4013. // The Amazon Resource Name (ARN) of the alias.
  4014. AliasArn *string `type:"string"`
  4015. // A description of the alias.
  4016. Description *string `type:"string"`
  4017. // The function version that the alias invokes.
  4018. FunctionVersion *string `min:"1" type:"string"`
  4019. // The name of the alias.
  4020. Name *string `min:"1" type:"string"`
  4021. // A unique identifier that changes when you update the alias.
  4022. RevisionId *string `type:"string"`
  4023. // The routing configuration (http://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html)
  4024. // of the alias.
  4025. RoutingConfig *AliasRoutingConfiguration `type:"structure"`
  4026. }
  4027. // String returns the string representation
  4028. func (s AliasConfiguration) String() string {
  4029. return awsutil.Prettify(s)
  4030. }
  4031. // GoString returns the string representation
  4032. func (s AliasConfiguration) GoString() string {
  4033. return s.String()
  4034. }
  4035. // SetAliasArn sets the AliasArn field's value.
  4036. func (s *AliasConfiguration) SetAliasArn(v string) *AliasConfiguration {
  4037. s.AliasArn = &v
  4038. return s
  4039. }
  4040. // SetDescription sets the Description field's value.
  4041. func (s *AliasConfiguration) SetDescription(v string) *AliasConfiguration {
  4042. s.Description = &v
  4043. return s
  4044. }
  4045. // SetFunctionVersion sets the FunctionVersion field's value.
  4046. func (s *AliasConfiguration) SetFunctionVersion(v string) *AliasConfiguration {
  4047. s.FunctionVersion = &v
  4048. return s
  4049. }
  4050. // SetName sets the Name field's value.
  4051. func (s *AliasConfiguration) SetName(v string) *AliasConfiguration {
  4052. s.Name = &v
  4053. return s
  4054. }
  4055. // SetRevisionId sets the RevisionId field's value.
  4056. func (s *AliasConfiguration) SetRevisionId(v string) *AliasConfiguration {
  4057. s.RevisionId = &v
  4058. return s
  4059. }
  4060. // SetRoutingConfig sets the RoutingConfig field's value.
  4061. func (s *AliasConfiguration) SetRoutingConfig(v *AliasRoutingConfiguration) *AliasConfiguration {
  4062. s.RoutingConfig = v
  4063. return s
  4064. }
  4065. // A Lambda function alias's traffic shifting (http://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html)
  4066. // configuration.
  4067. type AliasRoutingConfiguration struct {
  4068. _ struct{} `type:"structure"`
  4069. // The name of the second alias, and the percentage of traffic that is routed
  4070. // to it.
  4071. AdditionalVersionWeights map[string]*float64 `type:"map"`
  4072. }
  4073. // String returns the string representation
  4074. func (s AliasRoutingConfiguration) String() string {
  4075. return awsutil.Prettify(s)
  4076. }
  4077. // GoString returns the string representation
  4078. func (s AliasRoutingConfiguration) GoString() string {
  4079. return s.String()
  4080. }
  4081. // SetAdditionalVersionWeights sets the AdditionalVersionWeights field's value.
  4082. func (s *AliasRoutingConfiguration) SetAdditionalVersionWeights(v map[string]*float64) *AliasRoutingConfiguration {
  4083. s.AdditionalVersionWeights = v
  4084. return s
  4085. }
  4086. type CreateAliasInput struct {
  4087. _ struct{} `type:"structure"`
  4088. // A description of the alias.
  4089. Description *string `type:"string"`
  4090. // The name of the lambda function.
  4091. //
  4092. // Name formats
  4093. //
  4094. // * Function name - MyFunction.
  4095. //
  4096. // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction.
  4097. //
  4098. // * Partial ARN - 123456789012:function:MyFunction.
  4099. //
  4100. // The length constraint applies only to the full ARN. If you specify only the
  4101. // function name, it is limited to 64 characters in length.
  4102. //
  4103. // FunctionName is a required field
  4104. FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
  4105. // The function version that the alias invokes.
  4106. //
  4107. // FunctionVersion is a required field
  4108. FunctionVersion *string `min:"1" type:"string" required:"true"`
  4109. // The name of the alias.
  4110. //
  4111. // Name is a required field
  4112. Name *string `min:"1" type:"string" required:"true"`
  4113. // The routing configuration (http://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html)
  4114. // of the alias.
  4115. RoutingConfig *AliasRoutingConfiguration `type:"structure"`
  4116. }
  4117. // String returns the string representation
  4118. func (s CreateAliasInput) String() string {
  4119. return awsutil.Prettify(s)
  4120. }
  4121. // GoString returns the string representation
  4122. func (s CreateAliasInput) GoString() string {
  4123. return s.String()
  4124. }
  4125. // Validate inspects the fields of the type to determine if they are valid.
  4126. func (s *CreateAliasInput) Validate() error {
  4127. invalidParams := request.ErrInvalidParams{Context: "CreateAliasInput"}
  4128. if s.FunctionName == nil {
  4129. invalidParams.Add(request.NewErrParamRequired("FunctionName"))
  4130. }
  4131. if s.FunctionName != nil && len(*s.FunctionName) < 1 {
  4132. invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
  4133. }
  4134. if s.FunctionVersion == nil {
  4135. invalidParams.Add(request.NewErrParamRequired("FunctionVersion"))
  4136. }
  4137. if s.FunctionVersion != nil && len(*s.FunctionVersion) < 1 {
  4138. invalidParams.Add(request.NewErrParamMinLen("FunctionVersion", 1))
  4139. }
  4140. if s.Name == nil {
  4141. invalidParams.Add(request.NewErrParamRequired("Name"))
  4142. }
  4143. if s.Name != nil && len(*s.Name) < 1 {
  4144. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  4145. }
  4146. if invalidParams.Len() > 0 {
  4147. return invalidParams
  4148. }
  4149. return nil
  4150. }
  4151. // SetDescription sets the Description field's value.
  4152. func (s *CreateAliasInput) SetDescription(v string) *CreateAliasInput {
  4153. s.Description = &v
  4154. return s
  4155. }
  4156. // SetFunctionName sets the FunctionName field's value.
  4157. func (s *CreateAliasInput) SetFunctionName(v string) *CreateAliasInput {
  4158. s.FunctionName = &v
  4159. return s
  4160. }
  4161. // SetFunctionVersion sets the FunctionVersion field's value.
  4162. func (s *CreateAliasInput) SetFunctionVersion(v string) *CreateAliasInput {
  4163. s.FunctionVersion = &v
  4164. return s
  4165. }
  4166. // SetName sets the Name field's value.
  4167. func (s *CreateAliasInput) SetName(v string) *CreateAliasInput {
  4168. s.Name = &v
  4169. return s
  4170. }
  4171. // SetRoutingConfig sets the RoutingConfig field's value.
  4172. func (s *CreateAliasInput) SetRoutingConfig(v *AliasRoutingConfiguration) *CreateAliasInput {
  4173. s.RoutingConfig = v
  4174. return s
  4175. }
  4176. type CreateEventSourceMappingInput struct {
  4177. _ struct{} `type:"structure"`
  4178. // The maximum number of items to retrieve in a single batch.
  4179. //
  4180. // * Amazon Kinesis - Default 100. Max 10,000.
  4181. //
  4182. // * Amazon DynamoDB Streams - Default 100. Max 1,000.
  4183. //
  4184. // * Amazon Simple Queue Service - Default 10. Max 10.
  4185. BatchSize *int64 `min:"1" type:"integer"`
  4186. // Disables the event source mapping to pause polling and invocation.
  4187. Enabled *bool `type:"boolean"`
  4188. // The Amazon Resource Name (ARN) of the event source.
  4189. //
  4190. // * Amazon Kinesis - The ARN of the data stream or a stream consumer.
  4191. //
  4192. // * Amazon DynamoDB Streams - The ARN of the stream.
  4193. //
  4194. // * Amazon Simple Queue Service - The ARN of the queue.
  4195. //
  4196. // EventSourceArn is a required field
  4197. EventSourceArn *string `type:"string" required:"true"`
  4198. // The name of the Lambda function.
  4199. //
  4200. // Name formats
  4201. //
  4202. // * Function name - MyFunction.
  4203. //
  4204. // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction.
  4205. //
  4206. // * Version or Alias ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD.
  4207. //
  4208. // * Partial ARN - 123456789012:function:MyFunction.
  4209. //
  4210. // The length constraint applies only to the full ARN. If you specify only the
  4211. // function name, it's limited to 64 characters in length.
  4212. //
  4213. // FunctionName is a required field
  4214. FunctionName *string `min:"1" type:"string" required:"true"`
  4215. // The position in a stream from which to start reading. Required for Amazon
  4216. // Kinesis and Amazon DynamoDB Streams sources. AT_TIMESTAMP is only supported
  4217. // for Amazon Kinesis streams.
  4218. StartingPosition *string `type:"string" enum:"EventSourcePosition"`
  4219. // With StartingPosition set to AT_TIMESTAMP, the time from which to start reading.
  4220. StartingPositionTimestamp *time.Time `type:"timestamp"`
  4221. }
  4222. // String returns the string representation
  4223. func (s CreateEventSourceMappingInput) String() string {
  4224. return awsutil.Prettify(s)
  4225. }
  4226. // GoString returns the string representation
  4227. func (s CreateEventSourceMappingInput) GoString() string {
  4228. return s.String()
  4229. }
  4230. // Validate inspects the fields of the type to determine if they are valid.
  4231. func (s *CreateEventSourceMappingInput) Validate() error {
  4232. invalidParams := request.ErrInvalidParams{Context: "CreateEventSourceMappingInput"}
  4233. if s.BatchSize != nil && *s.BatchSize < 1 {
  4234. invalidParams.Add(request.NewErrParamMinValue("BatchSize", 1))
  4235. }
  4236. if s.EventSourceArn == nil {
  4237. invalidParams.Add(request.NewErrParamRequired("EventSourceArn"))
  4238. }
  4239. if s.FunctionName == nil {
  4240. invalidParams.Add(request.NewErrParamRequired("FunctionName"))
  4241. }
  4242. if s.FunctionName != nil && len(*s.FunctionName) < 1 {
  4243. invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
  4244. }
  4245. if invalidParams.Len() > 0 {
  4246. return invalidParams
  4247. }
  4248. return nil
  4249. }
  4250. // SetBatchSize sets the BatchSize field's value.
  4251. func (s *CreateEventSourceMappingInput) SetBatchSize(v int64) *CreateEventSourceMappingInput {
  4252. s.BatchSize = &v
  4253. return s
  4254. }
  4255. // SetEnabled sets the Enabled field's value.
  4256. func (s *CreateEventSourceMappingInput) SetEnabled(v bool) *CreateEventSourceMappingInput {
  4257. s.Enabled = &v
  4258. return s
  4259. }
  4260. // SetEventSourceArn sets the EventSourceArn field's value.
  4261. func (s *CreateEventSourceMappingInput) SetEventSourceArn(v string) *CreateEventSourceMappingInput {
  4262. s.EventSourceArn = &v
  4263. return s
  4264. }
  4265. // SetFunctionName sets the FunctionName field's value.
  4266. func (s *CreateEventSourceMappingInput) SetFunctionName(v string) *CreateEventSourceMappingInput {
  4267. s.FunctionName = &v
  4268. return s
  4269. }
  4270. // SetStartingPosition sets the StartingPosition field's value.
  4271. func (s *CreateEventSourceMappingInput) SetStartingPosition(v string) *CreateEventSourceMappingInput {
  4272. s.StartingPosition = &v
  4273. return s
  4274. }
  4275. // SetStartingPositionTimestamp sets the StartingPositionTimestamp field's value.
  4276. func (s *CreateEventSourceMappingInput) SetStartingPositionTimestamp(v time.Time) *CreateEventSourceMappingInput {
  4277. s.StartingPositionTimestamp = &v
  4278. return s
  4279. }
  4280. type CreateFunctionInput struct {
  4281. _ struct{} `type:"structure"`
  4282. // The code for the function.
  4283. //
  4284. // Code is a required field
  4285. Code *FunctionCode `type:"structure" required:"true"`
  4286. // A dead letter queue configuration that specifies the queue or topic where
  4287. // Lambda sends asynchronous events when they fail processing. For more information,
  4288. // see Dead Letter Queues (http://docs.aws.amazon.com/lambda/latest/dg/dlq.html).
  4289. DeadLetterConfig *DeadLetterConfig `type:"structure"`
  4290. // A description of the function.
  4291. Description *string `type:"string"`
  4292. // Environment variables that are accessible from function code during execution.
  4293. Environment *Environment `type:"structure"`
  4294. // The name of the Lambda function.
  4295. //
  4296. // Name formats
  4297. //
  4298. // * Function name - my-function.
  4299. //
  4300. // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function.
  4301. //
  4302. // * Partial ARN - 123456789012:function:my-function.
  4303. //
  4304. // The length constraint applies only to the full ARN. If you specify only the
  4305. // function name, it is limited to 64 characters in length.
  4306. //
  4307. // FunctionName is a required field
  4308. FunctionName *string `min:"1" type:"string" required:"true"`
  4309. // The name of the method within your code that Lambda calls to execute your
  4310. // function. The format includes the filename and can also include namespaces
  4311. // and other qualifiers, depending on the runtime. For more information, see
  4312. // Programming Model (http://docs.aws.amazon.com/lambda/latest/dg/programming-model-v2.html).
  4313. //
  4314. // Handler is a required field
  4315. Handler *string `type:"string" required:"true"`
  4316. // The ARN of the AWS Key Management Service key used to encrypt your function's
  4317. // environment variables. If not provided, AWS Lambda uses a default service
  4318. // key.
  4319. KMSKeyArn *string `type:"string"`
  4320. // A list of function layers (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html)
  4321. // to add to the function's execution environment. Specify each layer by ARN,
  4322. // including the version.
  4323. Layers []*string `type:"list"`
  4324. // The amount of memory that your function has access to. Increasing the function's
  4325. // memory also increases it's CPU allocation. The default value is 128 MB. The
  4326. // value must be a multiple of 64 MB.
  4327. MemorySize *int64 `min:"128" type:"integer"`
  4328. // Set to true to publish the first version of the function during creation.
  4329. Publish *bool `type:"boolean"`
  4330. // The Amazon Resource Name (ARN) of the function's execution role.
  4331. //
  4332. // Role is a required field
  4333. Role *string `type:"string" required:"true"`
  4334. // The identifier of the function's runtime (http://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html).
  4335. //
  4336. // Runtime is a required field
  4337. Runtime *string `type:"string" required:"true" enum:"Runtime"`
  4338. // A list of tags (http://docs.aws.amazon.com/lambda/latest/dg/tagging.html)
  4339. // to apply to the function.
  4340. Tags map[string]*string `type:"map"`
  4341. // The amount of time that Lambda allows a function to run before terminating
  4342. // it. The default is 3 seconds. The maximum allowed value is 900 seconds.
  4343. Timeout *int64 `min:"1" type:"integer"`
  4344. // Set Mode to Active to sample and trace a subset of incoming requests with
  4345. // AWS X-Ray.
  4346. TracingConfig *TracingConfig `type:"structure"`
  4347. // For network connectivity to AWS resources in a VPC, specify a list of security
  4348. // groups and subnets in the VPC. When you connect a function to a VPC, it can
  4349. // only access resources and the internet through that VPC. For more information,
  4350. // see VPC Settings (http://docs.aws.amazon.com/lambda/latest/dg/vpc.html).
  4351. VpcConfig *VpcConfig `type:"structure"`
  4352. }
  4353. // String returns the string representation
  4354. func (s CreateFunctionInput) String() string {
  4355. return awsutil.Prettify(s)
  4356. }
  4357. // GoString returns the string representation
  4358. func (s CreateFunctionInput) GoString() string {
  4359. return s.String()
  4360. }
  4361. // Validate inspects the fields of the type to determine if they are valid.
  4362. func (s *CreateFunctionInput) Validate() error {
  4363. invalidParams := request.ErrInvalidParams{Context: "CreateFunctionInput"}
  4364. if s.Code == nil {
  4365. invalidParams.Add(request.NewErrParamRequired("Code"))
  4366. }
  4367. if s.FunctionName == nil {
  4368. invalidParams.Add(request.NewErrParamRequired("FunctionName"))
  4369. }
  4370. if s.FunctionName != nil && len(*s.FunctionName) < 1 {
  4371. invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
  4372. }
  4373. if s.Handler == nil {
  4374. invalidParams.Add(request.NewErrParamRequired("Handler"))
  4375. }
  4376. if s.MemorySize != nil && *s.MemorySize < 128 {
  4377. invalidParams.Add(request.NewErrParamMinValue("MemorySize", 128))
  4378. }
  4379. if s.Role == nil {
  4380. invalidParams.Add(request.NewErrParamRequired("Role"))
  4381. }
  4382. if s.Runtime == nil {
  4383. invalidParams.Add(request.NewErrParamRequired("Runtime"))
  4384. }
  4385. if s.Timeout != nil && *s.Timeout < 1 {
  4386. invalidParams.Add(request.NewErrParamMinValue("Timeout", 1))
  4387. }
  4388. if s.Code != nil {
  4389. if err := s.Code.Validate(); err != nil {
  4390. invalidParams.AddNested("Code", err.(request.ErrInvalidParams))
  4391. }
  4392. }
  4393. if invalidParams.Len() > 0 {
  4394. return invalidParams
  4395. }
  4396. return nil
  4397. }
  4398. // SetCode sets the Code field's value.
  4399. func (s *CreateFunctionInput) SetCode(v *FunctionCode) *CreateFunctionInput {
  4400. s.Code = v
  4401. return s
  4402. }
  4403. // SetDeadLetterConfig sets the DeadLetterConfig field's value.
  4404. func (s *CreateFunctionInput) SetDeadLetterConfig(v *DeadLetterConfig) *CreateFunctionInput {
  4405. s.DeadLetterConfig = v
  4406. return s
  4407. }
  4408. // SetDescription sets the Description field's value.
  4409. func (s *CreateFunctionInput) SetDescription(v string) *CreateFunctionInput {
  4410. s.Description = &v
  4411. return s
  4412. }
  4413. // SetEnvironment sets the Environment field's value.
  4414. func (s *CreateFunctionInput) SetEnvironment(v *Environment) *CreateFunctionInput {
  4415. s.Environment = v
  4416. return s
  4417. }
  4418. // SetFunctionName sets the FunctionName field's value.
  4419. func (s *CreateFunctionInput) SetFunctionName(v string) *CreateFunctionInput {
  4420. s.FunctionName = &v
  4421. return s
  4422. }
  4423. // SetHandler sets the Handler field's value.
  4424. func (s *CreateFunctionInput) SetHandler(v string) *CreateFunctionInput {
  4425. s.Handler = &v
  4426. return s
  4427. }
  4428. // SetKMSKeyArn sets the KMSKeyArn field's value.
  4429. func (s *CreateFunctionInput) SetKMSKeyArn(v string) *CreateFunctionInput {
  4430. s.KMSKeyArn = &v
  4431. return s
  4432. }
  4433. // SetLayers sets the Layers field's value.
  4434. func (s *CreateFunctionInput) SetLayers(v []*string) *CreateFunctionInput {
  4435. s.Layers = v
  4436. return s
  4437. }
  4438. // SetMemorySize sets the MemorySize field's value.
  4439. func (s *CreateFunctionInput) SetMemorySize(v int64) *CreateFunctionInput {
  4440. s.MemorySize = &v
  4441. return s
  4442. }
  4443. // SetPublish sets the Publish field's value.
  4444. func (s *CreateFunctionInput) SetPublish(v bool) *CreateFunctionInput {
  4445. s.Publish = &v
  4446. return s
  4447. }
  4448. // SetRole sets the Role field's value.
  4449. func (s *CreateFunctionInput) SetRole(v string) *CreateFunctionInput {
  4450. s.Role = &v
  4451. return s
  4452. }
  4453. // SetRuntime sets the Runtime field's value.
  4454. func (s *CreateFunctionInput) SetRuntime(v string) *CreateFunctionInput {
  4455. s.Runtime = &v
  4456. return s
  4457. }
  4458. // SetTags sets the Tags field's value.
  4459. func (s *CreateFunctionInput) SetTags(v map[string]*string) *CreateFunctionInput {
  4460. s.Tags = v
  4461. return s
  4462. }
  4463. // SetTimeout sets the Timeout field's value.
  4464. func (s *CreateFunctionInput) SetTimeout(v int64) *CreateFunctionInput {
  4465. s.Timeout = &v
  4466. return s
  4467. }
  4468. // SetTracingConfig sets the TracingConfig field's value.
  4469. func (s *CreateFunctionInput) SetTracingConfig(v *TracingConfig) *CreateFunctionInput {
  4470. s.TracingConfig = v
  4471. return s
  4472. }
  4473. // SetVpcConfig sets the VpcConfig field's value.
  4474. func (s *CreateFunctionInput) SetVpcConfig(v *VpcConfig) *CreateFunctionInput {
  4475. s.VpcConfig = v
  4476. return s
  4477. }
  4478. // The dead letter queue (http://docs.aws.amazon.com/lambda/latest/dg/dlq.html)
  4479. // for failed asynchronous invocations.
  4480. type DeadLetterConfig struct {
  4481. _ struct{} `type:"structure"`
  4482. // The Amazon Resource Name (ARN) of an Amazon SQS queue or Amazon SNS topic.
  4483. TargetArn *string `type:"string"`
  4484. }
  4485. // String returns the string representation
  4486. func (s DeadLetterConfig) String() string {
  4487. return awsutil.Prettify(s)
  4488. }
  4489. // GoString returns the string representation
  4490. func (s DeadLetterConfig) GoString() string {
  4491. return s.String()
  4492. }
  4493. // SetTargetArn sets the TargetArn field's value.
  4494. func (s *DeadLetterConfig) SetTargetArn(v string) *DeadLetterConfig {
  4495. s.TargetArn = &v
  4496. return s
  4497. }
  4498. type DeleteAliasInput struct {
  4499. _ struct{} `type:"structure"`
  4500. // The name of the lambda function.
  4501. //
  4502. // Name formats
  4503. //
  4504. // * Function name - MyFunction.
  4505. //
  4506. // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction.
  4507. //
  4508. // * Partial ARN - 123456789012:function:MyFunction.
  4509. //
  4510. // The length constraint applies only to the full ARN. If you specify only the
  4511. // function name, it is limited to 64 characters in length.
  4512. //
  4513. // FunctionName is a required field
  4514. FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
  4515. // The name of the alias.
  4516. //
  4517. // Name is a required field
  4518. Name *string `location:"uri" locationName:"Name" min:"1" type:"string" required:"true"`
  4519. }
  4520. // String returns the string representation
  4521. func (s DeleteAliasInput) String() string {
  4522. return awsutil.Prettify(s)
  4523. }
  4524. // GoString returns the string representation
  4525. func (s DeleteAliasInput) GoString() string {
  4526. return s.String()
  4527. }
  4528. // Validate inspects the fields of the type to determine if they are valid.
  4529. func (s *DeleteAliasInput) Validate() error {
  4530. invalidParams := request.ErrInvalidParams{Context: "DeleteAliasInput"}
  4531. if s.FunctionName == nil {
  4532. invalidParams.Add(request.NewErrParamRequired("FunctionName"))
  4533. }
  4534. if s.FunctionName != nil && len(*s.FunctionName) < 1 {
  4535. invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
  4536. }
  4537. if s.Name == nil {
  4538. invalidParams.Add(request.NewErrParamRequired("Name"))
  4539. }
  4540. if s.Name != nil && len(*s.Name) < 1 {
  4541. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  4542. }
  4543. if invalidParams.Len() > 0 {
  4544. return invalidParams
  4545. }
  4546. return nil
  4547. }
  4548. // SetFunctionName sets the FunctionName field's value.
  4549. func (s *DeleteAliasInput) SetFunctionName(v string) *DeleteAliasInput {
  4550. s.FunctionName = &v
  4551. return s
  4552. }
  4553. // SetName sets the Name field's value.
  4554. func (s *DeleteAliasInput) SetName(v string) *DeleteAliasInput {
  4555. s.Name = &v
  4556. return s
  4557. }
  4558. type DeleteAliasOutput struct {
  4559. _ struct{} `type:"structure"`
  4560. }
  4561. // String returns the string representation
  4562. func (s DeleteAliasOutput) String() string {
  4563. return awsutil.Prettify(s)
  4564. }
  4565. // GoString returns the string representation
  4566. func (s DeleteAliasOutput) GoString() string {
  4567. return s.String()
  4568. }
  4569. type DeleteEventSourceMappingInput struct {
  4570. _ struct{} `type:"structure"`
  4571. // The identifier of the event source mapping.
  4572. //
  4573. // UUID is a required field
  4574. UUID *string `location:"uri" locationName:"UUID" type:"string" required:"true"`
  4575. }
  4576. // String returns the string representation
  4577. func (s DeleteEventSourceMappingInput) String() string {
  4578. return awsutil.Prettify(s)
  4579. }
  4580. // GoString returns the string representation
  4581. func (s DeleteEventSourceMappingInput) GoString() string {
  4582. return s.String()
  4583. }
  4584. // Validate inspects the fields of the type to determine if they are valid.
  4585. func (s *DeleteEventSourceMappingInput) Validate() error {
  4586. invalidParams := request.ErrInvalidParams{Context: "DeleteEventSourceMappingInput"}
  4587. if s.UUID == nil {
  4588. invalidParams.Add(request.NewErrParamRequired("UUID"))
  4589. }
  4590. if s.UUID != nil && len(*s.UUID) < 1 {
  4591. invalidParams.Add(request.NewErrParamMinLen("UUID", 1))
  4592. }
  4593. if invalidParams.Len() > 0 {
  4594. return invalidParams
  4595. }
  4596. return nil
  4597. }
  4598. // SetUUID sets the UUID field's value.
  4599. func (s *DeleteEventSourceMappingInput) SetUUID(v string) *DeleteEventSourceMappingInput {
  4600. s.UUID = &v
  4601. return s
  4602. }
  4603. type DeleteFunctionConcurrencyInput struct {
  4604. _ struct{} `type:"structure"`
  4605. // The name of the Lambda function.
  4606. //
  4607. // Name formats
  4608. //
  4609. // * Function name - my-function.
  4610. //
  4611. // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function.
  4612. //
  4613. // * Partial ARN - 123456789012:function:my-function.
  4614. //
  4615. // The length constraint applies only to the full ARN. If you specify only the
  4616. // function name, it is limited to 64 characters in length.
  4617. //
  4618. // FunctionName is a required field
  4619. FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
  4620. }
  4621. // String returns the string representation
  4622. func (s DeleteFunctionConcurrencyInput) String() string {
  4623. return awsutil.Prettify(s)
  4624. }
  4625. // GoString returns the string representation
  4626. func (s DeleteFunctionConcurrencyInput) GoString() string {
  4627. return s.String()
  4628. }
  4629. // Validate inspects the fields of the type to determine if they are valid.
  4630. func (s *DeleteFunctionConcurrencyInput) Validate() error {
  4631. invalidParams := request.ErrInvalidParams{Context: "DeleteFunctionConcurrencyInput"}
  4632. if s.FunctionName == nil {
  4633. invalidParams.Add(request.NewErrParamRequired("FunctionName"))
  4634. }
  4635. if s.FunctionName != nil && len(*s.FunctionName) < 1 {
  4636. invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
  4637. }
  4638. if invalidParams.Len() > 0 {
  4639. return invalidParams
  4640. }
  4641. return nil
  4642. }
  4643. // SetFunctionName sets the FunctionName field's value.
  4644. func (s *DeleteFunctionConcurrencyInput) SetFunctionName(v string) *DeleteFunctionConcurrencyInput {
  4645. s.FunctionName = &v
  4646. return s
  4647. }
  4648. type DeleteFunctionConcurrencyOutput struct {
  4649. _ struct{} `type:"structure"`
  4650. }
  4651. // String returns the string representation
  4652. func (s DeleteFunctionConcurrencyOutput) String() string {
  4653. return awsutil.Prettify(s)
  4654. }
  4655. // GoString returns the string representation
  4656. func (s DeleteFunctionConcurrencyOutput) GoString() string {
  4657. return s.String()
  4658. }
  4659. type DeleteFunctionInput struct {
  4660. _ struct{} `type:"structure"`
  4661. // The name of the Lambda function or version.
  4662. //
  4663. // Name formats
  4664. //
  4665. // * Function name - my-function (name-only), my-function:1 (with version).
  4666. //
  4667. // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function.
  4668. //
  4669. // * Partial ARN - 123456789012:function:my-function.
  4670. //
  4671. // You can append a version number or alias to any of the formats. The length
  4672. // constraint applies only to the full ARN. If you specify only the function
  4673. // name, it is limited to 64 characters in length.
  4674. //
  4675. // FunctionName is a required field
  4676. FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
  4677. // Specify a version to delete. You cannot delete a version that is referenced
  4678. // by an alias.
  4679. Qualifier *string `location:"querystring" locationName:"Qualifier" min:"1" type:"string"`
  4680. }
  4681. // String returns the string representation
  4682. func (s DeleteFunctionInput) String() string {
  4683. return awsutil.Prettify(s)
  4684. }
  4685. // GoString returns the string representation
  4686. func (s DeleteFunctionInput) GoString() string {
  4687. return s.String()
  4688. }
  4689. // Validate inspects the fields of the type to determine if they are valid.
  4690. func (s *DeleteFunctionInput) Validate() error {
  4691. invalidParams := request.ErrInvalidParams{Context: "DeleteFunctionInput"}
  4692. if s.FunctionName == nil {
  4693. invalidParams.Add(request.NewErrParamRequired("FunctionName"))
  4694. }
  4695. if s.FunctionName != nil && len(*s.FunctionName) < 1 {
  4696. invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
  4697. }
  4698. if s.Qualifier != nil && len(*s.Qualifier) < 1 {
  4699. invalidParams.Add(request.NewErrParamMinLen("Qualifier", 1))
  4700. }
  4701. if invalidParams.Len() > 0 {
  4702. return invalidParams
  4703. }
  4704. return nil
  4705. }
  4706. // SetFunctionName sets the FunctionName field's value.
  4707. func (s *DeleteFunctionInput) SetFunctionName(v string) *DeleteFunctionInput {
  4708. s.FunctionName = &v
  4709. return s
  4710. }
  4711. // SetQualifier sets the Qualifier field's value.
  4712. func (s *DeleteFunctionInput) SetQualifier(v string) *DeleteFunctionInput {
  4713. s.Qualifier = &v
  4714. return s
  4715. }
  4716. type DeleteFunctionOutput struct {
  4717. _ struct{} `type:"structure"`
  4718. }
  4719. // String returns the string representation
  4720. func (s DeleteFunctionOutput) String() string {
  4721. return awsutil.Prettify(s)
  4722. }
  4723. // GoString returns the string representation
  4724. func (s DeleteFunctionOutput) GoString() string {
  4725. return s.String()
  4726. }
  4727. type DeleteLayerVersionInput struct {
  4728. _ struct{} `type:"structure"`
  4729. // The name or Amazon Resource Name (ARN) of the layer.
  4730. //
  4731. // LayerName is a required field
  4732. LayerName *string `location:"uri" locationName:"LayerName" min:"1" type:"string" required:"true"`
  4733. // The version number.
  4734. //
  4735. // VersionNumber is a required field
  4736. VersionNumber *int64 `location:"uri" locationName:"VersionNumber" type:"long" required:"true"`
  4737. }
  4738. // String returns the string representation
  4739. func (s DeleteLayerVersionInput) String() string {
  4740. return awsutil.Prettify(s)
  4741. }
  4742. // GoString returns the string representation
  4743. func (s DeleteLayerVersionInput) GoString() string {
  4744. return s.String()
  4745. }
  4746. // Validate inspects the fields of the type to determine if they are valid.
  4747. func (s *DeleteLayerVersionInput) Validate() error {
  4748. invalidParams := request.ErrInvalidParams{Context: "DeleteLayerVersionInput"}
  4749. if s.LayerName == nil {
  4750. invalidParams.Add(request.NewErrParamRequired("LayerName"))
  4751. }
  4752. if s.LayerName != nil && len(*s.LayerName) < 1 {
  4753. invalidParams.Add(request.NewErrParamMinLen("LayerName", 1))
  4754. }
  4755. if s.VersionNumber == nil {
  4756. invalidParams.Add(request.NewErrParamRequired("VersionNumber"))
  4757. }
  4758. if invalidParams.Len() > 0 {
  4759. return invalidParams
  4760. }
  4761. return nil
  4762. }
  4763. // SetLayerName sets the LayerName field's value.
  4764. func (s *DeleteLayerVersionInput) SetLayerName(v string) *DeleteLayerVersionInput {
  4765. s.LayerName = &v
  4766. return s
  4767. }
  4768. // SetVersionNumber sets the VersionNumber field's value.
  4769. func (s *DeleteLayerVersionInput) SetVersionNumber(v int64) *DeleteLayerVersionInput {
  4770. s.VersionNumber = &v
  4771. return s
  4772. }
  4773. type DeleteLayerVersionOutput struct {
  4774. _ struct{} `type:"structure"`
  4775. }
  4776. // String returns the string representation
  4777. func (s DeleteLayerVersionOutput) String() string {
  4778. return awsutil.Prettify(s)
  4779. }
  4780. // GoString returns the string representation
  4781. func (s DeleteLayerVersionOutput) GoString() string {
  4782. return s.String()
  4783. }
  4784. // A function's environment variable settings.
  4785. type Environment struct {
  4786. _ struct{} `type:"structure"`
  4787. // Environment variable key-value pairs.
  4788. Variables map[string]*string `type:"map" sensitive:"true"`
  4789. }
  4790. // String returns the string representation
  4791. func (s Environment) String() string {
  4792. return awsutil.Prettify(s)
  4793. }
  4794. // GoString returns the string representation
  4795. func (s Environment) GoString() string {
  4796. return s.String()
  4797. }
  4798. // SetVariables sets the Variables field's value.
  4799. func (s *Environment) SetVariables(v map[string]*string) *Environment {
  4800. s.Variables = v
  4801. return s
  4802. }
  4803. // Error messages for environment variables that could not be applied.
  4804. type EnvironmentError struct {
  4805. _ struct{} `type:"structure"`
  4806. // The error code.
  4807. ErrorCode *string `type:"string"`
  4808. // The error message.
  4809. Message *string `type:"string" sensitive:"true"`
  4810. }
  4811. // String returns the string representation
  4812. func (s EnvironmentError) String() string {
  4813. return awsutil.Prettify(s)
  4814. }
  4815. // GoString returns the string representation
  4816. func (s EnvironmentError) GoString() string {
  4817. return s.String()
  4818. }
  4819. // SetErrorCode sets the ErrorCode field's value.
  4820. func (s *EnvironmentError) SetErrorCode(v string) *EnvironmentError {
  4821. s.ErrorCode = &v
  4822. return s
  4823. }
  4824. // SetMessage sets the Message field's value.
  4825. func (s *EnvironmentError) SetMessage(v string) *EnvironmentError {
  4826. s.Message = &v
  4827. return s
  4828. }
  4829. // The results of a configuration update that applied environment variables.
  4830. type EnvironmentResponse struct {
  4831. _ struct{} `type:"structure"`
  4832. // Error messages for environment variables that could not be applied.
  4833. Error *EnvironmentError `type:"structure"`
  4834. // Environment variable key-value pairs.
  4835. Variables map[string]*string `type:"map" sensitive:"true"`
  4836. }
  4837. // String returns the string representation
  4838. func (s EnvironmentResponse) String() string {
  4839. return awsutil.Prettify(s)
  4840. }
  4841. // GoString returns the string representation
  4842. func (s EnvironmentResponse) GoString() string {
  4843. return s.String()
  4844. }
  4845. // SetError sets the Error field's value.
  4846. func (s *EnvironmentResponse) SetError(v *EnvironmentError) *EnvironmentResponse {
  4847. s.Error = v
  4848. return s
  4849. }
  4850. // SetVariables sets the Variables field's value.
  4851. func (s *EnvironmentResponse) SetVariables(v map[string]*string) *EnvironmentResponse {
  4852. s.Variables = v
  4853. return s
  4854. }
  4855. // A mapping between an AWS resource and an AWS Lambda function. See CreateEventSourceMapping
  4856. // for details.
  4857. type EventSourceMappingConfiguration struct {
  4858. _ struct{} `type:"structure"`
  4859. // The maximum number of items to retrieve in a single batch.
  4860. BatchSize *int64 `min:"1" type:"integer"`
  4861. // The Amazon Resource Name (ARN) of the event source.
  4862. EventSourceArn *string `type:"string"`
  4863. // The ARN of the Lambda function.
  4864. FunctionArn *string `type:"string"`
  4865. // The date that the event source mapping was last updated.
  4866. LastModified *time.Time `type:"timestamp"`
  4867. // The result of the last AWS Lambda invocation of your Lambda function.
  4868. LastProcessingResult *string `type:"string"`
  4869. // The state of the event source mapping. It can be one of the following: Creating,
  4870. // Enabling, Enabled, Disabling, Disabled, Updating, or Deleting.
  4871. State *string `type:"string"`
  4872. // The cause of the last state change, either User initiated or Lambda initiated.
  4873. StateTransitionReason *string `type:"string"`
  4874. // The identifier of the event source mapping.
  4875. UUID *string `type:"string"`
  4876. }
  4877. // String returns the string representation
  4878. func (s EventSourceMappingConfiguration) String() string {
  4879. return awsutil.Prettify(s)
  4880. }
  4881. // GoString returns the string representation
  4882. func (s EventSourceMappingConfiguration) GoString() string {
  4883. return s.String()
  4884. }
  4885. // SetBatchSize sets the BatchSize field's value.
  4886. func (s *EventSourceMappingConfiguration) SetBatchSize(v int64) *EventSourceMappingConfiguration {
  4887. s.BatchSize = &v
  4888. return s
  4889. }
  4890. // SetEventSourceArn sets the EventSourceArn field's value.
  4891. func (s *EventSourceMappingConfiguration) SetEventSourceArn(v string) *EventSourceMappingConfiguration {
  4892. s.EventSourceArn = &v
  4893. return s
  4894. }
  4895. // SetFunctionArn sets the FunctionArn field's value.
  4896. func (s *EventSourceMappingConfiguration) SetFunctionArn(v string) *EventSourceMappingConfiguration {
  4897. s.FunctionArn = &v
  4898. return s
  4899. }
  4900. // SetLastModified sets the LastModified field's value.
  4901. func (s *EventSourceMappingConfiguration) SetLastModified(v time.Time) *EventSourceMappingConfiguration {
  4902. s.LastModified = &v
  4903. return s
  4904. }
  4905. // SetLastProcessingResult sets the LastProcessingResult field's value.
  4906. func (s *EventSourceMappingConfiguration) SetLastProcessingResult(v string) *EventSourceMappingConfiguration {
  4907. s.LastProcessingResult = &v
  4908. return s
  4909. }
  4910. // SetState sets the State field's value.
  4911. func (s *EventSourceMappingConfiguration) SetState(v string) *EventSourceMappingConfiguration {
  4912. s.State = &v
  4913. return s
  4914. }
  4915. // SetStateTransitionReason sets the StateTransitionReason field's value.
  4916. func (s *EventSourceMappingConfiguration) SetStateTransitionReason(v string) *EventSourceMappingConfiguration {
  4917. s.StateTransitionReason = &v
  4918. return s
  4919. }
  4920. // SetUUID sets the UUID field's value.
  4921. func (s *EventSourceMappingConfiguration) SetUUID(v string) *EventSourceMappingConfiguration {
  4922. s.UUID = &v
  4923. return s
  4924. }
  4925. // The code for the Lambda function. You can specify either an object in Amazon
  4926. // S3, or upload a deployment package directly.
  4927. type FunctionCode struct {
  4928. _ struct{} `type:"structure"`
  4929. // An Amazon S3 bucket in the same region as your function. The bucket can be
  4930. // in a different AWS account.
  4931. S3Bucket *string `min:"3" type:"string"`
  4932. // The Amazon S3 key of the deployment package.
  4933. S3Key *string `min:"1" type:"string"`
  4934. // For versioned objects, the version of the deployment package object to use.
  4935. S3ObjectVersion *string `min:"1" type:"string"`
  4936. // The base64-encoded contents of the deployment package. AWS SDK and AWS CLI
  4937. // clients handle the encoding for you.
  4938. //
  4939. // ZipFile is automatically base64 encoded/decoded by the SDK.
  4940. ZipFile []byte `type:"blob" sensitive:"true"`
  4941. }
  4942. // String returns the string representation
  4943. func (s FunctionCode) String() string {
  4944. return awsutil.Prettify(s)
  4945. }
  4946. // GoString returns the string representation
  4947. func (s FunctionCode) GoString() string {
  4948. return s.String()
  4949. }
  4950. // Validate inspects the fields of the type to determine if they are valid.
  4951. func (s *FunctionCode) Validate() error {
  4952. invalidParams := request.ErrInvalidParams{Context: "FunctionCode"}
  4953. if s.S3Bucket != nil && len(*s.S3Bucket) < 3 {
  4954. invalidParams.Add(request.NewErrParamMinLen("S3Bucket", 3))
  4955. }
  4956. if s.S3Key != nil && len(*s.S3Key) < 1 {
  4957. invalidParams.Add(request.NewErrParamMinLen("S3Key", 1))
  4958. }
  4959. if s.S3ObjectVersion != nil && len(*s.S3ObjectVersion) < 1 {
  4960. invalidParams.Add(request.NewErrParamMinLen("S3ObjectVersion", 1))
  4961. }
  4962. if invalidParams.Len() > 0 {
  4963. return invalidParams
  4964. }
  4965. return nil
  4966. }
  4967. // SetS3Bucket sets the S3Bucket field's value.
  4968. func (s *FunctionCode) SetS3Bucket(v string) *FunctionCode {
  4969. s.S3Bucket = &v
  4970. return s
  4971. }
  4972. // SetS3Key sets the S3Key field's value.
  4973. func (s *FunctionCode) SetS3Key(v string) *FunctionCode {
  4974. s.S3Key = &v
  4975. return s
  4976. }
  4977. // SetS3ObjectVersion sets the S3ObjectVersion field's value.
  4978. func (s *FunctionCode) SetS3ObjectVersion(v string) *FunctionCode {
  4979. s.S3ObjectVersion = &v
  4980. return s
  4981. }
  4982. // SetZipFile sets the ZipFile field's value.
  4983. func (s *FunctionCode) SetZipFile(v []byte) *FunctionCode {
  4984. s.ZipFile = v
  4985. return s
  4986. }
  4987. // Details about a function's deployment package.
  4988. type FunctionCodeLocation struct {
  4989. _ struct{} `type:"structure"`
  4990. // A pre-signed URL that you can use to download the deployment package.
  4991. Location *string `type:"string"`
  4992. // The service hosting the file.
  4993. RepositoryType *string `type:"string"`
  4994. }
  4995. // String returns the string representation
  4996. func (s FunctionCodeLocation) String() string {
  4997. return awsutil.Prettify(s)
  4998. }
  4999. // GoString returns the string representation
  5000. func (s FunctionCodeLocation) GoString() string {
  5001. return s.String()
  5002. }
  5003. // SetLocation sets the Location field's value.
  5004. func (s *FunctionCodeLocation) SetLocation(v string) *FunctionCodeLocation {
  5005. s.Location = &v
  5006. return s
  5007. }
  5008. // SetRepositoryType sets the RepositoryType field's value.
  5009. func (s *FunctionCodeLocation) SetRepositoryType(v string) *FunctionCodeLocation {
  5010. s.RepositoryType = &v
  5011. return s
  5012. }
  5013. // Details about a function's configuration.
  5014. type FunctionConfiguration struct {
  5015. _ struct{} `type:"structure"`
  5016. // The SHA256 hash of the function's deployment package.
  5017. CodeSha256 *string `type:"string"`
  5018. // The size of the function's deployment package in bytes.
  5019. CodeSize *int64 `type:"long"`
  5020. // The function's dead letter queue.
  5021. DeadLetterConfig *DeadLetterConfig `type:"structure"`
  5022. // The function's description.
  5023. Description *string `type:"string"`
  5024. // The function's environment variables.
  5025. Environment *EnvironmentResponse `type:"structure"`
  5026. // The function's Amazon Resource Name (ARN).
  5027. FunctionArn *string `type:"string"`
  5028. // The name of the function.
  5029. FunctionName *string `min:"1" type:"string"`
  5030. // The function Lambda calls to begin executing your function.
  5031. Handler *string `type:"string"`
  5032. // The KMS key used to encrypt the function's environment variables. Only returned
  5033. // if you've configured a customer managed CMK.
  5034. KMSKeyArn *string `type:"string"`
  5035. // The date and time that the function was last updated, in ISO-8601 format
  5036. // (https://www.w3.org/TR/NOTE-datetime) (YYYY-MM-DDThh:mm:ss.sTZD).
  5037. LastModified *string `type:"string"`
  5038. // The function's layers (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html)
  5039. Layers []*Layer `type:"list"`
  5040. // For Lambda@Edge functions, the ARN of the master function.
  5041. MasterArn *string `type:"string"`
  5042. // The memory allocated to the function
  5043. MemorySize *int64 `min:"128" type:"integer"`
  5044. // Represents the latest updated revision of the function or alias.
  5045. RevisionId *string `type:"string"`
  5046. // The function's execution role.
  5047. Role *string `type:"string"`
  5048. // The runtime environment for the Lambda function.
  5049. Runtime *string `type:"string" enum:"Runtime"`
  5050. // The amount of time that Lambda allows a function to run before terminating
  5051. // it.
  5052. Timeout *int64 `min:"1" type:"integer"`
  5053. // The function's AWS X-Ray tracing configuration.
  5054. TracingConfig *TracingConfigResponse `type:"structure"`
  5055. // The version of the Lambda function.
  5056. Version *string `min:"1" type:"string"`
  5057. // The function's networking configuration.
  5058. VpcConfig *VpcConfigResponse `type:"structure"`
  5059. }
  5060. // String returns the string representation
  5061. func (s FunctionConfiguration) String() string {
  5062. return awsutil.Prettify(s)
  5063. }
  5064. // GoString returns the string representation
  5065. func (s FunctionConfiguration) GoString() string {
  5066. return s.String()
  5067. }
  5068. // SetCodeSha256 sets the CodeSha256 field's value.
  5069. func (s *FunctionConfiguration) SetCodeSha256(v string) *FunctionConfiguration {
  5070. s.CodeSha256 = &v
  5071. return s
  5072. }
  5073. // SetCodeSize sets the CodeSize field's value.
  5074. func (s *FunctionConfiguration) SetCodeSize(v int64) *FunctionConfiguration {
  5075. s.CodeSize = &v
  5076. return s
  5077. }
  5078. // SetDeadLetterConfig sets the DeadLetterConfig field's value.
  5079. func (s *FunctionConfiguration) SetDeadLetterConfig(v *DeadLetterConfig) *FunctionConfiguration {
  5080. s.DeadLetterConfig = v
  5081. return s
  5082. }
  5083. // SetDescription sets the Description field's value.
  5084. func (s *FunctionConfiguration) SetDescription(v string) *FunctionConfiguration {
  5085. s.Description = &v
  5086. return s
  5087. }
  5088. // SetEnvironment sets the Environment field's value.
  5089. func (s *FunctionConfiguration) SetEnvironment(v *EnvironmentResponse) *FunctionConfiguration {
  5090. s.Environment = v
  5091. return s
  5092. }
  5093. // SetFunctionArn sets the FunctionArn field's value.
  5094. func (s *FunctionConfiguration) SetFunctionArn(v string) *FunctionConfiguration {
  5095. s.FunctionArn = &v
  5096. return s
  5097. }
  5098. // SetFunctionName sets the FunctionName field's value.
  5099. func (s *FunctionConfiguration) SetFunctionName(v string) *FunctionConfiguration {
  5100. s.FunctionName = &v
  5101. return s
  5102. }
  5103. // SetHandler sets the Handler field's value.
  5104. func (s *FunctionConfiguration) SetHandler(v string) *FunctionConfiguration {
  5105. s.Handler = &v
  5106. return s
  5107. }
  5108. // SetKMSKeyArn sets the KMSKeyArn field's value.
  5109. func (s *FunctionConfiguration) SetKMSKeyArn(v string) *FunctionConfiguration {
  5110. s.KMSKeyArn = &v
  5111. return s
  5112. }
  5113. // SetLastModified sets the LastModified field's value.
  5114. func (s *FunctionConfiguration) SetLastModified(v string) *FunctionConfiguration {
  5115. s.LastModified = &v
  5116. return s
  5117. }
  5118. // SetLayers sets the Layers field's value.
  5119. func (s *FunctionConfiguration) SetLayers(v []*Layer) *FunctionConfiguration {
  5120. s.Layers = v
  5121. return s
  5122. }
  5123. // SetMasterArn sets the MasterArn field's value.
  5124. func (s *FunctionConfiguration) SetMasterArn(v string) *FunctionConfiguration {
  5125. s.MasterArn = &v
  5126. return s
  5127. }
  5128. // SetMemorySize sets the MemorySize field's value.
  5129. func (s *FunctionConfiguration) SetMemorySize(v int64) *FunctionConfiguration {
  5130. s.MemorySize = &v
  5131. return s
  5132. }
  5133. // SetRevisionId sets the RevisionId field's value.
  5134. func (s *FunctionConfiguration) SetRevisionId(v string) *FunctionConfiguration {
  5135. s.RevisionId = &v
  5136. return s
  5137. }
  5138. // SetRole sets the Role field's value.
  5139. func (s *FunctionConfiguration) SetRole(v string) *FunctionConfiguration {
  5140. s.Role = &v
  5141. return s
  5142. }
  5143. // SetRuntime sets the Runtime field's value.
  5144. func (s *FunctionConfiguration) SetRuntime(v string) *FunctionConfiguration {
  5145. s.Runtime = &v
  5146. return s
  5147. }
  5148. // SetTimeout sets the Timeout field's value.
  5149. func (s *FunctionConfiguration) SetTimeout(v int64) *FunctionConfiguration {
  5150. s.Timeout = &v
  5151. return s
  5152. }
  5153. // SetTracingConfig sets the TracingConfig field's value.
  5154. func (s *FunctionConfiguration) SetTracingConfig(v *TracingConfigResponse) *FunctionConfiguration {
  5155. s.TracingConfig = v
  5156. return s
  5157. }
  5158. // SetVersion sets the Version field's value.
  5159. func (s *FunctionConfiguration) SetVersion(v string) *FunctionConfiguration {
  5160. s.Version = &v
  5161. return s
  5162. }
  5163. // SetVpcConfig sets the VpcConfig field's value.
  5164. func (s *FunctionConfiguration) SetVpcConfig(v *VpcConfigResponse) *FunctionConfiguration {
  5165. s.VpcConfig = v
  5166. return s
  5167. }
  5168. type GetAccountSettingsInput struct {
  5169. _ struct{} `type:"structure"`
  5170. }
  5171. // String returns the string representation
  5172. func (s GetAccountSettingsInput) String() string {
  5173. return awsutil.Prettify(s)
  5174. }
  5175. // GoString returns the string representation
  5176. func (s GetAccountSettingsInput) GoString() string {
  5177. return s.String()
  5178. }
  5179. type GetAccountSettingsOutput struct {
  5180. _ struct{} `type:"structure"`
  5181. // Limits related to concurrency and code storage.
  5182. AccountLimit *AccountLimit `type:"structure"`
  5183. // The number of functions and amount of storage in use.
  5184. AccountUsage *AccountUsage `type:"structure"`
  5185. }
  5186. // String returns the string representation
  5187. func (s GetAccountSettingsOutput) String() string {
  5188. return awsutil.Prettify(s)
  5189. }
  5190. // GoString returns the string representation
  5191. func (s GetAccountSettingsOutput) GoString() string {
  5192. return s.String()
  5193. }
  5194. // SetAccountLimit sets the AccountLimit field's value.
  5195. func (s *GetAccountSettingsOutput) SetAccountLimit(v *AccountLimit) *GetAccountSettingsOutput {
  5196. s.AccountLimit = v
  5197. return s
  5198. }
  5199. // SetAccountUsage sets the AccountUsage field's value.
  5200. func (s *GetAccountSettingsOutput) SetAccountUsage(v *AccountUsage) *GetAccountSettingsOutput {
  5201. s.AccountUsage = v
  5202. return s
  5203. }
  5204. type GetAliasInput struct {
  5205. _ struct{} `type:"structure"`
  5206. // The name of the lambda function.
  5207. //
  5208. // Name formats
  5209. //
  5210. // * Function name - MyFunction.
  5211. //
  5212. // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction.
  5213. //
  5214. // * Partial ARN - 123456789012:function:MyFunction.
  5215. //
  5216. // The length constraint applies only to the full ARN. If you specify only the
  5217. // function name, it is limited to 64 characters in length.
  5218. //
  5219. // FunctionName is a required field
  5220. FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
  5221. // The name of the alias.
  5222. //
  5223. // Name is a required field
  5224. Name *string `location:"uri" locationName:"Name" min:"1" type:"string" required:"true"`
  5225. }
  5226. // String returns the string representation
  5227. func (s GetAliasInput) String() string {
  5228. return awsutil.Prettify(s)
  5229. }
  5230. // GoString returns the string representation
  5231. func (s GetAliasInput) GoString() string {
  5232. return s.String()
  5233. }
  5234. // Validate inspects the fields of the type to determine if they are valid.
  5235. func (s *GetAliasInput) Validate() error {
  5236. invalidParams := request.ErrInvalidParams{Context: "GetAliasInput"}
  5237. if s.FunctionName == nil {
  5238. invalidParams.Add(request.NewErrParamRequired("FunctionName"))
  5239. }
  5240. if s.FunctionName != nil && len(*s.FunctionName) < 1 {
  5241. invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
  5242. }
  5243. if s.Name == nil {
  5244. invalidParams.Add(request.NewErrParamRequired("Name"))
  5245. }
  5246. if s.Name != nil && len(*s.Name) < 1 {
  5247. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  5248. }
  5249. if invalidParams.Len() > 0 {
  5250. return invalidParams
  5251. }
  5252. return nil
  5253. }
  5254. // SetFunctionName sets the FunctionName field's value.
  5255. func (s *GetAliasInput) SetFunctionName(v string) *GetAliasInput {
  5256. s.FunctionName = &v
  5257. return s
  5258. }
  5259. // SetName sets the Name field's value.
  5260. func (s *GetAliasInput) SetName(v string) *GetAliasInput {
  5261. s.Name = &v
  5262. return s
  5263. }
  5264. type GetEventSourceMappingInput struct {
  5265. _ struct{} `type:"structure"`
  5266. // The identifier of the event source mapping.
  5267. //
  5268. // UUID is a required field
  5269. UUID *string `location:"uri" locationName:"UUID" type:"string" required:"true"`
  5270. }
  5271. // String returns the string representation
  5272. func (s GetEventSourceMappingInput) String() string {
  5273. return awsutil.Prettify(s)
  5274. }
  5275. // GoString returns the string representation
  5276. func (s GetEventSourceMappingInput) GoString() string {
  5277. return s.String()
  5278. }
  5279. // Validate inspects the fields of the type to determine if they are valid.
  5280. func (s *GetEventSourceMappingInput) Validate() error {
  5281. invalidParams := request.ErrInvalidParams{Context: "GetEventSourceMappingInput"}
  5282. if s.UUID == nil {
  5283. invalidParams.Add(request.NewErrParamRequired("UUID"))
  5284. }
  5285. if s.UUID != nil && len(*s.UUID) < 1 {
  5286. invalidParams.Add(request.NewErrParamMinLen("UUID", 1))
  5287. }
  5288. if invalidParams.Len() > 0 {
  5289. return invalidParams
  5290. }
  5291. return nil
  5292. }
  5293. // SetUUID sets the UUID field's value.
  5294. func (s *GetEventSourceMappingInput) SetUUID(v string) *GetEventSourceMappingInput {
  5295. s.UUID = &v
  5296. return s
  5297. }
  5298. type GetFunctionConfigurationInput struct {
  5299. _ struct{} `type:"structure"`
  5300. // The name of the Lambda function, version, or alias.
  5301. //
  5302. // Name formats
  5303. //
  5304. // * Function name - my-function (name-only), my-function:v1 (with alias).
  5305. //
  5306. // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function.
  5307. //
  5308. // * Partial ARN - 123456789012:function:my-function.
  5309. //
  5310. // You can append a version number or alias to any of the formats. The length
  5311. // constraint applies only to the full ARN. If you specify only the function
  5312. // name, it is limited to 64 characters in length.
  5313. //
  5314. // FunctionName is a required field
  5315. FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
  5316. // Specify a version or alias to get details about a published version of the
  5317. // function.
  5318. Qualifier *string `location:"querystring" locationName:"Qualifier" min:"1" type:"string"`
  5319. }
  5320. // String returns the string representation
  5321. func (s GetFunctionConfigurationInput) String() string {
  5322. return awsutil.Prettify(s)
  5323. }
  5324. // GoString returns the string representation
  5325. func (s GetFunctionConfigurationInput) GoString() string {
  5326. return s.String()
  5327. }
  5328. // Validate inspects the fields of the type to determine if they are valid.
  5329. func (s *GetFunctionConfigurationInput) Validate() error {
  5330. invalidParams := request.ErrInvalidParams{Context: "GetFunctionConfigurationInput"}
  5331. if s.FunctionName == nil {
  5332. invalidParams.Add(request.NewErrParamRequired("FunctionName"))
  5333. }
  5334. if s.FunctionName != nil && len(*s.FunctionName) < 1 {
  5335. invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
  5336. }
  5337. if s.Qualifier != nil && len(*s.Qualifier) < 1 {
  5338. invalidParams.Add(request.NewErrParamMinLen("Qualifier", 1))
  5339. }
  5340. if invalidParams.Len() > 0 {
  5341. return invalidParams
  5342. }
  5343. return nil
  5344. }
  5345. // SetFunctionName sets the FunctionName field's value.
  5346. func (s *GetFunctionConfigurationInput) SetFunctionName(v string) *GetFunctionConfigurationInput {
  5347. s.FunctionName = &v
  5348. return s
  5349. }
  5350. // SetQualifier sets the Qualifier field's value.
  5351. func (s *GetFunctionConfigurationInput) SetQualifier(v string) *GetFunctionConfigurationInput {
  5352. s.Qualifier = &v
  5353. return s
  5354. }
  5355. type GetFunctionInput struct {
  5356. _ struct{} `type:"structure"`
  5357. // The name of the Lambda function, version, or alias.
  5358. //
  5359. // Name formats
  5360. //
  5361. // * Function name - my-function (name-only), my-function:v1 (with alias).
  5362. //
  5363. // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function.
  5364. //
  5365. // * Partial ARN - 123456789012:function:my-function.
  5366. //
  5367. // You can append a version number or alias to any of the formats. The length
  5368. // constraint applies only to the full ARN. If you specify only the function
  5369. // name, it is limited to 64 characters in length.
  5370. //
  5371. // FunctionName is a required field
  5372. FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
  5373. // Specify a version or alias to get details about a published version of the
  5374. // function.
  5375. Qualifier *string `location:"querystring" locationName:"Qualifier" min:"1" type:"string"`
  5376. }
  5377. // String returns the string representation
  5378. func (s GetFunctionInput) String() string {
  5379. return awsutil.Prettify(s)
  5380. }
  5381. // GoString returns the string representation
  5382. func (s GetFunctionInput) GoString() string {
  5383. return s.String()
  5384. }
  5385. // Validate inspects the fields of the type to determine if they are valid.
  5386. func (s *GetFunctionInput) Validate() error {
  5387. invalidParams := request.ErrInvalidParams{Context: "GetFunctionInput"}
  5388. if s.FunctionName == nil {
  5389. invalidParams.Add(request.NewErrParamRequired("FunctionName"))
  5390. }
  5391. if s.FunctionName != nil && len(*s.FunctionName) < 1 {
  5392. invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
  5393. }
  5394. if s.Qualifier != nil && len(*s.Qualifier) < 1 {
  5395. invalidParams.Add(request.NewErrParamMinLen("Qualifier", 1))
  5396. }
  5397. if invalidParams.Len() > 0 {
  5398. return invalidParams
  5399. }
  5400. return nil
  5401. }
  5402. // SetFunctionName sets the FunctionName field's value.
  5403. func (s *GetFunctionInput) SetFunctionName(v string) *GetFunctionInput {
  5404. s.FunctionName = &v
  5405. return s
  5406. }
  5407. // SetQualifier sets the Qualifier field's value.
  5408. func (s *GetFunctionInput) SetQualifier(v string) *GetFunctionInput {
  5409. s.Qualifier = &v
  5410. return s
  5411. }
  5412. type GetFunctionOutput struct {
  5413. _ struct{} `type:"structure"`
  5414. // The deployment package of the function or version.
  5415. Code *FunctionCodeLocation `type:"structure"`
  5416. // The function's reserved concurrency (http://docs.aws.amazon.com/lambda/latest/dg/concurrent-executions.html).
  5417. Concurrency *PutFunctionConcurrencyOutput `type:"structure"`
  5418. // The configuration of the function or version.
  5419. Configuration *FunctionConfiguration `type:"structure"`
  5420. // The function's tags (http://docs.aws.amazon.com/lambda/latest/dg/tagging.html).
  5421. Tags map[string]*string `type:"map"`
  5422. }
  5423. // String returns the string representation
  5424. func (s GetFunctionOutput) String() string {
  5425. return awsutil.Prettify(s)
  5426. }
  5427. // GoString returns the string representation
  5428. func (s GetFunctionOutput) GoString() string {
  5429. return s.String()
  5430. }
  5431. // SetCode sets the Code field's value.
  5432. func (s *GetFunctionOutput) SetCode(v *FunctionCodeLocation) *GetFunctionOutput {
  5433. s.Code = v
  5434. return s
  5435. }
  5436. // SetConcurrency sets the Concurrency field's value.
  5437. func (s *GetFunctionOutput) SetConcurrency(v *PutFunctionConcurrencyOutput) *GetFunctionOutput {
  5438. s.Concurrency = v
  5439. return s
  5440. }
  5441. // SetConfiguration sets the Configuration field's value.
  5442. func (s *GetFunctionOutput) SetConfiguration(v *FunctionConfiguration) *GetFunctionOutput {
  5443. s.Configuration = v
  5444. return s
  5445. }
  5446. // SetTags sets the Tags field's value.
  5447. func (s *GetFunctionOutput) SetTags(v map[string]*string) *GetFunctionOutput {
  5448. s.Tags = v
  5449. return s
  5450. }
  5451. type GetLayerVersionInput struct {
  5452. _ struct{} `type:"structure"`
  5453. // The name or Amazon Resource Name (ARN) of the layer.
  5454. //
  5455. // LayerName is a required field
  5456. LayerName *string `location:"uri" locationName:"LayerName" min:"1" type:"string" required:"true"`
  5457. // The version number.
  5458. //
  5459. // VersionNumber is a required field
  5460. VersionNumber *int64 `location:"uri" locationName:"VersionNumber" type:"long" required:"true"`
  5461. }
  5462. // String returns the string representation
  5463. func (s GetLayerVersionInput) String() string {
  5464. return awsutil.Prettify(s)
  5465. }
  5466. // GoString returns the string representation
  5467. func (s GetLayerVersionInput) GoString() string {
  5468. return s.String()
  5469. }
  5470. // Validate inspects the fields of the type to determine if they are valid.
  5471. func (s *GetLayerVersionInput) Validate() error {
  5472. invalidParams := request.ErrInvalidParams{Context: "GetLayerVersionInput"}
  5473. if s.LayerName == nil {
  5474. invalidParams.Add(request.NewErrParamRequired("LayerName"))
  5475. }
  5476. if s.LayerName != nil && len(*s.LayerName) < 1 {
  5477. invalidParams.Add(request.NewErrParamMinLen("LayerName", 1))
  5478. }
  5479. if s.VersionNumber == nil {
  5480. invalidParams.Add(request.NewErrParamRequired("VersionNumber"))
  5481. }
  5482. if invalidParams.Len() > 0 {
  5483. return invalidParams
  5484. }
  5485. return nil
  5486. }
  5487. // SetLayerName sets the LayerName field's value.
  5488. func (s *GetLayerVersionInput) SetLayerName(v string) *GetLayerVersionInput {
  5489. s.LayerName = &v
  5490. return s
  5491. }
  5492. // SetVersionNumber sets the VersionNumber field's value.
  5493. func (s *GetLayerVersionInput) SetVersionNumber(v int64) *GetLayerVersionInput {
  5494. s.VersionNumber = &v
  5495. return s
  5496. }
  5497. type GetLayerVersionOutput struct {
  5498. _ struct{} `type:"structure"`
  5499. // The layer's compatible runtimes.
  5500. CompatibleRuntimes []*string `type:"list"`
  5501. // Details about the layer version.
  5502. Content *LayerVersionContentOutput `type:"structure"`
  5503. // The date that the layer version was created, in ISO-8601 format (https://www.w3.org/TR/NOTE-datetime)
  5504. // (YYYY-MM-DDThh:mm:ss.sTZD).
  5505. CreatedDate *string `type:"string"`
  5506. // The description of the version.
  5507. Description *string `type:"string"`
  5508. // The ARN of the layer.
  5509. LayerArn *string `min:"1" type:"string"`
  5510. // The ARN of the layer version.
  5511. LayerVersionArn *string `min:"1" type:"string"`
  5512. // The layer's software license.
  5513. LicenseInfo *string `type:"string"`
  5514. // The version number.
  5515. Version *int64 `type:"long"`
  5516. }
  5517. // String returns the string representation
  5518. func (s GetLayerVersionOutput) String() string {
  5519. return awsutil.Prettify(s)
  5520. }
  5521. // GoString returns the string representation
  5522. func (s GetLayerVersionOutput) GoString() string {
  5523. return s.String()
  5524. }
  5525. // SetCompatibleRuntimes sets the CompatibleRuntimes field's value.
  5526. func (s *GetLayerVersionOutput) SetCompatibleRuntimes(v []*string) *GetLayerVersionOutput {
  5527. s.CompatibleRuntimes = v
  5528. return s
  5529. }
  5530. // SetContent sets the Content field's value.
  5531. func (s *GetLayerVersionOutput) SetContent(v *LayerVersionContentOutput) *GetLayerVersionOutput {
  5532. s.Content = v
  5533. return s
  5534. }
  5535. // SetCreatedDate sets the CreatedDate field's value.
  5536. func (s *GetLayerVersionOutput) SetCreatedDate(v string) *GetLayerVersionOutput {
  5537. s.CreatedDate = &v
  5538. return s
  5539. }
  5540. // SetDescription sets the Description field's value.
  5541. func (s *GetLayerVersionOutput) SetDescription(v string) *GetLayerVersionOutput {
  5542. s.Description = &v
  5543. return s
  5544. }
  5545. // SetLayerArn sets the LayerArn field's value.
  5546. func (s *GetLayerVersionOutput) SetLayerArn(v string) *GetLayerVersionOutput {
  5547. s.LayerArn = &v
  5548. return s
  5549. }
  5550. // SetLayerVersionArn sets the LayerVersionArn field's value.
  5551. func (s *GetLayerVersionOutput) SetLayerVersionArn(v string) *GetLayerVersionOutput {
  5552. s.LayerVersionArn = &v
  5553. return s
  5554. }
  5555. // SetLicenseInfo sets the LicenseInfo field's value.
  5556. func (s *GetLayerVersionOutput) SetLicenseInfo(v string) *GetLayerVersionOutput {
  5557. s.LicenseInfo = &v
  5558. return s
  5559. }
  5560. // SetVersion sets the Version field's value.
  5561. func (s *GetLayerVersionOutput) SetVersion(v int64) *GetLayerVersionOutput {
  5562. s.Version = &v
  5563. return s
  5564. }
  5565. type GetLayerVersionPolicyInput struct {
  5566. _ struct{} `type:"structure"`
  5567. // The name or Amazon Resource Name (ARN) of the layer.
  5568. //
  5569. // LayerName is a required field
  5570. LayerName *string `location:"uri" locationName:"LayerName" min:"1" type:"string" required:"true"`
  5571. // The version number.
  5572. //
  5573. // VersionNumber is a required field
  5574. VersionNumber *int64 `location:"uri" locationName:"VersionNumber" type:"long" required:"true"`
  5575. }
  5576. // String returns the string representation
  5577. func (s GetLayerVersionPolicyInput) String() string {
  5578. return awsutil.Prettify(s)
  5579. }
  5580. // GoString returns the string representation
  5581. func (s GetLayerVersionPolicyInput) GoString() string {
  5582. return s.String()
  5583. }
  5584. // Validate inspects the fields of the type to determine if they are valid.
  5585. func (s *GetLayerVersionPolicyInput) Validate() error {
  5586. invalidParams := request.ErrInvalidParams{Context: "GetLayerVersionPolicyInput"}
  5587. if s.LayerName == nil {
  5588. invalidParams.Add(request.NewErrParamRequired("LayerName"))
  5589. }
  5590. if s.LayerName != nil && len(*s.LayerName) < 1 {
  5591. invalidParams.Add(request.NewErrParamMinLen("LayerName", 1))
  5592. }
  5593. if s.VersionNumber == nil {
  5594. invalidParams.Add(request.NewErrParamRequired("VersionNumber"))
  5595. }
  5596. if invalidParams.Len() > 0 {
  5597. return invalidParams
  5598. }
  5599. return nil
  5600. }
  5601. // SetLayerName sets the LayerName field's value.
  5602. func (s *GetLayerVersionPolicyInput) SetLayerName(v string) *GetLayerVersionPolicyInput {
  5603. s.LayerName = &v
  5604. return s
  5605. }
  5606. // SetVersionNumber sets the VersionNumber field's value.
  5607. func (s *GetLayerVersionPolicyInput) SetVersionNumber(v int64) *GetLayerVersionPolicyInput {
  5608. s.VersionNumber = &v
  5609. return s
  5610. }
  5611. type GetLayerVersionPolicyOutput struct {
  5612. _ struct{} `type:"structure"`
  5613. // The policy document.
  5614. Policy *string `type:"string"`
  5615. // A unique identifier for the current revision of the policy.
  5616. RevisionId *string `type:"string"`
  5617. }
  5618. // String returns the string representation
  5619. func (s GetLayerVersionPolicyOutput) String() string {
  5620. return awsutil.Prettify(s)
  5621. }
  5622. // GoString returns the string representation
  5623. func (s GetLayerVersionPolicyOutput) GoString() string {
  5624. return s.String()
  5625. }
  5626. // SetPolicy sets the Policy field's value.
  5627. func (s *GetLayerVersionPolicyOutput) SetPolicy(v string) *GetLayerVersionPolicyOutput {
  5628. s.Policy = &v
  5629. return s
  5630. }
  5631. // SetRevisionId sets the RevisionId field's value.
  5632. func (s *GetLayerVersionPolicyOutput) SetRevisionId(v string) *GetLayerVersionPolicyOutput {
  5633. s.RevisionId = &v
  5634. return s
  5635. }
  5636. type GetPolicyInput struct {
  5637. _ struct{} `type:"structure"`
  5638. // The name of the Lambda function, version, or alias.
  5639. //
  5640. // Name formats
  5641. //
  5642. // * Function name - my-function (name-only), my-function:v1 (with alias).
  5643. //
  5644. // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function.
  5645. //
  5646. // * Partial ARN - 123456789012:function:my-function.
  5647. //
  5648. // You can append a version number or alias to any of the formats. The length
  5649. // constraint applies only to the full ARN. If you specify only the function
  5650. // name, it is limited to 64 characters in length.
  5651. //
  5652. // FunctionName is a required field
  5653. FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
  5654. // Specify a version or alias to get the policy for that resource.
  5655. Qualifier *string `location:"querystring" locationName:"Qualifier" min:"1" type:"string"`
  5656. }
  5657. // String returns the string representation
  5658. func (s GetPolicyInput) String() string {
  5659. return awsutil.Prettify(s)
  5660. }
  5661. // GoString returns the string representation
  5662. func (s GetPolicyInput) GoString() string {
  5663. return s.String()
  5664. }
  5665. // Validate inspects the fields of the type to determine if they are valid.
  5666. func (s *GetPolicyInput) Validate() error {
  5667. invalidParams := request.ErrInvalidParams{Context: "GetPolicyInput"}
  5668. if s.FunctionName == nil {
  5669. invalidParams.Add(request.NewErrParamRequired("FunctionName"))
  5670. }
  5671. if s.FunctionName != nil && len(*s.FunctionName) < 1 {
  5672. invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
  5673. }
  5674. if s.Qualifier != nil && len(*s.Qualifier) < 1 {
  5675. invalidParams.Add(request.NewErrParamMinLen("Qualifier", 1))
  5676. }
  5677. if invalidParams.Len() > 0 {
  5678. return invalidParams
  5679. }
  5680. return nil
  5681. }
  5682. // SetFunctionName sets the FunctionName field's value.
  5683. func (s *GetPolicyInput) SetFunctionName(v string) *GetPolicyInput {
  5684. s.FunctionName = &v
  5685. return s
  5686. }
  5687. // SetQualifier sets the Qualifier field's value.
  5688. func (s *GetPolicyInput) SetQualifier(v string) *GetPolicyInput {
  5689. s.Qualifier = &v
  5690. return s
  5691. }
  5692. type GetPolicyOutput struct {
  5693. _ struct{} `type:"structure"`
  5694. // The resource-based policy.
  5695. Policy *string `type:"string"`
  5696. // A unique identifier for the current revision of the policy.
  5697. RevisionId *string `type:"string"`
  5698. }
  5699. // String returns the string representation
  5700. func (s GetPolicyOutput) String() string {
  5701. return awsutil.Prettify(s)
  5702. }
  5703. // GoString returns the string representation
  5704. func (s GetPolicyOutput) GoString() string {
  5705. return s.String()
  5706. }
  5707. // SetPolicy sets the Policy field's value.
  5708. func (s *GetPolicyOutput) SetPolicy(v string) *GetPolicyOutput {
  5709. s.Policy = &v
  5710. return s
  5711. }
  5712. // SetRevisionId sets the RevisionId field's value.
  5713. func (s *GetPolicyOutput) SetRevisionId(v string) *GetPolicyOutput {
  5714. s.RevisionId = &v
  5715. return s
  5716. }
  5717. // Deprecated: InvokeAsyncInput has been deprecated
  5718. type InvokeAsyncInput struct {
  5719. _ struct{} `deprecated:"true" type:"structure" payload:"InvokeArgs"`
  5720. // The name of the Lambda function.
  5721. //
  5722. // Name formats
  5723. //
  5724. // * Function name - my-function.
  5725. //
  5726. // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function.
  5727. //
  5728. // * Partial ARN - 123456789012:function:my-function.
  5729. //
  5730. // The length constraint applies only to the full ARN. If you specify only the
  5731. // function name, it is limited to 64 characters in length.
  5732. //
  5733. // FunctionName is a required field
  5734. FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
  5735. // JSON that you want to provide to your Lambda function as input.
  5736. //
  5737. // InvokeArgs is a required field
  5738. InvokeArgs io.ReadSeeker `type:"blob" required:"true"`
  5739. }
  5740. // String returns the string representation
  5741. func (s InvokeAsyncInput) String() string {
  5742. return awsutil.Prettify(s)
  5743. }
  5744. // GoString returns the string representation
  5745. func (s InvokeAsyncInput) GoString() string {
  5746. return s.String()
  5747. }
  5748. // Validate inspects the fields of the type to determine if they are valid.
  5749. func (s *InvokeAsyncInput) Validate() error {
  5750. invalidParams := request.ErrInvalidParams{Context: "InvokeAsyncInput"}
  5751. if s.FunctionName == nil {
  5752. invalidParams.Add(request.NewErrParamRequired("FunctionName"))
  5753. }
  5754. if s.FunctionName != nil && len(*s.FunctionName) < 1 {
  5755. invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
  5756. }
  5757. if s.InvokeArgs == nil {
  5758. invalidParams.Add(request.NewErrParamRequired("InvokeArgs"))
  5759. }
  5760. if invalidParams.Len() > 0 {
  5761. return invalidParams
  5762. }
  5763. return nil
  5764. }
  5765. // SetFunctionName sets the FunctionName field's value.
  5766. func (s *InvokeAsyncInput) SetFunctionName(v string) *InvokeAsyncInput {
  5767. s.FunctionName = &v
  5768. return s
  5769. }
  5770. // SetInvokeArgs sets the InvokeArgs field's value.
  5771. func (s *InvokeAsyncInput) SetInvokeArgs(v io.ReadSeeker) *InvokeAsyncInput {
  5772. s.InvokeArgs = v
  5773. return s
  5774. }
  5775. // Upon success, it returns empty response. Otherwise, throws an exception.
  5776. //
  5777. // Deprecated: InvokeAsyncOutput has been deprecated
  5778. type InvokeAsyncOutput struct {
  5779. _ struct{} `deprecated:"true" type:"structure"`
  5780. // It will be 202 upon success.
  5781. Status *int64 `location:"statusCode" type:"integer"`
  5782. }
  5783. // String returns the string representation
  5784. func (s InvokeAsyncOutput) String() string {
  5785. return awsutil.Prettify(s)
  5786. }
  5787. // GoString returns the string representation
  5788. func (s InvokeAsyncOutput) GoString() string {
  5789. return s.String()
  5790. }
  5791. // SetStatus sets the Status field's value.
  5792. func (s *InvokeAsyncOutput) SetStatus(v int64) *InvokeAsyncOutput {
  5793. s.Status = &v
  5794. return s
  5795. }
  5796. type InvokeInput struct {
  5797. _ struct{} `type:"structure" payload:"Payload"`
  5798. // Up to 3583 bytes of base64-encoded data about the invoking client to pass
  5799. // to the function in the context object.
  5800. ClientContext *string `location:"header" locationName:"X-Amz-Client-Context" type:"string"`
  5801. // The name of the Lambda function, version, or alias.
  5802. //
  5803. // Name formats
  5804. //
  5805. // * Function name - my-function (name-only), my-function:v1 (with alias).
  5806. //
  5807. // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function.
  5808. //
  5809. // * Partial ARN - 123456789012:function:my-function.
  5810. //
  5811. // You can append a version number or alias to any of the formats. The length
  5812. // constraint applies only to the full ARN. If you specify only the function
  5813. // name, it is limited to 64 characters in length.
  5814. //
  5815. // FunctionName is a required field
  5816. FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
  5817. // Choose from the following options.
  5818. //
  5819. // * RequestResponse (default) - Invoke the function synchronously. Keep
  5820. // the connection open until the function returns a response or times out.
  5821. // The API response includes the function response and additional data.
  5822. //
  5823. // * Event - Invoke the function asynchronously. Send events that fail multiple
  5824. // times to the function's dead-letter queue (if configured). The API response
  5825. // only includes a status code.
  5826. //
  5827. // * DryRun - Validate parameter values and verify that the user or role
  5828. // has permission to invoke the function.
  5829. InvocationType *string `location:"header" locationName:"X-Amz-Invocation-Type" type:"string" enum:"InvocationType"`
  5830. // Set to Tail to include the execution log in the response.
  5831. LogType *string `location:"header" locationName:"X-Amz-Log-Type" type:"string" enum:"LogType"`
  5832. // JSON that you want to provide to your Lambda function as input.
  5833. Payload []byte `type:"blob" sensitive:"true"`
  5834. // Specify a version or alias to invoke a published version of the function.
  5835. Qualifier *string `location:"querystring" locationName:"Qualifier" min:"1" type:"string"`
  5836. }
  5837. // String returns the string representation
  5838. func (s InvokeInput) String() string {
  5839. return awsutil.Prettify(s)
  5840. }
  5841. // GoString returns the string representation
  5842. func (s InvokeInput) GoString() string {
  5843. return s.String()
  5844. }
  5845. // Validate inspects the fields of the type to determine if they are valid.
  5846. func (s *InvokeInput) Validate() error {
  5847. invalidParams := request.ErrInvalidParams{Context: "InvokeInput"}
  5848. if s.FunctionName == nil {
  5849. invalidParams.Add(request.NewErrParamRequired("FunctionName"))
  5850. }
  5851. if s.FunctionName != nil && len(*s.FunctionName) < 1 {
  5852. invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
  5853. }
  5854. if s.Qualifier != nil && len(*s.Qualifier) < 1 {
  5855. invalidParams.Add(request.NewErrParamMinLen("Qualifier", 1))
  5856. }
  5857. if invalidParams.Len() > 0 {
  5858. return invalidParams
  5859. }
  5860. return nil
  5861. }
  5862. // SetClientContext sets the ClientContext field's value.
  5863. func (s *InvokeInput) SetClientContext(v string) *InvokeInput {
  5864. s.ClientContext = &v
  5865. return s
  5866. }
  5867. // SetFunctionName sets the FunctionName field's value.
  5868. func (s *InvokeInput) SetFunctionName(v string) *InvokeInput {
  5869. s.FunctionName = &v
  5870. return s
  5871. }
  5872. // SetInvocationType sets the InvocationType field's value.
  5873. func (s *InvokeInput) SetInvocationType(v string) *InvokeInput {
  5874. s.InvocationType = &v
  5875. return s
  5876. }
  5877. // SetLogType sets the LogType field's value.
  5878. func (s *InvokeInput) SetLogType(v string) *InvokeInput {
  5879. s.LogType = &v
  5880. return s
  5881. }
  5882. // SetPayload sets the Payload field's value.
  5883. func (s *InvokeInput) SetPayload(v []byte) *InvokeInput {
  5884. s.Payload = v
  5885. return s
  5886. }
  5887. // SetQualifier sets the Qualifier field's value.
  5888. func (s *InvokeInput) SetQualifier(v string) *InvokeInput {
  5889. s.Qualifier = &v
  5890. return s
  5891. }
  5892. type InvokeOutput struct {
  5893. _ struct{} `type:"structure" payload:"Payload"`
  5894. // The version of the function that executed. When you invoke a function with
  5895. // an alias, indicates which version the alias resolved to.
  5896. ExecutedVersion *string `location:"header" locationName:"X-Amz-Executed-Version" min:"1" type:"string"`
  5897. // If present, indicates that an error occured during function execution. Details
  5898. // about the error are included in the response payload.
  5899. //
  5900. // * Handled - The runtime caught an error thrown by the function and formatted
  5901. // it into a JSON document.
  5902. //
  5903. // * Unhandled - The runtime did not handle the error. For example, the function
  5904. // ran out of memory or timed out.
  5905. FunctionError *string `location:"header" locationName:"X-Amz-Function-Error" type:"string"`
  5906. // The last 4 KB of the execution log, base64 encoded.
  5907. LogResult *string `location:"header" locationName:"X-Amz-Log-Result" type:"string"`
  5908. // The response from the function, or an error object.
  5909. Payload []byte `type:"blob" sensitive:"true"`
  5910. // The HTTP status code will be in the 200 range for successful request. For
  5911. // the RequestResponse invocation type this status code will be 200. For the
  5912. // Event invocation type this status code will be 202. For the DryRun invocation
  5913. // type the status code will be 204.
  5914. StatusCode *int64 `location:"statusCode" type:"integer"`
  5915. }
  5916. // String returns the string representation
  5917. func (s InvokeOutput) String() string {
  5918. return awsutil.Prettify(s)
  5919. }
  5920. // GoString returns the string representation
  5921. func (s InvokeOutput) GoString() string {
  5922. return s.String()
  5923. }
  5924. // SetExecutedVersion sets the ExecutedVersion field's value.
  5925. func (s *InvokeOutput) SetExecutedVersion(v string) *InvokeOutput {
  5926. s.ExecutedVersion = &v
  5927. return s
  5928. }
  5929. // SetFunctionError sets the FunctionError field's value.
  5930. func (s *InvokeOutput) SetFunctionError(v string) *InvokeOutput {
  5931. s.FunctionError = &v
  5932. return s
  5933. }
  5934. // SetLogResult sets the LogResult field's value.
  5935. func (s *InvokeOutput) SetLogResult(v string) *InvokeOutput {
  5936. s.LogResult = &v
  5937. return s
  5938. }
  5939. // SetPayload sets the Payload field's value.
  5940. func (s *InvokeOutput) SetPayload(v []byte) *InvokeOutput {
  5941. s.Payload = v
  5942. return s
  5943. }
  5944. // SetStatusCode sets the StatusCode field's value.
  5945. func (s *InvokeOutput) SetStatusCode(v int64) *InvokeOutput {
  5946. s.StatusCode = &v
  5947. return s
  5948. }
  5949. // An AWS Lambda layer (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html).
  5950. type Layer struct {
  5951. _ struct{} `type:"structure"`
  5952. // The Amazon Resource Name (ARN) of the function layer.
  5953. Arn *string `min:"1" type:"string"`
  5954. // The size of the layer archive in bytes.
  5955. CodeSize *int64 `type:"long"`
  5956. }
  5957. // String returns the string representation
  5958. func (s Layer) String() string {
  5959. return awsutil.Prettify(s)
  5960. }
  5961. // GoString returns the string representation
  5962. func (s Layer) GoString() string {
  5963. return s.String()
  5964. }
  5965. // SetArn sets the Arn field's value.
  5966. func (s *Layer) SetArn(v string) *Layer {
  5967. s.Arn = &v
  5968. return s
  5969. }
  5970. // SetCodeSize sets the CodeSize field's value.
  5971. func (s *Layer) SetCodeSize(v int64) *Layer {
  5972. s.CodeSize = &v
  5973. return s
  5974. }
  5975. // A ZIP archive that contains the contents of an AWS Lambda layer (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html).
  5976. // You can specify either an Amazon S3 location, or upload a layer archive directly.
  5977. type LayerVersionContentInput struct {
  5978. _ struct{} `type:"structure"`
  5979. // The Amazon S3 bucket of the layer archive.
  5980. S3Bucket *string `min:"3" type:"string"`
  5981. // The Amazon S3 key of the layer archive.
  5982. S3Key *string `min:"1" type:"string"`
  5983. // For versioned objects, the version of the layer archive object to use.
  5984. S3ObjectVersion *string `min:"1" type:"string"`
  5985. // The base64-encoded contents of the layer archive. AWS SDK and AWS CLI clients
  5986. // handle the encoding for you.
  5987. //
  5988. // ZipFile is automatically base64 encoded/decoded by the SDK.
  5989. ZipFile []byte `type:"blob" sensitive:"true"`
  5990. }
  5991. // String returns the string representation
  5992. func (s LayerVersionContentInput) String() string {
  5993. return awsutil.Prettify(s)
  5994. }
  5995. // GoString returns the string representation
  5996. func (s LayerVersionContentInput) GoString() string {
  5997. return s.String()
  5998. }
  5999. // Validate inspects the fields of the type to determine if they are valid.
  6000. func (s *LayerVersionContentInput) Validate() error {
  6001. invalidParams := request.ErrInvalidParams{Context: "LayerVersionContentInput"}
  6002. if s.S3Bucket != nil && len(*s.S3Bucket) < 3 {
  6003. invalidParams.Add(request.NewErrParamMinLen("S3Bucket", 3))
  6004. }
  6005. if s.S3Key != nil && len(*s.S3Key) < 1 {
  6006. invalidParams.Add(request.NewErrParamMinLen("S3Key", 1))
  6007. }
  6008. if s.S3ObjectVersion != nil && len(*s.S3ObjectVersion) < 1 {
  6009. invalidParams.Add(request.NewErrParamMinLen("S3ObjectVersion", 1))
  6010. }
  6011. if invalidParams.Len() > 0 {
  6012. return invalidParams
  6013. }
  6014. return nil
  6015. }
  6016. // SetS3Bucket sets the S3Bucket field's value.
  6017. func (s *LayerVersionContentInput) SetS3Bucket(v string) *LayerVersionContentInput {
  6018. s.S3Bucket = &v
  6019. return s
  6020. }
  6021. // SetS3Key sets the S3Key field's value.
  6022. func (s *LayerVersionContentInput) SetS3Key(v string) *LayerVersionContentInput {
  6023. s.S3Key = &v
  6024. return s
  6025. }
  6026. // SetS3ObjectVersion sets the S3ObjectVersion field's value.
  6027. func (s *LayerVersionContentInput) SetS3ObjectVersion(v string) *LayerVersionContentInput {
  6028. s.S3ObjectVersion = &v
  6029. return s
  6030. }
  6031. // SetZipFile sets the ZipFile field's value.
  6032. func (s *LayerVersionContentInput) SetZipFile(v []byte) *LayerVersionContentInput {
  6033. s.ZipFile = v
  6034. return s
  6035. }
  6036. // Details about a version of an AWS Lambda layer (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html).
  6037. type LayerVersionContentOutput struct {
  6038. _ struct{} `type:"structure"`
  6039. // The SHA-256 hash of the layer archive.
  6040. CodeSha256 *string `type:"string"`
  6041. // The size of the layer archive in bytes.
  6042. CodeSize *int64 `type:"long"`
  6043. // A link to the layer archive in Amazon S3 that is valid for 10 minutes.
  6044. Location *string `type:"string"`
  6045. }
  6046. // String returns the string representation
  6047. func (s LayerVersionContentOutput) String() string {
  6048. return awsutil.Prettify(s)
  6049. }
  6050. // GoString returns the string representation
  6051. func (s LayerVersionContentOutput) GoString() string {
  6052. return s.String()
  6053. }
  6054. // SetCodeSha256 sets the CodeSha256 field's value.
  6055. func (s *LayerVersionContentOutput) SetCodeSha256(v string) *LayerVersionContentOutput {
  6056. s.CodeSha256 = &v
  6057. return s
  6058. }
  6059. // SetCodeSize sets the CodeSize field's value.
  6060. func (s *LayerVersionContentOutput) SetCodeSize(v int64) *LayerVersionContentOutput {
  6061. s.CodeSize = &v
  6062. return s
  6063. }
  6064. // SetLocation sets the Location field's value.
  6065. func (s *LayerVersionContentOutput) SetLocation(v string) *LayerVersionContentOutput {
  6066. s.Location = &v
  6067. return s
  6068. }
  6069. // Details about a version of an AWS Lambda layer (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html).
  6070. type LayerVersionsListItem struct {
  6071. _ struct{} `type:"structure"`
  6072. // The layer's compatible runtimes.
  6073. CompatibleRuntimes []*string `type:"list"`
  6074. // The date that the version was created, in ISO 8601 format. For example, 2018-11-27T15:10:45.123+0000.
  6075. CreatedDate *string `type:"string"`
  6076. // The description of the version.
  6077. Description *string `type:"string"`
  6078. // The ARN of the layer version.
  6079. LayerVersionArn *string `min:"1" type:"string"`
  6080. // The layer's open-source license.
  6081. LicenseInfo *string `type:"string"`
  6082. // The version number.
  6083. Version *int64 `type:"long"`
  6084. }
  6085. // String returns the string representation
  6086. func (s LayerVersionsListItem) String() string {
  6087. return awsutil.Prettify(s)
  6088. }
  6089. // GoString returns the string representation
  6090. func (s LayerVersionsListItem) GoString() string {
  6091. return s.String()
  6092. }
  6093. // SetCompatibleRuntimes sets the CompatibleRuntimes field's value.
  6094. func (s *LayerVersionsListItem) SetCompatibleRuntimes(v []*string) *LayerVersionsListItem {
  6095. s.CompatibleRuntimes = v
  6096. return s
  6097. }
  6098. // SetCreatedDate sets the CreatedDate field's value.
  6099. func (s *LayerVersionsListItem) SetCreatedDate(v string) *LayerVersionsListItem {
  6100. s.CreatedDate = &v
  6101. return s
  6102. }
  6103. // SetDescription sets the Description field's value.
  6104. func (s *LayerVersionsListItem) SetDescription(v string) *LayerVersionsListItem {
  6105. s.Description = &v
  6106. return s
  6107. }
  6108. // SetLayerVersionArn sets the LayerVersionArn field's value.
  6109. func (s *LayerVersionsListItem) SetLayerVersionArn(v string) *LayerVersionsListItem {
  6110. s.LayerVersionArn = &v
  6111. return s
  6112. }
  6113. // SetLicenseInfo sets the LicenseInfo field's value.
  6114. func (s *LayerVersionsListItem) SetLicenseInfo(v string) *LayerVersionsListItem {
  6115. s.LicenseInfo = &v
  6116. return s
  6117. }
  6118. // SetVersion sets the Version field's value.
  6119. func (s *LayerVersionsListItem) SetVersion(v int64) *LayerVersionsListItem {
  6120. s.Version = &v
  6121. return s
  6122. }
  6123. // Details about an AWS Lambda layer (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html).
  6124. type LayersListItem struct {
  6125. _ struct{} `type:"structure"`
  6126. // The newest version of the layer.
  6127. LatestMatchingVersion *LayerVersionsListItem `type:"structure"`
  6128. // The Amazon Resource Name (ARN) of the function layer.
  6129. LayerArn *string `min:"1" type:"string"`
  6130. // The name of the layer.
  6131. LayerName *string `min:"1" type:"string"`
  6132. }
  6133. // String returns the string representation
  6134. func (s LayersListItem) String() string {
  6135. return awsutil.Prettify(s)
  6136. }
  6137. // GoString returns the string representation
  6138. func (s LayersListItem) GoString() string {
  6139. return s.String()
  6140. }
  6141. // SetLatestMatchingVersion sets the LatestMatchingVersion field's value.
  6142. func (s *LayersListItem) SetLatestMatchingVersion(v *LayerVersionsListItem) *LayersListItem {
  6143. s.LatestMatchingVersion = v
  6144. return s
  6145. }
  6146. // SetLayerArn sets the LayerArn field's value.
  6147. func (s *LayersListItem) SetLayerArn(v string) *LayersListItem {
  6148. s.LayerArn = &v
  6149. return s
  6150. }
  6151. // SetLayerName sets the LayerName field's value.
  6152. func (s *LayersListItem) SetLayerName(v string) *LayersListItem {
  6153. s.LayerName = &v
  6154. return s
  6155. }
  6156. type ListAliasesInput struct {
  6157. _ struct{} `type:"structure"`
  6158. // The name of the lambda function.
  6159. //
  6160. // Name formats
  6161. //
  6162. // * Function name - MyFunction.
  6163. //
  6164. // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction.
  6165. //
  6166. // * Partial ARN - 123456789012:function:MyFunction.
  6167. //
  6168. // The length constraint applies only to the full ARN. If you specify only the
  6169. // function name, it is limited to 64 characters in length.
  6170. //
  6171. // FunctionName is a required field
  6172. FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
  6173. // Specify a function version to only list aliases that invoke that version.
  6174. FunctionVersion *string `location:"querystring" locationName:"FunctionVersion" min:"1" type:"string"`
  6175. // Specify the pagination token returned by a previous request to retrieve the
  6176. // next page of results.
  6177. Marker *string `location:"querystring" locationName:"Marker" type:"string"`
  6178. // Limit the number of aliases returned.
  6179. MaxItems *int64 `location:"querystring" locationName:"MaxItems" min:"1" type:"integer"`
  6180. }
  6181. // String returns the string representation
  6182. func (s ListAliasesInput) String() string {
  6183. return awsutil.Prettify(s)
  6184. }
  6185. // GoString returns the string representation
  6186. func (s ListAliasesInput) GoString() string {
  6187. return s.String()
  6188. }
  6189. // Validate inspects the fields of the type to determine if they are valid.
  6190. func (s *ListAliasesInput) Validate() error {
  6191. invalidParams := request.ErrInvalidParams{Context: "ListAliasesInput"}
  6192. if s.FunctionName == nil {
  6193. invalidParams.Add(request.NewErrParamRequired("FunctionName"))
  6194. }
  6195. if s.FunctionName != nil && len(*s.FunctionName) < 1 {
  6196. invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
  6197. }
  6198. if s.FunctionVersion != nil && len(*s.FunctionVersion) < 1 {
  6199. invalidParams.Add(request.NewErrParamMinLen("FunctionVersion", 1))
  6200. }
  6201. if s.MaxItems != nil && *s.MaxItems < 1 {
  6202. invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1))
  6203. }
  6204. if invalidParams.Len() > 0 {
  6205. return invalidParams
  6206. }
  6207. return nil
  6208. }
  6209. // SetFunctionName sets the FunctionName field's value.
  6210. func (s *ListAliasesInput) SetFunctionName(v string) *ListAliasesInput {
  6211. s.FunctionName = &v
  6212. return s
  6213. }
  6214. // SetFunctionVersion sets the FunctionVersion field's value.
  6215. func (s *ListAliasesInput) SetFunctionVersion(v string) *ListAliasesInput {
  6216. s.FunctionVersion = &v
  6217. return s
  6218. }
  6219. // SetMarker sets the Marker field's value.
  6220. func (s *ListAliasesInput) SetMarker(v string) *ListAliasesInput {
  6221. s.Marker = &v
  6222. return s
  6223. }
  6224. // SetMaxItems sets the MaxItems field's value.
  6225. func (s *ListAliasesInput) SetMaxItems(v int64) *ListAliasesInput {
  6226. s.MaxItems = &v
  6227. return s
  6228. }
  6229. type ListAliasesOutput struct {
  6230. _ struct{} `type:"structure"`
  6231. // A list of aliases.
  6232. Aliases []*AliasConfiguration `type:"list"`
  6233. // Pagination token included if more results are available.
  6234. NextMarker *string `type:"string"`
  6235. }
  6236. // String returns the string representation
  6237. func (s ListAliasesOutput) String() string {
  6238. return awsutil.Prettify(s)
  6239. }
  6240. // GoString returns the string representation
  6241. func (s ListAliasesOutput) GoString() string {
  6242. return s.String()
  6243. }
  6244. // SetAliases sets the Aliases field's value.
  6245. func (s *ListAliasesOutput) SetAliases(v []*AliasConfiguration) *ListAliasesOutput {
  6246. s.Aliases = v
  6247. return s
  6248. }
  6249. // SetNextMarker sets the NextMarker field's value.
  6250. func (s *ListAliasesOutput) SetNextMarker(v string) *ListAliasesOutput {
  6251. s.NextMarker = &v
  6252. return s
  6253. }
  6254. type ListEventSourceMappingsInput struct {
  6255. _ struct{} `type:"structure"`
  6256. // The Amazon Resource Name (ARN) of the event source.
  6257. //
  6258. // * Amazon Kinesis - The ARN of the data stream or a stream consumer.
  6259. //
  6260. // * Amazon DynamoDB Streams - The ARN of the stream.
  6261. //
  6262. // * Amazon Simple Queue Service - The ARN of the queue.
  6263. EventSourceArn *string `location:"querystring" locationName:"EventSourceArn" type:"string"`
  6264. // The name of the Lambda function.
  6265. //
  6266. // Name formats
  6267. //
  6268. // * Function name - MyFunction.
  6269. //
  6270. // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction.
  6271. //
  6272. // * Version or Alias ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD.
  6273. //
  6274. // * Partial ARN - 123456789012:function:MyFunction.
  6275. //
  6276. // The length constraint applies only to the full ARN. If you specify only the
  6277. // function name, it's limited to 64 characters in length.
  6278. FunctionName *string `location:"querystring" locationName:"FunctionName" min:"1" type:"string"`
  6279. // A pagination token returned by a previous call.
  6280. Marker *string `location:"querystring" locationName:"Marker" type:"string"`
  6281. // The maximum number of event source mappings to return.
  6282. MaxItems *int64 `location:"querystring" locationName:"MaxItems" min:"1" type:"integer"`
  6283. }
  6284. // String returns the string representation
  6285. func (s ListEventSourceMappingsInput) String() string {
  6286. return awsutil.Prettify(s)
  6287. }
  6288. // GoString returns the string representation
  6289. func (s ListEventSourceMappingsInput) GoString() string {
  6290. return s.String()
  6291. }
  6292. // Validate inspects the fields of the type to determine if they are valid.
  6293. func (s *ListEventSourceMappingsInput) Validate() error {
  6294. invalidParams := request.ErrInvalidParams{Context: "ListEventSourceMappingsInput"}
  6295. if s.FunctionName != nil && len(*s.FunctionName) < 1 {
  6296. invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
  6297. }
  6298. if s.MaxItems != nil && *s.MaxItems < 1 {
  6299. invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1))
  6300. }
  6301. if invalidParams.Len() > 0 {
  6302. return invalidParams
  6303. }
  6304. return nil
  6305. }
  6306. // SetEventSourceArn sets the EventSourceArn field's value.
  6307. func (s *ListEventSourceMappingsInput) SetEventSourceArn(v string) *ListEventSourceMappingsInput {
  6308. s.EventSourceArn = &v
  6309. return s
  6310. }
  6311. // SetFunctionName sets the FunctionName field's value.
  6312. func (s *ListEventSourceMappingsInput) SetFunctionName(v string) *ListEventSourceMappingsInput {
  6313. s.FunctionName = &v
  6314. return s
  6315. }
  6316. // SetMarker sets the Marker field's value.
  6317. func (s *ListEventSourceMappingsInput) SetMarker(v string) *ListEventSourceMappingsInput {
  6318. s.Marker = &v
  6319. return s
  6320. }
  6321. // SetMaxItems sets the MaxItems field's value.
  6322. func (s *ListEventSourceMappingsInput) SetMaxItems(v int64) *ListEventSourceMappingsInput {
  6323. s.MaxItems = &v
  6324. return s
  6325. }
  6326. type ListEventSourceMappingsOutput struct {
  6327. _ struct{} `type:"structure"`
  6328. // A list of event source mappings.
  6329. EventSourceMappings []*EventSourceMappingConfiguration `type:"list"`
  6330. // A pagination token that's returned when the response doesn't contain all
  6331. // event source mappings.
  6332. NextMarker *string `type:"string"`
  6333. }
  6334. // String returns the string representation
  6335. func (s ListEventSourceMappingsOutput) String() string {
  6336. return awsutil.Prettify(s)
  6337. }
  6338. // GoString returns the string representation
  6339. func (s ListEventSourceMappingsOutput) GoString() string {
  6340. return s.String()
  6341. }
  6342. // SetEventSourceMappings sets the EventSourceMappings field's value.
  6343. func (s *ListEventSourceMappingsOutput) SetEventSourceMappings(v []*EventSourceMappingConfiguration) *ListEventSourceMappingsOutput {
  6344. s.EventSourceMappings = v
  6345. return s
  6346. }
  6347. // SetNextMarker sets the NextMarker field's value.
  6348. func (s *ListEventSourceMappingsOutput) SetNextMarker(v string) *ListEventSourceMappingsOutput {
  6349. s.NextMarker = &v
  6350. return s
  6351. }
  6352. type ListFunctionsInput struct {
  6353. _ struct{} `type:"structure"`
  6354. // Set to ALL to include entries for all published versions of each function.
  6355. FunctionVersion *string `location:"querystring" locationName:"FunctionVersion" type:"string" enum:"FunctionVersion"`
  6356. // Specify the pagination token returned by a previous request to retrieve the
  6357. // next page of results.
  6358. Marker *string `location:"querystring" locationName:"Marker" type:"string"`
  6359. // For Lambda@Edge functions, the region of the master function. For example,
  6360. // us-east-2 or ALL. If specified, you must set FunctionVersion to ALL.
  6361. MasterRegion *string `location:"querystring" locationName:"MasterRegion" type:"string"`
  6362. // Specify a value between 1 and 50 to limit the number of functions in the
  6363. // response.
  6364. MaxItems *int64 `location:"querystring" locationName:"MaxItems" min:"1" type:"integer"`
  6365. }
  6366. // String returns the string representation
  6367. func (s ListFunctionsInput) String() string {
  6368. return awsutil.Prettify(s)
  6369. }
  6370. // GoString returns the string representation
  6371. func (s ListFunctionsInput) GoString() string {
  6372. return s.String()
  6373. }
  6374. // Validate inspects the fields of the type to determine if they are valid.
  6375. func (s *ListFunctionsInput) Validate() error {
  6376. invalidParams := request.ErrInvalidParams{Context: "ListFunctionsInput"}
  6377. if s.MaxItems != nil && *s.MaxItems < 1 {
  6378. invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1))
  6379. }
  6380. if invalidParams.Len() > 0 {
  6381. return invalidParams
  6382. }
  6383. return nil
  6384. }
  6385. // SetFunctionVersion sets the FunctionVersion field's value.
  6386. func (s *ListFunctionsInput) SetFunctionVersion(v string) *ListFunctionsInput {
  6387. s.FunctionVersion = &v
  6388. return s
  6389. }
  6390. // SetMarker sets the Marker field's value.
  6391. func (s *ListFunctionsInput) SetMarker(v string) *ListFunctionsInput {
  6392. s.Marker = &v
  6393. return s
  6394. }
  6395. // SetMasterRegion sets the MasterRegion field's value.
  6396. func (s *ListFunctionsInput) SetMasterRegion(v string) *ListFunctionsInput {
  6397. s.MasterRegion = &v
  6398. return s
  6399. }
  6400. // SetMaxItems sets the MaxItems field's value.
  6401. func (s *ListFunctionsInput) SetMaxItems(v int64) *ListFunctionsInput {
  6402. s.MaxItems = &v
  6403. return s
  6404. }
  6405. // A list of Lambda functions.
  6406. type ListFunctionsOutput struct {
  6407. _ struct{} `type:"structure"`
  6408. // A list of Lambda functions.
  6409. Functions []*FunctionConfiguration `type:"list"`
  6410. // Pagination token included if more results are available.
  6411. NextMarker *string `type:"string"`
  6412. }
  6413. // String returns the string representation
  6414. func (s ListFunctionsOutput) String() string {
  6415. return awsutil.Prettify(s)
  6416. }
  6417. // GoString returns the string representation
  6418. func (s ListFunctionsOutput) GoString() string {
  6419. return s.String()
  6420. }
  6421. // SetFunctions sets the Functions field's value.
  6422. func (s *ListFunctionsOutput) SetFunctions(v []*FunctionConfiguration) *ListFunctionsOutput {
  6423. s.Functions = v
  6424. return s
  6425. }
  6426. // SetNextMarker sets the NextMarker field's value.
  6427. func (s *ListFunctionsOutput) SetNextMarker(v string) *ListFunctionsOutput {
  6428. s.NextMarker = &v
  6429. return s
  6430. }
  6431. type ListLayerVersionsInput struct {
  6432. _ struct{} `type:"structure"`
  6433. // A runtime identifier. For example, go1.x.
  6434. CompatibleRuntime *string `location:"querystring" locationName:"CompatibleRuntime" type:"string" enum:"Runtime"`
  6435. // The name or Amazon Resource Name (ARN) of the layer.
  6436. //
  6437. // LayerName is a required field
  6438. LayerName *string `location:"uri" locationName:"LayerName" min:"1" type:"string" required:"true"`
  6439. // A pagination token returned by a previous call.
  6440. Marker *string `location:"querystring" locationName:"Marker" type:"string"`
  6441. // The maximum number of versions to return.
  6442. MaxItems *int64 `location:"querystring" locationName:"MaxItems" min:"1" type:"integer"`
  6443. }
  6444. // String returns the string representation
  6445. func (s ListLayerVersionsInput) String() string {
  6446. return awsutil.Prettify(s)
  6447. }
  6448. // GoString returns the string representation
  6449. func (s ListLayerVersionsInput) GoString() string {
  6450. return s.String()
  6451. }
  6452. // Validate inspects the fields of the type to determine if they are valid.
  6453. func (s *ListLayerVersionsInput) Validate() error {
  6454. invalidParams := request.ErrInvalidParams{Context: "ListLayerVersionsInput"}
  6455. if s.LayerName == nil {
  6456. invalidParams.Add(request.NewErrParamRequired("LayerName"))
  6457. }
  6458. if s.LayerName != nil && len(*s.LayerName) < 1 {
  6459. invalidParams.Add(request.NewErrParamMinLen("LayerName", 1))
  6460. }
  6461. if s.MaxItems != nil && *s.MaxItems < 1 {
  6462. invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1))
  6463. }
  6464. if invalidParams.Len() > 0 {
  6465. return invalidParams
  6466. }
  6467. return nil
  6468. }
  6469. // SetCompatibleRuntime sets the CompatibleRuntime field's value.
  6470. func (s *ListLayerVersionsInput) SetCompatibleRuntime(v string) *ListLayerVersionsInput {
  6471. s.CompatibleRuntime = &v
  6472. return s
  6473. }
  6474. // SetLayerName sets the LayerName field's value.
  6475. func (s *ListLayerVersionsInput) SetLayerName(v string) *ListLayerVersionsInput {
  6476. s.LayerName = &v
  6477. return s
  6478. }
  6479. // SetMarker sets the Marker field's value.
  6480. func (s *ListLayerVersionsInput) SetMarker(v string) *ListLayerVersionsInput {
  6481. s.Marker = &v
  6482. return s
  6483. }
  6484. // SetMaxItems sets the MaxItems field's value.
  6485. func (s *ListLayerVersionsInput) SetMaxItems(v int64) *ListLayerVersionsInput {
  6486. s.MaxItems = &v
  6487. return s
  6488. }
  6489. type ListLayerVersionsOutput struct {
  6490. _ struct{} `type:"structure"`
  6491. // A list of versions.
  6492. LayerVersions []*LayerVersionsListItem `type:"list"`
  6493. // A pagination token returned when the response doesn't contain all versions.
  6494. NextMarker *string `type:"string"`
  6495. }
  6496. // String returns the string representation
  6497. func (s ListLayerVersionsOutput) String() string {
  6498. return awsutil.Prettify(s)
  6499. }
  6500. // GoString returns the string representation
  6501. func (s ListLayerVersionsOutput) GoString() string {
  6502. return s.String()
  6503. }
  6504. // SetLayerVersions sets the LayerVersions field's value.
  6505. func (s *ListLayerVersionsOutput) SetLayerVersions(v []*LayerVersionsListItem) *ListLayerVersionsOutput {
  6506. s.LayerVersions = v
  6507. return s
  6508. }
  6509. // SetNextMarker sets the NextMarker field's value.
  6510. func (s *ListLayerVersionsOutput) SetNextMarker(v string) *ListLayerVersionsOutput {
  6511. s.NextMarker = &v
  6512. return s
  6513. }
  6514. type ListLayersInput struct {
  6515. _ struct{} `type:"structure"`
  6516. // A runtime identifier. For example, go1.x.
  6517. CompatibleRuntime *string `location:"querystring" locationName:"CompatibleRuntime" type:"string" enum:"Runtime"`
  6518. // A pagination token returned by a previous call.
  6519. Marker *string `location:"querystring" locationName:"Marker" type:"string"`
  6520. // The maximum number of layers to return.
  6521. MaxItems *int64 `location:"querystring" locationName:"MaxItems" min:"1" type:"integer"`
  6522. }
  6523. // String returns the string representation
  6524. func (s ListLayersInput) String() string {
  6525. return awsutil.Prettify(s)
  6526. }
  6527. // GoString returns the string representation
  6528. func (s ListLayersInput) GoString() string {
  6529. return s.String()
  6530. }
  6531. // Validate inspects the fields of the type to determine if they are valid.
  6532. func (s *ListLayersInput) Validate() error {
  6533. invalidParams := request.ErrInvalidParams{Context: "ListLayersInput"}
  6534. if s.MaxItems != nil && *s.MaxItems < 1 {
  6535. invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1))
  6536. }
  6537. if invalidParams.Len() > 0 {
  6538. return invalidParams
  6539. }
  6540. return nil
  6541. }
  6542. // SetCompatibleRuntime sets the CompatibleRuntime field's value.
  6543. func (s *ListLayersInput) SetCompatibleRuntime(v string) *ListLayersInput {
  6544. s.CompatibleRuntime = &v
  6545. return s
  6546. }
  6547. // SetMarker sets the Marker field's value.
  6548. func (s *ListLayersInput) SetMarker(v string) *ListLayersInput {
  6549. s.Marker = &v
  6550. return s
  6551. }
  6552. // SetMaxItems sets the MaxItems field's value.
  6553. func (s *ListLayersInput) SetMaxItems(v int64) *ListLayersInput {
  6554. s.MaxItems = &v
  6555. return s
  6556. }
  6557. type ListLayersOutput struct {
  6558. _ struct{} `type:"structure"`
  6559. // A list of function layers.
  6560. Layers []*LayersListItem `type:"list"`
  6561. // A pagination token returned when the response doesn't contain all layers.
  6562. NextMarker *string `type:"string"`
  6563. }
  6564. // String returns the string representation
  6565. func (s ListLayersOutput) String() string {
  6566. return awsutil.Prettify(s)
  6567. }
  6568. // GoString returns the string representation
  6569. func (s ListLayersOutput) GoString() string {
  6570. return s.String()
  6571. }
  6572. // SetLayers sets the Layers field's value.
  6573. func (s *ListLayersOutput) SetLayers(v []*LayersListItem) *ListLayersOutput {
  6574. s.Layers = v
  6575. return s
  6576. }
  6577. // SetNextMarker sets the NextMarker field's value.
  6578. func (s *ListLayersOutput) SetNextMarker(v string) *ListLayersOutput {
  6579. s.NextMarker = &v
  6580. return s
  6581. }
  6582. type ListTagsInput struct {
  6583. _ struct{} `type:"structure"`
  6584. // The function's Amazon Resource Name (ARN).
  6585. //
  6586. // Resource is a required field
  6587. Resource *string `location:"uri" locationName:"ARN" type:"string" required:"true"`
  6588. }
  6589. // String returns the string representation
  6590. func (s ListTagsInput) String() string {
  6591. return awsutil.Prettify(s)
  6592. }
  6593. // GoString returns the string representation
  6594. func (s ListTagsInput) GoString() string {
  6595. return s.String()
  6596. }
  6597. // Validate inspects the fields of the type to determine if they are valid.
  6598. func (s *ListTagsInput) Validate() error {
  6599. invalidParams := request.ErrInvalidParams{Context: "ListTagsInput"}
  6600. if s.Resource == nil {
  6601. invalidParams.Add(request.NewErrParamRequired("Resource"))
  6602. }
  6603. if s.Resource != nil && len(*s.Resource) < 1 {
  6604. invalidParams.Add(request.NewErrParamMinLen("Resource", 1))
  6605. }
  6606. if invalidParams.Len() > 0 {
  6607. return invalidParams
  6608. }
  6609. return nil
  6610. }
  6611. // SetResource sets the Resource field's value.
  6612. func (s *ListTagsInput) SetResource(v string) *ListTagsInput {
  6613. s.Resource = &v
  6614. return s
  6615. }
  6616. type ListTagsOutput struct {
  6617. _ struct{} `type:"structure"`
  6618. // The function's tags.
  6619. Tags map[string]*string `type:"map"`
  6620. }
  6621. // String returns the string representation
  6622. func (s ListTagsOutput) String() string {
  6623. return awsutil.Prettify(s)
  6624. }
  6625. // GoString returns the string representation
  6626. func (s ListTagsOutput) GoString() string {
  6627. return s.String()
  6628. }
  6629. // SetTags sets the Tags field's value.
  6630. func (s *ListTagsOutput) SetTags(v map[string]*string) *ListTagsOutput {
  6631. s.Tags = v
  6632. return s
  6633. }
  6634. type ListVersionsByFunctionInput struct {
  6635. _ struct{} `type:"structure"`
  6636. // The name of the lambda function.
  6637. //
  6638. // Name formats
  6639. //
  6640. // * Function name - MyFunction.
  6641. //
  6642. // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction.
  6643. //
  6644. // * Partial ARN - 123456789012:function:MyFunction.
  6645. //
  6646. // The length constraint applies only to the full ARN. If you specify only the
  6647. // function name, it is limited to 64 characters in length.
  6648. //
  6649. // FunctionName is a required field
  6650. FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
  6651. // Specify the pagination token returned by a previous request to retrieve the
  6652. // next page of results.
  6653. Marker *string `location:"querystring" locationName:"Marker" type:"string"`
  6654. // Limit the number of versions returned.
  6655. MaxItems *int64 `location:"querystring" locationName:"MaxItems" min:"1" type:"integer"`
  6656. }
  6657. // String returns the string representation
  6658. func (s ListVersionsByFunctionInput) String() string {
  6659. return awsutil.Prettify(s)
  6660. }
  6661. // GoString returns the string representation
  6662. func (s ListVersionsByFunctionInput) GoString() string {
  6663. return s.String()
  6664. }
  6665. // Validate inspects the fields of the type to determine if they are valid.
  6666. func (s *ListVersionsByFunctionInput) Validate() error {
  6667. invalidParams := request.ErrInvalidParams{Context: "ListVersionsByFunctionInput"}
  6668. if s.FunctionName == nil {
  6669. invalidParams.Add(request.NewErrParamRequired("FunctionName"))
  6670. }
  6671. if s.FunctionName != nil && len(*s.FunctionName) < 1 {
  6672. invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
  6673. }
  6674. if s.MaxItems != nil && *s.MaxItems < 1 {
  6675. invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1))
  6676. }
  6677. if invalidParams.Len() > 0 {
  6678. return invalidParams
  6679. }
  6680. return nil
  6681. }
  6682. // SetFunctionName sets the FunctionName field's value.
  6683. func (s *ListVersionsByFunctionInput) SetFunctionName(v string) *ListVersionsByFunctionInput {
  6684. s.FunctionName = &v
  6685. return s
  6686. }
  6687. // SetMarker sets the Marker field's value.
  6688. func (s *ListVersionsByFunctionInput) SetMarker(v string) *ListVersionsByFunctionInput {
  6689. s.Marker = &v
  6690. return s
  6691. }
  6692. // SetMaxItems sets the MaxItems field's value.
  6693. func (s *ListVersionsByFunctionInput) SetMaxItems(v int64) *ListVersionsByFunctionInput {
  6694. s.MaxItems = &v
  6695. return s
  6696. }
  6697. type ListVersionsByFunctionOutput struct {
  6698. _ struct{} `type:"structure"`
  6699. // Pagination token included if more results are available.
  6700. NextMarker *string `type:"string"`
  6701. // A list of Lambda function versions.
  6702. Versions []*FunctionConfiguration `type:"list"`
  6703. }
  6704. // String returns the string representation
  6705. func (s ListVersionsByFunctionOutput) String() string {
  6706. return awsutil.Prettify(s)
  6707. }
  6708. // GoString returns the string representation
  6709. func (s ListVersionsByFunctionOutput) GoString() string {
  6710. return s.String()
  6711. }
  6712. // SetNextMarker sets the NextMarker field's value.
  6713. func (s *ListVersionsByFunctionOutput) SetNextMarker(v string) *ListVersionsByFunctionOutput {
  6714. s.NextMarker = &v
  6715. return s
  6716. }
  6717. // SetVersions sets the Versions field's value.
  6718. func (s *ListVersionsByFunctionOutput) SetVersions(v []*FunctionConfiguration) *ListVersionsByFunctionOutput {
  6719. s.Versions = v
  6720. return s
  6721. }
  6722. type PublishLayerVersionInput struct {
  6723. _ struct{} `type:"structure"`
  6724. // A list of compatible function runtimes (http://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html).
  6725. // Used for filtering with ListLayers and ListLayerVersions.
  6726. CompatibleRuntimes []*string `type:"list"`
  6727. // The function layer archive.
  6728. //
  6729. // Content is a required field
  6730. Content *LayerVersionContentInput `type:"structure" required:"true"`
  6731. // The description of the version.
  6732. Description *string `type:"string"`
  6733. // The name or Amazon Resource Name (ARN) of the layer.
  6734. //
  6735. // LayerName is a required field
  6736. LayerName *string `location:"uri" locationName:"LayerName" min:"1" type:"string" required:"true"`
  6737. // The layer's software license. It can be any of the following:
  6738. //
  6739. // * An SPDX license identifier (https://spdx.org/licenses/). For example,
  6740. // MIT.
  6741. //
  6742. // * The URL of a license hosted on the internet. For example, https://opensource.org/licenses/MIT.
  6743. //
  6744. // * The full text of the license.
  6745. LicenseInfo *string `type:"string"`
  6746. }
  6747. // String returns the string representation
  6748. func (s PublishLayerVersionInput) String() string {
  6749. return awsutil.Prettify(s)
  6750. }
  6751. // GoString returns the string representation
  6752. func (s PublishLayerVersionInput) GoString() string {
  6753. return s.String()
  6754. }
  6755. // Validate inspects the fields of the type to determine if they are valid.
  6756. func (s *PublishLayerVersionInput) Validate() error {
  6757. invalidParams := request.ErrInvalidParams{Context: "PublishLayerVersionInput"}
  6758. if s.Content == nil {
  6759. invalidParams.Add(request.NewErrParamRequired("Content"))
  6760. }
  6761. if s.LayerName == nil {
  6762. invalidParams.Add(request.NewErrParamRequired("LayerName"))
  6763. }
  6764. if s.LayerName != nil && len(*s.LayerName) < 1 {
  6765. invalidParams.Add(request.NewErrParamMinLen("LayerName", 1))
  6766. }
  6767. if s.Content != nil {
  6768. if err := s.Content.Validate(); err != nil {
  6769. invalidParams.AddNested("Content", err.(request.ErrInvalidParams))
  6770. }
  6771. }
  6772. if invalidParams.Len() > 0 {
  6773. return invalidParams
  6774. }
  6775. return nil
  6776. }
  6777. // SetCompatibleRuntimes sets the CompatibleRuntimes field's value.
  6778. func (s *PublishLayerVersionInput) SetCompatibleRuntimes(v []*string) *PublishLayerVersionInput {
  6779. s.CompatibleRuntimes = v
  6780. return s
  6781. }
  6782. // SetContent sets the Content field's value.
  6783. func (s *PublishLayerVersionInput) SetContent(v *LayerVersionContentInput) *PublishLayerVersionInput {
  6784. s.Content = v
  6785. return s
  6786. }
  6787. // SetDescription sets the Description field's value.
  6788. func (s *PublishLayerVersionInput) SetDescription(v string) *PublishLayerVersionInput {
  6789. s.Description = &v
  6790. return s
  6791. }
  6792. // SetLayerName sets the LayerName field's value.
  6793. func (s *PublishLayerVersionInput) SetLayerName(v string) *PublishLayerVersionInput {
  6794. s.LayerName = &v
  6795. return s
  6796. }
  6797. // SetLicenseInfo sets the LicenseInfo field's value.
  6798. func (s *PublishLayerVersionInput) SetLicenseInfo(v string) *PublishLayerVersionInput {
  6799. s.LicenseInfo = &v
  6800. return s
  6801. }
  6802. type PublishLayerVersionOutput struct {
  6803. _ struct{} `type:"structure"`
  6804. // The layer's compatible runtimes.
  6805. CompatibleRuntimes []*string `type:"list"`
  6806. // Details about the layer version.
  6807. Content *LayerVersionContentOutput `type:"structure"`
  6808. // The date that the layer version was created, in ISO-8601 format (https://www.w3.org/TR/NOTE-datetime)
  6809. // (YYYY-MM-DDThh:mm:ss.sTZD).
  6810. CreatedDate *string `type:"string"`
  6811. // The description of the version.
  6812. Description *string `type:"string"`
  6813. // The ARN of the layer.
  6814. LayerArn *string `min:"1" type:"string"`
  6815. // The ARN of the layer version.
  6816. LayerVersionArn *string `min:"1" type:"string"`
  6817. // The layer's software license.
  6818. LicenseInfo *string `type:"string"`
  6819. // The version number.
  6820. Version *int64 `type:"long"`
  6821. }
  6822. // String returns the string representation
  6823. func (s PublishLayerVersionOutput) String() string {
  6824. return awsutil.Prettify(s)
  6825. }
  6826. // GoString returns the string representation
  6827. func (s PublishLayerVersionOutput) GoString() string {
  6828. return s.String()
  6829. }
  6830. // SetCompatibleRuntimes sets the CompatibleRuntimes field's value.
  6831. func (s *PublishLayerVersionOutput) SetCompatibleRuntimes(v []*string) *PublishLayerVersionOutput {
  6832. s.CompatibleRuntimes = v
  6833. return s
  6834. }
  6835. // SetContent sets the Content field's value.
  6836. func (s *PublishLayerVersionOutput) SetContent(v *LayerVersionContentOutput) *PublishLayerVersionOutput {
  6837. s.Content = v
  6838. return s
  6839. }
  6840. // SetCreatedDate sets the CreatedDate field's value.
  6841. func (s *PublishLayerVersionOutput) SetCreatedDate(v string) *PublishLayerVersionOutput {
  6842. s.CreatedDate = &v
  6843. return s
  6844. }
  6845. // SetDescription sets the Description field's value.
  6846. func (s *PublishLayerVersionOutput) SetDescription(v string) *PublishLayerVersionOutput {
  6847. s.Description = &v
  6848. return s
  6849. }
  6850. // SetLayerArn sets the LayerArn field's value.
  6851. func (s *PublishLayerVersionOutput) SetLayerArn(v string) *PublishLayerVersionOutput {
  6852. s.LayerArn = &v
  6853. return s
  6854. }
  6855. // SetLayerVersionArn sets the LayerVersionArn field's value.
  6856. func (s *PublishLayerVersionOutput) SetLayerVersionArn(v string) *PublishLayerVersionOutput {
  6857. s.LayerVersionArn = &v
  6858. return s
  6859. }
  6860. // SetLicenseInfo sets the LicenseInfo field's value.
  6861. func (s *PublishLayerVersionOutput) SetLicenseInfo(v string) *PublishLayerVersionOutput {
  6862. s.LicenseInfo = &v
  6863. return s
  6864. }
  6865. // SetVersion sets the Version field's value.
  6866. func (s *PublishLayerVersionOutput) SetVersion(v int64) *PublishLayerVersionOutput {
  6867. s.Version = &v
  6868. return s
  6869. }
  6870. type PublishVersionInput struct {
  6871. _ struct{} `type:"structure"`
  6872. // Only publish a version if the hash matches the value specified. Use this
  6873. // option to avoid publishing a version if the function code has changed since
  6874. // you last updated it. You can get the hash for the version you uploaded from
  6875. // the output of UpdateFunctionCode.
  6876. CodeSha256 *string `type:"string"`
  6877. // Specify a description for the version to override the description in the
  6878. // function configuration.
  6879. Description *string `type:"string"`
  6880. // The name of the lambda function.
  6881. //
  6882. // Name formats
  6883. //
  6884. // * Function name - MyFunction.
  6885. //
  6886. // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction.
  6887. //
  6888. // * Partial ARN - 123456789012:function:MyFunction.
  6889. //
  6890. // The length constraint applies only to the full ARN. If you specify only the
  6891. // function name, it is limited to 64 characters in length.
  6892. //
  6893. // FunctionName is a required field
  6894. FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
  6895. // Only update the function if the revision ID matches the ID specified. Use
  6896. // this option to avoid publishing a version if the function configuration has
  6897. // changed since you last updated it.
  6898. RevisionId *string `type:"string"`
  6899. }
  6900. // String returns the string representation
  6901. func (s PublishVersionInput) String() string {
  6902. return awsutil.Prettify(s)
  6903. }
  6904. // GoString returns the string representation
  6905. func (s PublishVersionInput) GoString() string {
  6906. return s.String()
  6907. }
  6908. // Validate inspects the fields of the type to determine if they are valid.
  6909. func (s *PublishVersionInput) Validate() error {
  6910. invalidParams := request.ErrInvalidParams{Context: "PublishVersionInput"}
  6911. if s.FunctionName == nil {
  6912. invalidParams.Add(request.NewErrParamRequired("FunctionName"))
  6913. }
  6914. if s.FunctionName != nil && len(*s.FunctionName) < 1 {
  6915. invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
  6916. }
  6917. if invalidParams.Len() > 0 {
  6918. return invalidParams
  6919. }
  6920. return nil
  6921. }
  6922. // SetCodeSha256 sets the CodeSha256 field's value.
  6923. func (s *PublishVersionInput) SetCodeSha256(v string) *PublishVersionInput {
  6924. s.CodeSha256 = &v
  6925. return s
  6926. }
  6927. // SetDescription sets the Description field's value.
  6928. func (s *PublishVersionInput) SetDescription(v string) *PublishVersionInput {
  6929. s.Description = &v
  6930. return s
  6931. }
  6932. // SetFunctionName sets the FunctionName field's value.
  6933. func (s *PublishVersionInput) SetFunctionName(v string) *PublishVersionInput {
  6934. s.FunctionName = &v
  6935. return s
  6936. }
  6937. // SetRevisionId sets the RevisionId field's value.
  6938. func (s *PublishVersionInput) SetRevisionId(v string) *PublishVersionInput {
  6939. s.RevisionId = &v
  6940. return s
  6941. }
  6942. type PutFunctionConcurrencyInput struct {
  6943. _ struct{} `type:"structure"`
  6944. // The name of the Lambda function.
  6945. //
  6946. // Name formats
  6947. //
  6948. // * Function name - my-function.
  6949. //
  6950. // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function.
  6951. //
  6952. // * Partial ARN - 123456789012:function:my-function.
  6953. //
  6954. // The length constraint applies only to the full ARN. If you specify only the
  6955. // function name, it is limited to 64 characters in length.
  6956. //
  6957. // FunctionName is a required field
  6958. FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
  6959. // The number of simultaneous executions to reserve for the function.
  6960. //
  6961. // ReservedConcurrentExecutions is a required field
  6962. ReservedConcurrentExecutions *int64 `type:"integer" required:"true"`
  6963. }
  6964. // String returns the string representation
  6965. func (s PutFunctionConcurrencyInput) String() string {
  6966. return awsutil.Prettify(s)
  6967. }
  6968. // GoString returns the string representation
  6969. func (s PutFunctionConcurrencyInput) GoString() string {
  6970. return s.String()
  6971. }
  6972. // Validate inspects the fields of the type to determine if they are valid.
  6973. func (s *PutFunctionConcurrencyInput) Validate() error {
  6974. invalidParams := request.ErrInvalidParams{Context: "PutFunctionConcurrencyInput"}
  6975. if s.FunctionName == nil {
  6976. invalidParams.Add(request.NewErrParamRequired("FunctionName"))
  6977. }
  6978. if s.FunctionName != nil && len(*s.FunctionName) < 1 {
  6979. invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
  6980. }
  6981. if s.ReservedConcurrentExecutions == nil {
  6982. invalidParams.Add(request.NewErrParamRequired("ReservedConcurrentExecutions"))
  6983. }
  6984. if invalidParams.Len() > 0 {
  6985. return invalidParams
  6986. }
  6987. return nil
  6988. }
  6989. // SetFunctionName sets the FunctionName field's value.
  6990. func (s *PutFunctionConcurrencyInput) SetFunctionName(v string) *PutFunctionConcurrencyInput {
  6991. s.FunctionName = &v
  6992. return s
  6993. }
  6994. // SetReservedConcurrentExecutions sets the ReservedConcurrentExecutions field's value.
  6995. func (s *PutFunctionConcurrencyInput) SetReservedConcurrentExecutions(v int64) *PutFunctionConcurrencyInput {
  6996. s.ReservedConcurrentExecutions = &v
  6997. return s
  6998. }
  6999. type PutFunctionConcurrencyOutput struct {
  7000. _ struct{} `type:"structure"`
  7001. // The number of concurrent executions reserved for this function. For more
  7002. // information, see Managing Concurrency (http://docs.aws.amazon.com/lambda/latest/dg/concurrent-executions.html).
  7003. ReservedConcurrentExecutions *int64 `type:"integer"`
  7004. }
  7005. // String returns the string representation
  7006. func (s PutFunctionConcurrencyOutput) String() string {
  7007. return awsutil.Prettify(s)
  7008. }
  7009. // GoString returns the string representation
  7010. func (s PutFunctionConcurrencyOutput) GoString() string {
  7011. return s.String()
  7012. }
  7013. // SetReservedConcurrentExecutions sets the ReservedConcurrentExecutions field's value.
  7014. func (s *PutFunctionConcurrencyOutput) SetReservedConcurrentExecutions(v int64) *PutFunctionConcurrencyOutput {
  7015. s.ReservedConcurrentExecutions = &v
  7016. return s
  7017. }
  7018. type RemoveLayerVersionPermissionInput struct {
  7019. _ struct{} `type:"structure"`
  7020. // The name or Amazon Resource Name (ARN) of the layer.
  7021. //
  7022. // LayerName is a required field
  7023. LayerName *string `location:"uri" locationName:"LayerName" min:"1" type:"string" required:"true"`
  7024. // Only update the policy if the revision ID matches the ID specified. Use this
  7025. // option to avoid modifying a policy that has changed since you last read it.
  7026. RevisionId *string `location:"querystring" locationName:"RevisionId" type:"string"`
  7027. // The identifier that was specified when the statement was added.
  7028. //
  7029. // StatementId is a required field
  7030. StatementId *string `location:"uri" locationName:"StatementId" min:"1" type:"string" required:"true"`
  7031. // The version number.
  7032. //
  7033. // VersionNumber is a required field
  7034. VersionNumber *int64 `location:"uri" locationName:"VersionNumber" type:"long" required:"true"`
  7035. }
  7036. // String returns the string representation
  7037. func (s RemoveLayerVersionPermissionInput) String() string {
  7038. return awsutil.Prettify(s)
  7039. }
  7040. // GoString returns the string representation
  7041. func (s RemoveLayerVersionPermissionInput) GoString() string {
  7042. return s.String()
  7043. }
  7044. // Validate inspects the fields of the type to determine if they are valid.
  7045. func (s *RemoveLayerVersionPermissionInput) Validate() error {
  7046. invalidParams := request.ErrInvalidParams{Context: "RemoveLayerVersionPermissionInput"}
  7047. if s.LayerName == nil {
  7048. invalidParams.Add(request.NewErrParamRequired("LayerName"))
  7049. }
  7050. if s.LayerName != nil && len(*s.LayerName) < 1 {
  7051. invalidParams.Add(request.NewErrParamMinLen("LayerName", 1))
  7052. }
  7053. if s.StatementId == nil {
  7054. invalidParams.Add(request.NewErrParamRequired("StatementId"))
  7055. }
  7056. if s.StatementId != nil && len(*s.StatementId) < 1 {
  7057. invalidParams.Add(request.NewErrParamMinLen("StatementId", 1))
  7058. }
  7059. if s.VersionNumber == nil {
  7060. invalidParams.Add(request.NewErrParamRequired("VersionNumber"))
  7061. }
  7062. if invalidParams.Len() > 0 {
  7063. return invalidParams
  7064. }
  7065. return nil
  7066. }
  7067. // SetLayerName sets the LayerName field's value.
  7068. func (s *RemoveLayerVersionPermissionInput) SetLayerName(v string) *RemoveLayerVersionPermissionInput {
  7069. s.LayerName = &v
  7070. return s
  7071. }
  7072. // SetRevisionId sets the RevisionId field's value.
  7073. func (s *RemoveLayerVersionPermissionInput) SetRevisionId(v string) *RemoveLayerVersionPermissionInput {
  7074. s.RevisionId = &v
  7075. return s
  7076. }
  7077. // SetStatementId sets the StatementId field's value.
  7078. func (s *RemoveLayerVersionPermissionInput) SetStatementId(v string) *RemoveLayerVersionPermissionInput {
  7079. s.StatementId = &v
  7080. return s
  7081. }
  7082. // SetVersionNumber sets the VersionNumber field's value.
  7083. func (s *RemoveLayerVersionPermissionInput) SetVersionNumber(v int64) *RemoveLayerVersionPermissionInput {
  7084. s.VersionNumber = &v
  7085. return s
  7086. }
  7087. type RemoveLayerVersionPermissionOutput struct {
  7088. _ struct{} `type:"structure"`
  7089. }
  7090. // String returns the string representation
  7091. func (s RemoveLayerVersionPermissionOutput) String() string {
  7092. return awsutil.Prettify(s)
  7093. }
  7094. // GoString returns the string representation
  7095. func (s RemoveLayerVersionPermissionOutput) GoString() string {
  7096. return s.String()
  7097. }
  7098. type RemovePermissionInput struct {
  7099. _ struct{} `type:"structure"`
  7100. // The name of the Lambda function, version, or alias.
  7101. //
  7102. // Name formats
  7103. //
  7104. // * Function name - my-function (name-only), my-function:v1 (with alias).
  7105. //
  7106. // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function.
  7107. //
  7108. // * Partial ARN - 123456789012:function:my-function.
  7109. //
  7110. // You can append a version number or alias to any of the formats. The length
  7111. // constraint applies only to the full ARN. If you specify only the function
  7112. // name, it is limited to 64 characters in length.
  7113. //
  7114. // FunctionName is a required field
  7115. FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
  7116. // Specify a version or alias to remove permissions from a published version
  7117. // of the function.
  7118. Qualifier *string `location:"querystring" locationName:"Qualifier" min:"1" type:"string"`
  7119. // Only update the policy if the revision ID matches the ID specified. Use this
  7120. // option to avoid modifying a policy that has changed since you last read it.
  7121. RevisionId *string `location:"querystring" locationName:"RevisionId" type:"string"`
  7122. // Statement ID of the permission to remove.
  7123. //
  7124. // StatementId is a required field
  7125. StatementId *string `location:"uri" locationName:"StatementId" min:"1" type:"string" required:"true"`
  7126. }
  7127. // String returns the string representation
  7128. func (s RemovePermissionInput) String() string {
  7129. return awsutil.Prettify(s)
  7130. }
  7131. // GoString returns the string representation
  7132. func (s RemovePermissionInput) GoString() string {
  7133. return s.String()
  7134. }
  7135. // Validate inspects the fields of the type to determine if they are valid.
  7136. func (s *RemovePermissionInput) Validate() error {
  7137. invalidParams := request.ErrInvalidParams{Context: "RemovePermissionInput"}
  7138. if s.FunctionName == nil {
  7139. invalidParams.Add(request.NewErrParamRequired("FunctionName"))
  7140. }
  7141. if s.FunctionName != nil && len(*s.FunctionName) < 1 {
  7142. invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
  7143. }
  7144. if s.Qualifier != nil && len(*s.Qualifier) < 1 {
  7145. invalidParams.Add(request.NewErrParamMinLen("Qualifier", 1))
  7146. }
  7147. if s.StatementId == nil {
  7148. invalidParams.Add(request.NewErrParamRequired("StatementId"))
  7149. }
  7150. if s.StatementId != nil && len(*s.StatementId) < 1 {
  7151. invalidParams.Add(request.NewErrParamMinLen("StatementId", 1))
  7152. }
  7153. if invalidParams.Len() > 0 {
  7154. return invalidParams
  7155. }
  7156. return nil
  7157. }
  7158. // SetFunctionName sets the FunctionName field's value.
  7159. func (s *RemovePermissionInput) SetFunctionName(v string) *RemovePermissionInput {
  7160. s.FunctionName = &v
  7161. return s
  7162. }
  7163. // SetQualifier sets the Qualifier field's value.
  7164. func (s *RemovePermissionInput) SetQualifier(v string) *RemovePermissionInput {
  7165. s.Qualifier = &v
  7166. return s
  7167. }
  7168. // SetRevisionId sets the RevisionId field's value.
  7169. func (s *RemovePermissionInput) SetRevisionId(v string) *RemovePermissionInput {
  7170. s.RevisionId = &v
  7171. return s
  7172. }
  7173. // SetStatementId sets the StatementId field's value.
  7174. func (s *RemovePermissionInput) SetStatementId(v string) *RemovePermissionInput {
  7175. s.StatementId = &v
  7176. return s
  7177. }
  7178. type RemovePermissionOutput struct {
  7179. _ struct{} `type:"structure"`
  7180. }
  7181. // String returns the string representation
  7182. func (s RemovePermissionOutput) String() string {
  7183. return awsutil.Prettify(s)
  7184. }
  7185. // GoString returns the string representation
  7186. func (s RemovePermissionOutput) GoString() string {
  7187. return s.String()
  7188. }
  7189. type TagResourceInput struct {
  7190. _ struct{} `type:"structure"`
  7191. // The function's Amazon Resource Name (ARN).
  7192. //
  7193. // Resource is a required field
  7194. Resource *string `location:"uri" locationName:"ARN" type:"string" required:"true"`
  7195. // A list of tags to apply to the function.
  7196. //
  7197. // Tags is a required field
  7198. Tags map[string]*string `type:"map" required:"true"`
  7199. }
  7200. // String returns the string representation
  7201. func (s TagResourceInput) String() string {
  7202. return awsutil.Prettify(s)
  7203. }
  7204. // GoString returns the string representation
  7205. func (s TagResourceInput) GoString() string {
  7206. return s.String()
  7207. }
  7208. // Validate inspects the fields of the type to determine if they are valid.
  7209. func (s *TagResourceInput) Validate() error {
  7210. invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"}
  7211. if s.Resource == nil {
  7212. invalidParams.Add(request.NewErrParamRequired("Resource"))
  7213. }
  7214. if s.Resource != nil && len(*s.Resource) < 1 {
  7215. invalidParams.Add(request.NewErrParamMinLen("Resource", 1))
  7216. }
  7217. if s.Tags == nil {
  7218. invalidParams.Add(request.NewErrParamRequired("Tags"))
  7219. }
  7220. if invalidParams.Len() > 0 {
  7221. return invalidParams
  7222. }
  7223. return nil
  7224. }
  7225. // SetResource sets the Resource field's value.
  7226. func (s *TagResourceInput) SetResource(v string) *TagResourceInput {
  7227. s.Resource = &v
  7228. return s
  7229. }
  7230. // SetTags sets the Tags field's value.
  7231. func (s *TagResourceInput) SetTags(v map[string]*string) *TagResourceInput {
  7232. s.Tags = v
  7233. return s
  7234. }
  7235. type TagResourceOutput struct {
  7236. _ struct{} `type:"structure"`
  7237. }
  7238. // String returns the string representation
  7239. func (s TagResourceOutput) String() string {
  7240. return awsutil.Prettify(s)
  7241. }
  7242. // GoString returns the string representation
  7243. func (s TagResourceOutput) GoString() string {
  7244. return s.String()
  7245. }
  7246. // The function's AWS X-Ray tracing configuration.
  7247. type TracingConfig struct {
  7248. _ struct{} `type:"structure"`
  7249. // The tracing mode.
  7250. Mode *string `type:"string" enum:"TracingMode"`
  7251. }
  7252. // String returns the string representation
  7253. func (s TracingConfig) String() string {
  7254. return awsutil.Prettify(s)
  7255. }
  7256. // GoString returns the string representation
  7257. func (s TracingConfig) GoString() string {
  7258. return s.String()
  7259. }
  7260. // SetMode sets the Mode field's value.
  7261. func (s *TracingConfig) SetMode(v string) *TracingConfig {
  7262. s.Mode = &v
  7263. return s
  7264. }
  7265. // The function's AWS X-Ray tracing configuration.
  7266. type TracingConfigResponse struct {
  7267. _ struct{} `type:"structure"`
  7268. // The tracing mode.
  7269. Mode *string `type:"string" enum:"TracingMode"`
  7270. }
  7271. // String returns the string representation
  7272. func (s TracingConfigResponse) String() string {
  7273. return awsutil.Prettify(s)
  7274. }
  7275. // GoString returns the string representation
  7276. func (s TracingConfigResponse) GoString() string {
  7277. return s.String()
  7278. }
  7279. // SetMode sets the Mode field's value.
  7280. func (s *TracingConfigResponse) SetMode(v string) *TracingConfigResponse {
  7281. s.Mode = &v
  7282. return s
  7283. }
  7284. type UntagResourceInput struct {
  7285. _ struct{} `type:"structure"`
  7286. // The function's Amazon Resource Name (ARN).
  7287. //
  7288. // Resource is a required field
  7289. Resource *string `location:"uri" locationName:"ARN" type:"string" required:"true"`
  7290. // A list of tag keys to remove from the function.
  7291. //
  7292. // TagKeys is a required field
  7293. TagKeys []*string `location:"querystring" locationName:"tagKeys" type:"list" required:"true"`
  7294. }
  7295. // String returns the string representation
  7296. func (s UntagResourceInput) String() string {
  7297. return awsutil.Prettify(s)
  7298. }
  7299. // GoString returns the string representation
  7300. func (s UntagResourceInput) GoString() string {
  7301. return s.String()
  7302. }
  7303. // Validate inspects the fields of the type to determine if they are valid.
  7304. func (s *UntagResourceInput) Validate() error {
  7305. invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"}
  7306. if s.Resource == nil {
  7307. invalidParams.Add(request.NewErrParamRequired("Resource"))
  7308. }
  7309. if s.Resource != nil && len(*s.Resource) < 1 {
  7310. invalidParams.Add(request.NewErrParamMinLen("Resource", 1))
  7311. }
  7312. if s.TagKeys == nil {
  7313. invalidParams.Add(request.NewErrParamRequired("TagKeys"))
  7314. }
  7315. if invalidParams.Len() > 0 {
  7316. return invalidParams
  7317. }
  7318. return nil
  7319. }
  7320. // SetResource sets the Resource field's value.
  7321. func (s *UntagResourceInput) SetResource(v string) *UntagResourceInput {
  7322. s.Resource = &v
  7323. return s
  7324. }
  7325. // SetTagKeys sets the TagKeys field's value.
  7326. func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput {
  7327. s.TagKeys = v
  7328. return s
  7329. }
  7330. type UntagResourceOutput struct {
  7331. _ struct{} `type:"structure"`
  7332. }
  7333. // String returns the string representation
  7334. func (s UntagResourceOutput) String() string {
  7335. return awsutil.Prettify(s)
  7336. }
  7337. // GoString returns the string representation
  7338. func (s UntagResourceOutput) GoString() string {
  7339. return s.String()
  7340. }
  7341. type UpdateAliasInput struct {
  7342. _ struct{} `type:"structure"`
  7343. // A description of the alias.
  7344. Description *string `type:"string"`
  7345. // The name of the lambda function.
  7346. //
  7347. // Name formats
  7348. //
  7349. // * Function name - MyFunction.
  7350. //
  7351. // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction.
  7352. //
  7353. // * Partial ARN - 123456789012:function:MyFunction.
  7354. //
  7355. // The length constraint applies only to the full ARN. If you specify only the
  7356. // function name, it is limited to 64 characters in length.
  7357. //
  7358. // FunctionName is a required field
  7359. FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
  7360. // The function version that the alias invokes.
  7361. FunctionVersion *string `min:"1" type:"string"`
  7362. // The name of the alias.
  7363. //
  7364. // Name is a required field
  7365. Name *string `location:"uri" locationName:"Name" min:"1" type:"string" required:"true"`
  7366. // Only update the alias if the revision ID matches the ID specified. Use this
  7367. // option to avoid modifying an alias that has changed since you last read it.
  7368. RevisionId *string `type:"string"`
  7369. // The routing configuration (http://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html)
  7370. // of the alias.
  7371. RoutingConfig *AliasRoutingConfiguration `type:"structure"`
  7372. }
  7373. // String returns the string representation
  7374. func (s UpdateAliasInput) String() string {
  7375. return awsutil.Prettify(s)
  7376. }
  7377. // GoString returns the string representation
  7378. func (s UpdateAliasInput) GoString() string {
  7379. return s.String()
  7380. }
  7381. // Validate inspects the fields of the type to determine if they are valid.
  7382. func (s *UpdateAliasInput) Validate() error {
  7383. invalidParams := request.ErrInvalidParams{Context: "UpdateAliasInput"}
  7384. if s.FunctionName == nil {
  7385. invalidParams.Add(request.NewErrParamRequired("FunctionName"))
  7386. }
  7387. if s.FunctionName != nil && len(*s.FunctionName) < 1 {
  7388. invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
  7389. }
  7390. if s.FunctionVersion != nil && len(*s.FunctionVersion) < 1 {
  7391. invalidParams.Add(request.NewErrParamMinLen("FunctionVersion", 1))
  7392. }
  7393. if s.Name == nil {
  7394. invalidParams.Add(request.NewErrParamRequired("Name"))
  7395. }
  7396. if s.Name != nil && len(*s.Name) < 1 {
  7397. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  7398. }
  7399. if invalidParams.Len() > 0 {
  7400. return invalidParams
  7401. }
  7402. return nil
  7403. }
  7404. // SetDescription sets the Description field's value.
  7405. func (s *UpdateAliasInput) SetDescription(v string) *UpdateAliasInput {
  7406. s.Description = &v
  7407. return s
  7408. }
  7409. // SetFunctionName sets the FunctionName field's value.
  7410. func (s *UpdateAliasInput) SetFunctionName(v string) *UpdateAliasInput {
  7411. s.FunctionName = &v
  7412. return s
  7413. }
  7414. // SetFunctionVersion sets the FunctionVersion field's value.
  7415. func (s *UpdateAliasInput) SetFunctionVersion(v string) *UpdateAliasInput {
  7416. s.FunctionVersion = &v
  7417. return s
  7418. }
  7419. // SetName sets the Name field's value.
  7420. func (s *UpdateAliasInput) SetName(v string) *UpdateAliasInput {
  7421. s.Name = &v
  7422. return s
  7423. }
  7424. // SetRevisionId sets the RevisionId field's value.
  7425. func (s *UpdateAliasInput) SetRevisionId(v string) *UpdateAliasInput {
  7426. s.RevisionId = &v
  7427. return s
  7428. }
  7429. // SetRoutingConfig sets the RoutingConfig field's value.
  7430. func (s *UpdateAliasInput) SetRoutingConfig(v *AliasRoutingConfiguration) *UpdateAliasInput {
  7431. s.RoutingConfig = v
  7432. return s
  7433. }
  7434. type UpdateEventSourceMappingInput struct {
  7435. _ struct{} `type:"structure"`
  7436. // The maximum number of items to retrieve in a single batch.
  7437. //
  7438. // * Amazon Kinesis - Default 100. Max 10,000.
  7439. //
  7440. // * Amazon DynamoDB Streams - Default 100. Max 1,000.
  7441. //
  7442. // * Amazon Simple Queue Service - Default 10. Max 10.
  7443. BatchSize *int64 `min:"1" type:"integer"`
  7444. // Disables the event source mapping to pause polling and invocation.
  7445. Enabled *bool `type:"boolean"`
  7446. // The name of the Lambda function.
  7447. //
  7448. // Name formats
  7449. //
  7450. // * Function name - MyFunction.
  7451. //
  7452. // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction.
  7453. //
  7454. // * Version or Alias ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD.
  7455. //
  7456. // * Partial ARN - 123456789012:function:MyFunction.
  7457. //
  7458. // The length constraint applies only to the full ARN. If you specify only the
  7459. // function name, it's limited to 64 characters in length.
  7460. FunctionName *string `min:"1" type:"string"`
  7461. // The identifier of the event source mapping.
  7462. //
  7463. // UUID is a required field
  7464. UUID *string `location:"uri" locationName:"UUID" type:"string" required:"true"`
  7465. }
  7466. // String returns the string representation
  7467. func (s UpdateEventSourceMappingInput) String() string {
  7468. return awsutil.Prettify(s)
  7469. }
  7470. // GoString returns the string representation
  7471. func (s UpdateEventSourceMappingInput) GoString() string {
  7472. return s.String()
  7473. }
  7474. // Validate inspects the fields of the type to determine if they are valid.
  7475. func (s *UpdateEventSourceMappingInput) Validate() error {
  7476. invalidParams := request.ErrInvalidParams{Context: "UpdateEventSourceMappingInput"}
  7477. if s.BatchSize != nil && *s.BatchSize < 1 {
  7478. invalidParams.Add(request.NewErrParamMinValue("BatchSize", 1))
  7479. }
  7480. if s.FunctionName != nil && len(*s.FunctionName) < 1 {
  7481. invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
  7482. }
  7483. if s.UUID == nil {
  7484. invalidParams.Add(request.NewErrParamRequired("UUID"))
  7485. }
  7486. if s.UUID != nil && len(*s.UUID) < 1 {
  7487. invalidParams.Add(request.NewErrParamMinLen("UUID", 1))
  7488. }
  7489. if invalidParams.Len() > 0 {
  7490. return invalidParams
  7491. }
  7492. return nil
  7493. }
  7494. // SetBatchSize sets the BatchSize field's value.
  7495. func (s *UpdateEventSourceMappingInput) SetBatchSize(v int64) *UpdateEventSourceMappingInput {
  7496. s.BatchSize = &v
  7497. return s
  7498. }
  7499. // SetEnabled sets the Enabled field's value.
  7500. func (s *UpdateEventSourceMappingInput) SetEnabled(v bool) *UpdateEventSourceMappingInput {
  7501. s.Enabled = &v
  7502. return s
  7503. }
  7504. // SetFunctionName sets the FunctionName field's value.
  7505. func (s *UpdateEventSourceMappingInput) SetFunctionName(v string) *UpdateEventSourceMappingInput {
  7506. s.FunctionName = &v
  7507. return s
  7508. }
  7509. // SetUUID sets the UUID field's value.
  7510. func (s *UpdateEventSourceMappingInput) SetUUID(v string) *UpdateEventSourceMappingInput {
  7511. s.UUID = &v
  7512. return s
  7513. }
  7514. type UpdateFunctionCodeInput struct {
  7515. _ struct{} `type:"structure"`
  7516. // Set to true to validate the request parameters and access permissions without
  7517. // modifying the function code.
  7518. DryRun *bool `type:"boolean"`
  7519. // The name of the Lambda function.
  7520. //
  7521. // Name formats
  7522. //
  7523. // * Function name - my-function.
  7524. //
  7525. // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function.
  7526. //
  7527. // * Partial ARN - 123456789012:function:my-function.
  7528. //
  7529. // The length constraint applies only to the full ARN. If you specify only the
  7530. // function name, it is limited to 64 characters in length.
  7531. //
  7532. // FunctionName is a required field
  7533. FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
  7534. // Set to true to publish a new version of the function after updating the code.
  7535. // This has the same effect as calling PublishVersion separately.
  7536. Publish *bool `type:"boolean"`
  7537. // Only update the function if the revision ID matches the ID specified. Use
  7538. // this option to avoid modifying a function that has changed since you last
  7539. // read it.
  7540. RevisionId *string `type:"string"`
  7541. // An Amazon S3 bucket in the same region as your function. The bucket can be
  7542. // in a different AWS account.
  7543. S3Bucket *string `min:"3" type:"string"`
  7544. // The Amazon S3 key of the deployment package.
  7545. S3Key *string `min:"1" type:"string"`
  7546. // For versioned objects, the version of the deployment package object to use.
  7547. S3ObjectVersion *string `min:"1" type:"string"`
  7548. // The base64-encoded contents of the deployment package. AWS SDK and AWS CLI
  7549. // clients handle the encoding for you.
  7550. //
  7551. // ZipFile is automatically base64 encoded/decoded by the SDK.
  7552. ZipFile []byte `type:"blob" sensitive:"true"`
  7553. }
  7554. // String returns the string representation
  7555. func (s UpdateFunctionCodeInput) String() string {
  7556. return awsutil.Prettify(s)
  7557. }
  7558. // GoString returns the string representation
  7559. func (s UpdateFunctionCodeInput) GoString() string {
  7560. return s.String()
  7561. }
  7562. // Validate inspects the fields of the type to determine if they are valid.
  7563. func (s *UpdateFunctionCodeInput) Validate() error {
  7564. invalidParams := request.ErrInvalidParams{Context: "UpdateFunctionCodeInput"}
  7565. if s.FunctionName == nil {
  7566. invalidParams.Add(request.NewErrParamRequired("FunctionName"))
  7567. }
  7568. if s.FunctionName != nil && len(*s.FunctionName) < 1 {
  7569. invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
  7570. }
  7571. if s.S3Bucket != nil && len(*s.S3Bucket) < 3 {
  7572. invalidParams.Add(request.NewErrParamMinLen("S3Bucket", 3))
  7573. }
  7574. if s.S3Key != nil && len(*s.S3Key) < 1 {
  7575. invalidParams.Add(request.NewErrParamMinLen("S3Key", 1))
  7576. }
  7577. if s.S3ObjectVersion != nil && len(*s.S3ObjectVersion) < 1 {
  7578. invalidParams.Add(request.NewErrParamMinLen("S3ObjectVersion", 1))
  7579. }
  7580. if invalidParams.Len() > 0 {
  7581. return invalidParams
  7582. }
  7583. return nil
  7584. }
  7585. // SetDryRun sets the DryRun field's value.
  7586. func (s *UpdateFunctionCodeInput) SetDryRun(v bool) *UpdateFunctionCodeInput {
  7587. s.DryRun = &v
  7588. return s
  7589. }
  7590. // SetFunctionName sets the FunctionName field's value.
  7591. func (s *UpdateFunctionCodeInput) SetFunctionName(v string) *UpdateFunctionCodeInput {
  7592. s.FunctionName = &v
  7593. return s
  7594. }
  7595. // SetPublish sets the Publish field's value.
  7596. func (s *UpdateFunctionCodeInput) SetPublish(v bool) *UpdateFunctionCodeInput {
  7597. s.Publish = &v
  7598. return s
  7599. }
  7600. // SetRevisionId sets the RevisionId field's value.
  7601. func (s *UpdateFunctionCodeInput) SetRevisionId(v string) *UpdateFunctionCodeInput {
  7602. s.RevisionId = &v
  7603. return s
  7604. }
  7605. // SetS3Bucket sets the S3Bucket field's value.
  7606. func (s *UpdateFunctionCodeInput) SetS3Bucket(v string) *UpdateFunctionCodeInput {
  7607. s.S3Bucket = &v
  7608. return s
  7609. }
  7610. // SetS3Key sets the S3Key field's value.
  7611. func (s *UpdateFunctionCodeInput) SetS3Key(v string) *UpdateFunctionCodeInput {
  7612. s.S3Key = &v
  7613. return s
  7614. }
  7615. // SetS3ObjectVersion sets the S3ObjectVersion field's value.
  7616. func (s *UpdateFunctionCodeInput) SetS3ObjectVersion(v string) *UpdateFunctionCodeInput {
  7617. s.S3ObjectVersion = &v
  7618. return s
  7619. }
  7620. // SetZipFile sets the ZipFile field's value.
  7621. func (s *UpdateFunctionCodeInput) SetZipFile(v []byte) *UpdateFunctionCodeInput {
  7622. s.ZipFile = v
  7623. return s
  7624. }
  7625. type UpdateFunctionConfigurationInput struct {
  7626. _ struct{} `type:"structure"`
  7627. // A dead letter queue configuration that specifies the queue or topic where
  7628. // Lambda sends asynchronous events when they fail processing. For more information,
  7629. // see Dead Letter Queues (http://docs.aws.amazon.com/lambda/latest/dg/dlq.html).
  7630. DeadLetterConfig *DeadLetterConfig `type:"structure"`
  7631. // A short user-defined function description. AWS Lambda does not use this value.
  7632. // Assign a meaningful description as you see fit.
  7633. Description *string `type:"string"`
  7634. // The parent object that contains your environment's configuration settings.
  7635. Environment *Environment `type:"structure"`
  7636. // The name of the Lambda function.
  7637. //
  7638. // Name formats
  7639. //
  7640. // * Function name - my-function.
  7641. //
  7642. // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function.
  7643. //
  7644. // * Partial ARN - 123456789012:function:my-function.
  7645. //
  7646. // The length constraint applies only to the full ARN. If you specify only the
  7647. // function name, it is limited to 64 characters in length.
  7648. //
  7649. // FunctionName is a required field
  7650. FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
  7651. // The function that Lambda calls to begin executing your function. For Node.js,
  7652. // it is the module-name.export value in your function.
  7653. Handler *string `type:"string"`
  7654. // The Amazon Resource Name (ARN) of the KMS key used to encrypt your function's
  7655. // environment variables. If you elect to use the AWS Lambda default service
  7656. // key, pass in an empty string ("") for this parameter.
  7657. KMSKeyArn *string `type:"string"`
  7658. // A list of function layers (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html)
  7659. // to add to the function's execution environment.
  7660. Layers []*string `type:"list"`
  7661. // The amount of memory, in MB, your Lambda function is given. AWS Lambda uses
  7662. // this memory size to infer the amount of CPU allocated to your function. Your
  7663. // function use-case determines your CPU and memory requirements. For example,
  7664. // a database operation might need less memory compared to an image processing
  7665. // function. The default value is 128 MB. The value must be a multiple of 64
  7666. // MB.
  7667. MemorySize *int64 `min:"128" type:"integer"`
  7668. // Only update the function if the revision ID matches the ID specified. Use
  7669. // this option to avoid modifying a function that has changed since you last
  7670. // read it.
  7671. RevisionId *string `type:"string"`
  7672. // The Amazon Resource Name (ARN) of the IAM role that Lambda will assume when
  7673. // it executes your function.
  7674. Role *string `type:"string"`
  7675. // The runtime version for the function.
  7676. Runtime *string `type:"string" enum:"Runtime"`
  7677. // The amount of time that Lambda allows a function to run before terminating
  7678. // it. The default is 3 seconds. The maximum allowed value is 900 seconds.
  7679. Timeout *int64 `min:"1" type:"integer"`
  7680. // Set Mode to Active to sample and trace a subset of incoming requests with
  7681. // AWS X-Ray.
  7682. TracingConfig *TracingConfig `type:"structure"`
  7683. // Specify security groups and subnets in a VPC to which your Lambda function
  7684. // needs access.
  7685. VpcConfig *VpcConfig `type:"structure"`
  7686. }
  7687. // String returns the string representation
  7688. func (s UpdateFunctionConfigurationInput) String() string {
  7689. return awsutil.Prettify(s)
  7690. }
  7691. // GoString returns the string representation
  7692. func (s UpdateFunctionConfigurationInput) GoString() string {
  7693. return s.String()
  7694. }
  7695. // Validate inspects the fields of the type to determine if they are valid.
  7696. func (s *UpdateFunctionConfigurationInput) Validate() error {
  7697. invalidParams := request.ErrInvalidParams{Context: "UpdateFunctionConfigurationInput"}
  7698. if s.FunctionName == nil {
  7699. invalidParams.Add(request.NewErrParamRequired("FunctionName"))
  7700. }
  7701. if s.FunctionName != nil && len(*s.FunctionName) < 1 {
  7702. invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
  7703. }
  7704. if s.MemorySize != nil && *s.MemorySize < 128 {
  7705. invalidParams.Add(request.NewErrParamMinValue("MemorySize", 128))
  7706. }
  7707. if s.Timeout != nil && *s.Timeout < 1 {
  7708. invalidParams.Add(request.NewErrParamMinValue("Timeout", 1))
  7709. }
  7710. if invalidParams.Len() > 0 {
  7711. return invalidParams
  7712. }
  7713. return nil
  7714. }
  7715. // SetDeadLetterConfig sets the DeadLetterConfig field's value.
  7716. func (s *UpdateFunctionConfigurationInput) SetDeadLetterConfig(v *DeadLetterConfig) *UpdateFunctionConfigurationInput {
  7717. s.DeadLetterConfig = v
  7718. return s
  7719. }
  7720. // SetDescription sets the Description field's value.
  7721. func (s *UpdateFunctionConfigurationInput) SetDescription(v string) *UpdateFunctionConfigurationInput {
  7722. s.Description = &v
  7723. return s
  7724. }
  7725. // SetEnvironment sets the Environment field's value.
  7726. func (s *UpdateFunctionConfigurationInput) SetEnvironment(v *Environment) *UpdateFunctionConfigurationInput {
  7727. s.Environment = v
  7728. return s
  7729. }
  7730. // SetFunctionName sets the FunctionName field's value.
  7731. func (s *UpdateFunctionConfigurationInput) SetFunctionName(v string) *UpdateFunctionConfigurationInput {
  7732. s.FunctionName = &v
  7733. return s
  7734. }
  7735. // SetHandler sets the Handler field's value.
  7736. func (s *UpdateFunctionConfigurationInput) SetHandler(v string) *UpdateFunctionConfigurationInput {
  7737. s.Handler = &v
  7738. return s
  7739. }
  7740. // SetKMSKeyArn sets the KMSKeyArn field's value.
  7741. func (s *UpdateFunctionConfigurationInput) SetKMSKeyArn(v string) *UpdateFunctionConfigurationInput {
  7742. s.KMSKeyArn = &v
  7743. return s
  7744. }
  7745. // SetLayers sets the Layers field's value.
  7746. func (s *UpdateFunctionConfigurationInput) SetLayers(v []*string) *UpdateFunctionConfigurationInput {
  7747. s.Layers = v
  7748. return s
  7749. }
  7750. // SetMemorySize sets the MemorySize field's value.
  7751. func (s *UpdateFunctionConfigurationInput) SetMemorySize(v int64) *UpdateFunctionConfigurationInput {
  7752. s.MemorySize = &v
  7753. return s
  7754. }
  7755. // SetRevisionId sets the RevisionId field's value.
  7756. func (s *UpdateFunctionConfigurationInput) SetRevisionId(v string) *UpdateFunctionConfigurationInput {
  7757. s.RevisionId = &v
  7758. return s
  7759. }
  7760. // SetRole sets the Role field's value.
  7761. func (s *UpdateFunctionConfigurationInput) SetRole(v string) *UpdateFunctionConfigurationInput {
  7762. s.Role = &v
  7763. return s
  7764. }
  7765. // SetRuntime sets the Runtime field's value.
  7766. func (s *UpdateFunctionConfigurationInput) SetRuntime(v string) *UpdateFunctionConfigurationInput {
  7767. s.Runtime = &v
  7768. return s
  7769. }
  7770. // SetTimeout sets the Timeout field's value.
  7771. func (s *UpdateFunctionConfigurationInput) SetTimeout(v int64) *UpdateFunctionConfigurationInput {
  7772. s.Timeout = &v
  7773. return s
  7774. }
  7775. // SetTracingConfig sets the TracingConfig field's value.
  7776. func (s *UpdateFunctionConfigurationInput) SetTracingConfig(v *TracingConfig) *UpdateFunctionConfigurationInput {
  7777. s.TracingConfig = v
  7778. return s
  7779. }
  7780. // SetVpcConfig sets the VpcConfig field's value.
  7781. func (s *UpdateFunctionConfigurationInput) SetVpcConfig(v *VpcConfig) *UpdateFunctionConfigurationInput {
  7782. s.VpcConfig = v
  7783. return s
  7784. }
  7785. // The VPC security groups and subnets attached to a Lambda function.
  7786. type VpcConfig struct {
  7787. _ struct{} `type:"structure"`
  7788. // A list of VPC security groups IDs.
  7789. SecurityGroupIds []*string `type:"list"`
  7790. // A list of VPC subnet IDs.
  7791. SubnetIds []*string `type:"list"`
  7792. }
  7793. // String returns the string representation
  7794. func (s VpcConfig) String() string {
  7795. return awsutil.Prettify(s)
  7796. }
  7797. // GoString returns the string representation
  7798. func (s VpcConfig) GoString() string {
  7799. return s.String()
  7800. }
  7801. // SetSecurityGroupIds sets the SecurityGroupIds field's value.
  7802. func (s *VpcConfig) SetSecurityGroupIds(v []*string) *VpcConfig {
  7803. s.SecurityGroupIds = v
  7804. return s
  7805. }
  7806. // SetSubnetIds sets the SubnetIds field's value.
  7807. func (s *VpcConfig) SetSubnetIds(v []*string) *VpcConfig {
  7808. s.SubnetIds = v
  7809. return s
  7810. }
  7811. // The VPC security groups and subnets attached to a Lambda function.
  7812. type VpcConfigResponse struct {
  7813. _ struct{} `type:"structure"`
  7814. // A list of VPC security groups IDs.
  7815. SecurityGroupIds []*string `type:"list"`
  7816. // A list of VPC subnet IDs.
  7817. SubnetIds []*string `type:"list"`
  7818. // The ID of the VPC.
  7819. VpcId *string `type:"string"`
  7820. }
  7821. // String returns the string representation
  7822. func (s VpcConfigResponse) String() string {
  7823. return awsutil.Prettify(s)
  7824. }
  7825. // GoString returns the string representation
  7826. func (s VpcConfigResponse) GoString() string {
  7827. return s.String()
  7828. }
  7829. // SetSecurityGroupIds sets the SecurityGroupIds field's value.
  7830. func (s *VpcConfigResponse) SetSecurityGroupIds(v []*string) *VpcConfigResponse {
  7831. s.SecurityGroupIds = v
  7832. return s
  7833. }
  7834. // SetSubnetIds sets the SubnetIds field's value.
  7835. func (s *VpcConfigResponse) SetSubnetIds(v []*string) *VpcConfigResponse {
  7836. s.SubnetIds = v
  7837. return s
  7838. }
  7839. // SetVpcId sets the VpcId field's value.
  7840. func (s *VpcConfigResponse) SetVpcId(v string) *VpcConfigResponse {
  7841. s.VpcId = &v
  7842. return s
  7843. }
  7844. const (
  7845. // EventSourcePositionTrimHorizon is a EventSourcePosition enum value
  7846. EventSourcePositionTrimHorizon = "TRIM_HORIZON"
  7847. // EventSourcePositionLatest is a EventSourcePosition enum value
  7848. EventSourcePositionLatest = "LATEST"
  7849. // EventSourcePositionAtTimestamp is a EventSourcePosition enum value
  7850. EventSourcePositionAtTimestamp = "AT_TIMESTAMP"
  7851. )
  7852. const (
  7853. // FunctionVersionAll is a FunctionVersion enum value
  7854. FunctionVersionAll = "ALL"
  7855. )
  7856. const (
  7857. // InvocationTypeEvent is a InvocationType enum value
  7858. InvocationTypeEvent = "Event"
  7859. // InvocationTypeRequestResponse is a InvocationType enum value
  7860. InvocationTypeRequestResponse = "RequestResponse"
  7861. // InvocationTypeDryRun is a InvocationType enum value
  7862. InvocationTypeDryRun = "DryRun"
  7863. )
  7864. const (
  7865. // LogTypeNone is a LogType enum value
  7866. LogTypeNone = "None"
  7867. // LogTypeTail is a LogType enum value
  7868. LogTypeTail = "Tail"
  7869. )
  7870. const (
  7871. // RuntimeNodejs is a Runtime enum value
  7872. RuntimeNodejs = "nodejs"
  7873. // RuntimeNodejs43 is a Runtime enum value
  7874. RuntimeNodejs43 = "nodejs4.3"
  7875. // RuntimeNodejs610 is a Runtime enum value
  7876. RuntimeNodejs610 = "nodejs6.10"
  7877. // RuntimeNodejs810 is a Runtime enum value
  7878. RuntimeNodejs810 = "nodejs8.10"
  7879. // RuntimeJava8 is a Runtime enum value
  7880. RuntimeJava8 = "java8"
  7881. // RuntimePython27 is a Runtime enum value
  7882. RuntimePython27 = "python2.7"
  7883. // RuntimePython36 is a Runtime enum value
  7884. RuntimePython36 = "python3.6"
  7885. // RuntimePython37 is a Runtime enum value
  7886. RuntimePython37 = "python3.7"
  7887. // RuntimeDotnetcore10 is a Runtime enum value
  7888. RuntimeDotnetcore10 = "dotnetcore1.0"
  7889. // RuntimeDotnetcore20 is a Runtime enum value
  7890. RuntimeDotnetcore20 = "dotnetcore2.0"
  7891. // RuntimeDotnetcore21 is a Runtime enum value
  7892. RuntimeDotnetcore21 = "dotnetcore2.1"
  7893. // RuntimeNodejs43Edge is a Runtime enum value
  7894. RuntimeNodejs43Edge = "nodejs4.3-edge"
  7895. // RuntimeGo1X is a Runtime enum value
  7896. RuntimeGo1X = "go1.x"
  7897. // RuntimeRuby25 is a Runtime enum value
  7898. RuntimeRuby25 = "ruby2.5"
  7899. // RuntimeProvided is a Runtime enum value
  7900. RuntimeProvided = "provided"
  7901. )
  7902. const (
  7903. // ThrottleReasonConcurrentInvocationLimitExceeded is a ThrottleReason enum value
  7904. ThrottleReasonConcurrentInvocationLimitExceeded = "ConcurrentInvocationLimitExceeded"
  7905. // ThrottleReasonFunctionInvocationRateLimitExceeded is a ThrottleReason enum value
  7906. ThrottleReasonFunctionInvocationRateLimitExceeded = "FunctionInvocationRateLimitExceeded"
  7907. // ThrottleReasonReservedFunctionConcurrentInvocationLimitExceeded is a ThrottleReason enum value
  7908. ThrottleReasonReservedFunctionConcurrentInvocationLimitExceeded = "ReservedFunctionConcurrentInvocationLimitExceeded"
  7909. // ThrottleReasonReservedFunctionInvocationRateLimitExceeded is a ThrottleReason enum value
  7910. ThrottleReasonReservedFunctionInvocationRateLimitExceeded = "ReservedFunctionInvocationRateLimitExceeded"
  7911. // ThrottleReasonCallerRateLimitExceeded is a ThrottleReason enum value
  7912. ThrottleReasonCallerRateLimitExceeded = "CallerRateLimitExceeded"
  7913. )
  7914. const (
  7915. // TracingModeActive is a TracingMode enum value
  7916. TracingModeActive = "Active"
  7917. // TracingModePassThrough is a TracingMode enum value
  7918. TracingModePassThrough = "PassThrough"
  7919. )