| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076 |
- // 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 opAddLayerVersionPermission = "AddLayerVersionPermission"
- // AddLayerVersionPermissionRequest generates a "aws/request.Request" representing the
- // client's request for the AddLayerVersionPermission operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // 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 AddLayerVersionPermission for more information on using the AddLayerVersionPermission
- // 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 AddLayerVersionPermissionRequest method.
- // req, resp := client.AddLayerVersionPermissionRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/AddLayerVersionPermission
- func (c *Lambda) AddLayerVersionPermissionRequest(input *AddLayerVersionPermissionInput) (req *request.Request, output *AddLayerVersionPermissionOutput) {
- op := &request.Operation{
- Name: opAddLayerVersionPermission,
- HTTPMethod: "POST",
- HTTPPath: "/2018-10-31/layers/{LayerName}/versions/{VersionNumber}/policy",
- }
- if input == nil {
- input = &AddLayerVersionPermissionInput{}
- }
- output = &AddLayerVersionPermissionOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // AddLayerVersionPermission API operation for AWS Lambda.
- //
- // Adds permissions to the resource-based policy of a version of an AWS Lambda
- // layer (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html).
- // Use this action to grant layer usage permission to other accounts. You can
- // grant permission to a single account, all AWS accounts, or all accounts in
- // an organization.
- //
- // To revoke permission, call RemoveLayerVersionPermission with the statement
- // ID that you specified when you added it.
- //
- // 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 AddLayerVersionPermission 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.
- //
- // * ErrCodeTooManyRequestsException "TooManyRequestsException"
- // Request throughput limit exceeded.
- //
- // * 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.
- //
- // * ErrCodePolicyLengthExceededException "PolicyLengthExceededException"
- // Lambda function access policy is limited to 20 KB.
- //
- // * ErrCodePreconditionFailedException "PreconditionFailedException"
- // The RevisionId provided does not match the latest RevisionId for the Lambda
- // function or alias. Call the GetFunction or the GetAlias API to retrieve the
- // latest RevisionId for your resource.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/AddLayerVersionPermission
- func (c *Lambda) AddLayerVersionPermission(input *AddLayerVersionPermissionInput) (*AddLayerVersionPermissionOutput, error) {
- req, out := c.AddLayerVersionPermissionRequest(input)
- return out, req.Send()
- }
- // AddLayerVersionPermissionWithContext is the same as AddLayerVersionPermission with the addition of
- // the ability to pass a context and additional request options.
- //
- // See AddLayerVersionPermission 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) AddLayerVersionPermissionWithContext(ctx aws.Context, input *AddLayerVersionPermissionInput, opts ...request.Option) (*AddLayerVersionPermissionOutput, error) {
- req, out := c.AddLayerVersionPermissionRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- 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 completes
- // successfully.
- //
- // 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)
- // }
- //
- // See also, 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.
- //
- // Grants an AWS service or another account permission to use a function. You
- // can apply the policy at the function level, or specify a qualifier to restrict
- // access to a single version or alias. If you use a qualifier, the invoker
- // must use the full Amazon Resource Name (ARN) of that version or alias to
- // invoke the function.
- //
- // To grant permission to another account, specify the account ID as the Principal.
- // For AWS services, the principal is a domain-style identifier defined by the
- // service, like s3.amazonaws.com or sns.amazonaws.com. For AWS services, you
- // can also specify the ARN or owning account of the associated resource as
- // the SourceArn or SourceAccount. If you grant permission to a service principal
- // without specifying the source, other accounts could potentially configure
- // resources in their account to invoke your Lambda function.
- //
- // This action adds a statement to a resource-based permission policy for the
- // function. For more information about function policies, see Lambda Function
- // Policies (http://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.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 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.
- //
- // * ErrCodePolicyLengthExceededException "PolicyLengthExceededException"
- // Lambda function access policy is limited to 20 KB.
- //
- // * ErrCodeTooManyRequestsException "TooManyRequestsException"
- // Request throughput limit exceeded.
- //
- // * ErrCodePreconditionFailedException "PreconditionFailedException"
- // The RevisionId provided does not match the latest RevisionId for the Lambda
- // function or alias. Call the GetFunction or the GetAlias API to retrieve the
- // latest RevisionId for your resource.
- //
- // See also, 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 completes
- // successfully.
- //
- // 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)
- // }
- //
- // See also, 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 (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html)
- // for a Lambda function version. Use aliases to provide clients with a function
- // identifier that you can update to invoke a different version.
- //
- // You can also map an alias to split invocation requests between two versions.
- // Use the RoutingConfig parameter to specify a second version and the percentage
- // of invocation requests that it receives.
- //
- // 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.
- //
- // * ErrCodeTooManyRequestsException "TooManyRequestsException"
- // Request throughput limit exceeded.
- //
- // See also, 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 completes
- // successfully.
- //
- // 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)
- // }
- //
- // See also, 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.
- //
- // Creates a mapping between an event source and an AWS Lambda function. Lambda
- // reads items from the event source and triggers the function.
- //
- // For details about each event source type, see the following topics.
- //
- // * Using AWS Lambda with Amazon Kinesis (http://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html)
- //
- // * Using AWS Lambda with Amazon SQS (http://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html)
- //
- // * Using AWS Lambda with Amazon DynamoDB (http://docs.aws.amazon.com/lambda/latest/dg/with-ddb.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 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.
- //
- // * ErrCodeResourceConflictException "ResourceConflictException"
- // The resource already exists.
- //
- // * ErrCodeTooManyRequestsException "TooManyRequestsException"
- // Request throughput limit exceeded.
- //
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // The resource (for example, a Lambda function or access policy statement)
- // specified in the request does not exist.
- //
- // See also, 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 completes
- // successfully.
- //
- // 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)
- // }
- //
- // See also, 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 Lambda function. To create a function, you need a deployment package
- // (http://docs.aws.amazon.com/lambda/latest/dg/deployment-package-v2.html)
- // and an execution role (http://docs.aws.amazon.com/lambda/latest/dg/intro-permission-model.html#lambda-intro-execution-role).
- // The deployment package contains your function code. The execution role grants
- // the function permission to use AWS services such as Amazon CloudWatch Logs
- // for log streaming and AWS X-Ray for request tracing.
- //
- // A function has an unpublished version, and can have published versions and
- // aliases. A published version is a snapshot of your function code and configuration
- // that can not be changed. An alias is a named resource that maps to a version,
- // and can be changed to map to a different version. Use the Publish parameter
- // to create version 1 of your function from its initial configuration.
- //
- // The other parameters let you configure version-specific and function-level
- // settings. You can modify version-specific settings later with UpdateFunctionConfiguration.
- // Function-level settings apply to both the unpublished and published versions
- // of the function and include tags (TagResource) and per-function concurrency
- // limits (PutFunctionConcurrency).
- //
- // If another account or a AWS service invokes your function, use AddPermission
- // to grant permission by creating a resource-based IAM policy. You can grant
- // permissions at the function level, on a version, or on an alias.
- //
- // To invoke your function directly, use Invoke. To invoke your function in
- // response to events in other AWS services, create an event source mapping
- // (CreateEventSourceMapping), or configure a function trigger in the other
- // service. For more information, see Invoking Functions (http://docs.aws.amazon.com/lambda/latest/dg/invoking-lambda-functions.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 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.
- //
- // * 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"
- // Request throughput limit exceeded.
- //
- // * ErrCodeCodeStorageExceededException "CodeStorageExceededException"
- // You have exceeded your maximum total code size per account. Limits (http://docs.aws.amazon.com/lambda/latest/dg/limits.html)
- //
- // See also, 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 completes
- // successfully.
- //
- // 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)
- // }
- //
- // See also, 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.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
- }
- // DeleteAlias API operation for AWS Lambda.
- //
- // Deletes a Lambda function alias (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 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.
- //
- // * ErrCodeTooManyRequestsException "TooManyRequestsException"
- // Request throughput limit exceeded.
- //
- // See also, 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 completes
- // successfully.
- //
- // 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)
- // }
- //
- // See also, 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.
- //
- // Deletes an event source mapping (http://docs.aws.amazon.com/lambda/latest/dg/intro-invocation-modes.html).
- // You can get the identifier of a mapping from the output of ListEventSourceMappings.
- //
- // 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.
- //
- // * ErrCodeTooManyRequestsException "TooManyRequestsException"
- // Request throughput limit exceeded.
- //
- // * ErrCodeResourceInUseException "ResourceInUseException"
- // The operation conflicts with the resource's availability. For example, you
- // attempted to update an EventSource Mapping in CREATING, or tried to delete
- // a EventSource mapping currently in the UPDATING state.
- //
- // See also, 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 completes
- // successfully.
- //
- // 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)
- // }
- //
- // See also, 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.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
- }
- // DeleteFunction API operation for AWS Lambda.
- //
- // Deletes a Lambda function. To delete a specific function version, use the
- // Qualifier parameter. Otherwise, all versions and aliases are deleted.
- //
- // To delete Lambda event source mappings that invoke a function, use DeleteEventSourceMapping.
- // For AWS services and resources that invoke your function directly, delete
- // the trigger in the service where you originally configured it.
- //
- // 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"
- // Request throughput limit exceeded.
- //
- // * 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.
- //
- // * ErrCodeResourceConflictException "ResourceConflictException"
- // The resource already exists.
- //
- // See also, 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 opDeleteFunctionConcurrency = "DeleteFunctionConcurrency"
- // DeleteFunctionConcurrencyRequest generates a "aws/request.Request" representing the
- // client's request for the DeleteFunctionConcurrency operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // 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 DeleteFunctionConcurrency for more information on using the DeleteFunctionConcurrency
- // 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 DeleteFunctionConcurrencyRequest method.
- // req, resp := client.DeleteFunctionConcurrencyRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteFunctionConcurrency
- func (c *Lambda) DeleteFunctionConcurrencyRequest(input *DeleteFunctionConcurrencyInput) (req *request.Request, output *DeleteFunctionConcurrencyOutput) {
- op := &request.Operation{
- Name: opDeleteFunctionConcurrency,
- HTTPMethod: "DELETE",
- HTTPPath: "/2017-10-31/functions/{FunctionName}/concurrency",
- }
- if input == nil {
- input = &DeleteFunctionConcurrencyInput{}
- }
- output = &DeleteFunctionConcurrencyOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
- }
- // DeleteFunctionConcurrency API operation for AWS Lambda.
- //
- // Removes a concurrent execution limit from a function.
- //
- // 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 DeleteFunctionConcurrency 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"
- // Request throughput limit exceeded.
- //
- // * 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.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteFunctionConcurrency
- func (c *Lambda) DeleteFunctionConcurrency(input *DeleteFunctionConcurrencyInput) (*DeleteFunctionConcurrencyOutput, error) {
- req, out := c.DeleteFunctionConcurrencyRequest(input)
- return out, req.Send()
- }
- // DeleteFunctionConcurrencyWithContext is the same as DeleteFunctionConcurrency with the addition of
- // the ability to pass a context and additional request options.
- //
- // See DeleteFunctionConcurrency 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) DeleteFunctionConcurrencyWithContext(ctx aws.Context, input *DeleteFunctionConcurrencyInput, opts ...request.Option) (*DeleteFunctionConcurrencyOutput, error) {
- req, out := c.DeleteFunctionConcurrencyRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opDeleteLayerVersion = "DeleteLayerVersion"
- // DeleteLayerVersionRequest generates a "aws/request.Request" representing the
- // client's request for the DeleteLayerVersion operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // 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 DeleteLayerVersion for more information on using the DeleteLayerVersion
- // 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 DeleteLayerVersionRequest method.
- // req, resp := client.DeleteLayerVersionRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteLayerVersion
- func (c *Lambda) DeleteLayerVersionRequest(input *DeleteLayerVersionInput) (req *request.Request, output *DeleteLayerVersionOutput) {
- op := &request.Operation{
- Name: opDeleteLayerVersion,
- HTTPMethod: "DELETE",
- HTTPPath: "/2018-10-31/layers/{LayerName}/versions/{VersionNumber}",
- }
- if input == nil {
- input = &DeleteLayerVersionInput{}
- }
- output = &DeleteLayerVersionOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
- }
- // DeleteLayerVersion API operation for AWS Lambda.
- //
- // Deletes a version of an AWS Lambda layer (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html).
- // Deleted versions can no longer be viewed or added to functions. To avoid
- // breaking functions, a copy of the version remains in Lambda until no functions
- // refer to it.
- //
- // 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 DeleteLayerVersion for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeServiceException "ServiceException"
- // The AWS Lambda service encountered an internal error.
- //
- // * ErrCodeTooManyRequestsException "TooManyRequestsException"
- // Request throughput limit exceeded.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteLayerVersion
- func (c *Lambda) DeleteLayerVersion(input *DeleteLayerVersionInput) (*DeleteLayerVersionOutput, error) {
- req, out := c.DeleteLayerVersionRequest(input)
- return out, req.Send()
- }
- // DeleteLayerVersionWithContext is the same as DeleteLayerVersion with the addition of
- // the ability to pass a context and additional request options.
- //
- // See DeleteLayerVersion 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) DeleteLayerVersionWithContext(ctx aws.Context, input *DeleteLayerVersionInput, opts ...request.Option) (*DeleteLayerVersionOutput, error) {
- req, out := c.DeleteLayerVersionRequest(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 completes
- // successfully.
- //
- // 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)
- // }
- //
- // See also, 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.
- //
- // Retrieves details about your account's limits (http://docs.aws.amazon.com/lambda/latest/dg/limits.html)
- // and usage in a region.
- //
- // 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"
- // Request throughput limit exceeded.
- //
- // * ErrCodeServiceException "ServiceException"
- // The AWS Lambda service encountered an internal error.
- //
- // See also, 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 completes
- // successfully.
- //
- // 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)
- // }
- //
- // See also, 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 details about a Lambda function alias (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 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.
- //
- // * ErrCodeTooManyRequestsException "TooManyRequestsException"
- // Request throughput limit exceeded.
- //
- // See also, 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 completes
- // successfully.
- //
- // 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)
- // }
- //
- // See also, 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 details about an event source mapping. You can get the identifier
- // of a mapping from the output of ListEventSourceMappings.
- //
- // 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.
- //
- // * ErrCodeTooManyRequestsException "TooManyRequestsException"
- // Request throughput limit exceeded.
- //
- // See also, 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 completes
- // successfully.
- //
- // 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)
- // }
- //
- // See also, 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 information about function or function version, with a link to download
- // the deployment package that's valid for 10 minutes. If you specify a function
- // version, only details specific to that version are returned.
- //
- // 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"
- // Request throughput limit exceeded.
- //
- // * 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.
- //
- // See also, 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 completes
- // successfully.
- //
- // 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)
- // }
- //
- // See also, 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 a the version-specific settings of a Lambda function or version.
- // The output includes only options that can vary between versions of a function.
- // To modify these settings, use UpdateFunctionConfiguration.
- //
- // To get all of a function's details, including function-level settings, use
- // GetFunction.
- //
- // 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"
- // Request throughput limit exceeded.
- //
- // * 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.
- //
- // See also, 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 opGetLayerVersion = "GetLayerVersion"
- // GetLayerVersionRequest generates a "aws/request.Request" representing the
- // client's request for the GetLayerVersion operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // 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 GetLayerVersion for more information on using the GetLayerVersion
- // 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 GetLayerVersionRequest method.
- // req, resp := client.GetLayerVersionRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetLayerVersion
- func (c *Lambda) GetLayerVersionRequest(input *GetLayerVersionInput) (req *request.Request, output *GetLayerVersionOutput) {
- op := &request.Operation{
- Name: opGetLayerVersion,
- HTTPMethod: "GET",
- HTTPPath: "/2018-10-31/layers/{LayerName}/versions/{VersionNumber}",
- }
- if input == nil {
- input = &GetLayerVersionInput{}
- }
- output = &GetLayerVersionOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // GetLayerVersion API operation for AWS Lambda.
- //
- // Returns information about a version of an AWS Lambda layer (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html),
- // with a link to download the layer archive that's valid for 10 minutes.
- //
- // 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 GetLayerVersion 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.
- //
- // * ErrCodeTooManyRequestsException "TooManyRequestsException"
- // Request throughput limit exceeded.
- //
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // The resource (for example, a Lambda function or access policy statement)
- // specified in the request does not exist.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetLayerVersion
- func (c *Lambda) GetLayerVersion(input *GetLayerVersionInput) (*GetLayerVersionOutput, error) {
- req, out := c.GetLayerVersionRequest(input)
- return out, req.Send()
- }
- // GetLayerVersionWithContext is the same as GetLayerVersion with the addition of
- // the ability to pass a context and additional request options.
- //
- // See GetLayerVersion 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) GetLayerVersionWithContext(ctx aws.Context, input *GetLayerVersionInput, opts ...request.Option) (*GetLayerVersionOutput, error) {
- req, out := c.GetLayerVersionRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opGetLayerVersionPolicy = "GetLayerVersionPolicy"
- // GetLayerVersionPolicyRequest generates a "aws/request.Request" representing the
- // client's request for the GetLayerVersionPolicy operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // 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 GetLayerVersionPolicy for more information on using the GetLayerVersionPolicy
- // 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 GetLayerVersionPolicyRequest method.
- // req, resp := client.GetLayerVersionPolicyRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetLayerVersionPolicy
- func (c *Lambda) GetLayerVersionPolicyRequest(input *GetLayerVersionPolicyInput) (req *request.Request, output *GetLayerVersionPolicyOutput) {
- op := &request.Operation{
- Name: opGetLayerVersionPolicy,
- HTTPMethod: "GET",
- HTTPPath: "/2018-10-31/layers/{LayerName}/versions/{VersionNumber}/policy",
- }
- if input == nil {
- input = &GetLayerVersionPolicyInput{}
- }
- output = &GetLayerVersionPolicyOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // GetLayerVersionPolicy API operation for AWS Lambda.
- //
- // Returns the permission policy for a version of an AWS Lambda layer (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html).
- // For more information, see AddLayerVersionPermission.
- //
- // 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 GetLayerVersionPolicy 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"
- // Request throughput limit exceeded.
- //
- // * 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.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetLayerVersionPolicy
- func (c *Lambda) GetLayerVersionPolicy(input *GetLayerVersionPolicyInput) (*GetLayerVersionPolicyOutput, error) {
- req, out := c.GetLayerVersionPolicyRequest(input)
- return out, req.Send()
- }
- // GetLayerVersionPolicyWithContext is the same as GetLayerVersionPolicy with the addition of
- // the ability to pass a context and additional request options.
- //
- // See GetLayerVersionPolicy 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) GetLayerVersionPolicyWithContext(ctx aws.Context, input *GetLayerVersionPolicyInput, opts ...request.Option) (*GetLayerVersionPolicyOutput, error) {
- req, out := c.GetLayerVersionPolicyRequest(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 completes
- // successfully.
- //
- // 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)
- // }
- //
- // See also, 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-based IAM policy (http://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html)
- // for a function, version, or alias.
- //
- // 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"
- // Request throughput limit exceeded.
- //
- // * 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.
- //
- // See also, 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 completes
- // successfully.
- //
- // 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)
- // }
- //
- // See also, 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 Lambda function. You can invoke a function synchronously and wait
- // for the response, or asynchronously. To invoke a function asynchronously,
- // set InvocationType to Event.
- //
- // For synchronous invocation, details about the function response, including
- // errors, are included in the response body and headers. For either invocation
- // type, you can find more information in the execution log (http://docs.aws.amazon.com/lambda/latest/dg/monitoring-functions.html)
- // and trace (http://docs.aws.amazon.com/lambda/latest/dg/dlq.html). To record
- // function errors for asynchronous invocations, configure your function with
- // a dead letter queue (http://docs.aws.amazon.com/lambda/latest/dg/dlq.html).
- //
- // The status code in the API response does not reflect function errors. Error
- // codes are reserved for errors that prevent your function from executing,
- // such as permissions errors, limit errors (http://docs.aws.amazon.com/lambda/latest/dg/limits.html),
- // or issues with your function's code and configuration. For example, Lambda
- // returns TooManyRequestsException if executing the function would cause you
- // to exceed a concurrency limit at either the account level (ConcurrentInvocationLimitExceeded)
- // or function level (ReservedFunctionConcurrentInvocationLimitExceeded).
- //
- // For functions with a long timeout, your client may be disconnected during
- // synchronous invocation while it waits for a response. Configure your HTTP
- // client, SDK, firewall, proxy, or operating system to allow for long connections
- // with timeout or keep-alive settings.
- //
- // 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"
- // Request throughput limit exceeded.
- //
- // * 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.
- //
- // * 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"
- // Need additional permissions to configure VPC settings.
- //
- // * 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 deployment package.
- //
- // * 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.
- //
- // See also, 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 completes
- // successfully.
- //
- // 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)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/InvokeAsync
- //
- // Deprecated: InvokeAsync has been deprecated
- 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.
- //
- // For asynchronous function invocation, use Invoke.
- //
- // Invokes a function asynchronously.
- //
- // 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.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/InvokeAsync
- //
- // Deprecated: InvokeAsync has been deprecated
- 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.
- //
- // Deprecated: InvokeAsyncWithContext has been deprecated
- 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 completes
- // successfully.
- //
- // 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)
- // }
- //
- // See also, 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 a list of aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html)
- // for a Lambda function.
- //
- // 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.
- //
- // * ErrCodeTooManyRequestsException "TooManyRequestsException"
- // Request throughput limit exceeded.
- //
- // See also, 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 completes
- // successfully.
- //
- // 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)
- // }
- //
- // See also, 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.
- //
- // Lists event source mappings. Specify an EventSourceArn to only show event
- // source mappings for a single event source.
- //
- // 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.
- //
- // * ErrCodeTooManyRequestsException "TooManyRequestsException"
- // Request throughput limit exceeded.
- //
- // See also, 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 completes
- // successfully.
- //
- // 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)
- // }
- //
- // See also, 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 Lambda functions, with the version-specific configuration
- // of each.
- //
- // Set FunctionVersion to ALL to include all published versions of each function
- // in addition to the unpublished version. To get more information about a function
- // or version, use GetFunction.
- //
- // 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"
- // Request throughput limit exceeded.
- //
- // * 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.
- //
- // See also, 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 opListLayerVersions = "ListLayerVersions"
- // ListLayerVersionsRequest generates a "aws/request.Request" representing the
- // client's request for the ListLayerVersions operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // 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 ListLayerVersions for more information on using the ListLayerVersions
- // 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 ListLayerVersionsRequest method.
- // req, resp := client.ListLayerVersionsRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListLayerVersions
- func (c *Lambda) ListLayerVersionsRequest(input *ListLayerVersionsInput) (req *request.Request, output *ListLayerVersionsOutput) {
- op := &request.Operation{
- Name: opListLayerVersions,
- HTTPMethod: "GET",
- HTTPPath: "/2018-10-31/layers/{LayerName}/versions",
- }
- if input == nil {
- input = &ListLayerVersionsInput{}
- }
- output = &ListLayerVersionsOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // ListLayerVersions API operation for AWS Lambda.
- //
- // Lists the versions of an AWS Lambda layer (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html).
- // Versions that have been deleted aren't listed. Specify a runtime identifier
- // (http://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html) to list
- // only versions that indicate that they're compatible with that runtime.
- //
- // 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 ListLayerVersions 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.
- //
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // The resource (for example, a Lambda function or access policy statement)
- // specified in the request does not exist.
- //
- // * ErrCodeTooManyRequestsException "TooManyRequestsException"
- // Request throughput limit exceeded.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListLayerVersions
- func (c *Lambda) ListLayerVersions(input *ListLayerVersionsInput) (*ListLayerVersionsOutput, error) {
- req, out := c.ListLayerVersionsRequest(input)
- return out, req.Send()
- }
- // ListLayerVersionsWithContext is the same as ListLayerVersions with the addition of
- // the ability to pass a context and additional request options.
- //
- // See ListLayerVersions 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) ListLayerVersionsWithContext(ctx aws.Context, input *ListLayerVersionsInput, opts ...request.Option) (*ListLayerVersionsOutput, error) {
- req, out := c.ListLayerVersionsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opListLayers = "ListLayers"
- // ListLayersRequest generates a "aws/request.Request" representing the
- // client's request for the ListLayers operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // 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 ListLayers for more information on using the ListLayers
- // 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 ListLayersRequest method.
- // req, resp := client.ListLayersRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListLayers
- func (c *Lambda) ListLayersRequest(input *ListLayersInput) (req *request.Request, output *ListLayersOutput) {
- op := &request.Operation{
- Name: opListLayers,
- HTTPMethod: "GET",
- HTTPPath: "/2018-10-31/layers",
- }
- if input == nil {
- input = &ListLayersInput{}
- }
- output = &ListLayersOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // ListLayers API operation for AWS Lambda.
- //
- // Lists AWS Lambda layers (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html)
- // and shows information about the latest version of each. Specify a runtime
- // identifier (http://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html)
- // to list only layers that indicate that they're compatible with that runtime.
- //
- // 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 ListLayers 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.
- //
- // * ErrCodeTooManyRequestsException "TooManyRequestsException"
- // Request throughput limit exceeded.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListLayers
- func (c *Lambda) ListLayers(input *ListLayersInput) (*ListLayersOutput, error) {
- req, out := c.ListLayersRequest(input)
- return out, req.Send()
- }
- // ListLayersWithContext is the same as ListLayers with the addition of
- // the ability to pass a context and additional request options.
- //
- // See ListLayers 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) ListLayersWithContext(ctx aws.Context, input *ListLayersInput, opts ...request.Option) (*ListLayersOutput, error) {
- req, out := c.ListLayersRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- 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 completes
- // successfully.
- //
- // 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)
- // }
- //
- // See also, 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 function's tags (http://docs.aws.amazon.com/lambda/latest/dg/tagging.html).
- // You can also view tags with GetFunction.
- //
- // 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.
- //
- // * ErrCodeTooManyRequestsException "TooManyRequestsException"
- // Request throughput limit exceeded.
- //
- // See also, 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 completes
- // successfully.
- //
- // 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)
- // }
- //
- // See also, 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.
- //
- // Returns a list of versions (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html),
- // with the version-specific configuration of each.
- //
- // 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.
- //
- // * ErrCodeTooManyRequestsException "TooManyRequestsException"
- // Request throughput limit exceeded.
- //
- // See also, 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 opPublishLayerVersion = "PublishLayerVersion"
- // PublishLayerVersionRequest generates a "aws/request.Request" representing the
- // client's request for the PublishLayerVersion operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // 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 PublishLayerVersion for more information on using the PublishLayerVersion
- // 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 PublishLayerVersionRequest method.
- // req, resp := client.PublishLayerVersionRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/PublishLayerVersion
- func (c *Lambda) PublishLayerVersionRequest(input *PublishLayerVersionInput) (req *request.Request, output *PublishLayerVersionOutput) {
- op := &request.Operation{
- Name: opPublishLayerVersion,
- HTTPMethod: "POST",
- HTTPPath: "/2018-10-31/layers/{LayerName}/versions",
- }
- if input == nil {
- input = &PublishLayerVersionInput{}
- }
- output = &PublishLayerVersionOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // PublishLayerVersion API operation for AWS Lambda.
- //
- // Creates an AWS Lambda layer (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html)
- // from a ZIP archive. Each time you call PublishLayerVersion with the same
- // version name, a new version is created.
- //
- // Add layers to your function with CreateFunction or UpdateFunctionConfiguration.
- //
- // 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 PublishLayerVersion 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"
- // Request throughput limit exceeded.
- //
- // * 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.
- //
- // * ErrCodeCodeStorageExceededException "CodeStorageExceededException"
- // You have exceeded your maximum total code size per account. Limits (http://docs.aws.amazon.com/lambda/latest/dg/limits.html)
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/PublishLayerVersion
- func (c *Lambda) PublishLayerVersion(input *PublishLayerVersionInput) (*PublishLayerVersionOutput, error) {
- req, out := c.PublishLayerVersionRequest(input)
- return out, req.Send()
- }
- // PublishLayerVersionWithContext is the same as PublishLayerVersion with the addition of
- // the ability to pass a context and additional request options.
- //
- // See PublishLayerVersion 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) PublishLayerVersionWithContext(ctx aws.Context, input *PublishLayerVersionInput, opts ...request.Option) (*PublishLayerVersionOutput, error) {
- req, out := c.PublishLayerVersionRequest(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 completes
- // successfully.
- //
- // 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)
- // }
- //
- // See also, 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.
- //
- // Creates a version (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html)
- // from the current code and configuration of a function. Use versions to create
- // a snapshot of your function code and configuration that doesn't change.
- //
- // AWS Lambda does not publish a version if the function's configuration and
- // code hasn't changed since the last version. Use UpdateFunctionCode or UpdateFunctionConfiguration
- // to update the function prior to publishing a version.
- //
- // Clients can invoke versions directly or with an alias. To create an alias,
- // use CreateAlias.
- //
- // 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.
- //
- // * ErrCodeTooManyRequestsException "TooManyRequestsException"
- // Request throughput limit exceeded.
- //
- // * ErrCodeCodeStorageExceededException "CodeStorageExceededException"
- // You have exceeded your maximum total code size per account. Limits (http://docs.aws.amazon.com/lambda/latest/dg/limits.html)
- //
- // * ErrCodePreconditionFailedException "PreconditionFailedException"
- // The RevisionId provided does not match the latest RevisionId for the Lambda
- // function or alias. Call the GetFunction or the GetAlias API to retrieve the
- // latest RevisionId for your resource.
- //
- // See also, 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 opPutFunctionConcurrency = "PutFunctionConcurrency"
- // PutFunctionConcurrencyRequest generates a "aws/request.Request" representing the
- // client's request for the PutFunctionConcurrency operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // 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 PutFunctionConcurrency for more information on using the PutFunctionConcurrency
- // 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 PutFunctionConcurrencyRequest method.
- // req, resp := client.PutFunctionConcurrencyRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/PutFunctionConcurrency
- func (c *Lambda) PutFunctionConcurrencyRequest(input *PutFunctionConcurrencyInput) (req *request.Request, output *PutFunctionConcurrencyOutput) {
- op := &request.Operation{
- Name: opPutFunctionConcurrency,
- HTTPMethod: "PUT",
- HTTPPath: "/2017-10-31/functions/{FunctionName}/concurrency",
- }
- if input == nil {
- input = &PutFunctionConcurrencyInput{}
- }
- output = &PutFunctionConcurrencyOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // PutFunctionConcurrency API operation for AWS Lambda.
- //
- // Sets the maximum number of simultaneous executions for a function, and reserves
- // capacity for that concurrency level.
- //
- // Concurrency settings apply to the function as a whole, including all published
- // versions and the unpublished version. Reserving concurrency both guarantees
- // that your function has capacity to process the specified number of events
- // simultaneously, and prevents it from scaling beyond that level. Use GetFunction
- // to see the current setting for a function.
- //
- // Use GetAccountSettings to see your regional concurrency limit. You can reserve
- // concurrency for as many functions as you like, as long as you leave at least
- // 100 simultaneous executions unreserved for functions that aren't configured
- // with a per-function limit. For more information, see Managing Concurrency
- // (http://docs.aws.amazon.com/lambda/latest/dg/concurrent-executions.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 PutFunctionConcurrency 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.
- //
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // The resource (for example, a Lambda function or access policy statement)
- // specified in the request does not exist.
- //
- // * ErrCodeTooManyRequestsException "TooManyRequestsException"
- // Request throughput limit exceeded.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/PutFunctionConcurrency
- func (c *Lambda) PutFunctionConcurrency(input *PutFunctionConcurrencyInput) (*PutFunctionConcurrencyOutput, error) {
- req, out := c.PutFunctionConcurrencyRequest(input)
- return out, req.Send()
- }
- // PutFunctionConcurrencyWithContext is the same as PutFunctionConcurrency with the addition of
- // the ability to pass a context and additional request options.
- //
- // See PutFunctionConcurrency 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) PutFunctionConcurrencyWithContext(ctx aws.Context, input *PutFunctionConcurrencyInput, opts ...request.Option) (*PutFunctionConcurrencyOutput, error) {
- req, out := c.PutFunctionConcurrencyRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opRemoveLayerVersionPermission = "RemoveLayerVersionPermission"
- // RemoveLayerVersionPermissionRequest generates a "aws/request.Request" representing the
- // client's request for the RemoveLayerVersionPermission operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // 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 RemoveLayerVersionPermission for more information on using the RemoveLayerVersionPermission
- // 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 RemoveLayerVersionPermissionRequest method.
- // req, resp := client.RemoveLayerVersionPermissionRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/RemoveLayerVersionPermission
- func (c *Lambda) RemoveLayerVersionPermissionRequest(input *RemoveLayerVersionPermissionInput) (req *request.Request, output *RemoveLayerVersionPermissionOutput) {
- op := &request.Operation{
- Name: opRemoveLayerVersionPermission,
- HTTPMethod: "DELETE",
- HTTPPath: "/2018-10-31/layers/{LayerName}/versions/{VersionNumber}/policy/{StatementId}",
- }
- if input == nil {
- input = &RemoveLayerVersionPermissionInput{}
- }
- output = &RemoveLayerVersionPermissionOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
- }
- // RemoveLayerVersionPermission API operation for AWS Lambda.
- //
- // Removes a statement from the permissions policy for a version of an AWS Lambda
- // layer (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html).
- // For more information, see AddLayerVersionPermission.
- //
- // 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 RemoveLayerVersionPermission 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.
- //
- // * ErrCodeTooManyRequestsException "TooManyRequestsException"
- // Request throughput limit exceeded.
- //
- // * ErrCodePreconditionFailedException "PreconditionFailedException"
- // The RevisionId provided does not match the latest RevisionId for the Lambda
- // function or alias. Call the GetFunction or the GetAlias API to retrieve the
- // latest RevisionId for your resource.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/RemoveLayerVersionPermission
- func (c *Lambda) RemoveLayerVersionPermission(input *RemoveLayerVersionPermissionInput) (*RemoveLayerVersionPermissionOutput, error) {
- req, out := c.RemoveLayerVersionPermissionRequest(input)
- return out, req.Send()
- }
- // RemoveLayerVersionPermissionWithContext is the same as RemoveLayerVersionPermission with the addition of
- // the ability to pass a context and additional request options.
- //
- // See RemoveLayerVersionPermission 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) RemoveLayerVersionPermissionWithContext(ctx aws.Context, input *RemoveLayerVersionPermissionInput, opts ...request.Option) (*RemoveLayerVersionPermissionOutput, error) {
- req, out := c.RemoveLayerVersionPermissionRequest(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 completes
- // successfully.
- //
- // 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)
- // }
- //
- // See also, 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.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
- }
- // RemovePermission API operation for AWS Lambda.
- //
- // Revokes function use permission from an AWS service or another account. You
- // can get the ID of the statement from the output of GetPolicy.
- //
- // 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.
- //
- // * ErrCodeTooManyRequestsException "TooManyRequestsException"
- // Request throughput limit exceeded.
- //
- // * ErrCodePreconditionFailedException "PreconditionFailedException"
- // The RevisionId provided does not match the latest RevisionId for the Lambda
- // function or alias. Call the GetFunction or the GetAlias API to retrieve the
- // latest RevisionId for your resource.
- //
- // See also, 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 completes
- // successfully.
- //
- // 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)
- // }
- //
- // See also, 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.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
- }
- // TagResource API operation for AWS Lambda.
- //
- // Adds tags (http://docs.aws.amazon.com/lambda/latest/dg/tagging.html) to a
- // function.
- //
- // 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.
- //
- // * ErrCodeTooManyRequestsException "TooManyRequestsException"
- // Request throughput limit exceeded.
- //
- // See also, 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 completes
- // successfully.
- //
- // 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)
- // }
- //
- // See also, 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.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
- }
- // UntagResource API operation for AWS Lambda.
- //
- // Removes tags (http://docs.aws.amazon.com/lambda/latest/dg/tagging.html) from
- // a function.
- //
- // 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.
- //
- // * ErrCodeTooManyRequestsException "TooManyRequestsException"
- // Request throughput limit exceeded.
- //
- // See also, 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 completes
- // successfully.
- //
- // 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)
- // }
- //
- // See also, 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.
- //
- // Updates the configuration of a Lambda function alias (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 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.
- //
- // * ErrCodeTooManyRequestsException "TooManyRequestsException"
- // Request throughput limit exceeded.
- //
- // * ErrCodePreconditionFailedException "PreconditionFailedException"
- // The RevisionId provided does not match the latest RevisionId for the Lambda
- // function or alias. Call the GetFunction or the GetAlias API to retrieve the
- // latest RevisionId for your resource.
- //
- // See also, 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 completes
- // successfully.
- //
- // 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)
- // }
- //
- // See also, 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.
- //
- // Updates an event source mapping. You can change the function that AWS Lambda
- // invokes, or pause invocation and resume later from the same location.
- //
- // 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.
- //
- // * ErrCodeTooManyRequestsException "TooManyRequestsException"
- // Request throughput limit exceeded.
- //
- // * ErrCodeResourceConflictException "ResourceConflictException"
- // The resource already exists.
- //
- // * ErrCodeResourceInUseException "ResourceInUseException"
- // The operation conflicts with the resource's availability. For example, you
- // attempted to update an EventSource Mapping in CREATING, or tried to delete
- // a EventSource mapping currently in the UPDATING state.
- //
- // See also, 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 completes
- // successfully.
- //
- // 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)
- // }
- //
- // See also, 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 a Lambda function's code.
- //
- // The function's code is locked when you publish a version. You cannot modify
- // the code of a published version, only the unpublished version.
- //
- // 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.
- //
- // * ErrCodeTooManyRequestsException "TooManyRequestsException"
- // Request throughput limit exceeded.
- //
- // * ErrCodeCodeStorageExceededException "CodeStorageExceededException"
- // You have exceeded your maximum total code size per account. Limits (http://docs.aws.amazon.com/lambda/latest/dg/limits.html)
- //
- // * ErrCodePreconditionFailedException "PreconditionFailedException"
- // The RevisionId provided does not match the latest RevisionId for the Lambda
- // function or alias. Call the GetFunction or the GetAlias API to retrieve the
- // latest RevisionId for your resource.
- //
- // See also, 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 completes
- // successfully.
- //
- // 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)
- // }
- //
- // See also, 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.
- //
- // Modify the version-specifc settings of a Lambda function.
- //
- // These settings can vary between versions of a function and are locked when
- // you publish a version. You cannot modify the configuration of a published
- // version, only the unpublished version.
- //
- // To configure function concurrency, use PutFunctionConcurrency. To grant invoke
- // permissions to an account or AWS service, use AddPermission.
- //
- // 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.
- //
- // * ErrCodeTooManyRequestsException "TooManyRequestsException"
- // Request throughput limit exceeded.
- //
- // * ErrCodeResourceConflictException "ResourceConflictException"
- // The resource already exists.
- //
- // * ErrCodePreconditionFailedException "PreconditionFailedException"
- // The RevisionId provided does not match the latest RevisionId for the Lambda
- // function or alias. Call the GetFunction or the GetAlias API to retrieve the
- // latest RevisionId for your resource.
- //
- // See also, 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()
- }
- // Limits related to concurrency and code storage. All file and storage sizes
- // are in bytes.
- type AccountLimit struct {
- _ struct{} `type:"structure"`
- // The maximum size of your function's code and layers when extracted.
- CodeSizeUnzipped *int64 `type:"long"`
- // The maximum size of a deployment package when uploaded direcly to AWS Lambda.
- // Use Amazon S3 for larger files.
- CodeSizeZipped *int64 `type:"long"`
- // The maximum number of simultaneous function executions.
- ConcurrentExecutions *int64 `type:"integer"`
- // The amount of storage space that you can use for all deployment packages
- // and layer archives.
- TotalCodeSize *int64 `type:"long"`
- // The maximum number of simultaneous function executions, less the concurrency
- // reserved for individual functions with PutFunctionConcurrency.
- UnreservedConcurrentExecutions *int64 `type:"integer"`
- }
- // 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
- }
- // SetUnreservedConcurrentExecutions sets the UnreservedConcurrentExecutions field's value.
- func (s *AccountLimit) SetUnreservedConcurrentExecutions(v int64) *AccountLimit {
- s.UnreservedConcurrentExecutions = &v
- return s
- }
- // The number of functions and amount of storage in use.
- type AccountUsage struct {
- _ struct{} `type:"structure"`
- // The number of Lambda functions.
- FunctionCount *int64 `type:"long"`
- // The amount of storage space, in bytes, in use by deployment packages and
- // layer archives.
- 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
- }
- type AddLayerVersionPermissionInput struct {
- _ struct{} `type:"structure"`
- // The API action that grants access to the layer. For example, lambda:GetLayerVersion.
- //
- // Action is a required field
- Action *string `type:"string" required:"true"`
- // The name or Amazon Resource Name (ARN) of the layer.
- //
- // LayerName is a required field
- LayerName *string `location:"uri" locationName:"LayerName" min:"1" type:"string" required:"true"`
- // With the principal set to *, grant permission to all accounts in the specified
- // organization.
- OrganizationId *string `type:"string"`
- // An account ID, or * to grant permission to all AWS accounts.
- //
- // Principal is a required field
- Principal *string `type:"string" required:"true"`
- // Only update the policy if the revision ID matches the ID specified. Use this
- // option to avoid modifying a policy that has changed since you last read it.
- RevisionId *string `location:"querystring" locationName:"RevisionId" type:"string"`
- // An identifier that distinguishes the policy from others on the same layer
- // version.
- //
- // StatementId is a required field
- StatementId *string `min:"1" type:"string" required:"true"`
- // The version number.
- //
- // VersionNumber is a required field
- VersionNumber *int64 `location:"uri" locationName:"VersionNumber" type:"long" required:"true"`
- }
- // String returns the string representation
- func (s AddLayerVersionPermissionInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s AddLayerVersionPermissionInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *AddLayerVersionPermissionInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "AddLayerVersionPermissionInput"}
- if s.Action == nil {
- invalidParams.Add(request.NewErrParamRequired("Action"))
- }
- if s.LayerName == nil {
- invalidParams.Add(request.NewErrParamRequired("LayerName"))
- }
- if s.LayerName != nil && len(*s.LayerName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("LayerName", 1))
- }
- if s.Principal == nil {
- invalidParams.Add(request.NewErrParamRequired("Principal"))
- }
- if s.StatementId == nil {
- invalidParams.Add(request.NewErrParamRequired("StatementId"))
- }
- if s.StatementId != nil && len(*s.StatementId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("StatementId", 1))
- }
- if s.VersionNumber == nil {
- invalidParams.Add(request.NewErrParamRequired("VersionNumber"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetAction sets the Action field's value.
- func (s *AddLayerVersionPermissionInput) SetAction(v string) *AddLayerVersionPermissionInput {
- s.Action = &v
- return s
- }
- // SetLayerName sets the LayerName field's value.
- func (s *AddLayerVersionPermissionInput) SetLayerName(v string) *AddLayerVersionPermissionInput {
- s.LayerName = &v
- return s
- }
- // SetOrganizationId sets the OrganizationId field's value.
- func (s *AddLayerVersionPermissionInput) SetOrganizationId(v string) *AddLayerVersionPermissionInput {
- s.OrganizationId = &v
- return s
- }
- // SetPrincipal sets the Principal field's value.
- func (s *AddLayerVersionPermissionInput) SetPrincipal(v string) *AddLayerVersionPermissionInput {
- s.Principal = &v
- return s
- }
- // SetRevisionId sets the RevisionId field's value.
- func (s *AddLayerVersionPermissionInput) SetRevisionId(v string) *AddLayerVersionPermissionInput {
- s.RevisionId = &v
- return s
- }
- // SetStatementId sets the StatementId field's value.
- func (s *AddLayerVersionPermissionInput) SetStatementId(v string) *AddLayerVersionPermissionInput {
- s.StatementId = &v
- return s
- }
- // SetVersionNumber sets the VersionNumber field's value.
- func (s *AddLayerVersionPermissionInput) SetVersionNumber(v int64) *AddLayerVersionPermissionInput {
- s.VersionNumber = &v
- return s
- }
- type AddLayerVersionPermissionOutput struct {
- _ struct{} `type:"structure"`
- // A unique identifier for the current revision of the policy.
- RevisionId *string `type:"string"`
- // The permission statement.
- Statement *string `type:"string"`
- }
- // String returns the string representation
- func (s AddLayerVersionPermissionOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s AddLayerVersionPermissionOutput) GoString() string {
- return s.String()
- }
- // SetRevisionId sets the RevisionId field's value.
- func (s *AddLayerVersionPermissionOutput) SetRevisionId(v string) *AddLayerVersionPermissionOutput {
- s.RevisionId = &v
- return s
- }
- // SetStatement sets the Statement field's value.
- func (s *AddLayerVersionPermissionOutput) SetStatement(v string) *AddLayerVersionPermissionOutput {
- s.Statement = &v
- return s
- }
- type AddPermissionInput struct {
- _ struct{} `type:"structure"`
- // The action that the principal can use on the function. For example, lambda:InvokeFunction
- // or lambda:GetFunction.
- //
- // Action is a required field
- Action *string `type:"string" required:"true"`
- // For Alexa Smart Home functions, a token that must be supplied by the invoker.
- EventSourceToken *string `type:"string"`
- // The name of the Lambda function, version, or alias.
- //
- // Name formats
- //
- // * Function name - my-function (name-only), my-function:v1 (with alias).
- //
- // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function.
- //
- // * Partial ARN - 123456789012:function:my-function.
- //
- // You can append a version number or alias to any of the formats. The length
- // constraint applies only to the full 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 AWS service or account that invokes the function. If you specify a service,
- // use SourceArn or SourceAccount to limit who can invoke the function through
- // that service.
- //
- // Principal is a required field
- Principal *string `type:"string" required:"true"`
- // Specify a version or alias to add permissions to a published version of the
- // function.
- Qualifier *string `location:"querystring" locationName:"Qualifier" min:"1" type:"string"`
- // Only update the policy if the revision ID matches the ID specified. Use this
- // option to avoid modifying a policy that has changed since you last read it.
- RevisionId *string `type:"string"`
- // For AWS services, the ID of the account that owns the resource. Use instead
- // of SourceArn to grant permission to resources owned by another account (e.g.
- // all of an account's Amazon S3 buckets). Or use together with SourceArn to
- // ensure that the resource is owned by the specified account. For example,
- // an Amazon S3 bucket could be deleted by its owner and recreated by another
- // account.
- SourceAccount *string `type:"string"`
- // For AWS services, the ARN of the AWS resource that invokes the function.
- // For example, an Amazon S3 bucket or Amazon SNS topic.
- SourceArn *string `type:"string"`
- // A statement identifier that differentiates the statement from others in the
- // same policy.
- //
- // 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
- }
- // SetRevisionId sets the RevisionId field's value.
- func (s *AddPermissionInput) SetRevisionId(v string) *AddPermissionInput {
- s.RevisionId = &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
- }
- type AddPermissionOutput struct {
- _ struct{} `type:"structure"`
- // The permission statement added to the function policy.
- 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 alias (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).
- type AliasConfiguration struct {
- _ struct{} `type:"structure"`
- // The Amazon Resource Name (ARN) of the alias.
- AliasArn *string `type:"string"`
- // A description of the alias.
- Description *string `type:"string"`
- // The function version that the alias invokes.
- FunctionVersion *string `min:"1" type:"string"`
- // The name of the alias.
- Name *string `min:"1" type:"string"`
- // A unique identifier that changes when you update the alias.
- RevisionId *string `type:"string"`
- // The routing configuration (http://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html)
- // of the alias.
- RoutingConfig *AliasRoutingConfiguration `type:"structure"`
- }
- // 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
- }
- // SetRevisionId sets the RevisionId field's value.
- func (s *AliasConfiguration) SetRevisionId(v string) *AliasConfiguration {
- s.RevisionId = &v
- return s
- }
- // SetRoutingConfig sets the RoutingConfig field's value.
- func (s *AliasConfiguration) SetRoutingConfig(v *AliasRoutingConfiguration) *AliasConfiguration {
- s.RoutingConfig = v
- return s
- }
- // A Lambda function alias's traffic shifting (http://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html)
- // configuration.
- type AliasRoutingConfiguration struct {
- _ struct{} `type:"structure"`
- // The name of the second alias, and the percentage of traffic that is routed
- // to it.
- AdditionalVersionWeights map[string]*float64 `type:"map"`
- }
- // String returns the string representation
- func (s AliasRoutingConfiguration) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s AliasRoutingConfiguration) GoString() string {
- return s.String()
- }
- // SetAdditionalVersionWeights sets the AdditionalVersionWeights field's value.
- func (s *AliasRoutingConfiguration) SetAdditionalVersionWeights(v map[string]*float64) *AliasRoutingConfiguration {
- s.AdditionalVersionWeights = v
- return s
- }
- type CreateAliasInput struct {
- _ struct{} `type:"structure"`
- // A description of the alias.
- Description *string `type:"string"`
- // The name of the lambda function.
- //
- // Name formats
- //
- // * Function name - MyFunction.
- //
- // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction.
- //
- // * Partial ARN - 123456789012:function:MyFunction.
- //
- // The length constraint applies only to the full 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 function version that the alias invokes.
- //
- // FunctionVersion is a required field
- FunctionVersion *string `min:"1" type:"string" required:"true"`
- // The name of the alias.
- //
- // Name is a required field
- Name *string `min:"1" type:"string" required:"true"`
- // The routing configuration (http://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html)
- // of the alias.
- RoutingConfig *AliasRoutingConfiguration `type:"structure"`
- }
- // 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
- }
- // SetRoutingConfig sets the RoutingConfig field's value.
- func (s *CreateAliasInput) SetRoutingConfig(v *AliasRoutingConfiguration) *CreateAliasInput {
- s.RoutingConfig = v
- return s
- }
- type CreateEventSourceMappingInput struct {
- _ struct{} `type:"structure"`
- // The maximum number of items to retrieve in a single batch.
- //
- // * Amazon Kinesis - Default 100. Max 10,000.
- //
- // * Amazon DynamoDB Streams - Default 100. Max 1,000.
- //
- // * Amazon Simple Queue Service - Default 10. Max 10.
- BatchSize *int64 `min:"1" type:"integer"`
- // Disables the event source mapping to pause polling and invocation.
- Enabled *bool `type:"boolean"`
- // The Amazon Resource Name (ARN) of the event source.
- //
- // * Amazon Kinesis - The ARN of the data stream or a stream consumer.
- //
- // * Amazon DynamoDB Streams - The ARN of the stream.
- //
- // * Amazon Simple Queue Service - The ARN of the queue.
- //
- // EventSourceArn is a required field
- EventSourceArn *string `type:"string" required:"true"`
- // The name of the Lambda function.
- //
- // Name formats
- //
- // * Function name - MyFunction.
- //
- // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction.
- //
- // * Version or Alias ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD.
- //
- // * Partial ARN - 123456789012:function:MyFunction.
- //
- // The length constraint applies only to the full ARN. If you specify only the
- // function name, it's limited to 64 characters in length.
- //
- // FunctionName is a required field
- FunctionName *string `min:"1" type:"string" required:"true"`
- // The position in a stream from which to start reading. Required for Amazon
- // Kinesis and Amazon DynamoDB Streams sources. AT_TIMESTAMP is only supported
- // for Amazon Kinesis streams.
- StartingPosition *string `type:"string" enum:"EventSourcePosition"`
- // With StartingPosition set to AT_TIMESTAMP, the time from which to start reading.
- StartingPositionTimestamp *time.Time `type:"timestamp"`
- }
- // 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 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
- }
- type CreateFunctionInput struct {
- _ struct{} `type:"structure"`
- // The code for the function.
- //
- // Code is a required field
- Code *FunctionCode `type:"structure" required:"true"`
- // A dead letter queue configuration that specifies the queue or topic where
- // Lambda sends asynchronous events when they fail processing. For more information,
- // see Dead Letter Queues (http://docs.aws.amazon.com/lambda/latest/dg/dlq.html).
- DeadLetterConfig *DeadLetterConfig `type:"structure"`
- // A description of the function.
- Description *string `type:"string"`
- // Environment variables that are accessible from function code during execution.
- Environment *Environment `type:"structure"`
- // The name of the Lambda function.
- //
- // Name formats
- //
- // * Function name - my-function.
- //
- // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function.
- //
- // * Partial ARN - 123456789012:function:my-function.
- //
- // The length constraint applies only to the full 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 name of the method within your code that Lambda calls to execute your
- // function. The format includes the filename and can also include namespaces
- // and other qualifiers, depending on the runtime. For more information, see
- // Programming Model (http://docs.aws.amazon.com/lambda/latest/dg/programming-model-v2.html).
- //
- // Handler is a required field
- Handler *string `type:"string" required:"true"`
- // The ARN of the AWS Key Management Service key used to encrypt your function's
- // environment variables. If not provided, AWS Lambda uses a default service
- // key.
- KMSKeyArn *string `type:"string"`
- // A list of function layers (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html)
- // to add to the function's execution environment. Specify each layer by ARN,
- // including the version.
- Layers []*string `type:"list"`
- // The amount of memory that your function has access to. Increasing the function's
- // memory also increases it's CPU allocation. The default value is 128 MB. The
- // value must be a multiple of 64 MB.
- MemorySize *int64 `min:"128" type:"integer"`
- // Set to true to publish the first version of the function during creation.
- Publish *bool `type:"boolean"`
- // The Amazon Resource Name (ARN) of the function's execution role.
- //
- // Role is a required field
- Role *string `type:"string" required:"true"`
- // The identifier of the function's runtime (http://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html).
- //
- // Runtime is a required field
- Runtime *string `type:"string" required:"true" enum:"Runtime"`
- // A list of tags (http://docs.aws.amazon.com/lambda/latest/dg/tagging.html)
- // to apply to the function.
- Tags map[string]*string `type:"map"`
- // The amount of time that Lambda allows a function to run before terminating
- // it. The default is 3 seconds. The maximum allowed value is 900 seconds.
- Timeout *int64 `min:"1" type:"integer"`
- // Set Mode to Active to sample and trace a subset of incoming requests with
- // AWS X-Ray.
- TracingConfig *TracingConfig `type:"structure"`
- // For network connectivity to AWS resources in a VPC, specify a list of security
- // groups and subnets in the VPC. When you connect a function to a VPC, it can
- // only access resources and the internet through that VPC. For more information,
- // see VPC Settings (http://docs.aws.amazon.com/lambda/latest/dg/vpc.html).
- 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
- }
- // SetLayers sets the Layers field's value.
- func (s *CreateFunctionInput) SetLayers(v []*string) *CreateFunctionInput {
- s.Layers = 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 dead letter queue (http://docs.aws.amazon.com/lambda/latest/dg/dlq.html)
- // for failed asynchronous invocations.
- type DeadLetterConfig struct {
- _ struct{} `type:"structure"`
- // The Amazon Resource Name (ARN) of an Amazon SQS queue or Amazon SNS topic.
- 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
- }
- type DeleteAliasInput struct {
- _ struct{} `type:"structure"`
- // The name of the lambda function.
- //
- // Name formats
- //
- // * Function name - MyFunction.
- //
- // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction.
- //
- // * Partial ARN - 123456789012:function:MyFunction.
- //
- // The length constraint applies only to the full 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 name of the alias.
- //
- // 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
- }
- 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()
- }
- type DeleteEventSourceMappingInput struct {
- _ struct{} `type:"structure"`
- // The identifier 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 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 s.UUID != nil && len(*s.UUID) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("UUID", 1))
- }
- 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
- }
- type DeleteFunctionConcurrencyInput struct {
- _ struct{} `type:"structure"`
- // The name of the Lambda function.
- //
- // Name formats
- //
- // * Function name - my-function.
- //
- // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function.
- //
- // * Partial ARN - 123456789012:function:my-function.
- //
- // The length constraint applies only to the full 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 DeleteFunctionConcurrencyInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteFunctionConcurrencyInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DeleteFunctionConcurrencyInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteFunctionConcurrencyInput"}
- 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
- }
- // SetFunctionName sets the FunctionName field's value.
- func (s *DeleteFunctionConcurrencyInput) SetFunctionName(v string) *DeleteFunctionConcurrencyInput {
- s.FunctionName = &v
- return s
- }
- type DeleteFunctionConcurrencyOutput struct {
- _ struct{} `type:"structure"`
- }
- // String returns the string representation
- func (s DeleteFunctionConcurrencyOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteFunctionConcurrencyOutput) GoString() string {
- return s.String()
- }
- type DeleteFunctionInput struct {
- _ struct{} `type:"structure"`
- // The name of the Lambda function or version.
- //
- // Name formats
- //
- // * Function name - my-function (name-only), my-function:1 (with version).
- //
- // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function.
- //
- // * Partial ARN - 123456789012:function:my-function.
- //
- // You can append a version number or alias to any of the formats. The length
- // constraint applies only to the full 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"`
- // Specify a version to delete. You cannot delete a version that is referenced
- // by an alias.
- 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
- }
- 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()
- }
- type DeleteLayerVersionInput struct {
- _ struct{} `type:"structure"`
- // The name or Amazon Resource Name (ARN) of the layer.
- //
- // LayerName is a required field
- LayerName *string `location:"uri" locationName:"LayerName" min:"1" type:"string" required:"true"`
- // The version number.
- //
- // VersionNumber is a required field
- VersionNumber *int64 `location:"uri" locationName:"VersionNumber" type:"long" required:"true"`
- }
- // String returns the string representation
- func (s DeleteLayerVersionInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteLayerVersionInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DeleteLayerVersionInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteLayerVersionInput"}
- if s.LayerName == nil {
- invalidParams.Add(request.NewErrParamRequired("LayerName"))
- }
- if s.LayerName != nil && len(*s.LayerName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("LayerName", 1))
- }
- if s.VersionNumber == nil {
- invalidParams.Add(request.NewErrParamRequired("VersionNumber"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetLayerName sets the LayerName field's value.
- func (s *DeleteLayerVersionInput) SetLayerName(v string) *DeleteLayerVersionInput {
- s.LayerName = &v
- return s
- }
- // SetVersionNumber sets the VersionNumber field's value.
- func (s *DeleteLayerVersionInput) SetVersionNumber(v int64) *DeleteLayerVersionInput {
- s.VersionNumber = &v
- return s
- }
- type DeleteLayerVersionOutput struct {
- _ struct{} `type:"structure"`
- }
- // String returns the string representation
- func (s DeleteLayerVersionOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteLayerVersionOutput) GoString() string {
- return s.String()
- }
- // A function's environment variable settings.
- type Environment struct {
- _ struct{} `type:"structure"`
- // Environment variable key-value pairs.
- Variables map[string]*string `type:"map" sensitive:"true"`
- }
- // 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
- }
- // Error messages for environment variables that could not be applied.
- type EnvironmentError struct {
- _ struct{} `type:"structure"`
- // The error code.
- ErrorCode *string `type:"string"`
- // The error message.
- Message *string `type:"string" sensitive:"true"`
- }
- // 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 results of a configuration update that applied environment variables.
- type EnvironmentResponse struct {
- _ struct{} `type:"structure"`
- // Error messages for environment variables that could not be applied.
- Error *EnvironmentError `type:"structure"`
- // Environment variable key-value pairs.
- Variables map[string]*string `type:"map" sensitive:"true"`
- }
- // 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
- }
- // A mapping between an AWS resource and an AWS Lambda function. See CreateEventSourceMapping
- // for details.
- type EventSourceMappingConfiguration struct {
- _ struct{} `type:"structure"`
- // The maximum number of items to retrieve in a single batch.
- BatchSize *int64 `min:"1" type:"integer"`
- // The Amazon Resource Name (ARN) of the event source.
- EventSourceArn *string `type:"string"`
- // The ARN of the Lambda function.
- FunctionArn *string `type:"string"`
- // The date that the event source mapping was last updated.
- LastModified *time.Time `type:"timestamp"`
- // 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 one of the following: Creating,
- // Enabling, Enabled, Disabling, Disabled, Updating, or Deleting.
- State *string `type:"string"`
- // The cause of the last state change, either User initiated or Lambda initiated.
- StateTransitionReason *string `type:"string"`
- // The identifier of the event source 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. You can specify either an object in Amazon
- // S3, or upload a deployment package directly.
- type FunctionCode struct {
- _ struct{} `type:"structure"`
- // An Amazon S3 bucket in the same region as your function. The bucket can be
- // in a different AWS account.
- S3Bucket *string `min:"3" type:"string"`
- // The Amazon S3 key of the deployment package.
- S3Key *string `min:"1" type:"string"`
- // For versioned objects, the version of the deployment package object to use.
- S3ObjectVersion *string `min:"1" type:"string"`
- // The base64-encoded contents of the deployment package. AWS SDK and AWS CLI
- // clients handle the encoding for you.
- //
- // ZipFile is automatically base64 encoded/decoded by the SDK.
- ZipFile []byte `type:"blob" sensitive:"true"`
- }
- // 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
- }
- // Details about a function's deployment package.
- type FunctionCodeLocation struct {
- _ struct{} `type:"structure"`
- // A pre-signed URL that you can use to download the deployment package.
- Location *string `type:"string"`
- // The service hosting the file.
- 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
- }
- // Details about a function's configuration.
- type FunctionConfiguration struct {
- _ struct{} `type:"structure"`
- // The SHA256 hash of the function's deployment package.
- CodeSha256 *string `type:"string"`
- // The size of the function's deployment package in bytes.
- CodeSize *int64 `type:"long"`
- // The function's dead letter queue.
- DeadLetterConfig *DeadLetterConfig `type:"structure"`
- // The function's description.
- Description *string `type:"string"`
- // The function's environment variables.
- Environment *EnvironmentResponse `type:"structure"`
- // The function's Amazon Resource Name (ARN).
- FunctionArn *string `type:"string"`
- // The name of the function.
- FunctionName *string `min:"1" type:"string"`
- // The function Lambda calls to begin executing your function.
- Handler *string `type:"string"`
- // The KMS key used to encrypt the function's environment variables. Only returned
- // if you've configured a customer managed CMK.
- KMSKeyArn *string `type:"string"`
- // The date and time that the function was last updated, in ISO-8601 format
- // (https://www.w3.org/TR/NOTE-datetime) (YYYY-MM-DDThh:mm:ss.sTZD).
- LastModified *string `type:"string"`
- // The function's layers (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html)
- Layers []*Layer `type:"list"`
- // For Lambda@Edge functions, the ARN of the master function.
- MasterArn *string `type:"string"`
- // The memory allocated to the function
- MemorySize *int64 `min:"128" type:"integer"`
- // Represents the latest updated revision of the function or alias.
- RevisionId *string `type:"string"`
- // The function's execution role.
- Role *string `type:"string"`
- // The runtime environment for the Lambda function.
- Runtime *string `type:"string" enum:"Runtime"`
- // The amount of time that Lambda allows a function to run before terminating
- // it.
- Timeout *int64 `min:"1" type:"integer"`
- // The function's AWS X-Ray tracing configuration.
- TracingConfig *TracingConfigResponse `type:"structure"`
- // The version of the Lambda function.
- Version *string `min:"1" type:"string"`
- // The function's networking configuration.
- 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
- }
- // SetLayers sets the Layers field's value.
- func (s *FunctionConfiguration) SetLayers(v []*Layer) *FunctionConfiguration {
- s.Layers = 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
- }
- // SetRevisionId sets the RevisionId field's value.
- func (s *FunctionConfiguration) SetRevisionId(v string) *FunctionConfiguration {
- s.RevisionId = &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
- }
- 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()
- }
- type GetAccountSettingsOutput struct {
- _ struct{} `type:"structure"`
- // Limits related to concurrency and code storage.
- AccountLimit *AccountLimit `type:"structure"`
- // The number of functions and amount of storage in use.
- 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
- }
- type GetAliasInput struct {
- _ struct{} `type:"structure"`
- // The name of the lambda function.
- //
- // Name formats
- //
- // * Function name - MyFunction.
- //
- // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction.
- //
- // * Partial ARN - 123456789012:function:MyFunction.
- //
- // The length constraint applies only to the full 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 name of the alias.
- //
- // 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
- }
- type GetEventSourceMappingInput struct {
- _ struct{} `type:"structure"`
- // The identifier 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 s.UUID != nil && len(*s.UUID) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("UUID", 1))
- }
- 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
- }
- type GetFunctionConfigurationInput struct {
- _ struct{} `type:"structure"`
- // The name of the Lambda function, version, or alias.
- //
- // Name formats
- //
- // * Function name - my-function (name-only), my-function:v1 (with alias).
- //
- // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function.
- //
- // * Partial ARN - 123456789012:function:my-function.
- //
- // You can append a version number or alias to any of the formats. The length
- // constraint applies only to the full 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"`
- // Specify a version or alias to get details about a published version of the
- // function.
- 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
- }
- type GetFunctionInput struct {
- _ struct{} `type:"structure"`
- // The name of the Lambda function, version, or alias.
- //
- // Name formats
- //
- // * Function name - my-function (name-only), my-function:v1 (with alias).
- //
- // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function.
- //
- // * Partial ARN - 123456789012:function:my-function.
- //
- // You can append a version number or alias to any of the formats. The length
- // constraint applies only to the full 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"`
- // Specify a version or alias to get details about a published version of the
- // 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
- }
- type GetFunctionOutput struct {
- _ struct{} `type:"structure"`
- // The deployment package of the function or version.
- Code *FunctionCodeLocation `type:"structure"`
- // The function's reserved concurrency (http://docs.aws.amazon.com/lambda/latest/dg/concurrent-executions.html).
- Concurrency *PutFunctionConcurrencyOutput `type:"structure"`
- // The configuration of the function or version.
- Configuration *FunctionConfiguration `type:"structure"`
- // The function's tags (http://docs.aws.amazon.com/lambda/latest/dg/tagging.html).
- 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
- }
- // SetConcurrency sets the Concurrency field's value.
- func (s *GetFunctionOutput) SetConcurrency(v *PutFunctionConcurrencyOutput) *GetFunctionOutput {
- s.Concurrency = 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
- }
- type GetLayerVersionInput struct {
- _ struct{} `type:"structure"`
- // The name or Amazon Resource Name (ARN) of the layer.
- //
- // LayerName is a required field
- LayerName *string `location:"uri" locationName:"LayerName" min:"1" type:"string" required:"true"`
- // The version number.
- //
- // VersionNumber is a required field
- VersionNumber *int64 `location:"uri" locationName:"VersionNumber" type:"long" required:"true"`
- }
- // String returns the string representation
- func (s GetLayerVersionInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetLayerVersionInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *GetLayerVersionInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetLayerVersionInput"}
- if s.LayerName == nil {
- invalidParams.Add(request.NewErrParamRequired("LayerName"))
- }
- if s.LayerName != nil && len(*s.LayerName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("LayerName", 1))
- }
- if s.VersionNumber == nil {
- invalidParams.Add(request.NewErrParamRequired("VersionNumber"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetLayerName sets the LayerName field's value.
- func (s *GetLayerVersionInput) SetLayerName(v string) *GetLayerVersionInput {
- s.LayerName = &v
- return s
- }
- // SetVersionNumber sets the VersionNumber field's value.
- func (s *GetLayerVersionInput) SetVersionNumber(v int64) *GetLayerVersionInput {
- s.VersionNumber = &v
- return s
- }
- type GetLayerVersionOutput struct {
- _ struct{} `type:"structure"`
- // The layer's compatible runtimes.
- CompatibleRuntimes []*string `type:"list"`
- // Details about the layer version.
- Content *LayerVersionContentOutput `type:"structure"`
- // The date that the layer version was created, in ISO-8601 format (https://www.w3.org/TR/NOTE-datetime)
- // (YYYY-MM-DDThh:mm:ss.sTZD).
- CreatedDate *string `type:"string"`
- // The description of the version.
- Description *string `type:"string"`
- // The ARN of the layer.
- LayerArn *string `min:"1" type:"string"`
- // The ARN of the layer version.
- LayerVersionArn *string `min:"1" type:"string"`
- // The layer's software license.
- LicenseInfo *string `type:"string"`
- // The version number.
- Version *int64 `type:"long"`
- }
- // String returns the string representation
- func (s GetLayerVersionOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetLayerVersionOutput) GoString() string {
- return s.String()
- }
- // SetCompatibleRuntimes sets the CompatibleRuntimes field's value.
- func (s *GetLayerVersionOutput) SetCompatibleRuntimes(v []*string) *GetLayerVersionOutput {
- s.CompatibleRuntimes = v
- return s
- }
- // SetContent sets the Content field's value.
- func (s *GetLayerVersionOutput) SetContent(v *LayerVersionContentOutput) *GetLayerVersionOutput {
- s.Content = v
- return s
- }
- // SetCreatedDate sets the CreatedDate field's value.
- func (s *GetLayerVersionOutput) SetCreatedDate(v string) *GetLayerVersionOutput {
- s.CreatedDate = &v
- return s
- }
- // SetDescription sets the Description field's value.
- func (s *GetLayerVersionOutput) SetDescription(v string) *GetLayerVersionOutput {
- s.Description = &v
- return s
- }
- // SetLayerArn sets the LayerArn field's value.
- func (s *GetLayerVersionOutput) SetLayerArn(v string) *GetLayerVersionOutput {
- s.LayerArn = &v
- return s
- }
- // SetLayerVersionArn sets the LayerVersionArn field's value.
- func (s *GetLayerVersionOutput) SetLayerVersionArn(v string) *GetLayerVersionOutput {
- s.LayerVersionArn = &v
- return s
- }
- // SetLicenseInfo sets the LicenseInfo field's value.
- func (s *GetLayerVersionOutput) SetLicenseInfo(v string) *GetLayerVersionOutput {
- s.LicenseInfo = &v
- return s
- }
- // SetVersion sets the Version field's value.
- func (s *GetLayerVersionOutput) SetVersion(v int64) *GetLayerVersionOutput {
- s.Version = &v
- return s
- }
- type GetLayerVersionPolicyInput struct {
- _ struct{} `type:"structure"`
- // The name or Amazon Resource Name (ARN) of the layer.
- //
- // LayerName is a required field
- LayerName *string `location:"uri" locationName:"LayerName" min:"1" type:"string" required:"true"`
- // The version number.
- //
- // VersionNumber is a required field
- VersionNumber *int64 `location:"uri" locationName:"VersionNumber" type:"long" required:"true"`
- }
- // String returns the string representation
- func (s GetLayerVersionPolicyInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetLayerVersionPolicyInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *GetLayerVersionPolicyInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetLayerVersionPolicyInput"}
- if s.LayerName == nil {
- invalidParams.Add(request.NewErrParamRequired("LayerName"))
- }
- if s.LayerName != nil && len(*s.LayerName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("LayerName", 1))
- }
- if s.VersionNumber == nil {
- invalidParams.Add(request.NewErrParamRequired("VersionNumber"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetLayerName sets the LayerName field's value.
- func (s *GetLayerVersionPolicyInput) SetLayerName(v string) *GetLayerVersionPolicyInput {
- s.LayerName = &v
- return s
- }
- // SetVersionNumber sets the VersionNumber field's value.
- func (s *GetLayerVersionPolicyInput) SetVersionNumber(v int64) *GetLayerVersionPolicyInput {
- s.VersionNumber = &v
- return s
- }
- type GetLayerVersionPolicyOutput struct {
- _ struct{} `type:"structure"`
- // The policy document.
- Policy *string `type:"string"`
- // A unique identifier for the current revision of the policy.
- RevisionId *string `type:"string"`
- }
- // String returns the string representation
- func (s GetLayerVersionPolicyOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetLayerVersionPolicyOutput) GoString() string {
- return s.String()
- }
- // SetPolicy sets the Policy field's value.
- func (s *GetLayerVersionPolicyOutput) SetPolicy(v string) *GetLayerVersionPolicyOutput {
- s.Policy = &v
- return s
- }
- // SetRevisionId sets the RevisionId field's value.
- func (s *GetLayerVersionPolicyOutput) SetRevisionId(v string) *GetLayerVersionPolicyOutput {
- s.RevisionId = &v
- return s
- }
- type GetPolicyInput struct {
- _ struct{} `type:"structure"`
- // The name of the Lambda function, version, or alias.
- //
- // Name formats
- //
- // * Function name - my-function (name-only), my-function:v1 (with alias).
- //
- // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function.
- //
- // * Partial ARN - 123456789012:function:my-function.
- //
- // You can append a version number or alias to any of the formats. The length
- // constraint applies only to the full 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"`
- // Specify a version or alias to get the policy for that resource.
- 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
- }
- type GetPolicyOutput struct {
- _ struct{} `type:"structure"`
- // The resource-based policy.
- Policy *string `type:"string"`
- // A unique identifier for the current revision of the policy.
- RevisionId *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
- }
- // SetRevisionId sets the RevisionId field's value.
- func (s *GetPolicyOutput) SetRevisionId(v string) *GetPolicyOutput {
- s.RevisionId = &v
- return s
- }
- // Deprecated: InvokeAsyncInput has been deprecated
- type InvokeAsyncInput struct {
- _ struct{} `deprecated:"true" type:"structure" payload:"InvokeArgs"`
- // The name of the Lambda function.
- //
- // Name formats
- //
- // * Function name - my-function.
- //
- // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function.
- //
- // * Partial ARN - 123456789012:function:my-function.
- //
- // The length constraint applies only to the full 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.
- //
- // Deprecated: InvokeAsyncOutput has been deprecated
- 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
- }
- type InvokeInput struct {
- _ struct{} `type:"structure" payload:"Payload"`
- // Up to 3583 bytes of base64-encoded data about the invoking client to pass
- // to the function in the context object.
- ClientContext *string `location:"header" locationName:"X-Amz-Client-Context" type:"string"`
- // The name of the Lambda function, version, or alias.
- //
- // Name formats
- //
- // * Function name - my-function (name-only), my-function:v1 (with alias).
- //
- // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function.
- //
- // * Partial ARN - 123456789012:function:my-function.
- //
- // You can append a version number or alias to any of the formats. The length
- // constraint applies only to the full 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"`
- // Choose from the following options.
- //
- // * RequestResponse (default) - Invoke the function synchronously. Keep
- // the connection open until the function returns a response or times out.
- // The API response includes the function response and additional data.
- //
- // * Event - Invoke the function asynchronously. Send events that fail multiple
- // times to the function's dead-letter queue (if configured). The API response
- // only includes a status code.
- //
- // * DryRun - Validate parameter values and verify that the user or role
- // has permission to invoke the function.
- InvocationType *string `location:"header" locationName:"X-Amz-Invocation-Type" type:"string" enum:"InvocationType"`
- // Set to Tail to include the execution log in the response.
- 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" sensitive:"true"`
- // Specify a version or alias to invoke a published version of the function.
- 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
- }
- type InvokeOutput struct {
- _ struct{} `type:"structure" payload:"Payload"`
- // The version of the function that executed. When you invoke a function with
- // an alias, indicates which version the alias resolved to.
- ExecutedVersion *string `location:"header" locationName:"X-Amz-Executed-Version" min:"1" type:"string"`
- // If present, indicates that an error occured during function execution. Details
- // about the error are included in the response payload.
- //
- // * Handled - The runtime caught an error thrown by the function and formatted
- // it into a JSON document.
- //
- // * Unhandled - The runtime did not handle the error. For example, the function
- // ran out of memory or timed out.
- FunctionError *string `location:"header" locationName:"X-Amz-Function-Error" type:"string"`
- // The last 4 KB of the execution log, base64 encoded.
- LogResult *string `location:"header" locationName:"X-Amz-Log-Result" type:"string"`
- // The response from the function, or an error object.
- Payload []byte `type:"blob" sensitive:"true"`
- // 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()
- }
- // SetExecutedVersion sets the ExecutedVersion field's value.
- func (s *InvokeOutput) SetExecutedVersion(v string) *InvokeOutput {
- s.ExecutedVersion = &v
- return s
- }
- // 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
- }
- // An AWS Lambda layer (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html).
- type Layer struct {
- _ struct{} `type:"structure"`
- // The Amazon Resource Name (ARN) of the function layer.
- Arn *string `min:"1" type:"string"`
- // The size of the layer archive in bytes.
- CodeSize *int64 `type:"long"`
- }
- // String returns the string representation
- func (s Layer) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s Layer) GoString() string {
- return s.String()
- }
- // SetArn sets the Arn field's value.
- func (s *Layer) SetArn(v string) *Layer {
- s.Arn = &v
- return s
- }
- // SetCodeSize sets the CodeSize field's value.
- func (s *Layer) SetCodeSize(v int64) *Layer {
- s.CodeSize = &v
- return s
- }
- // A ZIP archive that contains the contents of an AWS Lambda layer (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html).
- // You can specify either an Amazon S3 location, or upload a layer archive directly.
- type LayerVersionContentInput struct {
- _ struct{} `type:"structure"`
- // The Amazon S3 bucket of the layer archive.
- S3Bucket *string `min:"3" type:"string"`
- // The Amazon S3 key of the layer archive.
- S3Key *string `min:"1" type:"string"`
- // For versioned objects, the version of the layer archive object to use.
- S3ObjectVersion *string `min:"1" type:"string"`
- // The base64-encoded contents of the layer archive. AWS SDK and AWS CLI clients
- // handle the encoding for you.
- //
- // ZipFile is automatically base64 encoded/decoded by the SDK.
- ZipFile []byte `type:"blob" sensitive:"true"`
- }
- // String returns the string representation
- func (s LayerVersionContentInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s LayerVersionContentInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *LayerVersionContentInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "LayerVersionContentInput"}
- 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 *LayerVersionContentInput) SetS3Bucket(v string) *LayerVersionContentInput {
- s.S3Bucket = &v
- return s
- }
- // SetS3Key sets the S3Key field's value.
- func (s *LayerVersionContentInput) SetS3Key(v string) *LayerVersionContentInput {
- s.S3Key = &v
- return s
- }
- // SetS3ObjectVersion sets the S3ObjectVersion field's value.
- func (s *LayerVersionContentInput) SetS3ObjectVersion(v string) *LayerVersionContentInput {
- s.S3ObjectVersion = &v
- return s
- }
- // SetZipFile sets the ZipFile field's value.
- func (s *LayerVersionContentInput) SetZipFile(v []byte) *LayerVersionContentInput {
- s.ZipFile = v
- return s
- }
- // Details about a version of an AWS Lambda layer (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html).
- type LayerVersionContentOutput struct {
- _ struct{} `type:"structure"`
- // The SHA-256 hash of the layer archive.
- CodeSha256 *string `type:"string"`
- // The size of the layer archive in bytes.
- CodeSize *int64 `type:"long"`
- // A link to the layer archive in Amazon S3 that is valid for 10 minutes.
- Location *string `type:"string"`
- }
- // String returns the string representation
- func (s LayerVersionContentOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s LayerVersionContentOutput) GoString() string {
- return s.String()
- }
- // SetCodeSha256 sets the CodeSha256 field's value.
- func (s *LayerVersionContentOutput) SetCodeSha256(v string) *LayerVersionContentOutput {
- s.CodeSha256 = &v
- return s
- }
- // SetCodeSize sets the CodeSize field's value.
- func (s *LayerVersionContentOutput) SetCodeSize(v int64) *LayerVersionContentOutput {
- s.CodeSize = &v
- return s
- }
- // SetLocation sets the Location field's value.
- func (s *LayerVersionContentOutput) SetLocation(v string) *LayerVersionContentOutput {
- s.Location = &v
- return s
- }
- // Details about a version of an AWS Lambda layer (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html).
- type LayerVersionsListItem struct {
- _ struct{} `type:"structure"`
- // The layer's compatible runtimes.
- CompatibleRuntimes []*string `type:"list"`
- // The date that the version was created, in ISO 8601 format. For example, 2018-11-27T15:10:45.123+0000.
- CreatedDate *string `type:"string"`
- // The description of the version.
- Description *string `type:"string"`
- // The ARN of the layer version.
- LayerVersionArn *string `min:"1" type:"string"`
- // The layer's open-source license.
- LicenseInfo *string `type:"string"`
- // The version number.
- Version *int64 `type:"long"`
- }
- // String returns the string representation
- func (s LayerVersionsListItem) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s LayerVersionsListItem) GoString() string {
- return s.String()
- }
- // SetCompatibleRuntimes sets the CompatibleRuntimes field's value.
- func (s *LayerVersionsListItem) SetCompatibleRuntimes(v []*string) *LayerVersionsListItem {
- s.CompatibleRuntimes = v
- return s
- }
- // SetCreatedDate sets the CreatedDate field's value.
- func (s *LayerVersionsListItem) SetCreatedDate(v string) *LayerVersionsListItem {
- s.CreatedDate = &v
- return s
- }
- // SetDescription sets the Description field's value.
- func (s *LayerVersionsListItem) SetDescription(v string) *LayerVersionsListItem {
- s.Description = &v
- return s
- }
- // SetLayerVersionArn sets the LayerVersionArn field's value.
- func (s *LayerVersionsListItem) SetLayerVersionArn(v string) *LayerVersionsListItem {
- s.LayerVersionArn = &v
- return s
- }
- // SetLicenseInfo sets the LicenseInfo field's value.
- func (s *LayerVersionsListItem) SetLicenseInfo(v string) *LayerVersionsListItem {
- s.LicenseInfo = &v
- return s
- }
- // SetVersion sets the Version field's value.
- func (s *LayerVersionsListItem) SetVersion(v int64) *LayerVersionsListItem {
- s.Version = &v
- return s
- }
- // Details about an AWS Lambda layer (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html).
- type LayersListItem struct {
- _ struct{} `type:"structure"`
- // The newest version of the layer.
- LatestMatchingVersion *LayerVersionsListItem `type:"structure"`
- // The Amazon Resource Name (ARN) of the function layer.
- LayerArn *string `min:"1" type:"string"`
- // The name of the layer.
- LayerName *string `min:"1" type:"string"`
- }
- // String returns the string representation
- func (s LayersListItem) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s LayersListItem) GoString() string {
- return s.String()
- }
- // SetLatestMatchingVersion sets the LatestMatchingVersion field's value.
- func (s *LayersListItem) SetLatestMatchingVersion(v *LayerVersionsListItem) *LayersListItem {
- s.LatestMatchingVersion = v
- return s
- }
- // SetLayerArn sets the LayerArn field's value.
- func (s *LayersListItem) SetLayerArn(v string) *LayersListItem {
- s.LayerArn = &v
- return s
- }
- // SetLayerName sets the LayerName field's value.
- func (s *LayersListItem) SetLayerName(v string) *LayersListItem {
- s.LayerName = &v
- return s
- }
- type ListAliasesInput struct {
- _ struct{} `type:"structure"`
- // The name of the lambda function.
- //
- // Name formats
- //
- // * Function name - MyFunction.
- //
- // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction.
- //
- // * Partial ARN - 123456789012:function:MyFunction.
- //
- // The length constraint applies only to the full 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"`
- // Specify a function version to only list aliases that invoke that version.
- FunctionVersion *string `location:"querystring" locationName:"FunctionVersion" min:"1" type:"string"`
- // Specify the pagination token returned by a previous request to retrieve the
- // next page of results.
- Marker *string `location:"querystring" locationName:"Marker" type:"string"`
- // Limit the number of aliases returned.
- 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
- }
- type ListAliasesOutput struct {
- _ struct{} `type:"structure"`
- // A list of aliases.
- Aliases []*AliasConfiguration `type:"list"`
- // Pagination token included if more results are available.
- 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
- }
- type ListEventSourceMappingsInput struct {
- _ struct{} `type:"structure"`
- // The Amazon Resource Name (ARN) of the event source.
- //
- // * Amazon Kinesis - The ARN of the data stream or a stream consumer.
- //
- // * Amazon DynamoDB Streams - The ARN of the stream.
- //
- // * Amazon Simple Queue Service - The ARN of the queue.
- EventSourceArn *string `location:"querystring" locationName:"EventSourceArn" type:"string"`
- // The name of the Lambda function.
- //
- // Name formats
- //
- // * Function name - MyFunction.
- //
- // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction.
- //
- // * Version or Alias ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD.
- //
- // * Partial ARN - 123456789012:function:MyFunction.
- //
- // The length constraint applies only to the full ARN. If you specify only the
- // function name, it's limited to 64 characters in length.
- FunctionName *string `location:"querystring" locationName:"FunctionName" min:"1" type:"string"`
- // A pagination token returned by a previous call.
- Marker *string `location:"querystring" locationName:"Marker" type:"string"`
- // The maximum number of event source mappings to return.
- 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
- }
- type ListEventSourceMappingsOutput struct {
- _ struct{} `type:"structure"`
- // A list of event source mappings.
- EventSourceMappings []*EventSourceMappingConfiguration `type:"list"`
- // A pagination token that's returned when the response doesn't contain all
- // 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
- }
- type ListFunctionsInput struct {
- _ struct{} `type:"structure"`
- // Set to ALL to include entries for all published versions of each function.
- FunctionVersion *string `location:"querystring" locationName:"FunctionVersion" type:"string" enum:"FunctionVersion"`
- // Specify the pagination token returned by a previous request to retrieve the
- // next page of results.
- Marker *string `location:"querystring" locationName:"Marker" type:"string"`
- // For Lambda@Edge functions, the region of the master function. For example,
- // us-east-2 or ALL. If specified, you must set FunctionVersion to ALL.
- MasterRegion *string `location:"querystring" locationName:"MasterRegion" type:"string"`
- // Specify a value between 1 and 50 to limit the number of functions in the
- // response.
- 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
- }
- // A list of Lambda functions.
- type ListFunctionsOutput struct {
- _ struct{} `type:"structure"`
- // A list of Lambda functions.
- Functions []*FunctionConfiguration `type:"list"`
- // Pagination token included if more results are available.
- 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
- }
- type ListLayerVersionsInput struct {
- _ struct{} `type:"structure"`
- // A runtime identifier. For example, go1.x.
- CompatibleRuntime *string `location:"querystring" locationName:"CompatibleRuntime" type:"string" enum:"Runtime"`
- // The name or Amazon Resource Name (ARN) of the layer.
- //
- // LayerName is a required field
- LayerName *string `location:"uri" locationName:"LayerName" min:"1" type:"string" required:"true"`
- // A pagination token returned by a previous call.
- Marker *string `location:"querystring" locationName:"Marker" type:"string"`
- // The maximum number of versions to return.
- MaxItems *int64 `location:"querystring" locationName:"MaxItems" min:"1" type:"integer"`
- }
- // String returns the string representation
- func (s ListLayerVersionsInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListLayerVersionsInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *ListLayerVersionsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListLayerVersionsInput"}
- if s.LayerName == nil {
- invalidParams.Add(request.NewErrParamRequired("LayerName"))
- }
- if s.LayerName != nil && len(*s.LayerName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("LayerName", 1))
- }
- if s.MaxItems != nil && *s.MaxItems < 1 {
- invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetCompatibleRuntime sets the CompatibleRuntime field's value.
- func (s *ListLayerVersionsInput) SetCompatibleRuntime(v string) *ListLayerVersionsInput {
- s.CompatibleRuntime = &v
- return s
- }
- // SetLayerName sets the LayerName field's value.
- func (s *ListLayerVersionsInput) SetLayerName(v string) *ListLayerVersionsInput {
- s.LayerName = &v
- return s
- }
- // SetMarker sets the Marker field's value.
- func (s *ListLayerVersionsInput) SetMarker(v string) *ListLayerVersionsInput {
- s.Marker = &v
- return s
- }
- // SetMaxItems sets the MaxItems field's value.
- func (s *ListLayerVersionsInput) SetMaxItems(v int64) *ListLayerVersionsInput {
- s.MaxItems = &v
- return s
- }
- type ListLayerVersionsOutput struct {
- _ struct{} `type:"structure"`
- // A list of versions.
- LayerVersions []*LayerVersionsListItem `type:"list"`
- // A pagination token returned when the response doesn't contain all versions.
- NextMarker *string `type:"string"`
- }
- // String returns the string representation
- func (s ListLayerVersionsOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListLayerVersionsOutput) GoString() string {
- return s.String()
- }
- // SetLayerVersions sets the LayerVersions field's value.
- func (s *ListLayerVersionsOutput) SetLayerVersions(v []*LayerVersionsListItem) *ListLayerVersionsOutput {
- s.LayerVersions = v
- return s
- }
- // SetNextMarker sets the NextMarker field's value.
- func (s *ListLayerVersionsOutput) SetNextMarker(v string) *ListLayerVersionsOutput {
- s.NextMarker = &v
- return s
- }
- type ListLayersInput struct {
- _ struct{} `type:"structure"`
- // A runtime identifier. For example, go1.x.
- CompatibleRuntime *string `location:"querystring" locationName:"CompatibleRuntime" type:"string" enum:"Runtime"`
- // A pagination token returned by a previous call.
- Marker *string `location:"querystring" locationName:"Marker" type:"string"`
- // The maximum number of layers to return.
- MaxItems *int64 `location:"querystring" locationName:"MaxItems" min:"1" type:"integer"`
- }
- // String returns the string representation
- func (s ListLayersInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListLayersInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *ListLayersInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListLayersInput"}
- if s.MaxItems != nil && *s.MaxItems < 1 {
- invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetCompatibleRuntime sets the CompatibleRuntime field's value.
- func (s *ListLayersInput) SetCompatibleRuntime(v string) *ListLayersInput {
- s.CompatibleRuntime = &v
- return s
- }
- // SetMarker sets the Marker field's value.
- func (s *ListLayersInput) SetMarker(v string) *ListLayersInput {
- s.Marker = &v
- return s
- }
- // SetMaxItems sets the MaxItems field's value.
- func (s *ListLayersInput) SetMaxItems(v int64) *ListLayersInput {
- s.MaxItems = &v
- return s
- }
- type ListLayersOutput struct {
- _ struct{} `type:"structure"`
- // A list of function layers.
- Layers []*LayersListItem `type:"list"`
- // A pagination token returned when the response doesn't contain all layers.
- NextMarker *string `type:"string"`
- }
- // String returns the string representation
- func (s ListLayersOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListLayersOutput) GoString() string {
- return s.String()
- }
- // SetLayers sets the Layers field's value.
- func (s *ListLayersOutput) SetLayers(v []*LayersListItem) *ListLayersOutput {
- s.Layers = v
- return s
- }
- // SetNextMarker sets the NextMarker field's value.
- func (s *ListLayersOutput) SetNextMarker(v string) *ListLayersOutput {
- s.NextMarker = &v
- return s
- }
- type ListTagsInput struct {
- _ struct{} `type:"structure"`
- // The function's Amazon Resource Name (ARN).
- //
- // 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 s.Resource != nil && len(*s.Resource) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Resource", 1))
- }
- 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
- }
- type ListTagsOutput struct {
- _ struct{} `type:"structure"`
- // The function's tags.
- 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
- }
- type ListVersionsByFunctionInput struct {
- _ struct{} `type:"structure"`
- // The name of the lambda function.
- //
- // Name formats
- //
- // * Function name - MyFunction.
- //
- // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction.
- //
- // * Partial ARN - 123456789012:function:MyFunction.
- //
- // The length constraint applies only to the full 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"`
- // Specify the pagination token returned by a previous request to retrieve the
- // next page of results.
- Marker *string `location:"querystring" locationName:"Marker" type:"string"`
- // Limit the number of versions returned.
- 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
- }
- type ListVersionsByFunctionOutput struct {
- _ struct{} `type:"structure"`
- // Pagination token included if more results are available.
- 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
- }
- type PublishLayerVersionInput struct {
- _ struct{} `type:"structure"`
- // A list of compatible function runtimes (http://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html).
- // Used for filtering with ListLayers and ListLayerVersions.
- CompatibleRuntimes []*string `type:"list"`
- // The function layer archive.
- //
- // Content is a required field
- Content *LayerVersionContentInput `type:"structure" required:"true"`
- // The description of the version.
- Description *string `type:"string"`
- // The name or Amazon Resource Name (ARN) of the layer.
- //
- // LayerName is a required field
- LayerName *string `location:"uri" locationName:"LayerName" min:"1" type:"string" required:"true"`
- // The layer's software license. It can be any of the following:
- //
- // * An SPDX license identifier (https://spdx.org/licenses/). For example,
- // MIT.
- //
- // * The URL of a license hosted on the internet. For example, https://opensource.org/licenses/MIT.
- //
- // * The full text of the license.
- LicenseInfo *string `type:"string"`
- }
- // String returns the string representation
- func (s PublishLayerVersionInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s PublishLayerVersionInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *PublishLayerVersionInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PublishLayerVersionInput"}
- if s.Content == nil {
- invalidParams.Add(request.NewErrParamRequired("Content"))
- }
- if s.LayerName == nil {
- invalidParams.Add(request.NewErrParamRequired("LayerName"))
- }
- if s.LayerName != nil && len(*s.LayerName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("LayerName", 1))
- }
- if s.Content != nil {
- if err := s.Content.Validate(); err != nil {
- invalidParams.AddNested("Content", err.(request.ErrInvalidParams))
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetCompatibleRuntimes sets the CompatibleRuntimes field's value.
- func (s *PublishLayerVersionInput) SetCompatibleRuntimes(v []*string) *PublishLayerVersionInput {
- s.CompatibleRuntimes = v
- return s
- }
- // SetContent sets the Content field's value.
- func (s *PublishLayerVersionInput) SetContent(v *LayerVersionContentInput) *PublishLayerVersionInput {
- s.Content = v
- return s
- }
- // SetDescription sets the Description field's value.
- func (s *PublishLayerVersionInput) SetDescription(v string) *PublishLayerVersionInput {
- s.Description = &v
- return s
- }
- // SetLayerName sets the LayerName field's value.
- func (s *PublishLayerVersionInput) SetLayerName(v string) *PublishLayerVersionInput {
- s.LayerName = &v
- return s
- }
- // SetLicenseInfo sets the LicenseInfo field's value.
- func (s *PublishLayerVersionInput) SetLicenseInfo(v string) *PublishLayerVersionInput {
- s.LicenseInfo = &v
- return s
- }
- type PublishLayerVersionOutput struct {
- _ struct{} `type:"structure"`
- // The layer's compatible runtimes.
- CompatibleRuntimes []*string `type:"list"`
- // Details about the layer version.
- Content *LayerVersionContentOutput `type:"structure"`
- // The date that the layer version was created, in ISO-8601 format (https://www.w3.org/TR/NOTE-datetime)
- // (YYYY-MM-DDThh:mm:ss.sTZD).
- CreatedDate *string `type:"string"`
- // The description of the version.
- Description *string `type:"string"`
- // The ARN of the layer.
- LayerArn *string `min:"1" type:"string"`
- // The ARN of the layer version.
- LayerVersionArn *string `min:"1" type:"string"`
- // The layer's software license.
- LicenseInfo *string `type:"string"`
- // The version number.
- Version *int64 `type:"long"`
- }
- // String returns the string representation
- func (s PublishLayerVersionOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s PublishLayerVersionOutput) GoString() string {
- return s.String()
- }
- // SetCompatibleRuntimes sets the CompatibleRuntimes field's value.
- func (s *PublishLayerVersionOutput) SetCompatibleRuntimes(v []*string) *PublishLayerVersionOutput {
- s.CompatibleRuntimes = v
- return s
- }
- // SetContent sets the Content field's value.
- func (s *PublishLayerVersionOutput) SetContent(v *LayerVersionContentOutput) *PublishLayerVersionOutput {
- s.Content = v
- return s
- }
- // SetCreatedDate sets the CreatedDate field's value.
- func (s *PublishLayerVersionOutput) SetCreatedDate(v string) *PublishLayerVersionOutput {
- s.CreatedDate = &v
- return s
- }
- // SetDescription sets the Description field's value.
- func (s *PublishLayerVersionOutput) SetDescription(v string) *PublishLayerVersionOutput {
- s.Description = &v
- return s
- }
- // SetLayerArn sets the LayerArn field's value.
- func (s *PublishLayerVersionOutput) SetLayerArn(v string) *PublishLayerVersionOutput {
- s.LayerArn = &v
- return s
- }
- // SetLayerVersionArn sets the LayerVersionArn field's value.
- func (s *PublishLayerVersionOutput) SetLayerVersionArn(v string) *PublishLayerVersionOutput {
- s.LayerVersionArn = &v
- return s
- }
- // SetLicenseInfo sets the LicenseInfo field's value.
- func (s *PublishLayerVersionOutput) SetLicenseInfo(v string) *PublishLayerVersionOutput {
- s.LicenseInfo = &v
- return s
- }
- // SetVersion sets the Version field's value.
- func (s *PublishLayerVersionOutput) SetVersion(v int64) *PublishLayerVersionOutput {
- s.Version = &v
- return s
- }
- type PublishVersionInput struct {
- _ struct{} `type:"structure"`
- // Only publish a version if the hash matches the value specified. Use this
- // option to avoid publishing a version if the function code has changed since
- // you last updated it. You can get the hash for the version you uploaded from
- // the output of UpdateFunctionCode.
- CodeSha256 *string `type:"string"`
- // Specify a description for the version to override the description in the
- // function configuration.
- Description *string `type:"string"`
- // The name of the lambda function.
- //
- // Name formats
- //
- // * Function name - MyFunction.
- //
- // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction.
- //
- // * Partial ARN - 123456789012:function:MyFunction.
- //
- // The length constraint applies only to the full 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"`
- // Only update the function if the revision ID matches the ID specified. Use
- // this option to avoid publishing a version if the function configuration has
- // changed since you last updated it.
- RevisionId *string `type:"string"`
- }
- // 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
- }
- // SetRevisionId sets the RevisionId field's value.
- func (s *PublishVersionInput) SetRevisionId(v string) *PublishVersionInput {
- s.RevisionId = &v
- return s
- }
- type PutFunctionConcurrencyInput struct {
- _ struct{} `type:"structure"`
- // The name of the Lambda function.
- //
- // Name formats
- //
- // * Function name - my-function.
- //
- // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function.
- //
- // * Partial ARN - 123456789012:function:my-function.
- //
- // The length constraint applies only to the full 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 number of simultaneous executions to reserve for the function.
- //
- // ReservedConcurrentExecutions is a required field
- ReservedConcurrentExecutions *int64 `type:"integer" required:"true"`
- }
- // String returns the string representation
- func (s PutFunctionConcurrencyInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s PutFunctionConcurrencyInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *PutFunctionConcurrencyInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutFunctionConcurrencyInput"}
- 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.ReservedConcurrentExecutions == nil {
- invalidParams.Add(request.NewErrParamRequired("ReservedConcurrentExecutions"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetFunctionName sets the FunctionName field's value.
- func (s *PutFunctionConcurrencyInput) SetFunctionName(v string) *PutFunctionConcurrencyInput {
- s.FunctionName = &v
- return s
- }
- // SetReservedConcurrentExecutions sets the ReservedConcurrentExecutions field's value.
- func (s *PutFunctionConcurrencyInput) SetReservedConcurrentExecutions(v int64) *PutFunctionConcurrencyInput {
- s.ReservedConcurrentExecutions = &v
- return s
- }
- type PutFunctionConcurrencyOutput struct {
- _ struct{} `type:"structure"`
- // The number of concurrent executions reserved for this function. For more
- // information, see Managing Concurrency (http://docs.aws.amazon.com/lambda/latest/dg/concurrent-executions.html).
- ReservedConcurrentExecutions *int64 `type:"integer"`
- }
- // String returns the string representation
- func (s PutFunctionConcurrencyOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s PutFunctionConcurrencyOutput) GoString() string {
- return s.String()
- }
- // SetReservedConcurrentExecutions sets the ReservedConcurrentExecutions field's value.
- func (s *PutFunctionConcurrencyOutput) SetReservedConcurrentExecutions(v int64) *PutFunctionConcurrencyOutput {
- s.ReservedConcurrentExecutions = &v
- return s
- }
- type RemoveLayerVersionPermissionInput struct {
- _ struct{} `type:"structure"`
- // The name or Amazon Resource Name (ARN) of the layer.
- //
- // LayerName is a required field
- LayerName *string `location:"uri" locationName:"LayerName" min:"1" type:"string" required:"true"`
- // Only update the policy if the revision ID matches the ID specified. Use this
- // option to avoid modifying a policy that has changed since you last read it.
- RevisionId *string `location:"querystring" locationName:"RevisionId" type:"string"`
- // The identifier that was specified when the statement was added.
- //
- // StatementId is a required field
- StatementId *string `location:"uri" locationName:"StatementId" min:"1" type:"string" required:"true"`
- // The version number.
- //
- // VersionNumber is a required field
- VersionNumber *int64 `location:"uri" locationName:"VersionNumber" type:"long" required:"true"`
- }
- // String returns the string representation
- func (s RemoveLayerVersionPermissionInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s RemoveLayerVersionPermissionInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *RemoveLayerVersionPermissionInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "RemoveLayerVersionPermissionInput"}
- if s.LayerName == nil {
- invalidParams.Add(request.NewErrParamRequired("LayerName"))
- }
- if s.LayerName != nil && len(*s.LayerName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("LayerName", 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 s.VersionNumber == nil {
- invalidParams.Add(request.NewErrParamRequired("VersionNumber"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetLayerName sets the LayerName field's value.
- func (s *RemoveLayerVersionPermissionInput) SetLayerName(v string) *RemoveLayerVersionPermissionInput {
- s.LayerName = &v
- return s
- }
- // SetRevisionId sets the RevisionId field's value.
- func (s *RemoveLayerVersionPermissionInput) SetRevisionId(v string) *RemoveLayerVersionPermissionInput {
- s.RevisionId = &v
- return s
- }
- // SetStatementId sets the StatementId field's value.
- func (s *RemoveLayerVersionPermissionInput) SetStatementId(v string) *RemoveLayerVersionPermissionInput {
- s.StatementId = &v
- return s
- }
- // SetVersionNumber sets the VersionNumber field's value.
- func (s *RemoveLayerVersionPermissionInput) SetVersionNumber(v int64) *RemoveLayerVersionPermissionInput {
- s.VersionNumber = &v
- return s
- }
- type RemoveLayerVersionPermissionOutput struct {
- _ struct{} `type:"structure"`
- }
- // String returns the string representation
- func (s RemoveLayerVersionPermissionOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s RemoveLayerVersionPermissionOutput) GoString() string {
- return s.String()
- }
- type RemovePermissionInput struct {
- _ struct{} `type:"structure"`
- // The name of the Lambda function, version, or alias.
- //
- // Name formats
- //
- // * Function name - my-function (name-only), my-function:v1 (with alias).
- //
- // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function.
- //
- // * Partial ARN - 123456789012:function:my-function.
- //
- // You can append a version number or alias to any of the formats. The length
- // constraint applies only to the full 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"`
- // Specify a version or alias to remove permissions from a published version
- // of the function.
- Qualifier *string `location:"querystring" locationName:"Qualifier" min:"1" type:"string"`
- // Only update the policy if the revision ID matches the ID specified. Use this
- // option to avoid modifying a policy that has changed since you last read it.
- RevisionId *string `location:"querystring" locationName:"RevisionId" 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
- }
- // SetRevisionId sets the RevisionId field's value.
- func (s *RemovePermissionInput) SetRevisionId(v string) *RemovePermissionInput {
- s.RevisionId = &v
- return s
- }
- // SetStatementId sets the StatementId field's value.
- func (s *RemovePermissionInput) SetStatementId(v string) *RemovePermissionInput {
- s.StatementId = &v
- return s
- }
- 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()
- }
- type TagResourceInput struct {
- _ struct{} `type:"structure"`
- // The function's Amazon Resource Name (ARN).
- //
- // Resource is a required field
- Resource *string `location:"uri" locationName:"ARN" type:"string" required:"true"`
- // A list of tags to apply to the 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.Resource != nil && len(*s.Resource) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Resource", 1))
- }
- 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
- }
- 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 function's AWS X-Ray tracing configuration.
- type TracingConfig struct {
- _ struct{} `type:"structure"`
- // The tracing mode.
- 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
- }
- // The function's AWS X-Ray tracing configuration.
- type TracingConfigResponse struct {
- _ struct{} `type:"structure"`
- // The tracing mode.
- 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
- }
- type UntagResourceInput struct {
- _ struct{} `type:"structure"`
- // The function's Amazon Resource Name (ARN).
- //
- // Resource is a required field
- Resource *string `location:"uri" locationName:"ARN" type:"string" required:"true"`
- // A list of tag keys to remove 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.Resource != nil && len(*s.Resource) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Resource", 1))
- }
- 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
- }
- 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()
- }
- type UpdateAliasInput struct {
- _ struct{} `type:"structure"`
- // A description of the alias.
- Description *string `type:"string"`
- // The name of the lambda function.
- //
- // Name formats
- //
- // * Function name - MyFunction.
- //
- // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction.
- //
- // * Partial ARN - 123456789012:function:MyFunction.
- //
- // The length constraint applies only to the full 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 function version that the alias invokes.
- FunctionVersion *string `min:"1" type:"string"`
- // The name of the alias.
- //
- // Name is a required field
- Name *string `location:"uri" locationName:"Name" min:"1" type:"string" required:"true"`
- // Only update the alias if the revision ID matches the ID specified. Use this
- // option to avoid modifying an alias that has changed since you last read it.
- RevisionId *string `type:"string"`
- // The routing configuration (http://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html)
- // of the alias.
- RoutingConfig *AliasRoutingConfiguration `type:"structure"`
- }
- // 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
- }
- // SetRevisionId sets the RevisionId field's value.
- func (s *UpdateAliasInput) SetRevisionId(v string) *UpdateAliasInput {
- s.RevisionId = &v
- return s
- }
- // SetRoutingConfig sets the RoutingConfig field's value.
- func (s *UpdateAliasInput) SetRoutingConfig(v *AliasRoutingConfiguration) *UpdateAliasInput {
- s.RoutingConfig = v
- return s
- }
- type UpdateEventSourceMappingInput struct {
- _ struct{} `type:"structure"`
- // The maximum number of items to retrieve in a single batch.
- //
- // * Amazon Kinesis - Default 100. Max 10,000.
- //
- // * Amazon DynamoDB Streams - Default 100. Max 1,000.
- //
- // * Amazon Simple Queue Service - Default 10. Max 10.
- BatchSize *int64 `min:"1" type:"integer"`
- // Disables the event source mapping to pause polling and invocation.
- Enabled *bool `type:"boolean"`
- // The name of the Lambda function.
- //
- // Name formats
- //
- // * Function name - MyFunction.
- //
- // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction.
- //
- // * Version or Alias ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD.
- //
- // * Partial ARN - 123456789012:function:MyFunction.
- //
- // The length constraint applies only to the full ARN. If you specify only the
- // function name, it's limited to 64 characters in length.
- FunctionName *string `min:"1" type:"string"`
- // The identifier 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 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 s.UUID != nil && len(*s.UUID) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("UUID", 1))
- }
- 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
- }
- type UpdateFunctionCodeInput struct {
- _ struct{} `type:"structure"`
- // Set to true to validate the request parameters and access permissions without
- // modifying the function code.
- DryRun *bool `type:"boolean"`
- // The name of the Lambda function.
- //
- // Name formats
- //
- // * Function name - my-function.
- //
- // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function.
- //
- // * Partial ARN - 123456789012:function:my-function.
- //
- // The length constraint applies only to the full 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"`
- // Set to true to publish a new version of the function after updating the code.
- // This has the same effect as calling PublishVersion separately.
- Publish *bool `type:"boolean"`
- // Only update the function if the revision ID matches the ID specified. Use
- // this option to avoid modifying a function that has changed since you last
- // read it.
- RevisionId *string `type:"string"`
- // An Amazon S3 bucket in the same region as your function. The bucket can be
- // in a different AWS account.
- S3Bucket *string `min:"3" type:"string"`
- // The Amazon S3 key of the deployment package.
- S3Key *string `min:"1" type:"string"`
- // For versioned objects, the version of the deployment package object to use.
- S3ObjectVersion *string `min:"1" type:"string"`
- // The base64-encoded contents of the deployment package. AWS SDK and AWS CLI
- // clients handle the encoding for you.
- //
- // ZipFile is automatically base64 encoded/decoded by the SDK.
- ZipFile []byte `type:"blob" sensitive:"true"`
- }
- // 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
- }
- // SetRevisionId sets the RevisionId field's value.
- func (s *UpdateFunctionCodeInput) SetRevisionId(v string) *UpdateFunctionCodeInput {
- s.RevisionId = &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
- }
- type UpdateFunctionConfigurationInput struct {
- _ struct{} `type:"structure"`
- // A dead letter queue configuration that specifies the queue or topic where
- // Lambda sends asynchronous events when they fail processing. For more information,
- // see Dead Letter Queues (http://docs.aws.amazon.com/lambda/latest/dg/dlq.html).
- 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.
- //
- // Name formats
- //
- // * Function name - my-function.
- //
- // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function.
- //
- // * Partial ARN - 123456789012:function:my-function.
- //
- // The length constraint applies only to the full 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 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"`
- // A list of function layers (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html)
- // to add to the function's execution environment.
- Layers []*string `type:"list"`
- // 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"`
- // Only update the function if the revision ID matches the ID specified. Use
- // this option to avoid modifying a function that has changed since you last
- // read it.
- RevisionId *string `type:"string"`
- // The Amazon Resource Name (ARN) of the IAM role that Lambda will assume when
- // it executes your function.
- Role *string `type:"string"`
- // The runtime version for the function.
- Runtime *string `type:"string" enum:"Runtime"`
- // The amount of time that Lambda allows a function to run before terminating
- // it. The default is 3 seconds. The maximum allowed value is 900 seconds.
- Timeout *int64 `min:"1" type:"integer"`
- // Set Mode to Active to sample and trace a subset of incoming requests with
- // AWS X-Ray.
- TracingConfig *TracingConfig `type:"structure"`
- // Specify security groups and subnets in a VPC to which your Lambda function
- // needs access.
- 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
- }
- // SetLayers sets the Layers field's value.
- func (s *UpdateFunctionConfigurationInput) SetLayers(v []*string) *UpdateFunctionConfigurationInput {
- s.Layers = v
- return s
- }
- // SetMemorySize sets the MemorySize field's value.
- func (s *UpdateFunctionConfigurationInput) SetMemorySize(v int64) *UpdateFunctionConfigurationInput {
- s.MemorySize = &v
- return s
- }
- // SetRevisionId sets the RevisionId field's value.
- func (s *UpdateFunctionConfigurationInput) SetRevisionId(v string) *UpdateFunctionConfigurationInput {
- s.RevisionId = &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
- }
- // The VPC security groups and subnets attached to a Lambda function.
- type VpcConfig struct {
- _ struct{} `type:"structure"`
- // A list of VPC security groups IDs.
- SecurityGroupIds []*string `type:"list"`
- // A list of VPC subnet IDs.
- 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
- }
- // The VPC security groups and subnets attached to a Lambda function.
- type VpcConfigResponse struct {
- _ struct{} `type:"structure"`
- // A list of VPC security groups IDs.
- SecurityGroupIds []*string `type:"list"`
- // A list of VPC subnet IDs.
- SubnetIds []*string `type:"list"`
- // The ID of the VPC.
- 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"
- // RuntimeNodejs810 is a Runtime enum value
- RuntimeNodejs810 = "nodejs8.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"
- // RuntimePython37 is a Runtime enum value
- RuntimePython37 = "python3.7"
- // RuntimeDotnetcore10 is a Runtime enum value
- RuntimeDotnetcore10 = "dotnetcore1.0"
- // RuntimeDotnetcore20 is a Runtime enum value
- RuntimeDotnetcore20 = "dotnetcore2.0"
- // RuntimeDotnetcore21 is a Runtime enum value
- RuntimeDotnetcore21 = "dotnetcore2.1"
- // RuntimeNodejs43Edge is a Runtime enum value
- RuntimeNodejs43Edge = "nodejs4.3-edge"
- // RuntimeGo1X is a Runtime enum value
- RuntimeGo1X = "go1.x"
- // RuntimeRuby25 is a Runtime enum value
- RuntimeRuby25 = "ruby2.5"
- // RuntimeProvided is a Runtime enum value
- RuntimeProvided = "provided"
- )
- const (
- // ThrottleReasonConcurrentInvocationLimitExceeded is a ThrottleReason enum value
- ThrottleReasonConcurrentInvocationLimitExceeded = "ConcurrentInvocationLimitExceeded"
- // ThrottleReasonFunctionInvocationRateLimitExceeded is a ThrottleReason enum value
- ThrottleReasonFunctionInvocationRateLimitExceeded = "FunctionInvocationRateLimitExceeded"
- // ThrottleReasonReservedFunctionConcurrentInvocationLimitExceeded is a ThrottleReason enum value
- ThrottleReasonReservedFunctionConcurrentInvocationLimitExceeded = "ReservedFunctionConcurrentInvocationLimitExceeded"
- // ThrottleReasonReservedFunctionInvocationRateLimitExceeded is a ThrottleReason enum value
- ThrottleReasonReservedFunctionInvocationRateLimitExceeded = "ReservedFunctionInvocationRateLimitExceeded"
- // 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"
- )
|