3 Star 1 Fork 0

Gitee 极速下载/aws-sdk-go

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/aws/aws-sdk-go
Clone or Download
api.go 249.33 KB
Copy Edit Raw Blame History
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package lambda
import (
"io"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awsutil"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/private/protocol"
"github.com/aws/aws-sdk-go/private/protocol/restjson"
)
const opAddPermission = "AddPermission"
// AddPermissionRequest generates a "aws/request.Request" representing the
// client's request for the AddPermission operation. The "output" return
// value will be populated with the request's response once the request complets
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See AddPermission for more information on using the AddPermission
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the AddPermissionRequest method.
// req, resp := client.AddPermissionRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/AddPermission
func (c *Lambda) AddPermissionRequest(input *AddPermissionInput) (req *request.Request, output *AddPermissionOutput) {
op := &request.Operation{
Name: opAddPermission,
HTTPMethod: "POST",
HTTPPath: "/2015-03-31/functions/{FunctionName}/policy",
}
if input == nil {
input = &AddPermissionInput{}
}
output = &AddPermissionOutput{}
req = c.newRequest(op, input, output)
return
}
// AddPermission API operation for AWS Lambda.
//
// Adds a permission to the resource policy associated with the specified AWS
// Lambda function. You use resource policies to grant permissions to event
// sources that use push model. In a push model, event sources (such as Amazon
// S3 and custom applications) invoke your Lambda function. Each permission
// you add to the resource policy allows an event source, permission to invoke
// the Lambda function.
//
// For information about the push model, see AWS Lambda: How it Works (http://docs.aws.amazon.com/lambda/latest/dg/lambda-introduction.html).
//
// If you are using versioning, the permissions you add are specific to the
// Lambda function version or alias you specify in the AddPermission request
// via the Qualifier parameter. For more information about versioning, see AWS
// Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).
//
// This operation requires permission for the lambda:AddPermission action.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Lambda's
// API operation AddPermission for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServiceException "ServiceException"
// The AWS Lambda service encountered an internal error.
//
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// The resource (for example, a Lambda function or access policy statement)
// specified in the request does not exist.
//
// * ErrCodeResourceConflictException "ResourceConflictException"
// The resource already exists.
//
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// One of the parameters in the request is invalid. For example, if you provided
// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
// API, that AWS Lambda is unable to assume you will get this exception. You
// will also get this exception if you have selected a deprecated runtime, such
// as Node v0.10.42.
//
// * ErrCodePolicyLengthExceededException "PolicyLengthExceededException"
// Lambda function access policy is limited to 20 KB.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/AddPermission
func (c *Lambda) AddPermission(input *AddPermissionInput) (*AddPermissionOutput, error) {
req, out := c.AddPermissionRequest(input)
return out, req.Send()
}
// AddPermissionWithContext is the same as AddPermission with the addition of
// the ability to pass a context and additional request options.
//
// See AddPermission for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Lambda) AddPermissionWithContext(ctx aws.Context, input *AddPermissionInput, opts ...request.Option) (*AddPermissionOutput, error) {
req, out := c.AddPermissionRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateAlias = "CreateAlias"
// CreateAliasRequest generates a "aws/request.Request" representing the
// client's request for the CreateAlias operation. The "output" return
// value will be populated with the request's response once the request complets
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreateAlias for more information on using the CreateAlias
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the CreateAliasRequest method.
// req, resp := client.CreateAliasRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/CreateAlias
func (c *Lambda) CreateAliasRequest(input *CreateAliasInput) (req *request.Request, output *AliasConfiguration) {
op := &request.Operation{
Name: opCreateAlias,
HTTPMethod: "POST",
HTTPPath: "/2015-03-31/functions/{FunctionName}/aliases",
}
if input == nil {
input = &CreateAliasInput{}
}
output = &AliasConfiguration{}
req = c.newRequest(op, input, output)
return
}
// CreateAlias API operation for AWS Lambda.
//
// Creates an alias that points to the specified Lambda function version. For
// more information, see Introduction to AWS Lambda Aliases (http://docs.aws.amazon.com/lambda/latest/dg/aliases-intro.html).
//
// Alias names are unique for a given function. This requires permission for
// the lambda:CreateAlias action.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Lambda's
// API operation CreateAlias for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServiceException "ServiceException"
// The AWS Lambda service encountered an internal error.
//
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// The resource (for example, a Lambda function or access policy statement)
// specified in the request does not exist.
//
// * ErrCodeResourceConflictException "ResourceConflictException"
// The resource already exists.
//
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// One of the parameters in the request is invalid. For example, if you provided
// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
// API, that AWS Lambda is unable to assume you will get this exception. You
// will also get this exception if you have selected a deprecated runtime, such
// as Node v0.10.42.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/CreateAlias
func (c *Lambda) CreateAlias(input *CreateAliasInput) (*AliasConfiguration, error) {
req, out := c.CreateAliasRequest(input)
return out, req.Send()
}
// CreateAliasWithContext is the same as CreateAlias with the addition of
// the ability to pass a context and additional request options.
//
// See CreateAlias for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Lambda) CreateAliasWithContext(ctx aws.Context, input *CreateAliasInput, opts ...request.Option) (*AliasConfiguration, error) {
req, out := c.CreateAliasRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateEventSourceMapping = "CreateEventSourceMapping"
// CreateEventSourceMappingRequest generates a "aws/request.Request" representing the
// client's request for the CreateEventSourceMapping operation. The "output" return
// value will be populated with the request's response once the request complets
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreateEventSourceMapping for more information on using the CreateEventSourceMapping
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the CreateEventSourceMappingRequest method.
// req, resp := client.CreateEventSourceMappingRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/CreateEventSourceMapping
func (c *Lambda) CreateEventSourceMappingRequest(input *CreateEventSourceMappingInput) (req *request.Request, output *EventSourceMappingConfiguration) {
op := &request.Operation{
Name: opCreateEventSourceMapping,
HTTPMethod: "POST",
HTTPPath: "/2015-03-31/event-source-mappings/",
}
if input == nil {
input = &CreateEventSourceMappingInput{}
}
output = &EventSourceMappingConfiguration{}
req = c.newRequest(op, input, output)
return
}
// CreateEventSourceMapping API operation for AWS Lambda.
//
// Identifies a stream as an event source for a Lambda function. It can be either
// an Amazon Kinesis stream or an Amazon DynamoDB stream. AWS Lambda invokes
// the specified function when records are posted to the stream.
//
// This association between a stream source and a Lambda function is called
// the event source mapping.
//
// This event source mapping is relevant only in the AWS Lambda pull model,
// where AWS Lambda invokes the function. For more information, see AWS Lambda:
// How it Works (http://docs.aws.amazon.com/lambda/latest/dg/lambda-introduction.html)
// in the AWS Lambda Developer Guide.
//
// You provide mapping information (for example, which stream to read from and
// which Lambda function to invoke) in the request body.
//
// Each event source, such as an Amazon Kinesis or a DynamoDB stream, can be
// associated with multiple AWS Lambda function. A given Lambda function can
// be associated with multiple AWS event sources.
//
// If you are using versioning, you can specify a specific function version
// or an alias via the function name parameter. For more information about versioning,
// see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).
//
// This operation requires permission for the lambda:CreateEventSourceMapping
// action.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Lambda's
// API operation CreateEventSourceMapping for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServiceException "ServiceException"
// The AWS Lambda service encountered an internal error.
//
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// One of the parameters in the request is invalid. For example, if you provided
// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
// API, that AWS Lambda is unable to assume you will get this exception. You
// will also get this exception if you have selected a deprecated runtime, such
// as Node v0.10.42.
//
// * ErrCodeResourceConflictException "ResourceConflictException"
// The resource already exists.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
//
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// The resource (for example, a Lambda function or access policy statement)
// specified in the request does not exist.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/CreateEventSourceMapping
func (c *Lambda) CreateEventSourceMapping(input *CreateEventSourceMappingInput) (*EventSourceMappingConfiguration, error) {
req, out := c.CreateEventSourceMappingRequest(input)
return out, req.Send()
}
// CreateEventSourceMappingWithContext is the same as CreateEventSourceMapping with the addition of
// the ability to pass a context and additional request options.
//
// See CreateEventSourceMapping for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Lambda) CreateEventSourceMappingWithContext(ctx aws.Context, input *CreateEventSourceMappingInput, opts ...request.Option) (*EventSourceMappingConfiguration, error) {
req, out := c.CreateEventSourceMappingRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateFunction = "CreateFunction"
// CreateFunctionRequest generates a "aws/request.Request" representing the
// client's request for the CreateFunction operation. The "output" return
// value will be populated with the request's response once the request complets
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreateFunction for more information on using the CreateFunction
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the CreateFunctionRequest method.
// req, resp := client.CreateFunctionRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/CreateFunction
func (c *Lambda) CreateFunctionRequest(input *CreateFunctionInput) (req *request.Request, output *FunctionConfiguration) {
op := &request.Operation{
Name: opCreateFunction,
HTTPMethod: "POST",
HTTPPath: "/2015-03-31/functions",
}
if input == nil {
input = &CreateFunctionInput{}
}
output = &FunctionConfiguration{}
req = c.newRequest(op, input, output)
return
}
// CreateFunction API operation for AWS Lambda.
//
// Creates a new Lambda function. The function metadata is created from the
// request parameters, and the code for the function is provided by a .zip file
// in the request body. If the function name already exists, the operation will
// fail. Note that the function name is case-sensitive.
//
// If you are using versioning, you can also publish a version of the Lambda
// function you are creating using the Publish parameter. For more information
// about versioning, see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).
//
// This operation requires permission for the lambda:CreateFunction action.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Lambda's
// API operation CreateFunction for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServiceException "ServiceException"
// The AWS Lambda service encountered an internal error.
//
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// One of the parameters in the request is invalid. For example, if you provided
// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
// API, that AWS Lambda is unable to assume you will get this exception. You
// will also get this exception if you have selected a deprecated runtime, such
// as Node v0.10.42.
//
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// The resource (for example, a Lambda function or access policy statement)
// specified in the request does not exist.
//
// * ErrCodeResourceConflictException "ResourceConflictException"
// The resource already exists.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
//
// * ErrCodeCodeStorageExceededException "CodeStorageExceededException"
// You have exceeded your maximum total code size per account. Limits (http://docs.aws.amazon.com/lambda/latest/dg/limits.html)
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/CreateFunction
func (c *Lambda) CreateFunction(input *CreateFunctionInput) (*FunctionConfiguration, error) {
req, out := c.CreateFunctionRequest(input)
return out, req.Send()
}
// CreateFunctionWithContext is the same as CreateFunction with the addition of
// the ability to pass a context and additional request options.
//
// See CreateFunction for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Lambda) CreateFunctionWithContext(ctx aws.Context, input *CreateFunctionInput, opts ...request.Option) (*FunctionConfiguration, error) {
req, out := c.CreateFunctionRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteAlias = "DeleteAlias"
// DeleteAliasRequest generates a "aws/request.Request" representing the
// client's request for the DeleteAlias operation. The "output" return
// value will be populated with the request's response once the request complets
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteAlias for more information on using the DeleteAlias
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteAliasRequest method.
// req, resp := client.DeleteAliasRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteAlias
func (c *Lambda) DeleteAliasRequest(input *DeleteAliasInput) (req *request.Request, output *DeleteAliasOutput) {
op := &request.Operation{
Name: opDeleteAlias,
HTTPMethod: "DELETE",
HTTPPath: "/2015-03-31/functions/{FunctionName}/aliases/{Name}",
}
if input == nil {
input = &DeleteAliasInput{}
}
output = &DeleteAliasOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
return
}
// DeleteAlias API operation for AWS Lambda.
//
// Deletes the specified Lambda function alias. For more information, see Introduction
// to AWS Lambda Aliases (http://docs.aws.amazon.com/lambda/latest/dg/aliases-intro.html).
//
// This requires permission for the lambda:DeleteAlias action.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Lambda's
// API operation DeleteAlias for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServiceException "ServiceException"
// The AWS Lambda service encountered an internal error.
//
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// One of the parameters in the request is invalid. For example, if you provided
// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
// API, that AWS Lambda is unable to assume you will get this exception. You
// will also get this exception if you have selected a deprecated runtime, such
// as Node v0.10.42.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteAlias
func (c *Lambda) DeleteAlias(input *DeleteAliasInput) (*DeleteAliasOutput, error) {
req, out := c.DeleteAliasRequest(input)
return out, req.Send()
}
// DeleteAliasWithContext is the same as DeleteAlias with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteAlias for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Lambda) DeleteAliasWithContext(ctx aws.Context, input *DeleteAliasInput, opts ...request.Option) (*DeleteAliasOutput, error) {
req, out := c.DeleteAliasRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteEventSourceMapping = "DeleteEventSourceMapping"
// DeleteEventSourceMappingRequest generates a "aws/request.Request" representing the
// client's request for the DeleteEventSourceMapping operation. The "output" return
// value will be populated with the request's response once the request complets
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteEventSourceMapping for more information on using the DeleteEventSourceMapping
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteEventSourceMappingRequest method.
// req, resp := client.DeleteEventSourceMappingRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteEventSourceMapping
func (c *Lambda) DeleteEventSourceMappingRequest(input *DeleteEventSourceMappingInput) (req *request.Request, output *EventSourceMappingConfiguration) {
op := &request.Operation{
Name: opDeleteEventSourceMapping,
HTTPMethod: "DELETE",
HTTPPath: "/2015-03-31/event-source-mappings/{UUID}",
}
if input == nil {
input = &DeleteEventSourceMappingInput{}
}
output = &EventSourceMappingConfiguration{}
req = c.newRequest(op, input, output)
return
}
// DeleteEventSourceMapping API operation for AWS Lambda.
//
// Removes an event source mapping. This means AWS Lambda will no longer invoke
// the function for events in the associated source.
//
// This operation requires permission for the lambda:DeleteEventSourceMapping
// action.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Lambda's
// API operation DeleteEventSourceMapping for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServiceException "ServiceException"
// The AWS Lambda service encountered an internal error.
//
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// The resource (for example, a Lambda function or access policy statement)
// specified in the request does not exist.
//
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// One of the parameters in the request is invalid. For example, if you provided
// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
// API, that AWS Lambda is unable to assume you will get this exception. You
// will also get this exception if you have selected a deprecated runtime, such
// as Node v0.10.42.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteEventSourceMapping
func (c *Lambda) DeleteEventSourceMapping(input *DeleteEventSourceMappingInput) (*EventSourceMappingConfiguration, error) {
req, out := c.DeleteEventSourceMappingRequest(input)
return out, req.Send()
}
// DeleteEventSourceMappingWithContext is the same as DeleteEventSourceMapping with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteEventSourceMapping for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Lambda) DeleteEventSourceMappingWithContext(ctx aws.Context, input *DeleteEventSourceMappingInput, opts ...request.Option) (*EventSourceMappingConfiguration, error) {
req, out := c.DeleteEventSourceMappingRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteFunction = "DeleteFunction"
// DeleteFunctionRequest generates a "aws/request.Request" representing the
// client's request for the DeleteFunction operation. The "output" return
// value will be populated with the request's response once the request complets
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteFunction for more information on using the DeleteFunction
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteFunctionRequest method.
// req, resp := client.DeleteFunctionRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteFunction
func (c *Lambda) DeleteFunctionRequest(input *DeleteFunctionInput) (req *request.Request, output *DeleteFunctionOutput) {
op := &request.Operation{
Name: opDeleteFunction,
HTTPMethod: "DELETE",
HTTPPath: "/2015-03-31/functions/{FunctionName}",
}
if input == nil {
input = &DeleteFunctionInput{}
}
output = &DeleteFunctionOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
return
}
// DeleteFunction API operation for AWS Lambda.
//
// Deletes the specified Lambda function code and configuration.
//
// If you are using the versioning feature and you don't specify a function
// version in your DeleteFunction request, AWS Lambda will delete the function,
// including all its versions, and any aliases pointing to the function versions.
// To delete a specific function version, you must provide the function version
// via the Qualifier parameter. For information about function versioning, see
// AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).
//
// When you delete a function the associated resource policy is also deleted.
// You will need to delete the event source mappings explicitly.
//
// This operation requires permission for the lambda:DeleteFunction action.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Lambda's
// API operation DeleteFunction for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServiceException "ServiceException"
// The AWS Lambda service encountered an internal error.
//
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// The resource (for example, a Lambda function or access policy statement)
// specified in the request does not exist.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
//
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// One of the parameters in the request is invalid. For example, if you provided
// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
// API, that AWS Lambda is unable to assume you will get this exception. You
// will also get this exception if you have selected a deprecated runtime, such
// as Node v0.10.42.
//
// * ErrCodeResourceConflictException "ResourceConflictException"
// The resource already exists.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteFunction
func (c *Lambda) DeleteFunction(input *DeleteFunctionInput) (*DeleteFunctionOutput, error) {
req, out := c.DeleteFunctionRequest(input)
return out, req.Send()
}
// DeleteFunctionWithContext is the same as DeleteFunction with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteFunction for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Lambda) DeleteFunctionWithContext(ctx aws.Context, input *DeleteFunctionInput, opts ...request.Option) (*DeleteFunctionOutput, error) {
req, out := c.DeleteFunctionRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetAccountSettings = "GetAccountSettings"
// GetAccountSettingsRequest generates a "aws/request.Request" representing the
// client's request for the GetAccountSettings operation. The "output" return
// value will be populated with the request's response once the request complets
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetAccountSettings for more information on using the GetAccountSettings
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the GetAccountSettingsRequest method.
// req, resp := client.GetAccountSettingsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetAccountSettings
func (c *Lambda) GetAccountSettingsRequest(input *GetAccountSettingsInput) (req *request.Request, output *GetAccountSettingsOutput) {
op := &request.Operation{
Name: opGetAccountSettings,
HTTPMethod: "GET",
HTTPPath: "/2016-08-19/account-settings/",
}
if input == nil {
input = &GetAccountSettingsInput{}
}
output = &GetAccountSettingsOutput{}
req = c.newRequest(op, input, output)
return
}
// GetAccountSettings API operation for AWS Lambda.
//
// Returns a customer's account settings.
//
// You can use this operation to retrieve Lambda limits information, such as
// code size and concurrency limits. For more information about limits, see
// AWS Lambda Limits (http://docs.aws.amazon.com/lambda/latest/dg/limits.html).
// You can also retrieve resource usage statistics, such as code storage usage
// and function count.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Lambda's
// API operation GetAccountSettings for usage and error information.
//
// Returned Error Codes:
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
//
// * ErrCodeServiceException "ServiceException"
// The AWS Lambda service encountered an internal error.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetAccountSettings
func (c *Lambda) GetAccountSettings(input *GetAccountSettingsInput) (*GetAccountSettingsOutput, error) {
req, out := c.GetAccountSettingsRequest(input)
return out, req.Send()
}
// GetAccountSettingsWithContext is the same as GetAccountSettings with the addition of
// the ability to pass a context and additional request options.
//
// See GetAccountSettings for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Lambda) GetAccountSettingsWithContext(ctx aws.Context, input *GetAccountSettingsInput, opts ...request.Option) (*GetAccountSettingsOutput, error) {
req, out := c.GetAccountSettingsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetAlias = "GetAlias"
// GetAliasRequest generates a "aws/request.Request" representing the
// client's request for the GetAlias operation. The "output" return
// value will be populated with the request's response once the request complets
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetAlias for more information on using the GetAlias
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the GetAliasRequest method.
// req, resp := client.GetAliasRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetAlias
func (c *Lambda) GetAliasRequest(input *GetAliasInput) (req *request.Request, output *AliasConfiguration) {
op := &request.Operation{
Name: opGetAlias,
HTTPMethod: "GET",
HTTPPath: "/2015-03-31/functions/{FunctionName}/aliases/{Name}",
}
if input == nil {
input = &GetAliasInput{}
}
output = &AliasConfiguration{}
req = c.newRequest(op, input, output)
return
}
// GetAlias API operation for AWS Lambda.
//
// Returns the specified alias information such as the alias ARN, description,
// and function version it is pointing to. For more information, see Introduction
// to AWS Lambda Aliases (http://docs.aws.amazon.com/lambda/latest/dg/aliases-intro.html).
//
// This requires permission for the lambda:GetAlias action.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Lambda's
// API operation GetAlias for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServiceException "ServiceException"
// The AWS Lambda service encountered an internal error.
//
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// The resource (for example, a Lambda function or access policy statement)
// specified in the request does not exist.
//
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// One of the parameters in the request is invalid. For example, if you provided
// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
// API, that AWS Lambda is unable to assume you will get this exception. You
// will also get this exception if you have selected a deprecated runtime, such
// as Node v0.10.42.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetAlias
func (c *Lambda) GetAlias(input *GetAliasInput) (*AliasConfiguration, error) {
req, out := c.GetAliasRequest(input)
return out, req.Send()
}
// GetAliasWithContext is the same as GetAlias with the addition of
// the ability to pass a context and additional request options.
//
// See GetAlias for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Lambda) GetAliasWithContext(ctx aws.Context, input *GetAliasInput, opts ...request.Option) (*AliasConfiguration, error) {
req, out := c.GetAliasRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetEventSourceMapping = "GetEventSourceMapping"
// GetEventSourceMappingRequest generates a "aws/request.Request" representing the
// client's request for the GetEventSourceMapping operation. The "output" return
// value will be populated with the request's response once the request complets
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetEventSourceMapping for more information on using the GetEventSourceMapping
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the GetEventSourceMappingRequest method.
// req, resp := client.GetEventSourceMappingRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetEventSourceMapping
func (c *Lambda) GetEventSourceMappingRequest(input *GetEventSourceMappingInput) (req *request.Request, output *EventSourceMappingConfiguration) {
op := &request.Operation{
Name: opGetEventSourceMapping,
HTTPMethod: "GET",
HTTPPath: "/2015-03-31/event-source-mappings/{UUID}",
}
if input == nil {
input = &GetEventSourceMappingInput{}
}
output = &EventSourceMappingConfiguration{}
req = c.newRequest(op, input, output)
return
}
// GetEventSourceMapping API operation for AWS Lambda.
//
// Returns configuration information for the specified event source mapping
// (see CreateEventSourceMapping).
//
// This operation requires permission for the lambda:GetEventSourceMapping action.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Lambda's
// API operation GetEventSourceMapping for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServiceException "ServiceException"
// The AWS Lambda service encountered an internal error.
//
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// The resource (for example, a Lambda function or access policy statement)
// specified in the request does not exist.
//
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// One of the parameters in the request is invalid. For example, if you provided
// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
// API, that AWS Lambda is unable to assume you will get this exception. You
// will also get this exception if you have selected a deprecated runtime, such
// as Node v0.10.42.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetEventSourceMapping
func (c *Lambda) GetEventSourceMapping(input *GetEventSourceMappingInput) (*EventSourceMappingConfiguration, error) {
req, out := c.GetEventSourceMappingRequest(input)
return out, req.Send()
}
// GetEventSourceMappingWithContext is the same as GetEventSourceMapping with the addition of
// the ability to pass a context and additional request options.
//
// See GetEventSourceMapping for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Lambda) GetEventSourceMappingWithContext(ctx aws.Context, input *GetEventSourceMappingInput, opts ...request.Option) (*EventSourceMappingConfiguration, error) {
req, out := c.GetEventSourceMappingRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetFunction = "GetFunction"
// GetFunctionRequest generates a "aws/request.Request" representing the
// client's request for the GetFunction operation. The "output" return
// value will be populated with the request's response once the request complets
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetFunction for more information on using the GetFunction
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the GetFunctionRequest method.
// req, resp := client.GetFunctionRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetFunction
func (c *Lambda) GetFunctionRequest(input *GetFunctionInput) (req *request.Request, output *GetFunctionOutput) {
op := &request.Operation{
Name: opGetFunction,
HTTPMethod: "GET",
HTTPPath: "/2015-03-31/functions/{FunctionName}",
}
if input == nil {
input = &GetFunctionInput{}
}
output = &GetFunctionOutput{}
req = c.newRequest(op, input, output)
return
}
// GetFunction API operation for AWS Lambda.
//
// Returns the configuration information of the Lambda function and a presigned
// URL link to the .zip file you uploaded with CreateFunction so you can download
// the .zip file. Note that the URL is valid for up to 10 minutes. The configuration
// information is the same information you provided as parameters when uploading
// the function.
//
// Using the optional Qualifier parameter, you can specify a specific function
// version for which you want this information. If you don't specify this parameter,
// the API uses unqualified function ARN which return information about the
// $LATEST version of the Lambda function. For more information, see AWS Lambda
// Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).
//
// This operation requires permission for the lambda:GetFunction action.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Lambda's
// API operation GetFunction for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServiceException "ServiceException"
// The AWS Lambda service encountered an internal error.
//
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// The resource (for example, a Lambda function or access policy statement)
// specified in the request does not exist.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
//
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// One of the parameters in the request is invalid. For example, if you provided
// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
// API, that AWS Lambda is unable to assume you will get this exception. You
// will also get this exception if you have selected a deprecated runtime, such
// as Node v0.10.42.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetFunction
func (c *Lambda) GetFunction(input *GetFunctionInput) (*GetFunctionOutput, error) {
req, out := c.GetFunctionRequest(input)
return out, req.Send()
}
// GetFunctionWithContext is the same as GetFunction with the addition of
// the ability to pass a context and additional request options.
//
// See GetFunction for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Lambda) GetFunctionWithContext(ctx aws.Context, input *GetFunctionInput, opts ...request.Option) (*GetFunctionOutput, error) {
req, out := c.GetFunctionRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetFunctionConfiguration = "GetFunctionConfiguration"
// GetFunctionConfigurationRequest generates a "aws/request.Request" representing the
// client's request for the GetFunctionConfiguration operation. The "output" return
// value will be populated with the request's response once the request complets
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetFunctionConfiguration for more information on using the GetFunctionConfiguration
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the GetFunctionConfigurationRequest method.
// req, resp := client.GetFunctionConfigurationRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetFunctionConfiguration
func (c *Lambda) GetFunctionConfigurationRequest(input *GetFunctionConfigurationInput) (req *request.Request, output *FunctionConfiguration) {
op := &request.Operation{
Name: opGetFunctionConfiguration,
HTTPMethod: "GET",
HTTPPath: "/2015-03-31/functions/{FunctionName}/configuration",
}
if input == nil {
input = &GetFunctionConfigurationInput{}
}
output = &FunctionConfiguration{}
req = c.newRequest(op, input, output)
return
}
// GetFunctionConfiguration API operation for AWS Lambda.
//
// Returns the configuration information of the Lambda function. This the same
// information you provided as parameters when uploading the function by using
// CreateFunction.
//
// If you are using the versioning feature, you can retrieve this information
// for a specific function version by using the optional Qualifier parameter
// and specifying the function version or alias that points to it. If you don't
// provide it, the API returns information about the $LATEST version of the
// function. For more information about versioning, see AWS Lambda Function
// Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).
//
// This operation requires permission for the lambda:GetFunctionConfiguration
// operation.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Lambda's
// API operation GetFunctionConfiguration for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServiceException "ServiceException"
// The AWS Lambda service encountered an internal error.
//
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// The resource (for example, a Lambda function or access policy statement)
// specified in the request does not exist.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
//
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// One of the parameters in the request is invalid. For example, if you provided
// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
// API, that AWS Lambda is unable to assume you will get this exception. You
// will also get this exception if you have selected a deprecated runtime, such
// as Node v0.10.42.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetFunctionConfiguration
func (c *Lambda) GetFunctionConfiguration(input *GetFunctionConfigurationInput) (*FunctionConfiguration, error) {
req, out := c.GetFunctionConfigurationRequest(input)
return out, req.Send()
}
// GetFunctionConfigurationWithContext is the same as GetFunctionConfiguration with the addition of
// the ability to pass a context and additional request options.
//
// See GetFunctionConfiguration for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Lambda) GetFunctionConfigurationWithContext(ctx aws.Context, input *GetFunctionConfigurationInput, opts ...request.Option) (*FunctionConfiguration, error) {
req, out := c.GetFunctionConfigurationRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetPolicy = "GetPolicy"
// GetPolicyRequest generates a "aws/request.Request" representing the
// client's request for the GetPolicy operation. The "output" return
// value will be populated with the request's response once the request complets
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetPolicy for more information on using the GetPolicy
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the GetPolicyRequest method.
// req, resp := client.GetPolicyRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetPolicy
func (c *Lambda) GetPolicyRequest(input *GetPolicyInput) (req *request.Request, output *GetPolicyOutput) {
op := &request.Operation{
Name: opGetPolicy,
HTTPMethod: "GET",
HTTPPath: "/2015-03-31/functions/{FunctionName}/policy",
}
if input == nil {
input = &GetPolicyInput{}
}
output = &GetPolicyOutput{}
req = c.newRequest(op, input, output)
return
}
// GetPolicy API operation for AWS Lambda.
//
// Returns the resource policy associated with the specified Lambda function.
//
// If you are using the versioning feature, you can get the resource policy
// associated with the specific Lambda function version or alias by specifying
// the version or alias name using the Qualifier parameter. For more information
// about versioning, see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).
//
// You need permission for the lambda:GetPolicy action.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Lambda's
// API operation GetPolicy for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServiceException "ServiceException"
// The AWS Lambda service encountered an internal error.
//
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// The resource (for example, a Lambda function or access policy statement)
// specified in the request does not exist.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
//
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// One of the parameters in the request is invalid. For example, if you provided
// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
// API, that AWS Lambda is unable to assume you will get this exception. You
// will also get this exception if you have selected a deprecated runtime, such
// as Node v0.10.42.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetPolicy
func (c *Lambda) GetPolicy(input *GetPolicyInput) (*GetPolicyOutput, error) {
req, out := c.GetPolicyRequest(input)
return out, req.Send()
}
// GetPolicyWithContext is the same as GetPolicy with the addition of
// the ability to pass a context and additional request options.
//
// See GetPolicy for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Lambda) GetPolicyWithContext(ctx aws.Context, input *GetPolicyInput, opts ...request.Option) (*GetPolicyOutput, error) {
req, out := c.GetPolicyRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opInvoke = "Invoke"
// InvokeRequest generates a "aws/request.Request" representing the
// client's request for the Invoke operation. The "output" return
// value will be populated with the request's response once the request complets
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See Invoke for more information on using the Invoke
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the InvokeRequest method.
// req, resp := client.InvokeRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/Invoke
func (c *Lambda) InvokeRequest(input *InvokeInput) (req *request.Request, output *InvokeOutput) {
op := &request.Operation{
Name: opInvoke,
HTTPMethod: "POST",
HTTPPath: "/2015-03-31/functions/{FunctionName}/invocations",
}
if input == nil {
input = &InvokeInput{}
}
output = &InvokeOutput{}
req = c.newRequest(op, input, output)
return
}
// Invoke API operation for AWS Lambda.
//
// Invokes a specific Lambda function. For an example, see Create the Lambda
// Function and Test It Manually (http://docs.aws.amazon.com/lambda/latest/dg/with-dynamodb-create-function.html#with-dbb-invoke-manually).
//
// If you are using the versioning feature, you can invoke the specific function
// version by providing function version or alias name that is pointing to the
// function version using the Qualifier parameter in the request. If you don't
// provide the Qualifier parameter, the $LATEST version of the Lambda function
// is invoked. Invocations occur at least once in response to an event and functions
// must be idempotent to handle this. For information about the versioning feature,
// see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).
//
// This operation requires permission for the lambda:InvokeFunction action.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Lambda's
// API operation Invoke for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServiceException "ServiceException"
// The AWS Lambda service encountered an internal error.
//
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// The resource (for example, a Lambda function or access policy statement)
// specified in the request does not exist.
//
// * ErrCodeInvalidRequestContentException "InvalidRequestContentException"
// The request body could not be parsed as JSON.
//
// * ErrCodeRequestTooLargeException "RequestTooLargeException"
// The request payload exceeded the Invoke request body JSON input limit. For
// more information, see Limits (http://docs.aws.amazon.com/lambda/latest/dg/limits.html).
//
// * ErrCodeUnsupportedMediaTypeException "UnsupportedMediaTypeException"
// The content type of the Invoke request body is not JSON.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
//
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// One of the parameters in the request is invalid. For example, if you provided
// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
// API, that AWS Lambda is unable to assume you will get this exception. You
// will also get this exception if you have selected a deprecated runtime, such
// as Node v0.10.42.
//
// * ErrCodeEC2UnexpectedException "EC2UnexpectedException"
// AWS Lambda received an unexpected EC2 client exception while setting up for
// the Lambda function.
//
// * ErrCodeSubnetIPAddressLimitReachedException "SubnetIPAddressLimitReachedException"
// AWS Lambda was not able to set up VPC access for the Lambda function because
// one or more configured subnets has no available IP addresses.
//
// * ErrCodeENILimitReachedException "ENILimitReachedException"
// AWS Lambda was not able to create an Elastic Network Interface (ENI) in the
// VPC, specified as part of Lambda function configuration, because the limit
// for network interfaces has been reached.
//
// * ErrCodeEC2ThrottledException "EC2ThrottledException"
// AWS Lambda was throttled by Amazon EC2 during Lambda function initialization
// using the execution role provided for the Lambda function.
//
// * ErrCodeEC2AccessDeniedException "EC2AccessDeniedException"
//
// * ErrCodeInvalidSubnetIDException "InvalidSubnetIDException"
// The Subnet ID provided in the Lambda function VPC configuration is invalid.
//
// * ErrCodeInvalidSecurityGroupIDException "InvalidSecurityGroupIDException"
// The Security Group ID provided in the Lambda function VPC configuration is
// invalid.
//
// * ErrCodeInvalidZipFileException "InvalidZipFileException"
// AWS Lambda could not unzip the function zip file.
//
// * ErrCodeKMSDisabledException "KMSDisabledException"
// Lambda was unable to decrypt the environment variables because the KMS key
// used is disabled. Check the Lambda function's KMS key settings.
//
// * ErrCodeKMSInvalidStateException "KMSInvalidStateException"
// Lambda was unable to decrypt the environment variables because the KMS key
// used is in an invalid state for Decrypt. Check the function's KMS key settings.
//
// * ErrCodeKMSAccessDeniedException "KMSAccessDeniedException"
// Lambda was unable to decrypt the environment variables because KMS access
// was denied. Check the Lambda function's KMS permissions.
//
// * ErrCodeKMSNotFoundException "KMSNotFoundException"
// Lambda was unable to decrypt the environment variables because the KMS key
// was not found. Check the function's KMS key settings.
//
// * ErrCodeInvalidRuntimeException "InvalidRuntimeException"
// The runtime or runtime version specified is not supported.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/Invoke
func (c *Lambda) Invoke(input *InvokeInput) (*InvokeOutput, error) {
req, out := c.InvokeRequest(input)
return out, req.Send()
}
// InvokeWithContext is the same as Invoke with the addition of
// the ability to pass a context and additional request options.
//
// See Invoke for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Lambda) InvokeWithContext(ctx aws.Context, input *InvokeInput, opts ...request.Option) (*InvokeOutput, error) {
req, out := c.InvokeRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opInvokeAsync = "InvokeAsync"
// InvokeAsyncRequest generates a "aws/request.Request" representing the
// client's request for the InvokeAsync operation. The "output" return
// value will be populated with the request's response once the request complets
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See InvokeAsync for more information on using the InvokeAsync
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the InvokeAsyncRequest method.
// req, resp := client.InvokeAsyncRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/InvokeAsync
func (c *Lambda) InvokeAsyncRequest(input *InvokeAsyncInput) (req *request.Request, output *InvokeAsyncOutput) {
if c.Client.Config.Logger != nil {
c.Client.Config.Logger.Log("This operation, InvokeAsync, has been deprecated")
}
op := &request.Operation{
Name: opInvokeAsync,
HTTPMethod: "POST",
HTTPPath: "/2014-11-13/functions/{FunctionName}/invoke-async/",
}
if input == nil {
input = &InvokeAsyncInput{}
}
output = &InvokeAsyncOutput{}
req = c.newRequest(op, input, output)
return
}
// InvokeAsync API operation for AWS Lambda.
//
// This API is deprecated. We recommend you use Invoke API (see Invoke).
//
// Submits an invocation request to AWS Lambda. Upon receiving the request,
// Lambda executes the specified function asynchronously. To see the logs generated
// by the Lambda function execution, see the CloudWatch Logs console.
//
// This operation requires permission for the lambda:InvokeFunction action.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Lambda's
// API operation InvokeAsync for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServiceException "ServiceException"
// The AWS Lambda service encountered an internal error.
//
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// The resource (for example, a Lambda function or access policy statement)
// specified in the request does not exist.
//
// * ErrCodeInvalidRequestContentException "InvalidRequestContentException"
// The request body could not be parsed as JSON.
//
// * ErrCodeInvalidRuntimeException "InvalidRuntimeException"
// The runtime or runtime version specified is not supported.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/InvokeAsync
func (c *Lambda) InvokeAsync(input *InvokeAsyncInput) (*InvokeAsyncOutput, error) {
req, out := c.InvokeAsyncRequest(input)
return out, req.Send()
}
// InvokeAsyncWithContext is the same as InvokeAsync with the addition of
// the ability to pass a context and additional request options.
//
// See InvokeAsync for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Lambda) InvokeAsyncWithContext(ctx aws.Context, input *InvokeAsyncInput, opts ...request.Option) (*InvokeAsyncOutput, error) {
req, out := c.InvokeAsyncRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opListAliases = "ListAliases"
// ListAliasesRequest generates a "aws/request.Request" representing the
// client's request for the ListAliases operation. The "output" return
// value will be populated with the request's response once the request complets
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListAliases for more information on using the ListAliases
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ListAliasesRequest method.
// req, resp := client.ListAliasesRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListAliases
func (c *Lambda) ListAliasesRequest(input *ListAliasesInput) (req *request.Request, output *ListAliasesOutput) {
op := &request.Operation{
Name: opListAliases,
HTTPMethod: "GET",
HTTPPath: "/2015-03-31/functions/{FunctionName}/aliases",
}
if input == nil {
input = &ListAliasesInput{}
}
output = &ListAliasesOutput{}
req = c.newRequest(op, input, output)
return
}
// ListAliases API operation for AWS Lambda.
//
// Returns list of aliases created for a Lambda function. For each alias, the
// response includes information such as the alias ARN, description, alias name,
// and the function version to which it points. For more information, see Introduction
// to AWS Lambda Aliases (http://docs.aws.amazon.com/lambda/latest/dg/aliases-intro.html).
//
// This requires permission for the lambda:ListAliases action.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Lambda's
// API operation ListAliases for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServiceException "ServiceException"
// The AWS Lambda service encountered an internal error.
//
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// The resource (for example, a Lambda function or access policy statement)
// specified in the request does not exist.
//
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// One of the parameters in the request is invalid. For example, if you provided
// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
// API, that AWS Lambda is unable to assume you will get this exception. You
// will also get this exception if you have selected a deprecated runtime, such
// as Node v0.10.42.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListAliases
func (c *Lambda) ListAliases(input *ListAliasesInput) (*ListAliasesOutput, error) {
req, out := c.ListAliasesRequest(input)
return out, req.Send()
}
// ListAliasesWithContext is the same as ListAliases with the addition of
// the ability to pass a context and additional request options.
//
// See ListAliases for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Lambda) ListAliasesWithContext(ctx aws.Context, input *ListAliasesInput, opts ...request.Option) (*ListAliasesOutput, error) {
req, out := c.ListAliasesRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opListEventSourceMappings = "ListEventSourceMappings"
// ListEventSourceMappingsRequest generates a "aws/request.Request" representing the
// client's request for the ListEventSourceMappings operation. The "output" return
// value will be populated with the request's response once the request complets
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListEventSourceMappings for more information on using the ListEventSourceMappings
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ListEventSourceMappingsRequest method.
// req, resp := client.ListEventSourceMappingsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListEventSourceMappings
func (c *Lambda) ListEventSourceMappingsRequest(input *ListEventSourceMappingsInput) (req *request.Request, output *ListEventSourceMappingsOutput) {
op := &request.Operation{
Name: opListEventSourceMappings,
HTTPMethod: "GET",
HTTPPath: "/2015-03-31/event-source-mappings/",
Paginator: &request.Paginator{
InputTokens: []string{"Marker"},
OutputTokens: []string{"NextMarker"},
LimitToken: "MaxItems",
TruncationToken: "",
},
}
if input == nil {
input = &ListEventSourceMappingsInput{}
}
output = &ListEventSourceMappingsOutput{}
req = c.newRequest(op, input, output)
return
}
// ListEventSourceMappings API operation for AWS Lambda.
//
// Returns a list of event source mappings you created using the CreateEventSourceMapping
// (see CreateEventSourceMapping).
//
// For each mapping, the API returns configuration information. You can optionally
// specify filters to retrieve specific event source mappings.
//
// If you are using the versioning feature, you can get list of event source
// mappings for a specific Lambda function version or an alias as described
// in the FunctionName parameter. For information about the versioning feature,
// see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).
//
// This operation requires permission for the lambda:ListEventSourceMappings
// action.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Lambda's
// API operation ListEventSourceMappings for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServiceException "ServiceException"
// The AWS Lambda service encountered an internal error.
//
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// The resource (for example, a Lambda function or access policy statement)
// specified in the request does not exist.
//
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// One of the parameters in the request is invalid. For example, if you provided
// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
// API, that AWS Lambda is unable to assume you will get this exception. You
// will also get this exception if you have selected a deprecated runtime, such
// as Node v0.10.42.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListEventSourceMappings
func (c *Lambda) ListEventSourceMappings(input *ListEventSourceMappingsInput) (*ListEventSourceMappingsOutput, error) {
req, out := c.ListEventSourceMappingsRequest(input)
return out, req.Send()
}
// ListEventSourceMappingsWithContext is the same as ListEventSourceMappings with the addition of
// the ability to pass a context and additional request options.
//
// See ListEventSourceMappings for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Lambda) ListEventSourceMappingsWithContext(ctx aws.Context, input *ListEventSourceMappingsInput, opts ...request.Option) (*ListEventSourceMappingsOutput, error) {
req, out := c.ListEventSourceMappingsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// ListEventSourceMappingsPages iterates over the pages of a ListEventSourceMappings operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListEventSourceMappings method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a ListEventSourceMappings operation.
// pageNum := 0
// err := client.ListEventSourceMappingsPages(params,
// func(page *ListEventSourceMappingsOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *Lambda) ListEventSourceMappingsPages(input *ListEventSourceMappingsInput, fn func(*ListEventSourceMappingsOutput, bool) bool) error {
return c.ListEventSourceMappingsPagesWithContext(aws.BackgroundContext(), input, fn)
}
// ListEventSourceMappingsPagesWithContext same as ListEventSourceMappingsPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Lambda) ListEventSourceMappingsPagesWithContext(ctx aws.Context, input *ListEventSourceMappingsInput, fn func(*ListEventSourceMappingsOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListEventSourceMappingsInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.ListEventSourceMappingsRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*ListEventSourceMappingsOutput), !p.HasNextPage())
}
return p.Err()
}
const opListFunctions = "ListFunctions"
// ListFunctionsRequest generates a "aws/request.Request" representing the
// client's request for the ListFunctions operation. The "output" return
// value will be populated with the request's response once the request complets
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListFunctions for more information on using the ListFunctions
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ListFunctionsRequest method.
// req, resp := client.ListFunctionsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListFunctions
func (c *Lambda) ListFunctionsRequest(input *ListFunctionsInput) (req *request.Request, output *ListFunctionsOutput) {
op := &request.Operation{
Name: opListFunctions,
HTTPMethod: "GET",
HTTPPath: "/2015-03-31/functions/",
Paginator: &request.Paginator{
InputTokens: []string{"Marker"},
OutputTokens: []string{"NextMarker"},
LimitToken: "MaxItems",
TruncationToken: "",
},
}
if input == nil {
input = &ListFunctionsInput{}
}
output = &ListFunctionsOutput{}
req = c.newRequest(op, input, output)
return
}
// ListFunctions API operation for AWS Lambda.
//
// Returns a list of your Lambda functions. For each function, the response
// includes the function configuration information. You must use GetFunction
// to retrieve the code for your function.
//
// This operation requires permission for the lambda:ListFunctions action.
//
// If you are using the versioning feature, you can list all of your functions
// or only $LATEST versions. For information about the versioning feature, see
// AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Lambda's
// API operation ListFunctions for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServiceException "ServiceException"
// The AWS Lambda service encountered an internal error.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
//
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// One of the parameters in the request is invalid. For example, if you provided
// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
// API, that AWS Lambda is unable to assume you will get this exception. You
// will also get this exception if you have selected a deprecated runtime, such
// as Node v0.10.42.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListFunctions
func (c *Lambda) ListFunctions(input *ListFunctionsInput) (*ListFunctionsOutput, error) {
req, out := c.ListFunctionsRequest(input)
return out, req.Send()
}
// ListFunctionsWithContext is the same as ListFunctions with the addition of
// the ability to pass a context and additional request options.
//
// See ListFunctions for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Lambda) ListFunctionsWithContext(ctx aws.Context, input *ListFunctionsInput, opts ...request.Option) (*ListFunctionsOutput, error) {
req, out := c.ListFunctionsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// ListFunctionsPages iterates over the pages of a ListFunctions operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListFunctions method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a ListFunctions operation.
// pageNum := 0
// err := client.ListFunctionsPages(params,
// func(page *ListFunctionsOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *Lambda) ListFunctionsPages(input *ListFunctionsInput, fn func(*ListFunctionsOutput, bool) bool) error {
return c.ListFunctionsPagesWithContext(aws.BackgroundContext(), input, fn)
}
// ListFunctionsPagesWithContext same as ListFunctionsPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Lambda) ListFunctionsPagesWithContext(ctx aws.Context, input *ListFunctionsInput, fn func(*ListFunctionsOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListFunctionsInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.ListFunctionsRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*ListFunctionsOutput), !p.HasNextPage())
}
return p.Err()
}
const opListTags = "ListTags"
// ListTagsRequest generates a "aws/request.Request" representing the
// client's request for the ListTags operation. The "output" return
// value will be populated with the request's response once the request complets
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListTags for more information on using the ListTags
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ListTagsRequest method.
// req, resp := client.ListTagsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListTags
func (c *Lambda) ListTagsRequest(input *ListTagsInput) (req *request.Request, output *ListTagsOutput) {
op := &request.Operation{
Name: opListTags,
HTTPMethod: "GET",
HTTPPath: "/2017-03-31/tags/{ARN}",
}
if input == nil {
input = &ListTagsInput{}
}
output = &ListTagsOutput{}
req = c.newRequest(op, input, output)
return
}
// ListTags API operation for AWS Lambda.
//
// Returns a list of tags assigned to a function when supplied the function
// ARN (Amazon Resource Name).
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Lambda's
// API operation ListTags for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServiceException "ServiceException"
// The AWS Lambda service encountered an internal error.
//
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// The resource (for example, a Lambda function or access policy statement)
// specified in the request does not exist.
//
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// One of the parameters in the request is invalid. For example, if you provided
// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
// API, that AWS Lambda is unable to assume you will get this exception. You
// will also get this exception if you have selected a deprecated runtime, such
// as Node v0.10.42.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListTags
func (c *Lambda) ListTags(input *ListTagsInput) (*ListTagsOutput, error) {
req, out := c.ListTagsRequest(input)
return out, req.Send()
}
// ListTagsWithContext is the same as ListTags with the addition of
// the ability to pass a context and additional request options.
//
// See ListTags for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Lambda) ListTagsWithContext(ctx aws.Context, input *ListTagsInput, opts ...request.Option) (*ListTagsOutput, error) {
req, out := c.ListTagsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opListVersionsByFunction = "ListVersionsByFunction"
// ListVersionsByFunctionRequest generates a "aws/request.Request" representing the
// client's request for the ListVersionsByFunction operation. The "output" return
// value will be populated with the request's response once the request complets
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListVersionsByFunction for more information on using the ListVersionsByFunction
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ListVersionsByFunctionRequest method.
// req, resp := client.ListVersionsByFunctionRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListVersionsByFunction
func (c *Lambda) ListVersionsByFunctionRequest(input *ListVersionsByFunctionInput) (req *request.Request, output *ListVersionsByFunctionOutput) {
op := &request.Operation{
Name: opListVersionsByFunction,
HTTPMethod: "GET",
HTTPPath: "/2015-03-31/functions/{FunctionName}/versions",
}
if input == nil {
input = &ListVersionsByFunctionInput{}
}
output = &ListVersionsByFunctionOutput{}
req = c.newRequest(op, input, output)
return
}
// ListVersionsByFunction API operation for AWS Lambda.
//
// List all versions of a function. For information about the versioning feature,
// see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Lambda's
// API operation ListVersionsByFunction for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServiceException "ServiceException"
// The AWS Lambda service encountered an internal error.
//
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// The resource (for example, a Lambda function or access policy statement)
// specified in the request does not exist.
//
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// One of the parameters in the request is invalid. For example, if you provided
// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
// API, that AWS Lambda is unable to assume you will get this exception. You
// will also get this exception if you have selected a deprecated runtime, such
// as Node v0.10.42.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListVersionsByFunction
func (c *Lambda) ListVersionsByFunction(input *ListVersionsByFunctionInput) (*ListVersionsByFunctionOutput, error) {
req, out := c.ListVersionsByFunctionRequest(input)
return out, req.Send()
}
// ListVersionsByFunctionWithContext is the same as ListVersionsByFunction with the addition of
// the ability to pass a context and additional request options.
//
// See ListVersionsByFunction for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Lambda) ListVersionsByFunctionWithContext(ctx aws.Context, input *ListVersionsByFunctionInput, opts ...request.Option) (*ListVersionsByFunctionOutput, error) {
req, out := c.ListVersionsByFunctionRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opPublishVersion = "PublishVersion"
// PublishVersionRequest generates a "aws/request.Request" representing the
// client's request for the PublishVersion operation. The "output" return
// value will be populated with the request's response once the request complets
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See PublishVersion for more information on using the PublishVersion
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the PublishVersionRequest method.
// req, resp := client.PublishVersionRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/PublishVersion
func (c *Lambda) PublishVersionRequest(input *PublishVersionInput) (req *request.Request, output *FunctionConfiguration) {
op := &request.Operation{
Name: opPublishVersion,
HTTPMethod: "POST",
HTTPPath: "/2015-03-31/functions/{FunctionName}/versions",
}
if input == nil {
input = &PublishVersionInput{}
}
output = &FunctionConfiguration{}
req = c.newRequest(op, input, output)
return
}
// PublishVersion API operation for AWS Lambda.
//
// Publishes a version of your function from the current snapshot of $LATEST.
// That is, AWS Lambda takes a snapshot of the function code and configuration
// information from $LATEST and publishes a new version. The code and configuration
// cannot be modified after publication. For information about the versioning
// feature, see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Lambda's
// API operation PublishVersion for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServiceException "ServiceException"
// The AWS Lambda service encountered an internal error.
//
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// The resource (for example, a Lambda function or access policy statement)
// specified in the request does not exist.
//
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// One of the parameters in the request is invalid. For example, if you provided
// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
// API, that AWS Lambda is unable to assume you will get this exception. You
// will also get this exception if you have selected a deprecated runtime, such
// as Node v0.10.42.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
//
// * ErrCodeCodeStorageExceededException "CodeStorageExceededException"
// You have exceeded your maximum total code size per account. Limits (http://docs.aws.amazon.com/lambda/latest/dg/limits.html)
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/PublishVersion
func (c *Lambda) PublishVersion(input *PublishVersionInput) (*FunctionConfiguration, error) {
req, out := c.PublishVersionRequest(input)
return out, req.Send()
}
// PublishVersionWithContext is the same as PublishVersion with the addition of
// the ability to pass a context and additional request options.
//
// See PublishVersion for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Lambda) PublishVersionWithContext(ctx aws.Context, input *PublishVersionInput, opts ...request.Option) (*FunctionConfiguration, error) {
req, out := c.PublishVersionRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opRemovePermission = "RemovePermission"
// RemovePermissionRequest generates a "aws/request.Request" representing the
// client's request for the RemovePermission operation. The "output" return
// value will be populated with the request's response once the request complets
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See RemovePermission for more information on using the RemovePermission
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the RemovePermissionRequest method.
// req, resp := client.RemovePermissionRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/RemovePermission
func (c *Lambda) RemovePermissionRequest(input *RemovePermissionInput) (req *request.Request, output *RemovePermissionOutput) {
op := &request.Operation{
Name: opRemovePermission,
HTTPMethod: "DELETE",
HTTPPath: "/2015-03-31/functions/{FunctionName}/policy/{StatementId}",
}
if input == nil {
input = &RemovePermissionInput{}
}
output = &RemovePermissionOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
return
}
// RemovePermission API operation for AWS Lambda.
//
// You can remove individual permissions from an resource policy associated
// with a Lambda function by providing a statement ID that you provided when
// you added the permission.
//
// If you are using versioning, the permissions you remove are specific to the
// Lambda function version or alias you specify in the AddPermission request
// via the Qualifier parameter. For more information about versioning, see AWS
// Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).
//
// Note that removal of a permission will cause an active event source to lose
// permission to the function.
//
// You need permission for the lambda:RemovePermission action.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Lambda's
// API operation RemovePermission for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServiceException "ServiceException"
// The AWS Lambda service encountered an internal error.
//
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// The resource (for example, a Lambda function or access policy statement)
// specified in the request does not exist.
//
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// One of the parameters in the request is invalid. For example, if you provided
// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
// API, that AWS Lambda is unable to assume you will get this exception. You
// will also get this exception if you have selected a deprecated runtime, such
// as Node v0.10.42.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/RemovePermission
func (c *Lambda) RemovePermission(input *RemovePermissionInput) (*RemovePermissionOutput, error) {
req, out := c.RemovePermissionRequest(input)
return out, req.Send()
}
// RemovePermissionWithContext is the same as RemovePermission with the addition of
// the ability to pass a context and additional request options.
//
// See RemovePermission for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Lambda) RemovePermissionWithContext(ctx aws.Context, input *RemovePermissionInput, opts ...request.Option) (*RemovePermissionOutput, error) {
req, out := c.RemovePermissionRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opTagResource = "TagResource"
// TagResourceRequest generates a "aws/request.Request" representing the
// client's request for the TagResource operation. The "output" return
// value will be populated with the request's response once the request complets
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See TagResource for more information on using the TagResource
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the TagResourceRequest method.
// req, resp := client.TagResourceRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/TagResource
func (c *Lambda) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) {
op := &request.Operation{
Name: opTagResource,
HTTPMethod: "POST",
HTTPPath: "/2017-03-31/tags/{ARN}",
}
if input == nil {
input = &TagResourceInput{}
}
output = &TagResourceOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
return
}
// TagResource API operation for AWS Lambda.
//
// Creates a list of tags (key-value pairs) on the Lambda function. Requires
// the Lambda function ARN (Amazon Resource Name). If a key is specified without
// a value, Lambda creates a tag with the specified key and a value of null.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Lambda's
// API operation TagResource for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServiceException "ServiceException"
// The AWS Lambda service encountered an internal error.
//
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// The resource (for example, a Lambda function or access policy statement)
// specified in the request does not exist.
//
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// One of the parameters in the request is invalid. For example, if you provided
// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
// API, that AWS Lambda is unable to assume you will get this exception. You
// will also get this exception if you have selected a deprecated runtime, such
// as Node v0.10.42.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/TagResource
func (c *Lambda) TagResource(input *TagResourceInput) (*TagResourceOutput, error) {
req, out := c.TagResourceRequest(input)
return out, req.Send()
}
// TagResourceWithContext is the same as TagResource with the addition of
// the ability to pass a context and additional request options.
//
// See TagResource for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Lambda) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) {
req, out := c.TagResourceRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opUntagResource = "UntagResource"
// UntagResourceRequest generates a "aws/request.Request" representing the
// client's request for the UntagResource operation. The "output" return
// value will be populated with the request's response once the request complets
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See UntagResource for more information on using the UntagResource
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the UntagResourceRequest method.
// req, resp := client.UntagResourceRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UntagResource
func (c *Lambda) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) {
op := &request.Operation{
Name: opUntagResource,
HTTPMethod: "DELETE",
HTTPPath: "/2017-03-31/tags/{ARN}",
}
if input == nil {
input = &UntagResourceInput{}
}
output = &UntagResourceOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
return
}
// UntagResource API operation for AWS Lambda.
//
// Removes tags from a Lambda function. Requires the function ARN (Amazon Resource
// Name).
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Lambda's
// API operation UntagResource for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServiceException "ServiceException"
// The AWS Lambda service encountered an internal error.
//
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// The resource (for example, a Lambda function or access policy statement)
// specified in the request does not exist.
//
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// One of the parameters in the request is invalid. For example, if you provided
// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
// API, that AWS Lambda is unable to assume you will get this exception. You
// will also get this exception if you have selected a deprecated runtime, such
// as Node v0.10.42.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UntagResource
func (c *Lambda) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) {
req, out := c.UntagResourceRequest(input)
return out, req.Send()
}
// UntagResourceWithContext is the same as UntagResource with the addition of
// the ability to pass a context and additional request options.
//
// See UntagResource for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Lambda) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) {
req, out := c.UntagResourceRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opUpdateAlias = "UpdateAlias"
// UpdateAliasRequest generates a "aws/request.Request" representing the
// client's request for the UpdateAlias operation. The "output" return
// value will be populated with the request's response once the request complets
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See UpdateAlias for more information on using the UpdateAlias
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the UpdateAliasRequest method.
// req, resp := client.UpdateAliasRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateAlias
func (c *Lambda) UpdateAliasRequest(input *UpdateAliasInput) (req *request.Request, output *AliasConfiguration) {
op := &request.Operation{
Name: opUpdateAlias,
HTTPMethod: "PUT",
HTTPPath: "/2015-03-31/functions/{FunctionName}/aliases/{Name}",
}
if input == nil {
input = &UpdateAliasInput{}
}
output = &AliasConfiguration{}
req = c.newRequest(op, input, output)
return
}
// UpdateAlias API operation for AWS Lambda.
//
// Using this API you can update the function version to which the alias points
// and the alias description. For more information, see Introduction to AWS
// Lambda Aliases (http://docs.aws.amazon.com/lambda/latest/dg/aliases-intro.html).
//
// This requires permission for the lambda:UpdateAlias action.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Lambda's
// API operation UpdateAlias for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServiceException "ServiceException"
// The AWS Lambda service encountered an internal error.
//
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// The resource (for example, a Lambda function or access policy statement)
// specified in the request does not exist.
//
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// One of the parameters in the request is invalid. For example, if you provided
// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
// API, that AWS Lambda is unable to assume you will get this exception. You
// will also get this exception if you have selected a deprecated runtime, such
// as Node v0.10.42.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateAlias
func (c *Lambda) UpdateAlias(input *UpdateAliasInput) (*AliasConfiguration, error) {
req, out := c.UpdateAliasRequest(input)
return out, req.Send()
}
// UpdateAliasWithContext is the same as UpdateAlias with the addition of
// the ability to pass a context and additional request options.
//
// See UpdateAlias for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Lambda) UpdateAliasWithContext(ctx aws.Context, input *UpdateAliasInput, opts ...request.Option) (*AliasConfiguration, error) {
req, out := c.UpdateAliasRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opUpdateEventSourceMapping = "UpdateEventSourceMapping"
// UpdateEventSourceMappingRequest generates a "aws/request.Request" representing the
// client's request for the UpdateEventSourceMapping operation. The "output" return
// value will be populated with the request's response once the request complets
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See UpdateEventSourceMapping for more information on using the UpdateEventSourceMapping
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the UpdateEventSourceMappingRequest method.
// req, resp := client.UpdateEventSourceMappingRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateEventSourceMapping
func (c *Lambda) UpdateEventSourceMappingRequest(input *UpdateEventSourceMappingInput) (req *request.Request, output *EventSourceMappingConfiguration) {
op := &request.Operation{
Name: opUpdateEventSourceMapping,
HTTPMethod: "PUT",
HTTPPath: "/2015-03-31/event-source-mappings/{UUID}",
}
if input == nil {
input = &UpdateEventSourceMappingInput{}
}
output = &EventSourceMappingConfiguration{}
req = c.newRequest(op, input, output)
return
}
// UpdateEventSourceMapping API operation for AWS Lambda.
//
// You can update an event source mapping. This is useful if you want to change
// the parameters of the existing mapping without losing your position in the
// stream. You can change which function will receive the stream records, but
// to change the stream itself, you must create a new mapping.
//
// If you are using the versioning feature, you can update the event source
// mapping to map to a specific Lambda function version or alias as described
// in the FunctionName parameter. For information about the versioning feature,
// see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).
//
// If you disable the event source mapping, AWS Lambda stops polling. If you
// enable again, it will resume polling from the time it had stopped polling,
// so you don't lose processing of any records. However, if you delete event
// source mapping and create it again, it will reset.
//
// This operation requires permission for the lambda:UpdateEventSourceMapping
// action.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Lambda's
// API operation UpdateEventSourceMapping for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServiceException "ServiceException"
// The AWS Lambda service encountered an internal error.
//
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// The resource (for example, a Lambda function or access policy statement)
// specified in the request does not exist.
//
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// One of the parameters in the request is invalid. For example, if you provided
// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
// API, that AWS Lambda is unable to assume you will get this exception. You
// will also get this exception if you have selected a deprecated runtime, such
// as Node v0.10.42.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
//
// * ErrCodeResourceConflictException "ResourceConflictException"
// The resource already exists.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateEventSourceMapping
func (c *Lambda) UpdateEventSourceMapping(input *UpdateEventSourceMappingInput) (*EventSourceMappingConfiguration, error) {
req, out := c.UpdateEventSourceMappingRequest(input)
return out, req.Send()
}
// UpdateEventSourceMappingWithContext is the same as UpdateEventSourceMapping with the addition of
// the ability to pass a context and additional request options.
//
// See UpdateEventSourceMapping for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Lambda) UpdateEventSourceMappingWithContext(ctx aws.Context, input *UpdateEventSourceMappingInput, opts ...request.Option) (*EventSourceMappingConfiguration, error) {
req, out := c.UpdateEventSourceMappingRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opUpdateFunctionCode = "UpdateFunctionCode"
// UpdateFunctionCodeRequest generates a "aws/request.Request" representing the
// client's request for the UpdateFunctionCode operation. The "output" return
// value will be populated with the request's response once the request complets
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See UpdateFunctionCode for more information on using the UpdateFunctionCode
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the UpdateFunctionCodeRequest method.
// req, resp := client.UpdateFunctionCodeRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateFunctionCode
func (c *Lambda) UpdateFunctionCodeRequest(input *UpdateFunctionCodeInput) (req *request.Request, output *FunctionConfiguration) {
op := &request.Operation{
Name: opUpdateFunctionCode,
HTTPMethod: "PUT",
HTTPPath: "/2015-03-31/functions/{FunctionName}/code",
}
if input == nil {
input = &UpdateFunctionCodeInput{}
}
output = &FunctionConfiguration{}
req = c.newRequest(op, input, output)
return
}
// UpdateFunctionCode API operation for AWS Lambda.
//
// Updates the code for the specified Lambda function. This operation must only
// be used on an existing Lambda function and cannot be used to update the function
// configuration.
//
// If you are using the versioning feature, note this API will always update
// the $LATEST version of your Lambda function. For information about the versioning
// feature, see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).
//
// This operation requires permission for the lambda:UpdateFunctionCode action.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Lambda's
// API operation UpdateFunctionCode for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServiceException "ServiceException"
// The AWS Lambda service encountered an internal error.
//
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// The resource (for example, a Lambda function or access policy statement)
// specified in the request does not exist.
//
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// One of the parameters in the request is invalid. For example, if you provided
// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
// API, that AWS Lambda is unable to assume you will get this exception. You
// will also get this exception if you have selected a deprecated runtime, such
// as Node v0.10.42.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
//
// * ErrCodeCodeStorageExceededException "CodeStorageExceededException"
// You have exceeded your maximum total code size per account. Limits (http://docs.aws.amazon.com/lambda/latest/dg/limits.html)
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateFunctionCode
func (c *Lambda) UpdateFunctionCode(input *UpdateFunctionCodeInput) (*FunctionConfiguration, error) {
req, out := c.UpdateFunctionCodeRequest(input)
return out, req.Send()
}
// UpdateFunctionCodeWithContext is the same as UpdateFunctionCode with the addition of
// the ability to pass a context and additional request options.
//
// See UpdateFunctionCode for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Lambda) UpdateFunctionCodeWithContext(ctx aws.Context, input *UpdateFunctionCodeInput, opts ...request.Option) (*FunctionConfiguration, error) {
req, out := c.UpdateFunctionCodeRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opUpdateFunctionConfiguration = "UpdateFunctionConfiguration"
// UpdateFunctionConfigurationRequest generates a "aws/request.Request" representing the
// client's request for the UpdateFunctionConfiguration operation. The "output" return
// value will be populated with the request's response once the request complets
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See UpdateFunctionConfiguration for more information on using the UpdateFunctionConfiguration
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the UpdateFunctionConfigurationRequest method.
// req, resp := client.UpdateFunctionConfigurationRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateFunctionConfiguration
func (c *Lambda) UpdateFunctionConfigurationRequest(input *UpdateFunctionConfigurationInput) (req *request.Request, output *FunctionConfiguration) {
op := &request.Operation{
Name: opUpdateFunctionConfiguration,
HTTPMethod: "PUT",
HTTPPath: "/2015-03-31/functions/{FunctionName}/configuration",
}
if input == nil {
input = &UpdateFunctionConfigurationInput{}
}
output = &FunctionConfiguration{}
req = c.newRequest(op, input, output)
return
}
// UpdateFunctionConfiguration API operation for AWS Lambda.
//
// Updates the configuration parameters for the specified Lambda function by
// using the values provided in the request. You provide only the parameters
// you want to change. This operation must only be used on an existing Lambda
// function and cannot be used to update the function's code.
//
// If you are using the versioning feature, note this API will always update
// the $LATEST version of your Lambda function. For information about the versioning
// feature, see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).
//
// This operation requires permission for the lambda:UpdateFunctionConfiguration
// action.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Lambda's
// API operation UpdateFunctionConfiguration for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServiceException "ServiceException"
// The AWS Lambda service encountered an internal error.
//
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// The resource (for example, a Lambda function or access policy statement)
// specified in the request does not exist.
//
// * ErrCodeInvalidParameterValueException "InvalidParameterValueException"
// One of the parameters in the request is invalid. For example, if you provided
// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
// API, that AWS Lambda is unable to assume you will get this exception. You
// will also get this exception if you have selected a deprecated runtime, such
// as Node v0.10.42.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
//
// * ErrCodeResourceConflictException "ResourceConflictException"
// The resource already exists.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateFunctionConfiguration
func (c *Lambda) UpdateFunctionConfiguration(input *UpdateFunctionConfigurationInput) (*FunctionConfiguration, error) {
req, out := c.UpdateFunctionConfigurationRequest(input)
return out, req.Send()
}
// UpdateFunctionConfigurationWithContext is the same as UpdateFunctionConfiguration with the addition of
// the ability to pass a context and additional request options.
//
// See UpdateFunctionConfiguration for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Lambda) UpdateFunctionConfigurationWithContext(ctx aws.Context, input *UpdateFunctionConfigurationInput, opts ...request.Option) (*FunctionConfiguration, error) {
req, out := c.UpdateFunctionConfigurationRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// Provides limits of code size and concurrency associated with the current
// account and region.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/AccountLimit
type AccountLimit struct {
_ struct{} `type:"structure"`
// Size, in bytes, of code/dependencies that you can zip into a deployment package
// (uncompressed zip/jar size) for uploading. The default limit is 250 MB.
CodeSizeUnzipped *int64 `type:"long"`
// Size, in bytes, of a single zipped code/dependencies package you can upload
// for your Lambda function(.zip/.jar file). Try using Amazon S3 for uploading
// larger files. Default limit is 50 MB.
CodeSizeZipped *int64 `type:"long"`
// Number of simultaneous executions of your function per region. For more information
// or to request a limit increase for concurrent executions, see Lambda Function
// Concurrent Executions (http://docs.aws.amazon.com/lambda/latest/dg/concurrent-executions.html).
// The default limit is 100.
ConcurrentExecutions *int64 `type:"integer"`
// Maximum size, in bytes, of a code package you can upload per region. The
// default size is 75 GB.
TotalCodeSize *int64 `type:"long"`
}
// String returns the string representation
func (s AccountLimit) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s AccountLimit) GoString() string {
return s.String()
}
// SetCodeSizeUnzipped sets the CodeSizeUnzipped field's value.
func (s *AccountLimit) SetCodeSizeUnzipped(v int64) *AccountLimit {
s.CodeSizeUnzipped = &v
return s
}
// SetCodeSizeZipped sets the CodeSizeZipped field's value.
func (s *AccountLimit) SetCodeSizeZipped(v int64) *AccountLimit {
s.CodeSizeZipped = &v
return s
}
// SetConcurrentExecutions sets the ConcurrentExecutions field's value.
func (s *AccountLimit) SetConcurrentExecutions(v int64) *AccountLimit {
s.ConcurrentExecutions = &v
return s
}
// SetTotalCodeSize sets the TotalCodeSize field's value.
func (s *AccountLimit) SetTotalCodeSize(v int64) *AccountLimit {
s.TotalCodeSize = &v
return s
}
// Provides code size usage and function count associated with the current account
// and region.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/AccountUsage
type AccountUsage struct {
_ struct{} `type:"structure"`
// The number of your account's existing functions per region.
FunctionCount *int64 `type:"long"`
// Total size, in bytes, of the account's deployment packages per region.
TotalCodeSize *int64 `type:"long"`
}
// String returns the string representation
func (s AccountUsage) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s AccountUsage) GoString() string {
return s.String()
}
// SetFunctionCount sets the FunctionCount field's value.
func (s *AccountUsage) SetFunctionCount(v int64) *AccountUsage {
s.FunctionCount = &v
return s
}
// SetTotalCodeSize sets the TotalCodeSize field's value.
func (s *AccountUsage) SetTotalCodeSize(v int64) *AccountUsage {
s.TotalCodeSize = &v
return s
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/AddPermissionRequest
type AddPermissionInput struct {
_ struct{} `type:"structure"`
// The AWS Lambda action you want to allow in this statement. Each Lambda action
// is a string starting with lambda: followed by the API name . For example,
// lambda:CreateFunction. You can use wildcard (lambda:*) to grant permission
// for all AWS Lambda actions.
//
// Action is a required field
Action *string `type:"string" required:"true"`
// A unique token that must be supplied by the principal invoking the function.
// This is currently only used for Alexa Smart Home functions.
EventSourceToken *string `type:"string"`
// Name of the Lambda function whose resource policy you are updating by adding
// a new permission.
//
// You can specify a function name (for example, Thumbnail) or you can specify
// Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail).
// AWS Lambda also allows you to specify partial ARN (for example, account-id:Thumbnail).
// Note that the length constraint applies only to the ARN. If you specify only
// the function name, it is limited to 64 characters in length.
//
// FunctionName is a required field
FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
// The principal who is getting this permission. It can be Amazon S3 service
// Principal (s3.amazonaws.com) if you want Amazon S3 to invoke the function,
// an AWS account ID if you are granting cross-account permission, or any valid
// AWS service principal such as sns.amazonaws.com. For example, you might want
// to allow a custom application in another AWS account to push events to AWS
// Lambda by invoking your function.
//
// Principal is a required field
Principal *string `type:"string" required:"true"`
// You can use this optional query parameter to describe a qualified ARN using
// a function version or an alias name. The permission will then apply to the
// specific qualified ARN. For example, if you specify function version 2 as
// the qualifier, then permission applies only when request is made using qualified
// function ARN:
//
// arn:aws:lambda:aws-region:acct-id:function:function-name:2
//
// If you specify an alias name, for example PROD, then the permission is valid
// only for requests made using the alias ARN:
//
// arn:aws:lambda:aws-region:acct-id:function:function-name:PROD
//
// If the qualifier is not specified, the permission is valid only when requests
// is made using unqualified function ARN.
//
// arn:aws:lambda:aws-region:acct-id:function:function-name
Qualifier *string `location:"querystring" locationName:"Qualifier" min:"1" type:"string"`
// This parameter is used for S3 and SES. The AWS account ID (without a hyphen)
// of the source owner. For example, if the SourceArn identifies a bucket, then
// this is the bucket owner's account ID. You can use this additional condition
// to ensure the bucket you specify is owned by a specific account (it is possible
// the bucket owner deleted the bucket and some other AWS account created the
// bucket). You can also use this condition to specify all sources (that is,
// you don't specify the SourceArn) owned by a specific account.
SourceAccount *string `type:"string"`
// This is optional; however, when granting permission to invoke your function,
// you should specify this field with the Amazon Resource Name (ARN) as its
// value. This ensures that only events generated from the specified source
// can invoke the function.
//
// If you add a permission without providing the source ARN, any AWS account
// that creates a mapping to your function ARN can send events to invoke your
// Lambda function.
SourceArn *string `type:"string"`
// A unique statement identifier.
//
// StatementId is a required field
StatementId *string `min:"1" type:"string" required:"true"`
}
// String returns the string representation
func (s AddPermissionInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s AddPermissionInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *AddPermissionInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "AddPermissionInput"}
if s.Action == nil {
invalidParams.Add(request.NewErrParamRequired("Action"))
}
if s.FunctionName == nil {
invalidParams.Add(request.NewErrParamRequired("FunctionName"))
}
if s.FunctionName != nil && len(*s.FunctionName) < 1 {
invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
}
if s.Principal == nil {
invalidParams.Add(request.NewErrParamRequired("Principal"))
}
if s.Qualifier != nil && len(*s.Qualifier) < 1 {
invalidParams.Add(request.NewErrParamMinLen("Qualifier", 1))
}
if s.StatementId == nil {
invalidParams.Add(request.NewErrParamRequired("StatementId"))
}
if s.StatementId != nil && len(*s.StatementId) < 1 {
invalidParams.Add(request.NewErrParamMinLen("StatementId", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetAction sets the Action field's value.
func (s *AddPermissionInput) SetAction(v string) *AddPermissionInput {
s.Action = &v
return s
}
// SetEventSourceToken sets the EventSourceToken field's value.
func (s *AddPermissionInput) SetEventSourceToken(v string) *AddPermissionInput {
s.EventSourceToken = &v
return s
}
// SetFunctionName sets the FunctionName field's value.
func (s *AddPermissionInput) SetFunctionName(v string) *AddPermissionInput {
s.FunctionName = &v
return s
}
// SetPrincipal sets the Principal field's value.
func (s *AddPermissionInput) SetPrincipal(v string) *AddPermissionInput {
s.Principal = &v
return s
}
// SetQualifier sets the Qualifier field's value.
func (s *AddPermissionInput) SetQualifier(v string) *AddPermissionInput {
s.Qualifier = &v
return s
}
// SetSourceAccount sets the SourceAccount field's value.
func (s *AddPermissionInput) SetSourceAccount(v string) *AddPermissionInput {
s.SourceAccount = &v
return s
}
// SetSourceArn sets the SourceArn field's value.
func (s *AddPermissionInput) SetSourceArn(v string) *AddPermissionInput {
s.SourceArn = &v
return s
}
// SetStatementId sets the StatementId field's value.
func (s *AddPermissionInput) SetStatementId(v string) *AddPermissionInput {
s.StatementId = &v
return s
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/AddPermissionResponse
type AddPermissionOutput struct {
_ struct{} `type:"structure"`
// The permission statement you specified in the request. The response returns
// the same as a string using a backslash ("\") as an escape character in the
// JSON.
Statement *string `type:"string"`
}
// String returns the string representation
func (s AddPermissionOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s AddPermissionOutput) GoString() string {
return s.String()
}
// SetStatement sets the Statement field's value.
func (s *AddPermissionOutput) SetStatement(v string) *AddPermissionOutput {
s.Statement = &v
return s
}
// Provides configuration information about a Lambda function version alias.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/AliasConfiguration
type AliasConfiguration struct {
_ struct{} `type:"structure"`
// Lambda function ARN that is qualified using the alias name as the suffix.
// For example, if you create an alias called BETA that points to a helloworld
// function version, the ARN is arn:aws:lambda:aws-regions:acct-id:function:helloworld:BETA.
AliasArn *string `type:"string"`
// Alias description.
Description *string `type:"string"`
// Function version to which the alias points.
FunctionVersion *string `min:"1" type:"string"`
// Alias name.
Name *string `min:"1" type:"string"`
}
// String returns the string representation
func (s AliasConfiguration) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s AliasConfiguration) GoString() string {
return s.String()
}
// SetAliasArn sets the AliasArn field's value.
func (s *AliasConfiguration) SetAliasArn(v string) *AliasConfiguration {
s.AliasArn = &v
return s
}
// SetDescription sets the Description field's value.
func (s *AliasConfiguration) SetDescription(v string) *AliasConfiguration {
s.Description = &v
return s
}
// SetFunctionVersion sets the FunctionVersion field's value.
func (s *AliasConfiguration) SetFunctionVersion(v string) *AliasConfiguration {
s.FunctionVersion = &v
return s
}
// SetName sets the Name field's value.
func (s *AliasConfiguration) SetName(v string) *AliasConfiguration {
s.Name = &v
return s
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/CreateAliasRequest
type CreateAliasInput struct {
_ struct{} `type:"structure"`
// Description of the alias.
Description *string `type:"string"`
// Name of the Lambda function for which you want to create an alias. Note that
// the length constraint applies only to the ARN. If you specify only the function
// name, it is limited to 64 characters in length.
//
// FunctionName is a required field
FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
// Lambda function version for which you are creating the alias.
//
// FunctionVersion is a required field
FunctionVersion *string `min:"1" type:"string" required:"true"`
// Name for the alias you are creating.
//
// Name is a required field
Name *string `min:"1" type:"string" required:"true"`
}
// String returns the string representation
func (s CreateAliasInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreateAliasInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *CreateAliasInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "CreateAliasInput"}
if s.FunctionName == nil {
invalidParams.Add(request.NewErrParamRequired("FunctionName"))
}
if s.FunctionName != nil && len(*s.FunctionName) < 1 {
invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
}
if s.FunctionVersion == nil {
invalidParams.Add(request.NewErrParamRequired("FunctionVersion"))
}
if s.FunctionVersion != nil && len(*s.FunctionVersion) < 1 {
invalidParams.Add(request.NewErrParamMinLen("FunctionVersion", 1))
}
if s.Name == nil {
invalidParams.Add(request.NewErrParamRequired("Name"))
}
if s.Name != nil && len(*s.Name) < 1 {
invalidParams.Add(request.NewErrParamMinLen("Name", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetDescription sets the Description field's value.
func (s *CreateAliasInput) SetDescription(v string) *CreateAliasInput {
s.Description = &v
return s
}
// SetFunctionName sets the FunctionName field's value.
func (s *CreateAliasInput) SetFunctionName(v string) *CreateAliasInput {
s.FunctionName = &v
return s
}
// SetFunctionVersion sets the FunctionVersion field's value.
func (s *CreateAliasInput) SetFunctionVersion(v string) *CreateAliasInput {
s.FunctionVersion = &v
return s
}
// SetName sets the Name field's value.
func (s *CreateAliasInput) SetName(v string) *CreateAliasInput {
s.Name = &v
return s
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/CreateEventSourceMappingRequest
type CreateEventSourceMappingInput struct {
_ struct{} `type:"structure"`
// The largest number of records that AWS Lambda will retrieve from your event
// source at the time of invoking your function. Your function receives an event
// with all the retrieved records. The default is 100 records.
BatchSize *int64 `min:"1" type:"integer"`
// Indicates whether AWS Lambda should begin polling the event source. By default,
// Enabled is true.
Enabled *bool `type:"boolean"`
// The Amazon Resource Name (ARN) of the Amazon Kinesis or the Amazon DynamoDB
// stream that is the event source. Any record added to this stream could cause
// AWS Lambda to invoke your Lambda function, it depends on the BatchSize. AWS
// Lambda POSTs the Amazon Kinesis event, containing records, to your Lambda
// function as JSON.
//
// EventSourceArn is a required field
EventSourceArn *string `type:"string" required:"true"`
// The Lambda function to invoke when AWS Lambda detects an event on the stream.
//
// You can specify the function name (for example, Thumbnail) or you can specify
// Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail).
//
// If you are using versioning, you can also provide a qualified function ARN
// (ARN that is qualified with function version or alias name as suffix). For
// more information about versioning, see AWS Lambda Function Versioning and
// Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html)
//
// AWS Lambda also allows you to specify only the function name with the account
// ID qualifier (for example, account-id:Thumbnail).
//
// Note that the length constraint applies only to the ARN. If you specify only
// the function name, it is limited to 64 characters in length.
//
// FunctionName is a required field
FunctionName *string `min:"1" type:"string" required:"true"`
// The position in the stream where AWS Lambda should start reading. Valid only
// for Kinesis streams. For more information, see ShardIteratorType (http://docs.aws.amazon.com/kinesis/latest/APIReference/API_GetShardIterator.html#Kinesis-GetShardIterator-request-ShardIteratorType)
// in the Amazon Kinesis API Reference.
//
// StartingPosition is a required field
StartingPosition *string `type:"string" required:"true" enum:"EventSourcePosition"`
// The timestamp of the data record from which to start reading. Used with shard
// iterator type (http://docs.aws.amazon.com/kinesis/latest/APIReference/API_GetShardIterator.html#Kinesis-GetShardIterator-request-ShardIteratorType)
// AT_TIMESTAMP. If a record with this exact timestamp does not exist, the iterator
// returned is for the next (later) record. If the timestamp is older than the
// current trim horizon, the iterator returned is for the oldest untrimmed data
// record (TRIM_HORIZON). Valid only for Kinesis streams.
StartingPositionTimestamp *time.Time `type:"timestamp" timestampFormat:"unix"`
}
// String returns the string representation
func (s CreateEventSourceMappingInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreateEventSourceMappingInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *CreateEventSourceMappingInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "CreateEventSourceMappingInput"}
if s.BatchSize != nil && *s.BatchSize < 1 {
invalidParams.Add(request.NewErrParamMinValue("BatchSize", 1))
}
if s.EventSourceArn == nil {
invalidParams.Add(request.NewErrParamRequired("EventSourceArn"))
}
if s.FunctionName == nil {
invalidParams.Add(request.NewErrParamRequired("FunctionName"))
}
if s.FunctionName != nil && len(*s.FunctionName) < 1 {
invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
}
if s.StartingPosition == nil {
invalidParams.Add(request.NewErrParamRequired("StartingPosition"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetBatchSize sets the BatchSize field's value.
func (s *CreateEventSourceMappingInput) SetBatchSize(v int64) *CreateEventSourceMappingInput {
s.BatchSize = &v
return s
}
// SetEnabled sets the Enabled field's value.
func (s *CreateEventSourceMappingInput) SetEnabled(v bool) *CreateEventSourceMappingInput {
s.Enabled = &v
return s
}
// SetEventSourceArn sets the EventSourceArn field's value.
func (s *CreateEventSourceMappingInput) SetEventSourceArn(v string) *CreateEventSourceMappingInput {
s.EventSourceArn = &v
return s
}
// SetFunctionName sets the FunctionName field's value.
func (s *CreateEventSourceMappingInput) SetFunctionName(v string) *CreateEventSourceMappingInput {
s.FunctionName = &v
return s
}
// SetStartingPosition sets the StartingPosition field's value.
func (s *CreateEventSourceMappingInput) SetStartingPosition(v string) *CreateEventSourceMappingInput {
s.StartingPosition = &v
return s
}
// SetStartingPositionTimestamp sets the StartingPositionTimestamp field's value.
func (s *CreateEventSourceMappingInput) SetStartingPositionTimestamp(v time.Time) *CreateEventSourceMappingInput {
s.StartingPositionTimestamp = &v
return s
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/CreateFunctionRequest
type CreateFunctionInput struct {
_ struct{} `type:"structure"`
// The code for the Lambda function.
//
// Code is a required field
Code *FunctionCode `type:"structure" required:"true"`
// The parent object that contains the target ARN (Amazon Resource Name) of
// an Amazon SQS queue or Amazon SNS topic.
DeadLetterConfig *DeadLetterConfig `type:"structure"`
// A short, user-defined function description. Lambda does not use this value.
// Assign a meaningful description as you see fit.
Description *string `type:"string"`
// The parent object that contains your environment's configuration settings.
Environment *Environment `type:"structure"`
// The name you want to assign to the function you are uploading. The function
// names appear in the console and are returned in the ListFunctions API. Function
// names are used to specify functions to other AWS Lambda API operations, such
// as Invoke. Note that the length constraint applies only to the ARN. If you
// specify only the function name, it is limited to 64 characters in length.
//
// FunctionName is a required field
FunctionName *string `min:"1" type:"string" required:"true"`
// The function within your code that Lambda calls to begin execution. For Node.js,
// it is the module-name.export value in your function. For Java, it can be
// package.class-name::handler or package.class-name. For more information,
// see Lambda Function Handler (Java) (http://docs.aws.amazon.com/lambda/latest/dg/java-programming-model-handler-types.html).
//
// Handler is a required field
Handler *string `type:"string" required:"true"`
// The Amazon Resource Name (ARN) of the KMS key used to encrypt your function's
// environment variables. If not provided, AWS Lambda will use a default service
// key.
KMSKeyArn *string `type:"string"`
// The amount of memory, in MB, your Lambda function is given. Lambda uses this
// memory size to infer the amount of CPU and memory allocated to your function.
// Your function use-case determines your CPU and memory requirements. For example,
// a database operation might need less memory compared to an image processing
// function. The default value is 128 MB. The value must be a multiple of 64
// MB.
MemorySize *int64 `min:"128" type:"integer"`
// This boolean parameter can be used to request AWS Lambda to create the Lambda
// function and publish a version as an atomic operation.
Publish *bool `type:"boolean"`
// The Amazon Resource Name (ARN) of the IAM role that Lambda assumes when it
// executes your function to access any other Amazon Web Services (AWS) resources.
// For more information, see AWS Lambda: How it Works (http://docs.aws.amazon.com/lambda/latest/dg/lambda-introduction.html).
//
// Role is a required field
Role *string `type:"string" required:"true"`
// The runtime environment for the Lambda function you are uploading.
//
// To use the Python runtime v3.6, set the value to "python3.6". To use the
// Python runtime v2.7, set the value to "python2.7". To use the Node.js runtime
// v6.10, set the value to "nodejs6.10". To use the Node.js runtime v4.3, set
// the value to "nodejs4.3".
//
// Node v0.10.42 is currently marked as deprecated. You must migrate existing
// functions to the newer Node.js runtime versions available on AWS Lambda (nodejs4.3
// or nodejs6.10) as soon as possible. You can request a one-time extension
// until June 30, 2017 by going to the Lambda console and following the instructions
// provided. Failure to do so will result in an invalid parmaeter error being
// returned. Note that you will have to follow this procedure for each region
// that contains functions written in the Node v0.10.42 runtime.
//
// Runtime is a required field
Runtime *string `type:"string" required:"true" enum:"Runtime"`
// The list of tags (key-value pairs) assigned to the new function.
Tags map[string]*string `type:"map"`
// The function execution time at which Lambda should terminate the function.
// Because the execution time has cost implications, we recommend you set this
// value based on your expected execution time. The default is 3 seconds.
Timeout *int64 `min:"1" type:"integer"`
// The parent object that contains your function's tracing settings.
TracingConfig *TracingConfig `type:"structure"`
// If your Lambda function accesses resources in a VPC, you provide this parameter
// identifying the list of security group IDs and subnet IDs. These must belong
// to the same VPC. You must provide at least one security group and one subnet
// ID.
VpcConfig *VpcConfig `type:"structure"`
}
// String returns the string representation
func (s CreateFunctionInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreateFunctionInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *CreateFunctionInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "CreateFunctionInput"}
if s.Code == nil {
invalidParams.Add(request.NewErrParamRequired("Code"))
}
if s.FunctionName == nil {
invalidParams.Add(request.NewErrParamRequired("FunctionName"))
}
if s.FunctionName != nil && len(*s.FunctionName) < 1 {
invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
}
if s.Handler == nil {
invalidParams.Add(request.NewErrParamRequired("Handler"))
}
if s.MemorySize != nil && *s.MemorySize < 128 {
invalidParams.Add(request.NewErrParamMinValue("MemorySize", 128))
}
if s.Role == nil {
invalidParams.Add(request.NewErrParamRequired("Role"))
}
if s.Runtime == nil {
invalidParams.Add(request.NewErrParamRequired("Runtime"))
}
if s.Timeout != nil && *s.Timeout < 1 {
invalidParams.Add(request.NewErrParamMinValue("Timeout", 1))
}
if s.Code != nil {
if err := s.Code.Validate(); err != nil {
invalidParams.AddNested("Code", err.(request.ErrInvalidParams))
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetCode sets the Code field's value.
func (s *CreateFunctionInput) SetCode(v *FunctionCode) *CreateFunctionInput {
s.Code = v
return s
}
// SetDeadLetterConfig sets the DeadLetterConfig field's value.
func (s *CreateFunctionInput) SetDeadLetterConfig(v *DeadLetterConfig) *CreateFunctionInput {
s.DeadLetterConfig = v
return s
}
// SetDescription sets the Description field's value.
func (s *CreateFunctionInput) SetDescription(v string) *CreateFunctionInput {
s.Description = &v
return s
}
// SetEnvironment sets the Environment field's value.
func (s *CreateFunctionInput) SetEnvironment(v *Environment) *CreateFunctionInput {
s.Environment = v
return s
}
// SetFunctionName sets the FunctionName field's value.
func (s *CreateFunctionInput) SetFunctionName(v string) *CreateFunctionInput {
s.FunctionName = &v
return s
}
// SetHandler sets the Handler field's value.
func (s *CreateFunctionInput) SetHandler(v string) *CreateFunctionInput {
s.Handler = &v
return s
}
// SetKMSKeyArn sets the KMSKeyArn field's value.
func (s *CreateFunctionInput) SetKMSKeyArn(v string) *CreateFunctionInput {
s.KMSKeyArn = &v
return s
}
// SetMemorySize sets the MemorySize field's value.
func (s *CreateFunctionInput) SetMemorySize(v int64) *CreateFunctionInput {
s.MemorySize = &v
return s
}
// SetPublish sets the Publish field's value.
func (s *CreateFunctionInput) SetPublish(v bool) *CreateFunctionInput {
s.Publish = &v
return s
}
// SetRole sets the Role field's value.
func (s *CreateFunctionInput) SetRole(v string) *CreateFunctionInput {
s.Role = &v
return s
}
// SetRuntime sets the Runtime field's value.
func (s *CreateFunctionInput) SetRuntime(v string) *CreateFunctionInput {
s.Runtime = &v
return s
}
// SetTags sets the Tags field's value.
func (s *CreateFunctionInput) SetTags(v map[string]*string) *CreateFunctionInput {
s.Tags = v
return s
}
// SetTimeout sets the Timeout field's value.
func (s *CreateFunctionInput) SetTimeout(v int64) *CreateFunctionInput {
s.Timeout = &v
return s
}
// SetTracingConfig sets the TracingConfig field's value.
func (s *CreateFunctionInput) SetTracingConfig(v *TracingConfig) *CreateFunctionInput {
s.TracingConfig = v
return s
}
// SetVpcConfig sets the VpcConfig field's value.
func (s *CreateFunctionInput) SetVpcConfig(v *VpcConfig) *CreateFunctionInput {
s.VpcConfig = v
return s
}
// The parent object that contains the target ARN (Amazon Resource Name) of
// an Amazon SQS queue or Amazon SNS topic.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeadLetterConfig
type DeadLetterConfig struct {
_ struct{} `type:"structure"`
// The Amazon Resource Name (ARN) of an Amazon SQS queue or Amazon SNS topic
// you specify as your Dead Letter Queue (DLQ).
TargetArn *string `type:"string"`
}
// String returns the string representation
func (s DeadLetterConfig) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeadLetterConfig) GoString() string {
return s.String()
}
// SetTargetArn sets the TargetArn field's value.
func (s *DeadLetterConfig) SetTargetArn(v string) *DeadLetterConfig {
s.TargetArn = &v
return s
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteAliasRequest
type DeleteAliasInput struct {
_ struct{} `type:"structure"`
// The Lambda function name for which the alias is created. Deleting an alias
// does not delete the function version to which it is pointing. Note that the
// length constraint applies only to the ARN. If you specify only the function
// name, it is limited to 64 characters in length.
//
// FunctionName is a required field
FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
// Name of the alias to delete.
//
// Name is a required field
Name *string `location:"uri" locationName:"Name" min:"1" type:"string" required:"true"`
}
// String returns the string representation
func (s DeleteAliasInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteAliasInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DeleteAliasInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DeleteAliasInput"}
if s.FunctionName == nil {
invalidParams.Add(request.NewErrParamRequired("FunctionName"))
}
if s.FunctionName != nil && len(*s.FunctionName) < 1 {
invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
}
if s.Name == nil {
invalidParams.Add(request.NewErrParamRequired("Name"))
}
if s.Name != nil && len(*s.Name) < 1 {
invalidParams.Add(request.NewErrParamMinLen("Name", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetFunctionName sets the FunctionName field's value.
func (s *DeleteAliasInput) SetFunctionName(v string) *DeleteAliasInput {
s.FunctionName = &v
return s
}
// SetName sets the Name field's value.
func (s *DeleteAliasInput) SetName(v string) *DeleteAliasInput {
s.Name = &v
return s
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteAliasOutput
type DeleteAliasOutput struct {
_ struct{} `type:"structure"`
}
// String returns the string representation
func (s DeleteAliasOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteAliasOutput) GoString() string {
return s.String()
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteEventSourceMappingRequest
type DeleteEventSourceMappingInput struct {
_ struct{} `type:"structure"`
// The event source mapping ID.
//
// UUID is a required field
UUID *string `location:"uri" locationName:"UUID" type:"string" required:"true"`
}
// String returns the string representation
func (s DeleteEventSourceMappingInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteEventSourceMappingInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DeleteEventSourceMappingInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DeleteEventSourceMappingInput"}
if s.UUID == nil {
invalidParams.Add(request.NewErrParamRequired("UUID"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetUUID sets the UUID field's value.
func (s *DeleteEventSourceMappingInput) SetUUID(v string) *DeleteEventSourceMappingInput {
s.UUID = &v
return s
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteFunctionRequest
type DeleteFunctionInput struct {
_ struct{} `type:"structure"`
// The Lambda function to delete.
//
// You can specify the function name (for example, Thumbnail) or you can specify
// Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail).
// If you are using versioning, you can also provide a qualified function ARN
// (ARN that is qualified with function version or alias name as suffix). AWS
// Lambda also allows you to specify only the function name with the account
// ID qualifier (for example, account-id:Thumbnail). Note that the length constraint
// applies only to the ARN. If you specify only the function name, it is limited
// to 64 characters in length.
//
// FunctionName is a required field
FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
// Using this optional parameter you can specify a function version (but not
// the $LATEST version) to direct AWS Lambda to delete a specific function version.
// If the function version has one or more aliases pointing to it, you will
// get an error because you cannot have aliases pointing to it. You can delete
// any function version but not the $LATEST, that is, you cannot specify $LATEST
// as the value of this parameter. The $LATEST version can be deleted only when
// you want to delete all the function versions and aliases.
//
// You can only specify a function version, not an alias name, using this parameter.
// You cannot delete a function version using its alias.
//
// If you don't specify this parameter, AWS Lambda will delete the function,
// including all of its versions and aliases.
Qualifier *string `location:"querystring" locationName:"Qualifier" min:"1" type:"string"`
}
// String returns the string representation
func (s DeleteFunctionInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteFunctionInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DeleteFunctionInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DeleteFunctionInput"}
if s.FunctionName == nil {
invalidParams.Add(request.NewErrParamRequired("FunctionName"))
}
if s.FunctionName != nil && len(*s.FunctionName) < 1 {
invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
}
if s.Qualifier != nil && len(*s.Qualifier) < 1 {
invalidParams.Add(request.NewErrParamMinLen("Qualifier", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetFunctionName sets the FunctionName field's value.
func (s *DeleteFunctionInput) SetFunctionName(v string) *DeleteFunctionInput {
s.FunctionName = &v
return s
}
// SetQualifier sets the Qualifier field's value.
func (s *DeleteFunctionInput) SetQualifier(v string) *DeleteFunctionInput {
s.Qualifier = &v
return s
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteFunctionOutput
type DeleteFunctionOutput struct {
_ struct{} `type:"structure"`
}
// String returns the string representation
func (s DeleteFunctionOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteFunctionOutput) GoString() string {
return s.String()
}
// The parent object that contains your environment's configuration settings.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/Environment
type Environment struct {
_ struct{} `type:"structure"`
// The key-value pairs that represent your environment's configuration settings.
Variables map[string]*string `type:"map"`
}
// String returns the string representation
func (s Environment) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s Environment) GoString() string {
return s.String()
}
// SetVariables sets the Variables field's value.
func (s *Environment) SetVariables(v map[string]*string) *Environment {
s.Variables = v
return s
}
// The parent object that contains error information associated with your configuration
// settings.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/EnvironmentError
type EnvironmentError struct {
_ struct{} `type:"structure"`
// The error code returned by the environment error object.
ErrorCode *string `type:"string"`
// The message returned by the environment error object.
Message *string `type:"string"`
}
// String returns the string representation
func (s EnvironmentError) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s EnvironmentError) GoString() string {
return s.String()
}
// SetErrorCode sets the ErrorCode field's value.
func (s *EnvironmentError) SetErrorCode(v string) *EnvironmentError {
s.ErrorCode = &v
return s
}
// SetMessage sets the Message field's value.
func (s *EnvironmentError) SetMessage(v string) *EnvironmentError {
s.Message = &v
return s
}
// The parent object returned that contains your environment's configuration
// settings or any error information associated with your configuration settings.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/EnvironmentResponse
type EnvironmentResponse struct {
_ struct{} `type:"structure"`
// The parent object that contains error information associated with your configuration
// settings.
Error *EnvironmentError `type:"structure"`
// The key-value pairs returned that represent your environment's configuration
// settings or error information.
Variables map[string]*string `type:"map"`
}
// String returns the string representation
func (s EnvironmentResponse) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s EnvironmentResponse) GoString() string {
return s.String()
}
// SetError sets the Error field's value.
func (s *EnvironmentResponse) SetError(v *EnvironmentError) *EnvironmentResponse {
s.Error = v
return s
}
// SetVariables sets the Variables field's value.
func (s *EnvironmentResponse) SetVariables(v map[string]*string) *EnvironmentResponse {
s.Variables = v
return s
}
// Describes mapping between an Amazon Kinesis stream and a Lambda function.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/EventSourceMappingConfiguration
type EventSourceMappingConfiguration struct {
_ struct{} `type:"structure"`
// The largest number of records that AWS Lambda will retrieve from your event
// source at the time of invoking your function. Your function receives an event
// with all the retrieved records.
BatchSize *int64 `min:"1" type:"integer"`
// The Amazon Resource Name (ARN) of the Amazon Kinesis stream that is the source
// of events.
EventSourceArn *string `type:"string"`
// The Lambda function to invoke when AWS Lambda detects an event on the stream.
FunctionArn *string `type:"string"`
// The UTC time string indicating the last time the event mapping was updated.
LastModified *time.Time `type:"timestamp" timestampFormat:"unix"`
// The result of the last AWS Lambda invocation of your Lambda function.
LastProcessingResult *string `type:"string"`
// The state of the event source mapping. It can be Creating, Enabled, Disabled,
// Enabling, Disabling, Updating, or Deleting.
State *string `type:"string"`
// The reason the event source mapping is in its current state. It is either
// user-requested or an AWS Lambda-initiated state transition.
StateTransitionReason *string `type:"string"`
// The AWS Lambda assigned opaque identifier for the mapping.
UUID *string `type:"string"`
}
// String returns the string representation
func (s EventSourceMappingConfiguration) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s EventSourceMappingConfiguration) GoString() string {
return s.String()
}
// SetBatchSize sets the BatchSize field's value.
func (s *EventSourceMappingConfiguration) SetBatchSize(v int64) *EventSourceMappingConfiguration {
s.BatchSize = &v
return s
}
// SetEventSourceArn sets the EventSourceArn field's value.
func (s *EventSourceMappingConfiguration) SetEventSourceArn(v string) *EventSourceMappingConfiguration {
s.EventSourceArn = &v
return s
}
// SetFunctionArn sets the FunctionArn field's value.
func (s *EventSourceMappingConfiguration) SetFunctionArn(v string) *EventSourceMappingConfiguration {
s.FunctionArn = &v
return s
}
// SetLastModified sets the LastModified field's value.
func (s *EventSourceMappingConfiguration) SetLastModified(v time.Time) *EventSourceMappingConfiguration {
s.LastModified = &v
return s
}
// SetLastProcessingResult sets the LastProcessingResult field's value.
func (s *EventSourceMappingConfiguration) SetLastProcessingResult(v string) *EventSourceMappingConfiguration {
s.LastProcessingResult = &v
return s
}
// SetState sets the State field's value.
func (s *EventSourceMappingConfiguration) SetState(v string) *EventSourceMappingConfiguration {
s.State = &v
return s
}
// SetStateTransitionReason sets the StateTransitionReason field's value.
func (s *EventSourceMappingConfiguration) SetStateTransitionReason(v string) *EventSourceMappingConfiguration {
s.StateTransitionReason = &v
return s
}
// SetUUID sets the UUID field's value.
func (s *EventSourceMappingConfiguration) SetUUID(v string) *EventSourceMappingConfiguration {
s.UUID = &v
return s
}
// The code for the Lambda function.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/FunctionCode
type FunctionCode struct {
_ struct{} `type:"structure"`
// Amazon S3 bucket name where the .zip file containing your deployment package
// is stored. This bucket must reside in the same AWS region where you are creating
// the Lambda function.
S3Bucket *string `min:"3" type:"string"`
// The Amazon S3 object (the deployment package) key name you want to upload.
S3Key *string `min:"1" type:"string"`
// The Amazon S3 object (the deployment package) version you want to upload.
S3ObjectVersion *string `min:"1" type:"string"`
// The contents of your zip file containing your deployment package. If you
// are using the web API directly, the contents of the zip file must be base64-encoded.
// If you are using the AWS SDKs or the AWS CLI, the SDKs or CLI will do the
// encoding for you. For more information about creating a .zip file, see Execution
// Permissions (http://docs.aws.amazon.com/lambda/latest/dg/intro-permission-model.html#lambda-intro-execution-role.html)
// in the AWS Lambda Developer Guide.
//
// ZipFile is automatically base64 encoded/decoded by the SDK.
ZipFile []byte `type:"blob"`
}
// String returns the string representation
func (s FunctionCode) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s FunctionCode) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *FunctionCode) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "FunctionCode"}
if s.S3Bucket != nil && len(*s.S3Bucket) < 3 {
invalidParams.Add(request.NewErrParamMinLen("S3Bucket", 3))
}
if s.S3Key != nil && len(*s.S3Key) < 1 {
invalidParams.Add(request.NewErrParamMinLen("S3Key", 1))
}
if s.S3ObjectVersion != nil && len(*s.S3ObjectVersion) < 1 {
invalidParams.Add(request.NewErrParamMinLen("S3ObjectVersion", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetS3Bucket sets the S3Bucket field's value.
func (s *FunctionCode) SetS3Bucket(v string) *FunctionCode {
s.S3Bucket = &v
return s
}
// SetS3Key sets the S3Key field's value.
func (s *FunctionCode) SetS3Key(v string) *FunctionCode {
s.S3Key = &v
return s
}
// SetS3ObjectVersion sets the S3ObjectVersion field's value.
func (s *FunctionCode) SetS3ObjectVersion(v string) *FunctionCode {
s.S3ObjectVersion = &v
return s
}
// SetZipFile sets the ZipFile field's value.
func (s *FunctionCode) SetZipFile(v []byte) *FunctionCode {
s.ZipFile = v
return s
}
// The object for the Lambda function location.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/FunctionCodeLocation
type FunctionCodeLocation struct {
_ struct{} `type:"structure"`
// The presigned URL you can use to download the function's .zip file that you
// previously uploaded. The URL is valid for up to 10 minutes.
Location *string `type:"string"`
// The repository from which you can download the function.
RepositoryType *string `type:"string"`
}
// String returns the string representation
func (s FunctionCodeLocation) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s FunctionCodeLocation) GoString() string {
return s.String()
}
// SetLocation sets the Location field's value.
func (s *FunctionCodeLocation) SetLocation(v string) *FunctionCodeLocation {
s.Location = &v
return s
}
// SetRepositoryType sets the RepositoryType field's value.
func (s *FunctionCodeLocation) SetRepositoryType(v string) *FunctionCodeLocation {
s.RepositoryType = &v
return s
}
// A complex type that describes function metadata.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/FunctionConfiguration
type FunctionConfiguration struct {
_ struct{} `type:"structure"`
// It is the SHA256 hash of your function deployment package.
CodeSha256 *string `type:"string"`
// The size, in bytes, of the function .zip file you uploaded.
CodeSize *int64 `type:"long"`
// The parent object that contains the target ARN (Amazon Resource Name) of
// an Amazon SQS queue or Amazon SNS topic.
DeadLetterConfig *DeadLetterConfig `type:"structure"`
// The user-provided description.
Description *string `type:"string"`
// The parent object that contains your environment's configuration settings.
Environment *EnvironmentResponse `type:"structure"`
// The Amazon Resource Name (ARN) assigned to the function.
FunctionArn *string `type:"string"`
// The name of the function. Note that the length constraint applies only to
// the ARN. If you specify only the function name, it is limited to 64 characters
// in length.
FunctionName *string `min:"1" type:"string"`
// The function Lambda calls to begin executing your function.
Handler *string `type:"string"`
// The Amazon Resource Name (ARN) of the KMS key used to encrypt your function's
// environment variables. If empty, it means you are using the AWS Lambda default
// service key.
KMSKeyArn *string `type:"string"`
// The time stamp of the last time you updated the function. The time stamp
// is conveyed as a string complying with ISO-8601 in this way YYYY-MM-DDThh:mm:ssTZD
// (e.g., 1997-07-16T19:20:30+01:00). For more information, see Date and Time
// Formats (https://www.w3.org/TR/NOTE-datetime).
LastModified *string `type:"string"`
// Returns the ARN (Amazon Resource Name) of the master function.
MasterArn *string `type:"string"`
// The memory size, in MB, you configured for the function. Must be a multiple
// of 64 MB.
MemorySize *int64 `min:"128" type:"integer"`
// The Amazon Resource Name (ARN) of the IAM role that Lambda assumes when it
// executes your function to access any other Amazon Web Services (AWS) resources.
Role *string `type:"string"`
// The runtime environment for the Lambda function.
Runtime *string `type:"string" enum:"Runtime"`
// The function execution time at which Lambda should terminate the function.
// Because the execution time has cost implications, we recommend you set this
// value based on your expected execution time. The default is 3 seconds.
Timeout *int64 `min:"1" type:"integer"`
// The parent object that contains your function's tracing settings.
TracingConfig *TracingConfigResponse `type:"structure"`
// The version of the Lambda function.
Version *string `min:"1" type:"string"`
// VPC configuration associated with your Lambda function.
VpcConfig *VpcConfigResponse `type:"structure"`
}
// String returns the string representation
func (s FunctionConfiguration) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s FunctionConfiguration) GoString() string {
return s.String()
}
// SetCodeSha256 sets the CodeSha256 field's value.
func (s *FunctionConfiguration) SetCodeSha256(v string) *FunctionConfiguration {
s.CodeSha256 = &v
return s
}
// SetCodeSize sets the CodeSize field's value.
func (s *FunctionConfiguration) SetCodeSize(v int64) *FunctionConfiguration {
s.CodeSize = &v
return s
}
// SetDeadLetterConfig sets the DeadLetterConfig field's value.
func (s *FunctionConfiguration) SetDeadLetterConfig(v *DeadLetterConfig) *FunctionConfiguration {
s.DeadLetterConfig = v
return s
}
// SetDescription sets the Description field's value.
func (s *FunctionConfiguration) SetDescription(v string) *FunctionConfiguration {
s.Description = &v
return s
}
// SetEnvironment sets the Environment field's value.
func (s *FunctionConfiguration) SetEnvironment(v *EnvironmentResponse) *FunctionConfiguration {
s.Environment = v
return s
}
// SetFunctionArn sets the FunctionArn field's value.
func (s *FunctionConfiguration) SetFunctionArn(v string) *FunctionConfiguration {
s.FunctionArn = &v
return s
}
// SetFunctionName sets the FunctionName field's value.
func (s *FunctionConfiguration) SetFunctionName(v string) *FunctionConfiguration {
s.FunctionName = &v
return s
}
// SetHandler sets the Handler field's value.
func (s *FunctionConfiguration) SetHandler(v string) *FunctionConfiguration {
s.Handler = &v
return s
}
// SetKMSKeyArn sets the KMSKeyArn field's value.
func (s *FunctionConfiguration) SetKMSKeyArn(v string) *FunctionConfiguration {
s.KMSKeyArn = &v
return s
}
// SetLastModified sets the LastModified field's value.
func (s *FunctionConfiguration) SetLastModified(v string) *FunctionConfiguration {
s.LastModified = &v
return s
}
// SetMasterArn sets the MasterArn field's value.
func (s *FunctionConfiguration) SetMasterArn(v string) *FunctionConfiguration {
s.MasterArn = &v
return s
}
// SetMemorySize sets the MemorySize field's value.
func (s *FunctionConfiguration) SetMemorySize(v int64) *FunctionConfiguration {
s.MemorySize = &v
return s
}
// SetRole sets the Role field's value.
func (s *FunctionConfiguration) SetRole(v string) *FunctionConfiguration {
s.Role = &v
return s
}
// SetRuntime sets the Runtime field's value.
func (s *FunctionConfiguration) SetRuntime(v string) *FunctionConfiguration {
s.Runtime = &v
return s
}
// SetTimeout sets the Timeout field's value.
func (s *FunctionConfiguration) SetTimeout(v int64) *FunctionConfiguration {
s.Timeout = &v
return s
}
// SetTracingConfig sets the TracingConfig field's value.
func (s *FunctionConfiguration) SetTracingConfig(v *TracingConfigResponse) *FunctionConfiguration {
s.TracingConfig = v
return s
}
// SetVersion sets the Version field's value.
func (s *FunctionConfiguration) SetVersion(v string) *FunctionConfiguration {
s.Version = &v
return s
}
// SetVpcConfig sets the VpcConfig field's value.
func (s *FunctionConfiguration) SetVpcConfig(v *VpcConfigResponse) *FunctionConfiguration {
s.VpcConfig = v
return s
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetAccountSettingsRequest
type GetAccountSettingsInput struct {
_ struct{} `type:"structure"`
}
// String returns the string representation
func (s GetAccountSettingsInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetAccountSettingsInput) GoString() string {
return s.String()
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetAccountSettingsResponse
type GetAccountSettingsOutput struct {
_ struct{} `type:"structure"`
// Provides limits of code size and concurrency associated with the current
// account and region.
AccountLimit *AccountLimit `type:"structure"`
// Provides code size usage and function count associated with the current account
// and region.
AccountUsage *AccountUsage `type:"structure"`
}
// String returns the string representation
func (s GetAccountSettingsOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetAccountSettingsOutput) GoString() string {
return s.String()
}
// SetAccountLimit sets the AccountLimit field's value.
func (s *GetAccountSettingsOutput) SetAccountLimit(v *AccountLimit) *GetAccountSettingsOutput {
s.AccountLimit = v
return s
}
// SetAccountUsage sets the AccountUsage field's value.
func (s *GetAccountSettingsOutput) SetAccountUsage(v *AccountUsage) *GetAccountSettingsOutput {
s.AccountUsage = v
return s
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetAliasRequest
type GetAliasInput struct {
_ struct{} `type:"structure"`
// Function name for which the alias is created. An alias is a subresource that
// exists only in the context of an existing Lambda function so you must specify
// the function name. Note that the length constraint applies only to the ARN.
// If you specify only the function name, it is limited to 64 characters in
// length.
//
// FunctionName is a required field
FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
// Name of the alias for which you want to retrieve information.
//
// Name is a required field
Name *string `location:"uri" locationName:"Name" min:"1" type:"string" required:"true"`
}
// String returns the string representation
func (s GetAliasInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetAliasInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *GetAliasInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "GetAliasInput"}
if s.FunctionName == nil {
invalidParams.Add(request.NewErrParamRequired("FunctionName"))
}
if s.FunctionName != nil && len(*s.FunctionName) < 1 {
invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
}
if s.Name == nil {
invalidParams.Add(request.NewErrParamRequired("Name"))
}
if s.Name != nil && len(*s.Name) < 1 {
invalidParams.Add(request.NewErrParamMinLen("Name", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetFunctionName sets the FunctionName field's value.
func (s *GetAliasInput) SetFunctionName(v string) *GetAliasInput {
s.FunctionName = &v
return s
}
// SetName sets the Name field's value.
func (s *GetAliasInput) SetName(v string) *GetAliasInput {
s.Name = &v
return s
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetEventSourceMappingRequest
type GetEventSourceMappingInput struct {
_ struct{} `type:"structure"`
// The AWS Lambda assigned ID of the event source mapping.
//
// UUID is a required field
UUID *string `location:"uri" locationName:"UUID" type:"string" required:"true"`
}
// String returns the string representation
func (s GetEventSourceMappingInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetEventSourceMappingInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *GetEventSourceMappingInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "GetEventSourceMappingInput"}
if s.UUID == nil {
invalidParams.Add(request.NewErrParamRequired("UUID"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetUUID sets the UUID field's value.
func (s *GetEventSourceMappingInput) SetUUID(v string) *GetEventSourceMappingInput {
s.UUID = &v
return s
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetFunctionConfigurationRequest
type GetFunctionConfigurationInput struct {
_ struct{} `type:"structure"`
// The name of the Lambda function for which you want to retrieve the configuration
// information.
//
// You can specify a function name (for example, Thumbnail) or you can specify
// Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail).
// AWS Lambda also allows you to specify a partial ARN (for example, account-id:Thumbnail).
// Note that the length constraint applies only to the ARN. If you specify only
// the function name, it is limited to 64 characters in length.
//
// FunctionName is a required field
FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
// Using this optional parameter you can specify a function version or an alias
// name. If you specify function version, the API uses qualified function ARN
// and returns information about the specific function version. If you specify
// an alias name, the API uses the alias ARN and returns information about the
// function version to which the alias points.
//
// If you don't specify this parameter, the API uses unqualified function ARN,
// and returns information about the $LATEST function version.
Qualifier *string `location:"querystring" locationName:"Qualifier" min:"1" type:"string"`
}
// String returns the string representation
func (s GetFunctionConfigurationInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetFunctionConfigurationInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *GetFunctionConfigurationInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "GetFunctionConfigurationInput"}
if s.FunctionName == nil {
invalidParams.Add(request.NewErrParamRequired("FunctionName"))
}
if s.FunctionName != nil && len(*s.FunctionName) < 1 {
invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
}
if s.Qualifier != nil && len(*s.Qualifier) < 1 {
invalidParams.Add(request.NewErrParamMinLen("Qualifier", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetFunctionName sets the FunctionName field's value.
func (s *GetFunctionConfigurationInput) SetFunctionName(v string) *GetFunctionConfigurationInput {
s.FunctionName = &v
return s
}
// SetQualifier sets the Qualifier field's value.
func (s *GetFunctionConfigurationInput) SetQualifier(v string) *GetFunctionConfigurationInput {
s.Qualifier = &v
return s
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetFunctionRequest
type GetFunctionInput struct {
_ struct{} `type:"structure"`
// The Lambda function name.
//
// You can specify a function name (for example, Thumbnail) or you can specify
// Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail).
// AWS Lambda also allows you to specify a partial ARN (for example, account-id:Thumbnail).
// Note that the length constraint applies only to the ARN. If you specify only
// the function name, it is limited to 64 characters in length.
//
// FunctionName is a required field
FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
// Using this optional parameter to specify a function version or an alias name.
// If you specify function version, the API uses qualified function ARN for
// the request and returns information about the specific Lambda function version.
// If you specify an alias name, the API uses the alias ARN and returns information
// about the function version to which the alias points. If you don't provide
// this parameter, the API uses unqualified function ARN and returns information
// about the $LATEST version of the Lambda function.
Qualifier *string `location:"querystring" locationName:"Qualifier" min:"1" type:"string"`
}
// String returns the string representation
func (s GetFunctionInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetFunctionInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *GetFunctionInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "GetFunctionInput"}
if s.FunctionName == nil {
invalidParams.Add(request.NewErrParamRequired("FunctionName"))
}
if s.FunctionName != nil && len(*s.FunctionName) < 1 {
invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
}
if s.Qualifier != nil && len(*s.Qualifier) < 1 {
invalidParams.Add(request.NewErrParamMinLen("Qualifier", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetFunctionName sets the FunctionName field's value.
func (s *GetFunctionInput) SetFunctionName(v string) *GetFunctionInput {
s.FunctionName = &v
return s
}
// SetQualifier sets the Qualifier field's value.
func (s *GetFunctionInput) SetQualifier(v string) *GetFunctionInput {
s.Qualifier = &v
return s
}
// This response contains the object for the Lambda function location (see FunctionCodeLocation.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetFunctionResponse
type GetFunctionOutput struct {
_ struct{} `type:"structure"`
// The object for the Lambda function location.
Code *FunctionCodeLocation `type:"structure"`
// A complex type that describes function metadata.
Configuration *FunctionConfiguration `type:"structure"`
// Returns the list of tags associated with the function.
Tags map[string]*string `type:"map"`
}
// String returns the string representation
func (s GetFunctionOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetFunctionOutput) GoString() string {
return s.String()
}
// SetCode sets the Code field's value.
func (s *GetFunctionOutput) SetCode(v *FunctionCodeLocation) *GetFunctionOutput {
s.Code = v
return s
}
// SetConfiguration sets the Configuration field's value.
func (s *GetFunctionOutput) SetConfiguration(v *FunctionConfiguration) *GetFunctionOutput {
s.Configuration = v
return s
}
// SetTags sets the Tags field's value.
func (s *GetFunctionOutput) SetTags(v map[string]*string) *GetFunctionOutput {
s.Tags = v
return s
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetPolicyRequest
type GetPolicyInput struct {
_ struct{} `type:"structure"`
// Function name whose resource policy you want to retrieve.
//
// You can specify the function name (for example, Thumbnail) or you can specify
// Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail).
// If you are using versioning, you can also provide a qualified function ARN
// (ARN that is qualified with function version or alias name as suffix). AWS
// Lambda also allows you to specify only the function name with the account
// ID qualifier (for example, account-id:Thumbnail). Note that the length constraint
// applies only to the ARN. If you specify only the function name, it is limited
// to 64 characters in length.
//
// FunctionName is a required field
FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
// You can specify this optional query parameter to specify a function version
// or an alias name in which case this API will return all permissions associated
// with the specific qualified ARN. If you don't provide this parameter, the
// API will return permissions that apply to the unqualified function ARN.
Qualifier *string `location:"querystring" locationName:"Qualifier" min:"1" type:"string"`
}
// String returns the string representation
func (s GetPolicyInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetPolicyInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *GetPolicyInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "GetPolicyInput"}
if s.FunctionName == nil {
invalidParams.Add(request.NewErrParamRequired("FunctionName"))
}
if s.FunctionName != nil && len(*s.FunctionName) < 1 {
invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
}
if s.Qualifier != nil && len(*s.Qualifier) < 1 {
invalidParams.Add(request.NewErrParamMinLen("Qualifier", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetFunctionName sets the FunctionName field's value.
func (s *GetPolicyInput) SetFunctionName(v string) *GetPolicyInput {
s.FunctionName = &v
return s
}
// SetQualifier sets the Qualifier field's value.
func (s *GetPolicyInput) SetQualifier(v string) *GetPolicyInput {
s.Qualifier = &v
return s
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetPolicyResponse
type GetPolicyOutput struct {
_ struct{} `type:"structure"`
// The resource policy associated with the specified function. The response
// returns the same as a string using a backslash ("\") as an escape character
// in the JSON.
Policy *string `type:"string"`
}
// String returns the string representation
func (s GetPolicyOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetPolicyOutput) GoString() string {
return s.String()
}
// SetPolicy sets the Policy field's value.
func (s *GetPolicyOutput) SetPolicy(v string) *GetPolicyOutput {
s.Policy = &v
return s
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/InvokeAsyncRequest
type InvokeAsyncInput struct {
_ struct{} `deprecated:"true" type:"structure" payload:"InvokeArgs"`
// The Lambda function name. Note that the length constraint applies only to
// the ARN. If you specify only the function name, it is limited to 64 characters
// in length.
//
// FunctionName is a required field
FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
// JSON that you want to provide to your Lambda function as input.
//
// InvokeArgs is a required field
InvokeArgs io.ReadSeeker `type:"blob" required:"true"`
}
// String returns the string representation
func (s InvokeAsyncInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s InvokeAsyncInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *InvokeAsyncInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "InvokeAsyncInput"}
if s.FunctionName == nil {
invalidParams.Add(request.NewErrParamRequired("FunctionName"))
}
if s.FunctionName != nil && len(*s.FunctionName) < 1 {
invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
}
if s.InvokeArgs == nil {
invalidParams.Add(request.NewErrParamRequired("InvokeArgs"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetFunctionName sets the FunctionName field's value.
func (s *InvokeAsyncInput) SetFunctionName(v string) *InvokeAsyncInput {
s.FunctionName = &v
return s
}
// SetInvokeArgs sets the InvokeArgs field's value.
func (s *InvokeAsyncInput) SetInvokeArgs(v io.ReadSeeker) *InvokeAsyncInput {
s.InvokeArgs = v
return s
}
// Upon success, it returns empty response. Otherwise, throws an exception.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/InvokeAsyncResponse
type InvokeAsyncOutput struct {
_ struct{} `deprecated:"true" type:"structure"`
// It will be 202 upon success.
Status *int64 `location:"statusCode" type:"integer"`
}
// String returns the string representation
func (s InvokeAsyncOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s InvokeAsyncOutput) GoString() string {
return s.String()
}
// SetStatus sets the Status field's value.
func (s *InvokeAsyncOutput) SetStatus(v int64) *InvokeAsyncOutput {
s.Status = &v
return s
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/InvocationRequest
type InvokeInput struct {
_ struct{} `type:"structure" payload:"Payload"`
// Using the ClientContext you can pass client-specific information to the Lambda
// function you are invoking. You can then process the client information in
// your Lambda function as you choose through the context variable. For an example
// of a ClientContext JSON, see PutEvents (http://docs.aws.amazon.com/mobileanalytics/latest/ug/PutEvents.html)
// in the Amazon Mobile Analytics API Reference and User Guide.
//
// The ClientContext JSON must be base64-encoded.
ClientContext *string `location:"header" locationName:"X-Amz-Client-Context" type:"string"`
// The Lambda function name.
//
// You can specify a function name (for example, Thumbnail) or you can specify
// Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail).
// AWS Lambda also allows you to specify a partial ARN (for example, account-id:Thumbnail).
// Note that the length constraint applies only to the ARN. If you specify only
// the function name, it is limited to 64 characters in length.
//
// FunctionName is a required field
FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
// By default, the Invoke API assumes RequestResponse invocation type. You can
// optionally request asynchronous execution by specifying Event as the InvocationType.
// You can also use this parameter to request AWS Lambda to not execute the
// function but do some verification, such as if the caller is authorized to
// invoke the function and if the inputs are valid. You request this by specifying
// DryRun as the InvocationType. This is useful in a cross-account scenario
// when you want to verify access to a function without running it.
InvocationType *string `location:"header" locationName:"X-Amz-Invocation-Type" type:"string" enum:"InvocationType"`
// You can set this optional parameter to Tail in the request only if you specify
// the InvocationType parameter with value RequestResponse. In this case, AWS
// Lambda returns the base64-encoded last 4 KB of log data produced by your
// Lambda function in the x-amz-log-result header.
LogType *string `location:"header" locationName:"X-Amz-Log-Type" type:"string" enum:"LogType"`
// JSON that you want to provide to your Lambda function as input.
Payload []byte `type:"blob"`
// You can use this optional parameter to specify a Lambda function version
// or alias name. If you specify a function version, the API uses the qualified
// function ARN to invoke a specific Lambda function. If you specify an alias
// name, the API uses the alias ARN to invoke the Lambda function version to
// which the alias points.
//
// If you don't provide this parameter, then the API uses unqualified function
// ARN which results in invocation of the $LATEST version.
Qualifier *string `location:"querystring" locationName:"Qualifier" min:"1" type:"string"`
}
// String returns the string representation
func (s InvokeInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s InvokeInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *InvokeInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "InvokeInput"}
if s.FunctionName == nil {
invalidParams.Add(request.NewErrParamRequired("FunctionName"))
}
if s.FunctionName != nil && len(*s.FunctionName) < 1 {
invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
}
if s.Qualifier != nil && len(*s.Qualifier) < 1 {
invalidParams.Add(request.NewErrParamMinLen("Qualifier", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetClientContext sets the ClientContext field's value.
func (s *InvokeInput) SetClientContext(v string) *InvokeInput {
s.ClientContext = &v
return s
}
// SetFunctionName sets the FunctionName field's value.
func (s *InvokeInput) SetFunctionName(v string) *InvokeInput {
s.FunctionName = &v
return s
}
// SetInvocationType sets the InvocationType field's value.
func (s *InvokeInput) SetInvocationType(v string) *InvokeInput {
s.InvocationType = &v
return s
}
// SetLogType sets the LogType field's value.
func (s *InvokeInput) SetLogType(v string) *InvokeInput {
s.LogType = &v
return s
}
// SetPayload sets the Payload field's value.
func (s *InvokeInput) SetPayload(v []byte) *InvokeInput {
s.Payload = v
return s
}
// SetQualifier sets the Qualifier field's value.
func (s *InvokeInput) SetQualifier(v string) *InvokeInput {
s.Qualifier = &v
return s
}
// Upon success, returns an empty response. Otherwise, throws an exception.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/InvocationResponse
type InvokeOutput struct {
_ struct{} `type:"structure" payload:"Payload"`
// Indicates whether an error occurred while executing the Lambda function.
// If an error occurred this field will have one of two values; Handled or Unhandled.
// Handled errors are errors that are reported by the function while the Unhandled
// errors are those detected and reported by AWS Lambda. Unhandled errors include
// out of memory errors and function timeouts. For information about how to
// report an Handled error, see Programming Model (http://docs.aws.amazon.com/lambda/latest/dg/programming-model.html).
FunctionError *string `location:"header" locationName:"X-Amz-Function-Error" type:"string"`
// It is the base64-encoded logs for the Lambda function invocation. This is
// present only if the invocation type is RequestResponse and the logs were
// requested.
LogResult *string `location:"header" locationName:"X-Amz-Log-Result" type:"string"`
// It is the JSON representation of the object returned by the Lambda function.
// This is present only if the invocation type is RequestResponse.
//
// In the event of a function error this field contains a message describing
// the error. For the Handled errors the Lambda function will report this message.
// For Unhandled errors AWS Lambda reports the message.
Payload []byte `type:"blob"`
// The HTTP status code will be in the 200 range for successful request. For
// the RequestResponse invocation type this status code will be 200. For the
// Event invocation type this status code will be 202. For the DryRun invocation
// type the status code will be 204.
StatusCode *int64 `location:"statusCode" type:"integer"`
}
// String returns the string representation
func (s InvokeOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s InvokeOutput) GoString() string {
return s.String()
}
// SetFunctionError sets the FunctionError field's value.
func (s *InvokeOutput) SetFunctionError(v string) *InvokeOutput {
s.FunctionError = &v
return s
}
// SetLogResult sets the LogResult field's value.
func (s *InvokeOutput) SetLogResult(v string) *InvokeOutput {
s.LogResult = &v
return s
}
// SetPayload sets the Payload field's value.
func (s *InvokeOutput) SetPayload(v []byte) *InvokeOutput {
s.Payload = v
return s
}
// SetStatusCode sets the StatusCode field's value.
func (s *InvokeOutput) SetStatusCode(v int64) *InvokeOutput {
s.StatusCode = &v
return s
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListAliasesRequest
type ListAliasesInput struct {
_ struct{} `type:"structure"`
// Lambda function name for which the alias is created. Note that the length
// constraint applies only to the ARN. If you specify only the function name,
// it is limited to 64 characters in length.
//
// FunctionName is a required field
FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
// If you specify this optional parameter, the API returns only the aliases
// that are pointing to the specific Lambda function version, otherwise the
// API returns all of the aliases created for the Lambda function.
FunctionVersion *string `location:"querystring" locationName:"FunctionVersion" min:"1" type:"string"`
// Optional string. An opaque pagination token returned from a previous ListAliases
// operation. If present, indicates where to continue the listing.
Marker *string `location:"querystring" locationName:"Marker" type:"string"`
// Optional integer. Specifies the maximum number of aliases to return in response.
// This parameter value must be greater than 0.
MaxItems *int64 `location:"querystring" locationName:"MaxItems" min:"1" type:"integer"`
}
// String returns the string representation
func (s ListAliasesInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListAliasesInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *ListAliasesInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "ListAliasesInput"}
if s.FunctionName == nil {
invalidParams.Add(request.NewErrParamRequired("FunctionName"))
}
if s.FunctionName != nil && len(*s.FunctionName) < 1 {
invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
}
if s.FunctionVersion != nil && len(*s.FunctionVersion) < 1 {
invalidParams.Add(request.NewErrParamMinLen("FunctionVersion", 1))
}
if s.MaxItems != nil && *s.MaxItems < 1 {
invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetFunctionName sets the FunctionName field's value.
func (s *ListAliasesInput) SetFunctionName(v string) *ListAliasesInput {
s.FunctionName = &v
return s
}
// SetFunctionVersion sets the FunctionVersion field's value.
func (s *ListAliasesInput) SetFunctionVersion(v string) *ListAliasesInput {
s.FunctionVersion = &v
return s
}
// SetMarker sets the Marker field's value.
func (s *ListAliasesInput) SetMarker(v string) *ListAliasesInput {
s.Marker = &v
return s
}
// SetMaxItems sets the MaxItems field's value.
func (s *ListAliasesInput) SetMaxItems(v int64) *ListAliasesInput {
s.MaxItems = &v
return s
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListAliasesResponse
type ListAliasesOutput struct {
_ struct{} `type:"structure"`
// A list of aliases.
Aliases []*AliasConfiguration `type:"list"`
// A string, present if there are more aliases.
NextMarker *string `type:"string"`
}
// String returns the string representation
func (s ListAliasesOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListAliasesOutput) GoString() string {
return s.String()
}
// SetAliases sets the Aliases field's value.
func (s *ListAliasesOutput) SetAliases(v []*AliasConfiguration) *ListAliasesOutput {
s.Aliases = v
return s
}
// SetNextMarker sets the NextMarker field's value.
func (s *ListAliasesOutput) SetNextMarker(v string) *ListAliasesOutput {
s.NextMarker = &v
return s
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListEventSourceMappingsRequest
type ListEventSourceMappingsInput struct {
_ struct{} `type:"structure"`
// The Amazon Resource Name (ARN) of the Amazon Kinesis stream. (This parameter
// is optional.)
EventSourceArn *string `location:"querystring" locationName:"EventSourceArn" type:"string"`
// The name of the Lambda function.
//
// You can specify the function name (for example, Thumbnail) or you can specify
// Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail).
// If you are using versioning, you can also provide a qualified function ARN
// (ARN that is qualified with function version or alias name as suffix). AWS
// Lambda also allows you to specify only the function name with the account
// ID qualifier (for example, account-id:Thumbnail). Note that the length constraint
// applies only to the ARN. If you specify only the function name, it is limited
// to 64 characters in length.
FunctionName *string `location:"querystring" locationName:"FunctionName" min:"1" type:"string"`
// Optional string. An opaque pagination token returned from a previous ListEventSourceMappings
// operation. If present, specifies to continue the list from where the returning
// call left off.
Marker *string `location:"querystring" locationName:"Marker" type:"string"`
// Optional integer. Specifies the maximum number of event sources to return
// in response. This value must be greater than 0.
MaxItems *int64 `location:"querystring" locationName:"MaxItems" min:"1" type:"integer"`
}
// String returns the string representation
func (s ListEventSourceMappingsInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListEventSourceMappingsInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *ListEventSourceMappingsInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "ListEventSourceMappingsInput"}
if s.FunctionName != nil && len(*s.FunctionName) < 1 {
invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
}
if s.MaxItems != nil && *s.MaxItems < 1 {
invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetEventSourceArn sets the EventSourceArn field's value.
func (s *ListEventSourceMappingsInput) SetEventSourceArn(v string) *ListEventSourceMappingsInput {
s.EventSourceArn = &v
return s
}
// SetFunctionName sets the FunctionName field's value.
func (s *ListEventSourceMappingsInput) SetFunctionName(v string) *ListEventSourceMappingsInput {
s.FunctionName = &v
return s
}
// SetMarker sets the Marker field's value.
func (s *ListEventSourceMappingsInput) SetMarker(v string) *ListEventSourceMappingsInput {
s.Marker = &v
return s
}
// SetMaxItems sets the MaxItems field's value.
func (s *ListEventSourceMappingsInput) SetMaxItems(v int64) *ListEventSourceMappingsInput {
s.MaxItems = &v
return s
}
// Contains a list of event sources (see EventSourceMappingConfiguration)
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListEventSourceMappingsResponse
type ListEventSourceMappingsOutput struct {
_ struct{} `type:"structure"`
// An array of EventSourceMappingConfiguration objects.
EventSourceMappings []*EventSourceMappingConfiguration `type:"list"`
// A string, present if there are more event source mappings.
NextMarker *string `type:"string"`
}
// String returns the string representation
func (s ListEventSourceMappingsOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListEventSourceMappingsOutput) GoString() string {
return s.String()
}
// SetEventSourceMappings sets the EventSourceMappings field's value.
func (s *ListEventSourceMappingsOutput) SetEventSourceMappings(v []*EventSourceMappingConfiguration) *ListEventSourceMappingsOutput {
s.EventSourceMappings = v
return s
}
// SetNextMarker sets the NextMarker field's value.
func (s *ListEventSourceMappingsOutput) SetNextMarker(v string) *ListEventSourceMappingsOutput {
s.NextMarker = &v
return s
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListFunctionsRequest
type ListFunctionsInput struct {
_ struct{} `type:"structure"`
// Optional string. If not specified, only the unqualified functions ARNs (Amazon
// Resource Names) will be returned.
//
// Valid value:
//
// ALL _ Will return all versions, including $LATEST which will have fully qualified
// ARNs (Amazon Resource Names).
FunctionVersion *string `location:"querystring" locationName:"FunctionVersion" type:"string" enum:"FunctionVersion"`
// Optional string. An opaque pagination token returned from a previous ListFunctions
// operation. If present, indicates where to continue the listing.
Marker *string `location:"querystring" locationName:"Marker" type:"string"`
// Optional string. If not specified, will return only regular function versions
// (i.e., non-replicated versions).
//
// Valid values are:
//
// The region from which the functions are replicated. For example, if you specify
// us-east-1, only functions replicated from that region will be returned.
//
// ALL _ Will return all functions from any region. If specified, you also must
// specify a valid FunctionVersion parameter.
MasterRegion *string `location:"querystring" locationName:"MasterRegion" type:"string"`
// Optional integer. Specifies the maximum number of AWS Lambda functions to
// return in response. This parameter value must be greater than 0.
MaxItems *int64 `location:"querystring" locationName:"MaxItems" min:"1" type:"integer"`
}
// String returns the string representation
func (s ListFunctionsInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListFunctionsInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *ListFunctionsInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "ListFunctionsInput"}
if s.MaxItems != nil && *s.MaxItems < 1 {
invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetFunctionVersion sets the FunctionVersion field's value.
func (s *ListFunctionsInput) SetFunctionVersion(v string) *ListFunctionsInput {
s.FunctionVersion = &v
return s
}
// SetMarker sets the Marker field's value.
func (s *ListFunctionsInput) SetMarker(v string) *ListFunctionsInput {
s.Marker = &v
return s
}
// SetMasterRegion sets the MasterRegion field's value.
func (s *ListFunctionsInput) SetMasterRegion(v string) *ListFunctionsInput {
s.MasterRegion = &v
return s
}
// SetMaxItems sets the MaxItems field's value.
func (s *ListFunctionsInput) SetMaxItems(v int64) *ListFunctionsInput {
s.MaxItems = &v
return s
}
// Contains a list of AWS Lambda function configurations (see FunctionConfiguration.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListFunctionsResponse
type ListFunctionsOutput struct {
_ struct{} `type:"structure"`
// A list of Lambda functions.
Functions []*FunctionConfiguration `type:"list"`
// A string, present if there are more functions.
NextMarker *string `type:"string"`
}
// String returns the string representation
func (s ListFunctionsOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListFunctionsOutput) GoString() string {
return s.String()
}
// SetFunctions sets the Functions field's value.
func (s *ListFunctionsOutput) SetFunctions(v []*FunctionConfiguration) *ListFunctionsOutput {
s.Functions = v
return s
}
// SetNextMarker sets the NextMarker field's value.
func (s *ListFunctionsOutput) SetNextMarker(v string) *ListFunctionsOutput {
s.NextMarker = &v
return s
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListTagsRequest
type ListTagsInput struct {
_ struct{} `type:"structure"`
// The ARN (Amazon Resource Name) of the function.
//
// Resource is a required field
Resource *string `location:"uri" locationName:"ARN" type:"string" required:"true"`
}
// String returns the string representation
func (s ListTagsInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListTagsInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *ListTagsInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "ListTagsInput"}
if s.Resource == nil {
invalidParams.Add(request.NewErrParamRequired("Resource"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetResource sets the Resource field's value.
func (s *ListTagsInput) SetResource(v string) *ListTagsInput {
s.Resource = &v
return s
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListTagsResponse
type ListTagsOutput struct {
_ struct{} `type:"structure"`
// The list of tags assigned to the function.
Tags map[string]*string `type:"map"`
}
// String returns the string representation
func (s ListTagsOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListTagsOutput) GoString() string {
return s.String()
}
// SetTags sets the Tags field's value.
func (s *ListTagsOutput) SetTags(v map[string]*string) *ListTagsOutput {
s.Tags = v
return s
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListVersionsByFunctionRequest
type ListVersionsByFunctionInput struct {
_ struct{} `type:"structure"`
// Function name whose versions to list. You can specify a function name (for
// example, Thumbnail) or you can specify Amazon Resource Name (ARN) of the
// function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail).
// AWS Lambda also allows you to specify a partial ARN (for example, account-id:Thumbnail).
// Note that the length constraint applies only to the ARN. If you specify only
// the function name, it is limited to 64 characters in length.
//
// FunctionName is a required field
FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
// Optional string. An opaque pagination token returned from a previous ListVersionsByFunction
// operation. If present, indicates where to continue the listing.
Marker *string `location:"querystring" locationName:"Marker" type:"string"`
// Optional integer. Specifies the maximum number of AWS Lambda function versions
// to return in response. This parameter value must be greater than 0.
MaxItems *int64 `location:"querystring" locationName:"MaxItems" min:"1" type:"integer"`
}
// String returns the string representation
func (s ListVersionsByFunctionInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListVersionsByFunctionInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *ListVersionsByFunctionInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "ListVersionsByFunctionInput"}
if s.FunctionName == nil {
invalidParams.Add(request.NewErrParamRequired("FunctionName"))
}
if s.FunctionName != nil && len(*s.FunctionName) < 1 {
invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
}
if s.MaxItems != nil && *s.MaxItems < 1 {
invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetFunctionName sets the FunctionName field's value.
func (s *ListVersionsByFunctionInput) SetFunctionName(v string) *ListVersionsByFunctionInput {
s.FunctionName = &v
return s
}
// SetMarker sets the Marker field's value.
func (s *ListVersionsByFunctionInput) SetMarker(v string) *ListVersionsByFunctionInput {
s.Marker = &v
return s
}
// SetMaxItems sets the MaxItems field's value.
func (s *ListVersionsByFunctionInput) SetMaxItems(v int64) *ListVersionsByFunctionInput {
s.MaxItems = &v
return s
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListVersionsByFunctionResponse
type ListVersionsByFunctionOutput struct {
_ struct{} `type:"structure"`
// A string, present if there are more function versions.
NextMarker *string `type:"string"`
// A list of Lambda function versions.
Versions []*FunctionConfiguration `type:"list"`
}
// String returns the string representation
func (s ListVersionsByFunctionOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListVersionsByFunctionOutput) GoString() string {
return s.String()
}
// SetNextMarker sets the NextMarker field's value.
func (s *ListVersionsByFunctionOutput) SetNextMarker(v string) *ListVersionsByFunctionOutput {
s.NextMarker = &v
return s
}
// SetVersions sets the Versions field's value.
func (s *ListVersionsByFunctionOutput) SetVersions(v []*FunctionConfiguration) *ListVersionsByFunctionOutput {
s.Versions = v
return s
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/PublishVersionRequest
type PublishVersionInput struct {
_ struct{} `type:"structure"`
// The SHA256 hash of the deployment package you want to publish. This provides
// validation on the code you are publishing. If you provide this parameter
// value must match the SHA256 of the $LATEST version for the publication to
// succeed.
CodeSha256 *string `type:"string"`
// The description for the version you are publishing. If not provided, AWS
// Lambda copies the description from the $LATEST version.
Description *string `type:"string"`
// The Lambda function name. You can specify a function name (for example, Thumbnail)
// or you can specify Amazon Resource Name (ARN) of the function (for example,
// arn:aws:lambda:us-west-2:account-id:function:ThumbNail). AWS Lambda also
// allows you to specify a partial ARN (for example, account-id:Thumbnail).
// Note that the length constraint applies only to the ARN. If you specify only
// the function name, it is limited to 64 characters in length.
//
// FunctionName is a required field
FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
}
// String returns the string representation
func (s PublishVersionInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s PublishVersionInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *PublishVersionInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "PublishVersionInput"}
if s.FunctionName == nil {
invalidParams.Add(request.NewErrParamRequired("FunctionName"))
}
if s.FunctionName != nil && len(*s.FunctionName) < 1 {
invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetCodeSha256 sets the CodeSha256 field's value.
func (s *PublishVersionInput) SetCodeSha256(v string) *PublishVersionInput {
s.CodeSha256 = &v
return s
}
// SetDescription sets the Description field's value.
func (s *PublishVersionInput) SetDescription(v string) *PublishVersionInput {
s.Description = &v
return s
}
// SetFunctionName sets the FunctionName field's value.
func (s *PublishVersionInput) SetFunctionName(v string) *PublishVersionInput {
s.FunctionName = &v
return s
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/RemovePermissionRequest
type RemovePermissionInput struct {
_ struct{} `type:"structure"`
// Lambda function whose resource policy you want to remove a permission from.
//
// You can specify a function name (for example, Thumbnail) or you can specify
// Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail).
// AWS Lambda also allows you to specify a partial ARN (for example, account-id:Thumbnail).
// Note that the length constraint applies only to the ARN. If you specify only
// the function name, it is limited to 64 characters in length.
//
// FunctionName is a required field
FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
// You can specify this optional parameter to remove permission associated with
// a specific function version or function alias. If you don't specify this
// parameter, the API removes permission associated with the unqualified function
// ARN.
Qualifier *string `location:"querystring" locationName:"Qualifier" min:"1" type:"string"`
// Statement ID of the permission to remove.
//
// StatementId is a required field
StatementId *string `location:"uri" locationName:"StatementId" min:"1" type:"string" required:"true"`
}
// String returns the string representation
func (s RemovePermissionInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s RemovePermissionInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *RemovePermissionInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "RemovePermissionInput"}
if s.FunctionName == nil {
invalidParams.Add(request.NewErrParamRequired("FunctionName"))
}
if s.FunctionName != nil && len(*s.FunctionName) < 1 {
invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
}
if s.Qualifier != nil && len(*s.Qualifier) < 1 {
invalidParams.Add(request.NewErrParamMinLen("Qualifier", 1))
}
if s.StatementId == nil {
invalidParams.Add(request.NewErrParamRequired("StatementId"))
}
if s.StatementId != nil && len(*s.StatementId) < 1 {
invalidParams.Add(request.NewErrParamMinLen("StatementId", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetFunctionName sets the FunctionName field's value.
func (s *RemovePermissionInput) SetFunctionName(v string) *RemovePermissionInput {
s.FunctionName = &v
return s
}
// SetQualifier sets the Qualifier field's value.
func (s *RemovePermissionInput) SetQualifier(v string) *RemovePermissionInput {
s.Qualifier = &v
return s
}
// SetStatementId sets the StatementId field's value.
func (s *RemovePermissionInput) SetStatementId(v string) *RemovePermissionInput {
s.StatementId = &v
return s
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/RemovePermissionOutput
type RemovePermissionOutput struct {
_ struct{} `type:"structure"`
}
// String returns the string representation
func (s RemovePermissionOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s RemovePermissionOutput) GoString() string {
return s.String()
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/TagResourceRequest
type TagResourceInput struct {
_ struct{} `type:"structure"`
// The ARN (Amazon Resource Name) of the Lambda function.
//
// Resource is a required field
Resource *string `location:"uri" locationName:"ARN" type:"string" required:"true"`
// The list of tags (key-value pairs) you are assigning to the Lambda function.
//
// Tags is a required field
Tags map[string]*string `type:"map" required:"true"`
}
// String returns the string representation
func (s TagResourceInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s TagResourceInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *TagResourceInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"}
if s.Resource == nil {
invalidParams.Add(request.NewErrParamRequired("Resource"))
}
if s.Tags == nil {
invalidParams.Add(request.NewErrParamRequired("Tags"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetResource sets the Resource field's value.
func (s *TagResourceInput) SetResource(v string) *TagResourceInput {
s.Resource = &v
return s
}
// SetTags sets the Tags field's value.
func (s *TagResourceInput) SetTags(v map[string]*string) *TagResourceInput {
s.Tags = v
return s
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/TagResourceOutput
type TagResourceOutput struct {
_ struct{} `type:"structure"`
}
// String returns the string representation
func (s TagResourceOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s TagResourceOutput) GoString() string {
return s.String()
}
// The parent object that contains your function's tracing settings.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/TracingConfig
type TracingConfig struct {
_ struct{} `type:"structure"`
// Can be either PassThrough or Active. If PassThrough, Lambda will only trace
// the request from an upstream service if it contains a tracing header with
// "sampled=1". If Active, Lambda will respect any tracing header it receives
// from an upstream service. If no tracing header is received, Lambda will call
// X-Ray for a tracing decision.
Mode *string `type:"string" enum:"TracingMode"`
}
// String returns the string representation
func (s TracingConfig) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s TracingConfig) GoString() string {
return s.String()
}
// SetMode sets the Mode field's value.
func (s *TracingConfig) SetMode(v string) *TracingConfig {
s.Mode = &v
return s
}
// Parent object of the tracing information associated with your Lambda function.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/TracingConfigResponse
type TracingConfigResponse struct {
_ struct{} `type:"structure"`
// The tracing mode associated with your Lambda function.
Mode *string `type:"string" enum:"TracingMode"`
}
// String returns the string representation
func (s TracingConfigResponse) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s TracingConfigResponse) GoString() string {
return s.String()
}
// SetMode sets the Mode field's value.
func (s *TracingConfigResponse) SetMode(v string) *TracingConfigResponse {
s.Mode = &v
return s
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UntagResourceRequest
type UntagResourceInput struct {
_ struct{} `type:"structure"`
// The ARN (Amazon Resource Name) of the function.
//
// Resource is a required field
Resource *string `location:"uri" locationName:"ARN" type:"string" required:"true"`
// The list of tag keys to be deleted from the function.
//
// TagKeys is a required field
TagKeys []*string `location:"querystring" locationName:"tagKeys" type:"list" required:"true"`
}
// String returns the string representation
func (s UntagResourceInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s UntagResourceInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *UntagResourceInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"}
if s.Resource == nil {
invalidParams.Add(request.NewErrParamRequired("Resource"))
}
if s.TagKeys == nil {
invalidParams.Add(request.NewErrParamRequired("TagKeys"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetResource sets the Resource field's value.
func (s *UntagResourceInput) SetResource(v string) *UntagResourceInput {
s.Resource = &v
return s
}
// SetTagKeys sets the TagKeys field's value.
func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput {
s.TagKeys = v
return s
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UntagResourceOutput
type UntagResourceOutput struct {
_ struct{} `type:"structure"`
}
// String returns the string representation
func (s UntagResourceOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s UntagResourceOutput) GoString() string {
return s.String()
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateAliasRequest
type UpdateAliasInput struct {
_ struct{} `type:"structure"`
// You can change the description of the alias using this parameter.
Description *string `type:"string"`
// The function name for which the alias is created. Note that the length constraint
// applies only to the ARN. If you specify only the function name, it is limited
// to 64 characters in length.
//
// FunctionName is a required field
FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
// Using this parameter you can change the Lambda function version to which
// the alias points.
FunctionVersion *string `min:"1" type:"string"`
// The alias name.
//
// Name is a required field
Name *string `location:"uri" locationName:"Name" min:"1" type:"string" required:"true"`
}
// String returns the string representation
func (s UpdateAliasInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s UpdateAliasInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *UpdateAliasInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "UpdateAliasInput"}
if s.FunctionName == nil {
invalidParams.Add(request.NewErrParamRequired("FunctionName"))
}
if s.FunctionName != nil && len(*s.FunctionName) < 1 {
invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
}
if s.FunctionVersion != nil && len(*s.FunctionVersion) < 1 {
invalidParams.Add(request.NewErrParamMinLen("FunctionVersion", 1))
}
if s.Name == nil {
invalidParams.Add(request.NewErrParamRequired("Name"))
}
if s.Name != nil && len(*s.Name) < 1 {
invalidParams.Add(request.NewErrParamMinLen("Name", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetDescription sets the Description field's value.
func (s *UpdateAliasInput) SetDescription(v string) *UpdateAliasInput {
s.Description = &v
return s
}
// SetFunctionName sets the FunctionName field's value.
func (s *UpdateAliasInput) SetFunctionName(v string) *UpdateAliasInput {
s.FunctionName = &v
return s
}
// SetFunctionVersion sets the FunctionVersion field's value.
func (s *UpdateAliasInput) SetFunctionVersion(v string) *UpdateAliasInput {
s.FunctionVersion = &v
return s
}
// SetName sets the Name field's value.
func (s *UpdateAliasInput) SetName(v string) *UpdateAliasInput {
s.Name = &v
return s
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateEventSourceMappingRequest
type UpdateEventSourceMappingInput struct {
_ struct{} `type:"structure"`
// The maximum number of stream records that can be sent to your Lambda function
// for a single invocation.
BatchSize *int64 `min:"1" type:"integer"`
// Specifies whether AWS Lambda should actively poll the stream or not. If disabled,
// AWS Lambda will not poll the stream.
Enabled *bool `type:"boolean"`
// The Lambda function to which you want the stream records sent.
//
// You can specify a function name (for example, Thumbnail) or you can specify
// Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail).
// AWS Lambda also allows you to specify a partial ARN (for example, account-id:Thumbnail).
// Note that the length constraint applies only to the ARN. If you specify only
// the function name, it is limited to 64 characters in length.
//
// If you are using versioning, you can also provide a qualified function ARN
// (ARN that is qualified with function version or alias name as suffix). For
// more information about versioning, see AWS Lambda Function Versioning and
// Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html)
//
// Note that the length constraint applies only to the ARN. If you specify only
// the function name, it is limited to 64 character in length.
FunctionName *string `min:"1" type:"string"`
// The event source mapping identifier.
//
// UUID is a required field
UUID *string `location:"uri" locationName:"UUID" type:"string" required:"true"`
}
// String returns the string representation
func (s UpdateEventSourceMappingInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s UpdateEventSourceMappingInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *UpdateEventSourceMappingInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "UpdateEventSourceMappingInput"}
if s.BatchSize != nil && *s.BatchSize < 1 {
invalidParams.Add(request.NewErrParamMinValue("BatchSize", 1))
}
if s.FunctionName != nil && len(*s.FunctionName) < 1 {
invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
}
if s.UUID == nil {
invalidParams.Add(request.NewErrParamRequired("UUID"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetBatchSize sets the BatchSize field's value.
func (s *UpdateEventSourceMappingInput) SetBatchSize(v int64) *UpdateEventSourceMappingInput {
s.BatchSize = &v
return s
}
// SetEnabled sets the Enabled field's value.
func (s *UpdateEventSourceMappingInput) SetEnabled(v bool) *UpdateEventSourceMappingInput {
s.Enabled = &v
return s
}
// SetFunctionName sets the FunctionName field's value.
func (s *UpdateEventSourceMappingInput) SetFunctionName(v string) *UpdateEventSourceMappingInput {
s.FunctionName = &v
return s
}
// SetUUID sets the UUID field's value.
func (s *UpdateEventSourceMappingInput) SetUUID(v string) *UpdateEventSourceMappingInput {
s.UUID = &v
return s
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateFunctionCodeRequest
type UpdateFunctionCodeInput struct {
_ struct{} `type:"structure"`
// This boolean parameter can be used to test your request to AWS Lambda to
// update the Lambda function and publish a version as an atomic operation.
// It will do all necessary computation and validation of your code but will
// not upload it or a publish a version. Each time this operation is invoked,
// the CodeSha256 hash value the provided code will also be computed and returned
// in the response.
DryRun *bool `type:"boolean"`
// The existing Lambda function name whose code you want to replace.
//
// You can specify a function name (for example, Thumbnail) or you can specify
// Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail).
// AWS Lambda also allows you to specify a partial ARN (for example, account-id:Thumbnail).
// Note that the length constraint applies only to the ARN. If you specify only
// the function name, it is limited to 64 characters in length.
//
// FunctionName is a required field
FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
// This boolean parameter can be used to request AWS Lambda to update the Lambda
// function and publish a version as an atomic operation.
Publish *bool `type:"boolean"`
// Amazon S3 bucket name where the .zip file containing your deployment package
// is stored. This bucket must reside in the same AWS Region where you are creating
// the Lambda function.
S3Bucket *string `min:"3" type:"string"`
// The Amazon S3 object (the deployment package) key name you want to upload.
S3Key *string `min:"1" type:"string"`
// The Amazon S3 object (the deployment package) version you want to upload.
S3ObjectVersion *string `min:"1" type:"string"`
// The contents of your zip file containing your deployment package. If you
// are using the web API directly, the contents of the zip file must be base64-encoded.
// If you are using the AWS SDKs or the AWS CLI, the SDKs or CLI will do the
// encoding for you. For more information about creating a .zip file, see Execution
// Permissions (http://docs.aws.amazon.com/lambda/latest/dg/intro-permission-model.html#lambda-intro-execution-role.html)
// in the AWS Lambda Developer Guide.
//
// ZipFile is automatically base64 encoded/decoded by the SDK.
ZipFile []byte `type:"blob"`
}
// String returns the string representation
func (s UpdateFunctionCodeInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s UpdateFunctionCodeInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *UpdateFunctionCodeInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "UpdateFunctionCodeInput"}
if s.FunctionName == nil {
invalidParams.Add(request.NewErrParamRequired("FunctionName"))
}
if s.FunctionName != nil && len(*s.FunctionName) < 1 {
invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
}
if s.S3Bucket != nil && len(*s.S3Bucket) < 3 {
invalidParams.Add(request.NewErrParamMinLen("S3Bucket", 3))
}
if s.S3Key != nil && len(*s.S3Key) < 1 {
invalidParams.Add(request.NewErrParamMinLen("S3Key", 1))
}
if s.S3ObjectVersion != nil && len(*s.S3ObjectVersion) < 1 {
invalidParams.Add(request.NewErrParamMinLen("S3ObjectVersion", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetDryRun sets the DryRun field's value.
func (s *UpdateFunctionCodeInput) SetDryRun(v bool) *UpdateFunctionCodeInput {
s.DryRun = &v
return s
}
// SetFunctionName sets the FunctionName field's value.
func (s *UpdateFunctionCodeInput) SetFunctionName(v string) *UpdateFunctionCodeInput {
s.FunctionName = &v
return s
}
// SetPublish sets the Publish field's value.
func (s *UpdateFunctionCodeInput) SetPublish(v bool) *UpdateFunctionCodeInput {
s.Publish = &v
return s
}
// SetS3Bucket sets the S3Bucket field's value.
func (s *UpdateFunctionCodeInput) SetS3Bucket(v string) *UpdateFunctionCodeInput {
s.S3Bucket = &v
return s
}
// SetS3Key sets the S3Key field's value.
func (s *UpdateFunctionCodeInput) SetS3Key(v string) *UpdateFunctionCodeInput {
s.S3Key = &v
return s
}
// SetS3ObjectVersion sets the S3ObjectVersion field's value.
func (s *UpdateFunctionCodeInput) SetS3ObjectVersion(v string) *UpdateFunctionCodeInput {
s.S3ObjectVersion = &v
return s
}
// SetZipFile sets the ZipFile field's value.
func (s *UpdateFunctionCodeInput) SetZipFile(v []byte) *UpdateFunctionCodeInput {
s.ZipFile = v
return s
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateFunctionConfigurationRequest
type UpdateFunctionConfigurationInput struct {
_ struct{} `type:"structure"`
// The parent object that contains the target ARN (Amazon Resource Name) of
// an Amazon SQS queue or Amazon SNS topic.
DeadLetterConfig *DeadLetterConfig `type:"structure"`
// A short user-defined function description. AWS Lambda does not use this value.
// Assign a meaningful description as you see fit.
Description *string `type:"string"`
// The parent object that contains your environment's configuration settings.
Environment *Environment `type:"structure"`
// The name of the Lambda function.
//
// You can specify a function name (for example, Thumbnail) or you can specify
// Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail).
// AWS Lambda also allows you to specify a partial ARN (for example, account-id:Thumbnail).
// Note that the length constraint applies only to the ARN. If you specify only
// the function name, it is limited to 64 character in length.
//
// FunctionName is a required field
FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
// The function that Lambda calls to begin executing your function. For Node.js,
// it is the module-name.export value in your function.
Handler *string `type:"string"`
// The Amazon Resource Name (ARN) of the KMS key used to encrypt your function's
// environment variables. If you elect to use the AWS Lambda default service
// key, pass in an empty string ("") for this parameter.
KMSKeyArn *string `type:"string"`
// The amount of memory, in MB, your Lambda function is given. AWS Lambda uses
// this memory size to infer the amount of CPU allocated to your function. Your
// function use-case determines your CPU and memory requirements. For example,
// a database operation might need less memory compared to an image processing
// function. The default value is 128 MB. The value must be a multiple of 64
// MB.
MemorySize *int64 `min:"128" type:"integer"`
// The Amazon Resource Name (ARN) of the IAM role that Lambda will assume when
// it executes your function.
Role *string `type:"string"`
// The runtime environment for the Lambda function.
//
// To use the Python runtime v3.6, set the value to "python3.6". To use the
// Python runtime v2.7, set the value to "python2.7". To use the Node.js runtime
// v6.10, set the value to "nodejs6.10". To use the Node.js runtime v4.3, set
// the value to "nodejs4.3". To use the Python runtime v3.6, set the value to
// "python3.6".
//
// Node v0.10.42 is currently marked as deprecated. You must migrate existing
// functions to the newer Node.js runtime versions available on AWS Lambda (nodejs4.3
// or nodejs6.10) as soon as possible. You can request a one-time extension
// until June 30, 2017 by going to the Lambda console and following the instructions
// provided. Failure to do so will result in an invalid parameter error being
// returned. Note that you will have to follow this procedure for each region
// that contains functions written in the Node v0.10.42 runtime.
Runtime *string `type:"string" enum:"Runtime"`
// The function execution time at which AWS Lambda should terminate the function.
// Because the execution time has cost implications, we recommend you set this
// value based on your expected execution time. The default is 3 seconds.
Timeout *int64 `min:"1" type:"integer"`
// The parent object that contains your function's tracing settings.
TracingConfig *TracingConfig `type:"structure"`
// If your Lambda function accesses resources in a VPC, you provide this parameter
// identifying the list of security group IDs and subnet IDs. These must belong
// to the same VPC. You must provide at least one security group and one subnet
// ID.
VpcConfig *VpcConfig `type:"structure"`
}
// String returns the string representation
func (s UpdateFunctionConfigurationInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s UpdateFunctionConfigurationInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *UpdateFunctionConfigurationInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "UpdateFunctionConfigurationInput"}
if s.FunctionName == nil {
invalidParams.Add(request.NewErrParamRequired("FunctionName"))
}
if s.FunctionName != nil && len(*s.FunctionName) < 1 {
invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
}
if s.MemorySize != nil && *s.MemorySize < 128 {
invalidParams.Add(request.NewErrParamMinValue("MemorySize", 128))
}
if s.Timeout != nil && *s.Timeout < 1 {
invalidParams.Add(request.NewErrParamMinValue("Timeout", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetDeadLetterConfig sets the DeadLetterConfig field's value.
func (s *UpdateFunctionConfigurationInput) SetDeadLetterConfig(v *DeadLetterConfig) *UpdateFunctionConfigurationInput {
s.DeadLetterConfig = v
return s
}
// SetDescription sets the Description field's value.
func (s *UpdateFunctionConfigurationInput) SetDescription(v string) *UpdateFunctionConfigurationInput {
s.Description = &v
return s
}
// SetEnvironment sets the Environment field's value.
func (s *UpdateFunctionConfigurationInput) SetEnvironment(v *Environment) *UpdateFunctionConfigurationInput {
s.Environment = v
return s
}
// SetFunctionName sets the FunctionName field's value.
func (s *UpdateFunctionConfigurationInput) SetFunctionName(v string) *UpdateFunctionConfigurationInput {
s.FunctionName = &v
return s
}
// SetHandler sets the Handler field's value.
func (s *UpdateFunctionConfigurationInput) SetHandler(v string) *UpdateFunctionConfigurationInput {
s.Handler = &v
return s
}
// SetKMSKeyArn sets the KMSKeyArn field's value.
func (s *UpdateFunctionConfigurationInput) SetKMSKeyArn(v string) *UpdateFunctionConfigurationInput {
s.KMSKeyArn = &v
return s
}
// SetMemorySize sets the MemorySize field's value.
func (s *UpdateFunctionConfigurationInput) SetMemorySize(v int64) *UpdateFunctionConfigurationInput {
s.MemorySize = &v
return s
}
// SetRole sets the Role field's value.
func (s *UpdateFunctionConfigurationInput) SetRole(v string) *UpdateFunctionConfigurationInput {
s.Role = &v
return s
}
// SetRuntime sets the Runtime field's value.
func (s *UpdateFunctionConfigurationInput) SetRuntime(v string) *UpdateFunctionConfigurationInput {
s.Runtime = &v
return s
}
// SetTimeout sets the Timeout field's value.
func (s *UpdateFunctionConfigurationInput) SetTimeout(v int64) *UpdateFunctionConfigurationInput {
s.Timeout = &v
return s
}
// SetTracingConfig sets the TracingConfig field's value.
func (s *UpdateFunctionConfigurationInput) SetTracingConfig(v *TracingConfig) *UpdateFunctionConfigurationInput {
s.TracingConfig = v
return s
}
// SetVpcConfig sets the VpcConfig field's value.
func (s *UpdateFunctionConfigurationInput) SetVpcConfig(v *VpcConfig) *UpdateFunctionConfigurationInput {
s.VpcConfig = v
return s
}
// If your Lambda function accesses resources in a VPC, you provide this parameter
// identifying the list of security group IDs and subnet IDs. These must belong
// to the same VPC. You must provide at least one security group and one subnet
// ID.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/VpcConfig
type VpcConfig struct {
_ struct{} `type:"structure"`
// A list of one or more security groups IDs in your VPC.
SecurityGroupIds []*string `type:"list"`
// A list of one or more subnet IDs in your VPC.
SubnetIds []*string `type:"list"`
}
// String returns the string representation
func (s VpcConfig) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s VpcConfig) GoString() string {
return s.String()
}
// SetSecurityGroupIds sets the SecurityGroupIds field's value.
func (s *VpcConfig) SetSecurityGroupIds(v []*string) *VpcConfig {
s.SecurityGroupIds = v
return s
}
// SetSubnetIds sets the SubnetIds field's value.
func (s *VpcConfig) SetSubnetIds(v []*string) *VpcConfig {
s.SubnetIds = v
return s
}
// VPC configuration associated with your Lambda function.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/VpcConfigResponse
type VpcConfigResponse struct {
_ struct{} `type:"structure"`
// A list of security group IDs associated with the Lambda function.
SecurityGroupIds []*string `type:"list"`
// A list of subnet IDs associated with the Lambda function.
SubnetIds []*string `type:"list"`
// The VPC ID associated with you Lambda function.
VpcId *string `type:"string"`
}
// String returns the string representation
func (s VpcConfigResponse) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s VpcConfigResponse) GoString() string {
return s.String()
}
// SetSecurityGroupIds sets the SecurityGroupIds field's value.
func (s *VpcConfigResponse) SetSecurityGroupIds(v []*string) *VpcConfigResponse {
s.SecurityGroupIds = v
return s
}
// SetSubnetIds sets the SubnetIds field's value.
func (s *VpcConfigResponse) SetSubnetIds(v []*string) *VpcConfigResponse {
s.SubnetIds = v
return s
}
// SetVpcId sets the VpcId field's value.
func (s *VpcConfigResponse) SetVpcId(v string) *VpcConfigResponse {
s.VpcId = &v
return s
}
const (
// EventSourcePositionTrimHorizon is a EventSourcePosition enum value
EventSourcePositionTrimHorizon = "TRIM_HORIZON"
// EventSourcePositionLatest is a EventSourcePosition enum value
EventSourcePositionLatest = "LATEST"
// EventSourcePositionAtTimestamp is a EventSourcePosition enum value
EventSourcePositionAtTimestamp = "AT_TIMESTAMP"
)
const (
// FunctionVersionAll is a FunctionVersion enum value
FunctionVersionAll = "ALL"
)
const (
// InvocationTypeEvent is a InvocationType enum value
InvocationTypeEvent = "Event"
// InvocationTypeRequestResponse is a InvocationType enum value
InvocationTypeRequestResponse = "RequestResponse"
// InvocationTypeDryRun is a InvocationType enum value
InvocationTypeDryRun = "DryRun"
)
const (
// LogTypeNone is a LogType enum value
LogTypeNone = "None"
// LogTypeTail is a LogType enum value
LogTypeTail = "Tail"
)
const (
// RuntimeNodejs is a Runtime enum value
RuntimeNodejs = "nodejs"
// RuntimeNodejs43 is a Runtime enum value
RuntimeNodejs43 = "nodejs4.3"
// RuntimeNodejs610 is a Runtime enum value
RuntimeNodejs610 = "nodejs6.10"
// RuntimeJava8 is a Runtime enum value
RuntimeJava8 = "java8"
// RuntimePython27 is a Runtime enum value
RuntimePython27 = "python2.7"
// RuntimePython36 is a Runtime enum value
RuntimePython36 = "python3.6"
// RuntimeDotnetcore10 is a Runtime enum value
RuntimeDotnetcore10 = "dotnetcore1.0"
// RuntimeNodejs43Edge is a Runtime enum value
RuntimeNodejs43Edge = "nodejs4.3-edge"
)
const (
// ThrottleReasonConcurrentInvocationLimitExceeded is a ThrottleReason enum value
ThrottleReasonConcurrentInvocationLimitExceeded = "ConcurrentInvocationLimitExceeded"
// ThrottleReasonFunctionInvocationRateLimitExceeded is a ThrottleReason enum value
ThrottleReasonFunctionInvocationRateLimitExceeded = "FunctionInvocationRateLimitExceeded"
// ThrottleReasonCallerRateLimitExceeded is a ThrottleReason enum value
ThrottleReasonCallerRateLimitExceeded = "CallerRateLimitExceeded"
)
const (
// TracingModeActive is a TracingMode enum value
TracingModeActive = "Active"
// TracingModePassThrough is a TracingMode enum value
TracingModePassThrough = "PassThrough"
)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors/aws-sdk-go.git
git@gitee.com:mirrors/aws-sdk-go.git
mirrors
aws-sdk-go
aws-sdk-go
v1.10.46

Search