1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189 |
- // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
- // Package lambda provides a client for AWS Lambda.
- package lambda
- import (
- "io"
- "time"
- "github.com/aws/aws-sdk-go/aws/awsutil"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/private/protocol"
- "github.com/aws/aws-sdk-go/private/protocol/restjson"
- )
- const opAddPermission = "AddPermission"
- // AddPermissionRequest generates a "aws/request.Request" representing the
- // client's request for the AddPermission operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See AddPermission for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the AddPermission method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // 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)
- // }
- //
- 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{}
- }
- req = c.newRequest(op, input, output)
- output = &AddPermissionOutput{}
- req.Data = output
- return
- }
- // AddPermission API operation for AWS Lambda.
- //
- // Adds a permission to the resource policy associated with the specified AWS
- // Lambda function. You use resource policies to grant permissions to event
- // sources that use push model. In a push model, event sources (such as Amazon
- // S3 and custom applications) invoke your Lambda function. Each permission
- // you add to the resource policy allows an event source, permission to invoke
- // the Lambda function.
- //
- // For information about the push model, see AWS Lambda: How it Works (http://docs.aws.amazon.com/lambda/latest/dg/lambda-introduction.html).
- //
- // If you are using versioning, the permissions you add are specific to the
- // Lambda function version or alias you specify in the AddPermission request
- // via the Qualifier parameter. For more information about versioning, see AWS
- // Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).
- //
- // This operation requires permission for the lambda:AddPermission action.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Lambda's
- // API operation AddPermission for usage and error information.
- //
- // Returned Error Codes:
- // * ServiceException
- // The AWS Lambda service encountered an internal error.
- //
- // * ResourceNotFoundException
- // The resource (for example, a Lambda function or access policy statement)
- // specified in the request does not exist.
- //
- // * ResourceConflictException
- // The resource already exists.
- //
- // * 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.
- //
- // * PolicyLengthExceededException
- // Lambda function access policy is limited to 20 KB.
- //
- // * TooManyRequestsException
- //
- func (c *Lambda) AddPermission(input *AddPermissionInput) (*AddPermissionOutput, error) {
- req, out := c.AddPermissionRequest(input)
- err := req.Send()
- return out, err
- }
- const opCreateAlias = "CreateAlias"
- // CreateAliasRequest generates a "aws/request.Request" representing the
- // client's request for the CreateAlias operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See CreateAlias for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the CreateAlias method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // 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)
- // }
- //
- 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{}
- }
- req = c.newRequest(op, input, output)
- output = &AliasConfiguration{}
- req.Data = output
- return
- }
- // CreateAlias API operation for AWS Lambda.
- //
- // Creates an alias that points to the specified Lambda function version. For
- // more information, see Introduction to AWS Lambda Aliases (http://docs.aws.amazon.com/lambda/latest/dg/aliases-intro.html).
- //
- // Alias names are unique for a given function. This requires permission for
- // the lambda:CreateAlias action.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Lambda's
- // API operation CreateAlias for usage and error information.
- //
- // Returned Error Codes:
- // * ServiceException
- // The AWS Lambda service encountered an internal error.
- //
- // * ResourceNotFoundException
- // The resource (for example, a Lambda function or access policy statement)
- // specified in the request does not exist.
- //
- // * ResourceConflictException
- // The resource already exists.
- //
- // * 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.
- //
- // * TooManyRequestsException
- //
- func (c *Lambda) CreateAlias(input *CreateAliasInput) (*AliasConfiguration, error) {
- req, out := c.CreateAliasRequest(input)
- err := req.Send()
- return out, err
- }
- const opCreateEventSourceMapping = "CreateEventSourceMapping"
- // CreateEventSourceMappingRequest generates a "aws/request.Request" representing the
- // client's request for the CreateEventSourceMapping operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See CreateEventSourceMapping for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the CreateEventSourceMapping method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // 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)
- // }
- //
- 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{}
- }
- req = c.newRequest(op, input, output)
- output = &EventSourceMappingConfiguration{}
- req.Data = output
- return
- }
- // CreateEventSourceMapping API operation for AWS Lambda.
- //
- // Identifies a stream as an event source for a Lambda function. It can be either
- // an Amazon Kinesis stream or an Amazon DynamoDB stream. AWS Lambda invokes
- // the specified function when records are posted to the stream.
- //
- // This association between a stream source and a Lambda function is called
- // the event source mapping.
- //
- // This event source mapping is relevant only in the AWS Lambda pull model,
- // where AWS Lambda invokes the function. For more information, go to AWS Lambda:
- // How it Works (http://docs.aws.amazon.com/lambda/latest/dg/lambda-introduction.html)
- // in the AWS Lambda Developer Guide.
- //
- // You provide mapping information (for example, which stream to read from and
- // which Lambda function to invoke) in the request body.
- //
- // Each event source, such as an Amazon Kinesis or a DynamoDB stream, can be
- // associated with multiple AWS Lambda function. A given Lambda function can
- // be associated with multiple AWS event sources.
- //
- // If you are using versioning, you can specify a specific function version
- // or an alias via the function name parameter. For more information about versioning,
- // see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).
- //
- // This operation requires permission for the lambda:CreateEventSourceMapping
- // action.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Lambda's
- // API operation CreateEventSourceMapping for usage and error information.
- //
- // Returned Error Codes:
- // * ServiceException
- // The AWS Lambda service encountered an internal error.
- //
- // * 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.
- //
- // * ResourceConflictException
- // The resource already exists.
- //
- // * TooManyRequestsException
- //
- // * ResourceNotFoundException
- // The resource (for example, a Lambda function or access policy statement)
- // specified in the request does not exist.
- //
- func (c *Lambda) CreateEventSourceMapping(input *CreateEventSourceMappingInput) (*EventSourceMappingConfiguration, error) {
- req, out := c.CreateEventSourceMappingRequest(input)
- err := req.Send()
- return out, err
- }
- const opCreateFunction = "CreateFunction"
- // CreateFunctionRequest generates a "aws/request.Request" representing the
- // client's request for the CreateFunction operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See CreateFunction for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the CreateFunction method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // 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)
- // }
- //
- 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{}
- }
- req = c.newRequest(op, input, output)
- output = &FunctionConfiguration{}
- req.Data = output
- return
- }
- // CreateFunction API operation for AWS Lambda.
- //
- // Creates a new Lambda function. The function metadata is created from the
- // request parameters, and the code for the function is provided by a .zip file
- // in the request body. If the function name already exists, the operation will
- // fail. Note that the function name is case-sensitive.
- //
- // If you are using versioning, you can also publish a version of the Lambda
- // function you are creating using the Publish parameter. For more information
- // about versioning, see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).
- //
- // This operation requires permission for the lambda:CreateFunction action.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Lambda's
- // API operation CreateFunction for usage and error information.
- //
- // Returned Error Codes:
- // * ServiceException
- // The AWS Lambda service encountered an internal error.
- //
- // * 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.
- //
- // * ResourceNotFoundException
- // The resource (for example, a Lambda function or access policy statement)
- // specified in the request does not exist.
- //
- // * ResourceConflictException
- // The resource already exists.
- //
- // * TooManyRequestsException
- //
- // * CodeStorageExceededException
- // You have exceeded your maximum total code size per account. Limits (http://docs.aws.amazon.com/lambda/latest/dg/limits.html)
- //
- func (c *Lambda) CreateFunction(input *CreateFunctionInput) (*FunctionConfiguration, error) {
- req, out := c.CreateFunctionRequest(input)
- err := req.Send()
- return out, err
- }
- const opDeleteAlias = "DeleteAlias"
- // DeleteAliasRequest generates a "aws/request.Request" representing the
- // client's request for the DeleteAlias operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See DeleteAlias for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the DeleteAlias method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // 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)
- // }
- //
- 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{}
- }
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
- req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
- output = &DeleteAliasOutput{}
- req.Data = output
- return
- }
- // DeleteAlias API operation for AWS Lambda.
- //
- // Deletes the specified Lambda function alias. For more information, see Introduction
- // to AWS Lambda Aliases (http://docs.aws.amazon.com/lambda/latest/dg/aliases-intro.html).
- //
- // This requires permission for the lambda:DeleteAlias action.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Lambda's
- // API operation DeleteAlias for usage and error information.
- //
- // Returned Error Codes:
- // * ServiceException
- // The AWS Lambda service encountered an internal error.
- //
- // * 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.
- //
- // * TooManyRequestsException
- //
- func (c *Lambda) DeleteAlias(input *DeleteAliasInput) (*DeleteAliasOutput, error) {
- req, out := c.DeleteAliasRequest(input)
- err := req.Send()
- return out, err
- }
- const opDeleteEventSourceMapping = "DeleteEventSourceMapping"
- // DeleteEventSourceMappingRequest generates a "aws/request.Request" representing the
- // client's request for the DeleteEventSourceMapping operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See DeleteEventSourceMapping for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the DeleteEventSourceMapping method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // 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)
- // }
- //
- 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{}
- }
- req = c.newRequest(op, input, output)
- output = &EventSourceMappingConfiguration{}
- req.Data = output
- return
- }
- // DeleteEventSourceMapping API operation for AWS Lambda.
- //
- // Removes an event source mapping. This means AWS Lambda will no longer invoke
- // the function for events in the associated source.
- //
- // This operation requires permission for the lambda:DeleteEventSourceMapping
- // action.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Lambda's
- // API operation DeleteEventSourceMapping for usage and error information.
- //
- // Returned Error Codes:
- // * ServiceException
- // The AWS Lambda service encountered an internal error.
- //
- // * ResourceNotFoundException
- // The resource (for example, a Lambda function or access policy statement)
- // specified in the request does not exist.
- //
- // * 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.
- //
- // * TooManyRequestsException
- //
- func (c *Lambda) DeleteEventSourceMapping(input *DeleteEventSourceMappingInput) (*EventSourceMappingConfiguration, error) {
- req, out := c.DeleteEventSourceMappingRequest(input)
- err := req.Send()
- return out, err
- }
- const opDeleteFunction = "DeleteFunction"
- // DeleteFunctionRequest generates a "aws/request.Request" representing the
- // client's request for the DeleteFunction operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See DeleteFunction for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the DeleteFunction method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // 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)
- // }
- //
- 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{}
- }
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
- req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
- output = &DeleteFunctionOutput{}
- req.Data = output
- return
- }
- // DeleteFunction API operation for AWS Lambda.
- //
- // Deletes the specified Lambda function code and configuration.
- //
- // If you are using the versioning feature and you don't specify a function
- // version in your DeleteFunction request, AWS Lambda will delete the function,
- // including all its versions, and any aliases pointing to the function versions.
- // To delete a specific function version, you must provide the function version
- // via the Qualifier parameter. For information about function versioning, see
- // AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).
- //
- // When you delete a function the associated resource policy is also deleted.
- // You will need to delete the event source mappings explicitly.
- //
- // This operation requires permission for the lambda:DeleteFunction action.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Lambda's
- // API operation DeleteFunction for usage and error information.
- //
- // Returned Error Codes:
- // * ServiceException
- // The AWS Lambda service encountered an internal error.
- //
- // * ResourceNotFoundException
- // The resource (for example, a Lambda function or access policy statement)
- // specified in the request does not exist.
- //
- // * TooManyRequestsException
- //
- // * 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.
- //
- // * ResourceConflictException
- // The resource already exists.
- //
- func (c *Lambda) DeleteFunction(input *DeleteFunctionInput) (*DeleteFunctionOutput, error) {
- req, out := c.DeleteFunctionRequest(input)
- err := req.Send()
- return out, err
- }
- const opGetAlias = "GetAlias"
- // GetAliasRequest generates a "aws/request.Request" representing the
- // client's request for the GetAlias operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See GetAlias for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the GetAlias method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // 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)
- // }
- //
- 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{}
- }
- req = c.newRequest(op, input, output)
- output = &AliasConfiguration{}
- req.Data = output
- return
- }
- // GetAlias API operation for AWS Lambda.
- //
- // Returns the specified alias information such as the alias ARN, description,
- // and function version it is pointing to. For more information, see Introduction
- // to AWS Lambda Aliases (http://docs.aws.amazon.com/lambda/latest/dg/aliases-intro.html).
- //
- // This requires permission for the lambda:GetAlias action.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Lambda's
- // API operation GetAlias for usage and error information.
- //
- // Returned Error Codes:
- // * ServiceException
- // The AWS Lambda service encountered an internal error.
- //
- // * ResourceNotFoundException
- // The resource (for example, a Lambda function or access policy statement)
- // specified in the request does not exist.
- //
- // * 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.
- //
- // * TooManyRequestsException
- //
- func (c *Lambda) GetAlias(input *GetAliasInput) (*AliasConfiguration, error) {
- req, out := c.GetAliasRequest(input)
- err := req.Send()
- return out, err
- }
- const opGetEventSourceMapping = "GetEventSourceMapping"
- // GetEventSourceMappingRequest generates a "aws/request.Request" representing the
- // client's request for the GetEventSourceMapping operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See GetEventSourceMapping for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the GetEventSourceMapping method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // 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)
- // }
- //
- 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{}
- }
- req = c.newRequest(op, input, output)
- output = &EventSourceMappingConfiguration{}
- req.Data = output
- return
- }
- // GetEventSourceMapping API operation for AWS Lambda.
- //
- // Returns configuration information for the specified event source mapping
- // (see CreateEventSourceMapping).
- //
- // This operation requires permission for the lambda:GetEventSourceMapping action.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Lambda's
- // API operation GetEventSourceMapping for usage and error information.
- //
- // Returned Error Codes:
- // * ServiceException
- // The AWS Lambda service encountered an internal error.
- //
- // * ResourceNotFoundException
- // The resource (for example, a Lambda function or access policy statement)
- // specified in the request does not exist.
- //
- // * 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.
- //
- // * TooManyRequestsException
- //
- func (c *Lambda) GetEventSourceMapping(input *GetEventSourceMappingInput) (*EventSourceMappingConfiguration, error) {
- req, out := c.GetEventSourceMappingRequest(input)
- err := req.Send()
- return out, err
- }
- const opGetFunction = "GetFunction"
- // GetFunctionRequest generates a "aws/request.Request" representing the
- // client's request for the GetFunction operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See GetFunction for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the GetFunction method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // 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)
- // }
- //
- 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{}
- }
- req = c.newRequest(op, input, output)
- output = &GetFunctionOutput{}
- req.Data = output
- return
- }
- // GetFunction API operation for AWS Lambda.
- //
- // Returns the configuration information of the Lambda function and a presigned
- // URL link to the .zip file you uploaded with CreateFunction so you can download
- // the .zip file. Note that the URL is valid for up to 10 minutes. The configuration
- // information is the same information you provided as parameters when uploading
- // the function.
- //
- // Using the optional Qualifier parameter, you can specify a specific function
- // version for which you want this information. If you don't specify this parameter,
- // the API uses unqualified function ARN which return information about the
- // $LATEST version of the Lambda function. For more information, see AWS Lambda
- // Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).
- //
- // This operation requires permission for the lambda:GetFunction action.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Lambda's
- // API operation GetFunction for usage and error information.
- //
- // Returned Error Codes:
- // * ServiceException
- // The AWS Lambda service encountered an internal error.
- //
- // * ResourceNotFoundException
- // The resource (for example, a Lambda function or access policy statement)
- // specified in the request does not exist.
- //
- // * TooManyRequestsException
- //
- // * 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.
- //
- func (c *Lambda) GetFunction(input *GetFunctionInput) (*GetFunctionOutput, error) {
- req, out := c.GetFunctionRequest(input)
- err := req.Send()
- return out, err
- }
- const opGetFunctionConfiguration = "GetFunctionConfiguration"
- // GetFunctionConfigurationRequest generates a "aws/request.Request" representing the
- // client's request for the GetFunctionConfiguration operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See GetFunctionConfiguration for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the GetFunctionConfiguration method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // 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)
- // }
- //
- 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{}
- }
- req = c.newRequest(op, input, output)
- output = &FunctionConfiguration{}
- req.Data = output
- return
- }
- // GetFunctionConfiguration API operation for AWS Lambda.
- //
- // Returns the configuration information of the Lambda function. This the same
- // information you provided as parameters when uploading the function by using
- // CreateFunction.
- //
- // If you are using the versioning feature, you can retrieve this information
- // for a specific function version by using the optional Qualifier parameter
- // and specifying the function version or alias that points to it. If you don't
- // provide it, the API returns information about the $LATEST version of the
- // function. For more information about versioning, see AWS Lambda Function
- // Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).
- //
- // This operation requires permission for the lambda:GetFunctionConfiguration
- // operation.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Lambda's
- // API operation GetFunctionConfiguration for usage and error information.
- //
- // Returned Error Codes:
- // * ServiceException
- // The AWS Lambda service encountered an internal error.
- //
- // * ResourceNotFoundException
- // The resource (for example, a Lambda function or access policy statement)
- // specified in the request does not exist.
- //
- // * TooManyRequestsException
- //
- // * 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.
- //
- func (c *Lambda) GetFunctionConfiguration(input *GetFunctionConfigurationInput) (*FunctionConfiguration, error) {
- req, out := c.GetFunctionConfigurationRequest(input)
- err := req.Send()
- return out, err
- }
- const opGetPolicy = "GetPolicy"
- // GetPolicyRequest generates a "aws/request.Request" representing the
- // client's request for the GetPolicy operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See GetPolicy for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the GetPolicy method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // 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)
- // }
- //
- 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{}
- }
- req = c.newRequest(op, input, output)
- output = &GetPolicyOutput{}
- req.Data = output
- return
- }
- // GetPolicy API operation for AWS Lambda.
- //
- // Returns the resource policy associated with the specified Lambda function.
- //
- // If you are using the versioning feature, you can get the resource policy
- // associated with the specific Lambda function version or alias by specifying
- // the version or alias name using the Qualifier parameter. For more information
- // about versioning, see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).
- //
- // For information about adding permissions, see AddPermission.
- //
- // You need permission for the lambda:GetPolicy action.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Lambda's
- // API operation GetPolicy for usage and error information.
- //
- // Returned Error Codes:
- // * ServiceException
- // The AWS Lambda service encountered an internal error.
- //
- // * ResourceNotFoundException
- // The resource (for example, a Lambda function or access policy statement)
- // specified in the request does not exist.
- //
- // * TooManyRequestsException
- //
- // * 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.
- //
- func (c *Lambda) GetPolicy(input *GetPolicyInput) (*GetPolicyOutput, error) {
- req, out := c.GetPolicyRequest(input)
- err := req.Send()
- return out, err
- }
- const opInvoke = "Invoke"
- // InvokeRequest generates a "aws/request.Request" representing the
- // client's request for the Invoke operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See Invoke for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the Invoke method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // 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)
- // }
- //
- 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{}
- }
- req = c.newRequest(op, input, output)
- output = &InvokeOutput{}
- req.Data = output
- return
- }
- // Invoke API operation for AWS Lambda.
- //
- // Invokes a specific Lambda function.
- //
- // If you are using the versioning feature, you can invoke the specific function
- // version by providing function version or alias name that is pointing to the
- // function version using the Qualifier parameter in the request. If you don't
- // provide the Qualifier parameter, the $LATEST version of the Lambda function
- // is invoked. Invocations occur at least once in response to an event and functions
- // must be idempotent to handle this. For information about the versioning feature,
- // see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).
- //
- // This operation requires permission for the lambda:InvokeFunction action.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Lambda's
- // API operation Invoke for usage and error information.
- //
- // Returned Error Codes:
- // * ServiceException
- // The AWS Lambda service encountered an internal error.
- //
- // * ResourceNotFoundException
- // The resource (for example, a Lambda function or access policy statement)
- // specified in the request does not exist.
- //
- // * InvalidRequestContentException
- // The request body could not be parsed as JSON.
- //
- // * 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).
- //
- // * UnsupportedMediaTypeException
- // The content type of the Invoke request body is not JSON.
- //
- // * TooManyRequestsException
- //
- // * 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.
- //
- // * EC2UnexpectedException
- // AWS Lambda received an unexpected EC2 client exception while setting up for
- // the Lambda function.
- //
- // * 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.
- //
- // * 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.
- //
- // * EC2ThrottledException
- // AWS Lambda was throttled by Amazon EC2 during Lambda function initialization
- // using the execution role provided for the Lambda function.
- //
- // * EC2AccessDeniedException
- //
- // * InvalidSubnetIDException
- // The Subnet ID provided in the Lambda function VPC configuration is invalid.
- //
- // * InvalidSecurityGroupIDException
- // The Security Group ID provided in the Lambda function VPC configuration is
- // invalid.
- //
- // * InvalidZipFileException
- // AWS Lambda could not unzip the function zip file.
- //
- func (c *Lambda) Invoke(input *InvokeInput) (*InvokeOutput, error) {
- req, out := c.InvokeRequest(input)
- err := req.Send()
- return out, err
- }
- const opInvokeAsync = "InvokeAsync"
- // InvokeAsyncRequest generates a "aws/request.Request" representing the
- // client's request for the InvokeAsync operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See InvokeAsync for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the InvokeAsync method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // 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)
- // }
- //
- 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{}
- }
- req = c.newRequest(op, input, output)
- output = &InvokeAsyncOutput{}
- req.Data = output
- return
- }
- // InvokeAsync API operation for AWS Lambda.
- //
- // This API is deprecated. We recommend you use Invoke API (see Invoke).
- //
- // Submits an invocation request to AWS Lambda. Upon receiving the request,
- // Lambda executes the specified function asynchronously. To see the logs generated
- // by the Lambda function execution, see the CloudWatch Logs console.
- //
- // This operation requires permission for the lambda:InvokeFunction action.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Lambda's
- // API operation InvokeAsync for usage and error information.
- //
- // Returned Error Codes:
- // * ServiceException
- // The AWS Lambda service encountered an internal error.
- //
- // * ResourceNotFoundException
- // The resource (for example, a Lambda function or access policy statement)
- // specified in the request does not exist.
- //
- // * InvalidRequestContentException
- // The request body could not be parsed as JSON.
- //
- func (c *Lambda) InvokeAsync(input *InvokeAsyncInput) (*InvokeAsyncOutput, error) {
- req, out := c.InvokeAsyncRequest(input)
- err := req.Send()
- return out, err
- }
- const opListAliases = "ListAliases"
- // ListAliasesRequest generates a "aws/request.Request" representing the
- // client's request for the ListAliases operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See ListAliases for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the ListAliases method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // 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)
- // }
- //
- 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{}
- }
- req = c.newRequest(op, input, output)
- output = &ListAliasesOutput{}
- req.Data = output
- return
- }
- // ListAliases API operation for AWS Lambda.
- //
- // Returns list of aliases created for a Lambda function. For each alias, the
- // response includes information such as the alias ARN, description, alias name,
- // and the function version to which it points. For more information, see Introduction
- // to AWS Lambda Aliases (http://docs.aws.amazon.com/lambda/latest/dg/aliases-intro.html).
- //
- // This requires permission for the lambda:ListAliases action.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Lambda's
- // API operation ListAliases for usage and error information.
- //
- // Returned Error Codes:
- // * ServiceException
- // The AWS Lambda service encountered an internal error.
- //
- // * ResourceNotFoundException
- // The resource (for example, a Lambda function or access policy statement)
- // specified in the request does not exist.
- //
- // * 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.
- //
- // * TooManyRequestsException
- //
- func (c *Lambda) ListAliases(input *ListAliasesInput) (*ListAliasesOutput, error) {
- req, out := c.ListAliasesRequest(input)
- err := req.Send()
- return out, err
- }
- const opListEventSourceMappings = "ListEventSourceMappings"
- // ListEventSourceMappingsRequest generates a "aws/request.Request" representing the
- // client's request for the ListEventSourceMappings operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See ListEventSourceMappings for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the ListEventSourceMappings method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // 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)
- // }
- //
- 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{}
- }
- req = c.newRequest(op, input, output)
- output = &ListEventSourceMappingsOutput{}
- req.Data = output
- return
- }
- // ListEventSourceMappings API operation for AWS Lambda.
- //
- // Returns a list of event source mappings you created using the CreateEventSourceMapping
- // (see CreateEventSourceMapping).
- //
- // For each mapping, the API returns configuration information. You can optionally
- // specify filters to retrieve specific event source mappings.
- //
- // If you are using the versioning feature, you can get list of event source
- // mappings for a specific Lambda function version or an alias as described
- // in the FunctionName parameter. For information about the versioning feature,
- // see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).
- //
- // This operation requires permission for the lambda:ListEventSourceMappings
- // action.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Lambda's
- // API operation ListEventSourceMappings for usage and error information.
- //
- // Returned Error Codes:
- // * ServiceException
- // The AWS Lambda service encountered an internal error.
- //
- // * ResourceNotFoundException
- // The resource (for example, a Lambda function or access policy statement)
- // specified in the request does not exist.
- //
- // * 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.
- //
- // * TooManyRequestsException
- //
- func (c *Lambda) ListEventSourceMappings(input *ListEventSourceMappingsInput) (*ListEventSourceMappingsOutput, error) {
- req, out := c.ListEventSourceMappingsRequest(input)
- err := req.Send()
- return out, err
- }
- // 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(p *ListEventSourceMappingsOutput, lastPage bool) (shouldContinue bool)) error {
- page, _ := c.ListEventSourceMappingsRequest(input)
- page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
- return page.EachPage(func(p interface{}, lastPage bool) bool {
- return fn(p.(*ListEventSourceMappingsOutput), lastPage)
- })
- }
- const opListFunctions = "ListFunctions"
- // ListFunctionsRequest generates a "aws/request.Request" representing the
- // client's request for the ListFunctions operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See ListFunctions for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the ListFunctions method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // 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)
- // }
- //
- 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{}
- }
- req = c.newRequest(op, input, output)
- output = &ListFunctionsOutput{}
- req.Data = output
- return
- }
- // ListFunctions API operation for AWS Lambda.
- //
- // Returns a list of your Lambda functions. For each function, the response
- // includes the function configuration information. You must use GetFunction
- // to retrieve the code for your function.
- //
- // This operation requires permission for the lambda:ListFunctions action.
- //
- // If you are using versioning feature, the response returns list of $LATEST
- // versions of your functions. For information about the versioning feature,
- // see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Lambda's
- // API operation ListFunctions for usage and error information.
- //
- // Returned Error Codes:
- // * ServiceException
- // The AWS Lambda service encountered an internal error.
- //
- // * TooManyRequestsException
- //
- func (c *Lambda) ListFunctions(input *ListFunctionsInput) (*ListFunctionsOutput, error) {
- req, out := c.ListFunctionsRequest(input)
- err := req.Send()
- return out, err
- }
- // 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(p *ListFunctionsOutput, lastPage bool) (shouldContinue bool)) error {
- page, _ := c.ListFunctionsRequest(input)
- page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
- return page.EachPage(func(p interface{}, lastPage bool) bool {
- return fn(p.(*ListFunctionsOutput), lastPage)
- })
- }
- const opListVersionsByFunction = "ListVersionsByFunction"
- // ListVersionsByFunctionRequest generates a "aws/request.Request" representing the
- // client's request for the ListVersionsByFunction operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See ListVersionsByFunction for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the ListVersionsByFunction method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // 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)
- // }
- //
- 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{}
- }
- req = c.newRequest(op, input, output)
- output = &ListVersionsByFunctionOutput{}
- req.Data = output
- return
- }
- // ListVersionsByFunction API operation for AWS Lambda.
- //
- // List all versions of a function. For information about the versioning feature,
- // see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Lambda's
- // API operation ListVersionsByFunction for usage and error information.
- //
- // Returned Error Codes:
- // * ServiceException
- // The AWS Lambda service encountered an internal error.
- //
- // * ResourceNotFoundException
- // The resource (for example, a Lambda function or access policy statement)
- // specified in the request does not exist.
- //
- // * 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.
- //
- // * TooManyRequestsException
- //
- func (c *Lambda) ListVersionsByFunction(input *ListVersionsByFunctionInput) (*ListVersionsByFunctionOutput, error) {
- req, out := c.ListVersionsByFunctionRequest(input)
- err := req.Send()
- return out, err
- }
- const opPublishVersion = "PublishVersion"
- // PublishVersionRequest generates a "aws/request.Request" representing the
- // client's request for the PublishVersion operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See PublishVersion for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the PublishVersion method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // 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)
- // }
- //
- 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{}
- }
- req = c.newRequest(op, input, output)
- output = &FunctionConfiguration{}
- req.Data = output
- return
- }
- // PublishVersion API operation for AWS Lambda.
- //
- // Publishes a version of your function from the current snapshot of $LATEST.
- // That is, AWS Lambda takes a snapshot of the function code and configuration
- // information from $LATEST and publishes a new version. The code and configuration
- // cannot be modified after publication. For information about the versioning
- // feature, see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Lambda's
- // API operation PublishVersion for usage and error information.
- //
- // Returned Error Codes:
- // * ServiceException
- // The AWS Lambda service encountered an internal error.
- //
- // * ResourceNotFoundException
- // The resource (for example, a Lambda function or access policy statement)
- // specified in the request does not exist.
- //
- // * 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.
- //
- // * TooManyRequestsException
- //
- // * CodeStorageExceededException
- // You have exceeded your maximum total code size per account. Limits (http://docs.aws.amazon.com/lambda/latest/dg/limits.html)
- //
- func (c *Lambda) PublishVersion(input *PublishVersionInput) (*FunctionConfiguration, error) {
- req, out := c.PublishVersionRequest(input)
- err := req.Send()
- return out, err
- }
- const opRemovePermission = "RemovePermission"
- // RemovePermissionRequest generates a "aws/request.Request" representing the
- // client's request for the RemovePermission operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See RemovePermission for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the RemovePermission method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // 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)
- // }
- //
- 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{}
- }
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
- req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
- output = &RemovePermissionOutput{}
- req.Data = output
- return
- }
- // RemovePermission API operation for AWS Lambda.
- //
- // You can remove individual permissions from an resource policy associated
- // with a Lambda function by providing a statement ID that you provided when
- // you added the permission.
- //
- // If you are using versioning, the permissions you remove are specific to the
- // Lambda function version or alias you specify in the AddPermission request
- // via the Qualifier parameter. For more information about versioning, see AWS
- // Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).
- //
- // Note that removal of a permission will cause an active event source to lose
- // permission to the function.
- //
- // You need permission for the lambda:RemovePermission action.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Lambda's
- // API operation RemovePermission for usage and error information.
- //
- // Returned Error Codes:
- // * ServiceException
- // The AWS Lambda service encountered an internal error.
- //
- // * ResourceNotFoundException
- // The resource (for example, a Lambda function or access policy statement)
- // specified in the request does not exist.
- //
- // * 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.
- //
- // * TooManyRequestsException
- //
- func (c *Lambda) RemovePermission(input *RemovePermissionInput) (*RemovePermissionOutput, error) {
- req, out := c.RemovePermissionRequest(input)
- err := req.Send()
- return out, err
- }
- const opUpdateAlias = "UpdateAlias"
- // UpdateAliasRequest generates a "aws/request.Request" representing the
- // client's request for the UpdateAlias operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See UpdateAlias for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the UpdateAlias method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // 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)
- // }
- //
- 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{}
- }
- req = c.newRequest(op, input, output)
- output = &AliasConfiguration{}
- req.Data = output
- return
- }
- // UpdateAlias API operation for AWS Lambda.
- //
- // Using this API you can update the function version to which the alias points
- // and the alias description. For more information, see Introduction to AWS
- // Lambda Aliases (http://docs.aws.amazon.com/lambda/latest/dg/aliases-intro.html).
- //
- // This requires permission for the lambda:UpdateAlias action.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Lambda's
- // API operation UpdateAlias for usage and error information.
- //
- // Returned Error Codes:
- // * ServiceException
- // The AWS Lambda service encountered an internal error.
- //
- // * ResourceNotFoundException
- // The resource (for example, a Lambda function or access policy statement)
- // specified in the request does not exist.
- //
- // * 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.
- //
- // * TooManyRequestsException
- //
- func (c *Lambda) UpdateAlias(input *UpdateAliasInput) (*AliasConfiguration, error) {
- req, out := c.UpdateAliasRequest(input)
- err := req.Send()
- return out, err
- }
- const opUpdateEventSourceMapping = "UpdateEventSourceMapping"
- // UpdateEventSourceMappingRequest generates a "aws/request.Request" representing the
- // client's request for the UpdateEventSourceMapping operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See UpdateEventSourceMapping for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the UpdateEventSourceMapping method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // 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)
- // }
- //
- 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{}
- }
- req = c.newRequest(op, input, output)
- output = &EventSourceMappingConfiguration{}
- req.Data = output
- return
- }
- // UpdateEventSourceMapping API operation for AWS Lambda.
- //
- // You can update an event source mapping. This is useful if you want to change
- // the parameters of the existing mapping without losing your position in the
- // stream. You can change which function will receive the stream records, but
- // to change the stream itself, you must create a new mapping.
- //
- // If you are using the versioning feature, you can update the event source
- // mapping to map to a specific Lambda function version or alias as described
- // in the FunctionName parameter. For information about the versioning feature,
- // see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).
- //
- // If you disable the event source mapping, AWS Lambda stops polling. If you
- // enable again, it will resume polling from the time it had stopped polling,
- // so you don't lose processing of any records. However, if you delete event
- // source mapping and create it again, it will reset.
- //
- // This operation requires permission for the lambda:UpdateEventSourceMapping
- // action.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Lambda's
- // API operation UpdateEventSourceMapping for usage and error information.
- //
- // Returned Error Codes:
- // * ServiceException
- // The AWS Lambda service encountered an internal error.
- //
- // * ResourceNotFoundException
- // The resource (for example, a Lambda function or access policy statement)
- // specified in the request does not exist.
- //
- // * 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.
- //
- // * TooManyRequestsException
- //
- // * ResourceConflictException
- // The resource already exists.
- //
- func (c *Lambda) UpdateEventSourceMapping(input *UpdateEventSourceMappingInput) (*EventSourceMappingConfiguration, error) {
- req, out := c.UpdateEventSourceMappingRequest(input)
- err := req.Send()
- return out, err
- }
- const opUpdateFunctionCode = "UpdateFunctionCode"
- // UpdateFunctionCodeRequest generates a "aws/request.Request" representing the
- // client's request for the UpdateFunctionCode operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See UpdateFunctionCode for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the UpdateFunctionCode method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // 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)
- // }
- //
- 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{}
- }
- req = c.newRequest(op, input, output)
- output = &FunctionConfiguration{}
- req.Data = output
- return
- }
- // UpdateFunctionCode API operation for AWS Lambda.
- //
- // Updates the code for the specified Lambda function. This operation must only
- // be used on an existing Lambda function and cannot be used to update the function
- // configuration.
- //
- // If you are using the versioning feature, note this API will always update
- // the $LATEST version of your Lambda function. For information about the versioning
- // feature, see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).
- //
- // This operation requires permission for the lambda:UpdateFunctionCode action.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Lambda's
- // API operation UpdateFunctionCode for usage and error information.
- //
- // Returned Error Codes:
- // * ServiceException
- // The AWS Lambda service encountered an internal error.
- //
- // * ResourceNotFoundException
- // The resource (for example, a Lambda function or access policy statement)
- // specified in the request does not exist.
- //
- // * 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.
- //
- // * TooManyRequestsException
- //
- // * CodeStorageExceededException
- // You have exceeded your maximum total code size per account. Limits (http://docs.aws.amazon.com/lambda/latest/dg/limits.html)
- //
- func (c *Lambda) UpdateFunctionCode(input *UpdateFunctionCodeInput) (*FunctionConfiguration, error) {
- req, out := c.UpdateFunctionCodeRequest(input)
- err := req.Send()
- return out, err
- }
- const opUpdateFunctionConfiguration = "UpdateFunctionConfiguration"
- // UpdateFunctionConfigurationRequest generates a "aws/request.Request" representing the
- // client's request for the UpdateFunctionConfiguration operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See UpdateFunctionConfiguration for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the UpdateFunctionConfiguration method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // 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)
- // }
- //
- 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{}
- }
- req = c.newRequest(op, input, output)
- output = &FunctionConfiguration{}
- req.Data = output
- return
- }
- // UpdateFunctionConfiguration API operation for AWS Lambda.
- //
- // Updates the configuration parameters for the specified Lambda function by
- // using the values provided in the request. You provide only the parameters
- // you want to change. This operation must only be used on an existing Lambda
- // function and cannot be used to update the function's code.
- //
- // If you are using the versioning feature, note this API will always update
- // the $LATEST version of your Lambda function. For information about the versioning
- // feature, see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html).
- //
- // This operation requires permission for the lambda:UpdateFunctionConfiguration
- // action.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Lambda's
- // API operation UpdateFunctionConfiguration for usage and error information.
- //
- // Returned Error Codes:
- // * ServiceException
- // The AWS Lambda service encountered an internal error.
- //
- // * ResourceNotFoundException
- // The resource (for example, a Lambda function or access policy statement)
- // specified in the request does not exist.
- //
- // * 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.
- //
- // * TooManyRequestsException
- //
- func (c *Lambda) UpdateFunctionConfiguration(input *UpdateFunctionConfigurationInput) (*FunctionConfiguration, error) {
- req, out := c.UpdateFunctionConfigurationRequest(input)
- err := req.Send()
- return out, err
- }
- type AddPermissionInput struct {
- _ struct{} `type:"structure"`
- // The AWS Lambda action you want to allow in this statement. Each Lambda action
- // is a string starting with lambda: followed by the API name . For example,
- // lambda:CreateFunction. You can use wildcard (lambda:*) to grant permission
- // for all AWS Lambda actions.
- //
- // Action is a required field
- Action *string `type:"string" required:"true"`
- // A unique token that must be supplied by the principal invoking the function.
- // This is currently only used for Alexa Smart Home functions.
- EventSourceToken *string `type:"string"`
- // Name of the Lambda function whose resource policy you are updating by adding
- // a new permission.
- //
- // You can specify a function name (for example, Thumbnail) or you can specify
- // Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail).
- // AWS Lambda also allows you to specify partial ARN (for example, account-id:Thumbnail).
- // Note that the length constraint applies only to the ARN. If you specify only
- // the function name, it is limited to 64 character in length.
- //
- // FunctionName is a required field
- FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
- // The principal who is getting this permission. It can be Amazon S3 service
- // Principal (s3.amazonaws.com) if you want Amazon S3 to invoke the function,
- // an AWS account ID if you are granting cross-account permission, or any valid
- // AWS service principal such as sns.amazonaws.com. For example, you might want
- // to allow a custom application in another AWS account to push events to AWS
- // Lambda by invoking your function.
- //
- // Principal is a required field
- Principal *string `type:"string" required:"true"`
- // You can use this optional query parameter to describe a qualified ARN using
- // a function version or an alias name. The permission will then apply to the
- // specific qualified ARN. For example, if you specify function version 2 as
- // the qualifier, then permission applies only when request is made using qualified
- // function ARN:
- //
- // arn:aws:lambda:aws-region:acct-id:function:function-name:2
- //
- // If you specify an alias name, for example PROD, then the permission is valid
- // only for requests made using the alias ARN:
- //
- // arn:aws:lambda:aws-region:acct-id:function:function-name:PROD
- //
- // If the qualifier is not specified, the permission is valid only when requests
- // is made using unqualified function ARN.
- //
- // arn:aws:lambda:aws-region:acct-id:function:function-name
- Qualifier *string `location:"querystring" locationName:"Qualifier" min:"1" type:"string"`
- // This parameter is used for S3 and SES only. The AWS account ID (without a
- // hyphen) of the source owner. For example, if the SourceArn identifies a bucket,
- // then this is the bucket owner's account ID. You can use this additional condition
- // to ensure the bucket you specify is owned by a specific account (it is possible
- // the bucket owner deleted the bucket and some other AWS account created the
- // bucket). You can also use this condition to specify all sources (that is,
- // you don't specify the SourceArn) owned by a specific account.
- SourceAccount *string `type:"string"`
- // This is optional; however, when granting Amazon S3 permission to invoke your
- // function, you should specify this field with the Amazon Resource Name (ARN)
- // as its value. This ensures that only events generated from the specified
- // source can invoke the function.
- //
- // If you add a permission for the Amazon S3 principal without providing the
- // source ARN, any AWS account that creates a mapping to your function ARN can
- // send events to invoke your Lambda function from Amazon S3.
- SourceArn *string `type:"string"`
- // A unique statement identifier.
- //
- // StatementId is a required field
- StatementId *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s AddPermissionInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s AddPermissionInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *AddPermissionInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "AddPermissionInput"}
- if s.Action == nil {
- invalidParams.Add(request.NewErrParamRequired("Action"))
- }
- if s.FunctionName == nil {
- invalidParams.Add(request.NewErrParamRequired("FunctionName"))
- }
- if s.FunctionName != nil && len(*s.FunctionName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
- }
- if s.Principal == nil {
- invalidParams.Add(request.NewErrParamRequired("Principal"))
- }
- if s.Qualifier != nil && len(*s.Qualifier) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Qualifier", 1))
- }
- if s.StatementId == nil {
- invalidParams.Add(request.NewErrParamRequired("StatementId"))
- }
- if s.StatementId != nil && len(*s.StatementId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("StatementId", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- type AddPermissionOutput struct {
- _ struct{} `type:"structure"`
- // The permission statement you specified in the request. The response returns
- // the same as a string using a backslash ("\") as an escape character in the
- // JSON.
- Statement *string `type:"string"`
- }
- // String returns the string representation
- func (s AddPermissionOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s AddPermissionOutput) GoString() string {
- return s.String()
- }
- // Provides configuration information about a Lambda function version alias.
- type AliasConfiguration struct {
- _ struct{} `type:"structure"`
- // Lambda function ARN that is qualified using the alias name as the suffix.
- // For example, if you create an alias called BETA that points to a helloworld
- // function version, the ARN is arn:aws:lambda:aws-regions:acct-id:function:helloworld:BETA.
- AliasArn *string `type:"string"`
- // Alias description.
- Description *string `type:"string"`
- // Function version to which the alias points.
- FunctionVersion *string `min:"1" type:"string"`
- // Alias name.
- Name *string `min:"1" type:"string"`
- }
- // String returns the string representation
- func (s AliasConfiguration) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s AliasConfiguration) GoString() string {
- return s.String()
- }
- type CreateAliasInput struct {
- _ struct{} `type:"structure"`
- // Description of the alias.
- Description *string `type:"string"`
- // Name of the Lambda function for which you want to create an alias.
- //
- // FunctionName is a required field
- FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
- // Lambda function version for which you are creating the alias.
- //
- // FunctionVersion is a required field
- FunctionVersion *string `min:"1" type:"string" required:"true"`
- // Name for the alias you are creating.
- //
- // Name is a required field
- Name *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s CreateAliasInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s CreateAliasInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *CreateAliasInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CreateAliasInput"}
- if s.FunctionName == nil {
- invalidParams.Add(request.NewErrParamRequired("FunctionName"))
- }
- if s.FunctionName != nil && len(*s.FunctionName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
- }
- if s.FunctionVersion == nil {
- invalidParams.Add(request.NewErrParamRequired("FunctionVersion"))
- }
- if s.FunctionVersion != nil && len(*s.FunctionVersion) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("FunctionVersion", 1))
- }
- if s.Name == nil {
- invalidParams.Add(request.NewErrParamRequired("Name"))
- }
- if s.Name != nil && len(*s.Name) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Name", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- type CreateEventSourceMappingInput struct {
- _ struct{} `type:"structure"`
- // The largest number of records that AWS Lambda will retrieve from your event
- // source at the time of invoking your function. Your function receives an event
- // with all the retrieved records. The default is 100 records.
- BatchSize *int64 `min:"1" type:"integer"`
- // Indicates whether AWS Lambda should begin polling the event source. By default,
- // Enabled is true.
- Enabled *bool `type:"boolean"`
- // The Amazon Resource Name (ARN) of the Amazon Kinesis or the Amazon DynamoDB
- // stream that is the event source. Any record added to this stream could cause
- // AWS Lambda to invoke your Lambda function, it depends on the BatchSize. AWS
- // Lambda POSTs the Amazon Kinesis event, containing records, to your Lambda
- // function as JSON.
- //
- // EventSourceArn is a required field
- EventSourceArn *string `type:"string" required:"true"`
- // The Lambda function to invoke when AWS Lambda detects an event on the stream.
- //
- // You can specify the function name (for example, Thumbnail) or you can specify
- // Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail).
- //
- // If you are using versioning, you can also provide a qualified function ARN
- // (ARN that is qualified with function version or alias name as suffix). For
- // more information about versioning, see AWS Lambda Function Versioning and
- // Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html)
- //
- // AWS Lambda also allows you to specify only the function name with the account
- // ID qualifier (for example, account-id:Thumbnail).
- //
- // Note that the length constraint applies only to the ARN. If you specify only
- // the function name, it is limited to 64 character in length.
- //
- // FunctionName is a required field
- FunctionName *string `min:"1" type:"string" required:"true"`
- // The position in the stream where AWS Lambda should start reading. For more
- // information, go to ShardIteratorType (http://docs.aws.amazon.com/kinesis/latest/APIReference/API_GetShardIterator.html#Kinesis-GetShardIterator-request-ShardIteratorType)
- // in the Amazon Kinesis API Reference.
- //
- // StartingPosition is a required field
- StartingPosition *string `type:"string" required:"true" enum:"EventSourcePosition"`
- }
- // String returns the string representation
- func (s CreateEventSourceMappingInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s CreateEventSourceMappingInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *CreateEventSourceMappingInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CreateEventSourceMappingInput"}
- if s.BatchSize != nil && *s.BatchSize < 1 {
- invalidParams.Add(request.NewErrParamMinValue("BatchSize", 1))
- }
- if s.EventSourceArn == nil {
- invalidParams.Add(request.NewErrParamRequired("EventSourceArn"))
- }
- if s.FunctionName == nil {
- invalidParams.Add(request.NewErrParamRequired("FunctionName"))
- }
- if s.FunctionName != nil && len(*s.FunctionName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
- }
- if s.StartingPosition == nil {
- invalidParams.Add(request.NewErrParamRequired("StartingPosition"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- type CreateFunctionInput struct {
- _ struct{} `type:"structure"`
- // The code for the Lambda function.
- //
- // Code is a required field
- Code *FunctionCode `type:"structure" required:"true"`
- // A short, user-defined function description. Lambda does not use this value.
- // Assign a meaningful description as you see fit.
- Description *string `type:"string"`
- // The name you want to assign to the function you are uploading. The function
- // names appear in the console and are returned in the ListFunctions API. Function
- // names are used to specify functions to other AWS Lambda APIs, such as Invoke.
- //
- // FunctionName is a required field
- FunctionName *string `min:"1" type:"string" required:"true"`
- // The function within your code that Lambda calls to begin execution. For Node.js,
- // it is the module-name.export value in your function. For Java, it can be
- // package.class-name::handler or package.class-name. For more information,
- // see Lambda Function Handler (Java) (http://docs.aws.amazon.com/lambda/latest/dg/java-programming-model-handler-types.html).
- //
- // Handler is a required field
- Handler *string `type:"string" required:"true"`
- // The amount of memory, in MB, your Lambda function is given. Lambda uses this
- // memory size to infer the amount of CPU and memory allocated to your function.
- // Your function use-case determines your CPU and memory requirements. For example,
- // a database operation might need less memory compared to an image processing
- // function. The default value is 128 MB. The value must be a multiple of 64
- // MB.
- MemorySize *int64 `min:"128" type:"integer"`
- // This boolean parameter can be used to request AWS Lambda to create the Lambda
- // function and publish a version as an atomic operation.
- Publish *bool `type:"boolean"`
- // The Amazon Resource Name (ARN) of the IAM role that Lambda assumes when it
- // executes your function to access any other Amazon Web Services (AWS) resources.
- // For more information, see AWS Lambda: How it Works (http://docs.aws.amazon.com/lambda/latest/dg/lambda-introduction.html).
- //
- // Role is a required field
- Role *string `type:"string" required:"true"`
- // The runtime environment for the Lambda function you are uploading.
- //
- // To use the Node.js runtime v4.3, set the value to "nodejs4.3". To use earlier
- // runtime (v0.10.42), set the value to "nodejs".
- //
- // Runtime is a required field
- Runtime *string `type:"string" required:"true" enum:"Runtime"`
- // The function execution time at which Lambda should terminate the function.
- // Because the execution time has cost implications, we recommend you set this
- // value based on your expected execution time. The default is 3 seconds.
- Timeout *int64 `min:"1" type:"integer"`
- // If your Lambda function accesses resources in a VPC, you provide this parameter
- // identifying the list of security group IDs and subnet IDs. These must belong
- // to the same VPC. You must provide at least one security group and one subnet
- // ID.
- VpcConfig *VpcConfig `type:"structure"`
- }
- // String returns the string representation
- func (s CreateFunctionInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s CreateFunctionInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *CreateFunctionInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CreateFunctionInput"}
- if s.Code == nil {
- invalidParams.Add(request.NewErrParamRequired("Code"))
- }
- if s.FunctionName == nil {
- invalidParams.Add(request.NewErrParamRequired("FunctionName"))
- }
- if s.FunctionName != nil && len(*s.FunctionName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
- }
- if s.Handler == nil {
- invalidParams.Add(request.NewErrParamRequired("Handler"))
- }
- if s.MemorySize != nil && *s.MemorySize < 128 {
- invalidParams.Add(request.NewErrParamMinValue("MemorySize", 128))
- }
- if s.Role == nil {
- invalidParams.Add(request.NewErrParamRequired("Role"))
- }
- if s.Runtime == nil {
- invalidParams.Add(request.NewErrParamRequired("Runtime"))
- }
- if s.Timeout != nil && *s.Timeout < 1 {
- invalidParams.Add(request.NewErrParamMinValue("Timeout", 1))
- }
- if s.Code != nil {
- if err := s.Code.Validate(); err != nil {
- invalidParams.AddNested("Code", err.(request.ErrInvalidParams))
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- type DeleteAliasInput struct {
- _ struct{} `type:"structure"`
- // The Lambda function name for which the alias is created. Deleting an alias
- // does not delete the function version to which it is pointing.
- //
- // FunctionName is a required field
- FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
- // Name of the alias to delete.
- //
- // Name is a required field
- Name *string `location:"uri" locationName:"Name" min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s DeleteAliasInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteAliasInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DeleteAliasInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteAliasInput"}
- if s.FunctionName == nil {
- invalidParams.Add(request.NewErrParamRequired("FunctionName"))
- }
- if s.FunctionName != nil && len(*s.FunctionName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
- }
- if s.Name == nil {
- invalidParams.Add(request.NewErrParamRequired("Name"))
- }
- if s.Name != nil && len(*s.Name) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Name", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- 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 event source mapping ID.
- //
- // UUID is a required field
- UUID *string `location:"uri" locationName:"UUID" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s DeleteEventSourceMappingInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteEventSourceMappingInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DeleteEventSourceMappingInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteEventSourceMappingInput"}
- if s.UUID == nil {
- invalidParams.Add(request.NewErrParamRequired("UUID"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- type DeleteFunctionInput struct {
- _ struct{} `type:"structure"`
- // The Lambda function to delete.
- //
- // You can specify the function name (for example, Thumbnail) or you can specify
- // Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail).
- // If you are using versioning, you can also provide a qualified function ARN
- // (ARN that is qualified with function version or alias name as suffix). AWS
- // Lambda also allows you to specify only the function name with the account
- // ID qualifier (for example, account-id:Thumbnail). Note that the length constraint
- // applies only to the ARN. If you specify only the function name, it is limited
- // to 64 character in length.
- //
- // FunctionName is a required field
- FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
- // Using this optional parameter you can specify a function version (but not
- // the $LATEST version) to direct AWS Lambda to delete a specific function version.
- // If the function version has one or more aliases pointing to it, you will
- // get an error because you cannot have aliases pointing to it. You can delete
- // any function version but not the $LATEST, that is, you cannot specify $LATEST
- // as the value of this parameter. The $LATEST version can be deleted only when
- // you want to delete all the function versions and aliases.
- //
- // You can only specify a function version, not an alias name, using this parameter.
- // You cannot delete a function version using its alias.
- //
- // If you don't specify this parameter, AWS Lambda will delete the function,
- // including all of its versions and aliases.
- Qualifier *string `location:"querystring" locationName:"Qualifier" min:"1" type:"string"`
- }
- // String returns the string representation
- func (s DeleteFunctionInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteFunctionInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DeleteFunctionInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteFunctionInput"}
- if s.FunctionName == nil {
- invalidParams.Add(request.NewErrParamRequired("FunctionName"))
- }
- if s.FunctionName != nil && len(*s.FunctionName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
- }
- if s.Qualifier != nil && len(*s.Qualifier) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Qualifier", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- 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()
- }
- // Describes mapping between an Amazon Kinesis stream and a Lambda function.
- type EventSourceMappingConfiguration struct {
- _ struct{} `type:"structure"`
- // The largest number of records that AWS Lambda will retrieve from your event
- // source at the time of invoking your function. Your function receives an event
- // with all the retrieved records.
- BatchSize *int64 `min:"1" type:"integer"`
- // The Amazon Resource Name (ARN) of the Amazon Kinesis stream that is the source
- // of events.
- EventSourceArn *string `type:"string"`
- // The Lambda function to invoke when AWS Lambda detects an event on the stream.
- FunctionArn *string `type:"string"`
- // The UTC time string indicating the last time the event mapping was updated.
- LastModified *time.Time `type:"timestamp" timestampFormat:"unix"`
- // The result of the last AWS Lambda invocation of your Lambda function.
- LastProcessingResult *string `type:"string"`
- // The state of the event source mapping. It can be Creating, Enabled, Disabled,
- // Enabling, Disabling, Updating, or Deleting.
- State *string `type:"string"`
- // The reason the event source mapping is in its current state. It is either
- // user-requested or an AWS Lambda-initiated state transition.
- StateTransitionReason *string `type:"string"`
- // The AWS Lambda assigned opaque identifier for the mapping.
- UUID *string `type:"string"`
- }
- // String returns the string representation
- func (s EventSourceMappingConfiguration) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s EventSourceMappingConfiguration) GoString() string {
- return s.String()
- }
- // The code for the Lambda function.
- type FunctionCode struct {
- _ struct{} `type:"structure"`
- // Amazon S3 bucket name where the .zip file containing your deployment package
- // is stored. This bucket must reside in the same AWS region where you are creating
- // the Lambda function.
- S3Bucket *string `min:"3" type:"string"`
- // The Amazon S3 object (the deployment package) key name you want to upload.
- S3Key *string `min:"1" type:"string"`
- // The Amazon S3 object (the deployment package) version you want to upload.
- S3ObjectVersion *string `min:"1" type:"string"`
- // The contents of your zip file containing your deployment package. If you
- // are using the web API directly, the contents of the zip file must be base64-encoded.
- // If you are using the AWS SDKs or the AWS CLI, the SDKs or CLI will do the
- // encoding for you. For more information about creating a .zip file, go to
- // Execution Permissions (http://docs.aws.amazon.com/lambda/latest/dg/intro-permission-model.html#lambda-intro-execution-role.html)
- // in the AWS Lambda Developer Guide.
- //
- // ZipFile is automatically base64 encoded/decoded by the SDK.
- ZipFile []byte `type:"blob"`
- }
- // String returns the string representation
- func (s FunctionCode) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s FunctionCode) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *FunctionCode) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "FunctionCode"}
- if s.S3Bucket != nil && len(*s.S3Bucket) < 3 {
- invalidParams.Add(request.NewErrParamMinLen("S3Bucket", 3))
- }
- if s.S3Key != nil && len(*s.S3Key) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("S3Key", 1))
- }
- if s.S3ObjectVersion != nil && len(*s.S3ObjectVersion) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("S3ObjectVersion", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // The object for the Lambda function location.
- type FunctionCodeLocation struct {
- _ struct{} `type:"structure"`
- // The presigned URL you can use to download the function's .zip file that you
- // previously uploaded. The URL is valid for up to 10 minutes.
- Location *string `type:"string"`
- // The repository from which you can download the function.
- RepositoryType *string `type:"string"`
- }
- // String returns the string representation
- func (s FunctionCodeLocation) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s FunctionCodeLocation) GoString() string {
- return s.String()
- }
- // A complex type that describes function metadata.
- type FunctionConfiguration struct {
- _ struct{} `type:"structure"`
- // It is the SHA256 hash of your function deployment package.
- CodeSha256 *string `type:"string"`
- // The size, in bytes, of the function .zip file you uploaded.
- CodeSize *int64 `type:"long"`
- // The user-provided description.
- Description *string `type:"string"`
- // The Amazon Resource Name (ARN) assigned to the function.
- 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 time stamp of the last time you updated the function.
- LastModified *string `type:"string"`
- // The memory size, in MB, you configured for the function. Must be a multiple
- // of 64 MB.
- MemorySize *int64 `min:"128" type:"integer"`
- // The Amazon Resource Name (ARN) of the IAM role that Lambda assumes when it
- // executes your function to access any other Amazon Web Services (AWS) resources.
- Role *string `type:"string"`
- // The runtime environment for the Lambda function.
- //
- // To use the Node.js runtime v4.3, set the value to "nodejs4.3". To use earlier
- // runtime (v0.10.42), set the value to "nodejs".
- Runtime *string `type:"string" enum:"Runtime"`
- // The function execution time at which Lambda should terminate the function.
- // Because the execution time has cost implications, we recommend you set this
- // value based on your expected execution time. The default is 3 seconds.
- Timeout *int64 `min:"1" type:"integer"`
- // The version of the Lambda function.
- Version *string `min:"1" type:"string"`
- // VPC configuration associated with your Lambda function.
- VpcConfig *VpcConfigResponse `type:"structure"`
- }
- // String returns the string representation
- func (s FunctionConfiguration) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s FunctionConfiguration) GoString() string {
- return s.String()
- }
- type GetAliasInput struct {
- _ struct{} `type:"structure"`
- // Function name for which the alias is created. An alias is a subresource that
- // exists only in the context of an existing Lambda function so you must specify
- // the function name.
- //
- // FunctionName is a required field
- FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
- // Name of the alias for which you want to retrieve information.
- //
- // Name is a required field
- Name *string `location:"uri" locationName:"Name" min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s GetAliasInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetAliasInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *GetAliasInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetAliasInput"}
- if s.FunctionName == nil {
- invalidParams.Add(request.NewErrParamRequired("FunctionName"))
- }
- if s.FunctionName != nil && len(*s.FunctionName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
- }
- if s.Name == nil {
- invalidParams.Add(request.NewErrParamRequired("Name"))
- }
- if s.Name != nil && len(*s.Name) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Name", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- type GetEventSourceMappingInput struct {
- _ struct{} `type:"structure"`
- // The AWS Lambda assigned ID of the event source mapping.
- //
- // UUID is a required field
- UUID *string `location:"uri" locationName:"UUID" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s GetEventSourceMappingInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetEventSourceMappingInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *GetEventSourceMappingInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetEventSourceMappingInput"}
- if s.UUID == nil {
- invalidParams.Add(request.NewErrParamRequired("UUID"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- type GetFunctionConfigurationInput struct {
- _ struct{} `type:"structure"`
- // The name of the Lambda function for which you want to retrieve the configuration
- // information.
- //
- // You can specify a function name (for example, Thumbnail) or you can specify
- // Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail).
- // AWS Lambda also allows you to specify a partial ARN (for example, account-id:Thumbnail).
- // Note that the length constraint applies only to the ARN. If you specify only
- // the function name, it is limited to 64 character in length.
- //
- // FunctionName is a required field
- FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
- // Using this optional parameter you can specify a function version or an alias
- // name. If you specify function version, the API uses qualified function ARN
- // and returns information about the specific function version. If you specify
- // an alias name, the API uses the alias ARN and returns information about the
- // function version to which the alias points.
- //
- // If you don't specify this parameter, the API uses unqualified function ARN,
- // and returns information about the $LATEST function version.
- Qualifier *string `location:"querystring" locationName:"Qualifier" min:"1" type:"string"`
- }
- // String returns the string representation
- func (s GetFunctionConfigurationInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetFunctionConfigurationInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *GetFunctionConfigurationInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetFunctionConfigurationInput"}
- if s.FunctionName == nil {
- invalidParams.Add(request.NewErrParamRequired("FunctionName"))
- }
- if s.FunctionName != nil && len(*s.FunctionName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
- }
- if s.Qualifier != nil && len(*s.Qualifier) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Qualifier", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- type GetFunctionInput struct {
- _ struct{} `type:"structure"`
- // The Lambda function name.
- //
- // You can specify a function name (for example, Thumbnail) or you can specify
- // Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail).
- // AWS Lambda also allows you to specify a partial ARN (for example, account-id:Thumbnail).
- // Note that the length constraint applies only to the ARN. If you specify only
- // the function name, it is limited to 64 character in length.
- //
- // FunctionName is a required field
- FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
- // Using this optional parameter to specify a function version or an alias name.
- // If you specify function version, the API uses qualified function ARN for
- // the request and returns information about the specific Lambda function version.
- // If you specify an alias name, the API uses the alias ARN and returns information
- // about the function version to which the alias points. If you don't provide
- // this parameter, the API uses unqualified function ARN and returns information
- // about the $LATEST version of the Lambda function.
- Qualifier *string `location:"querystring" locationName:"Qualifier" min:"1" type:"string"`
- }
- // String returns the string representation
- func (s GetFunctionInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetFunctionInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *GetFunctionInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetFunctionInput"}
- if s.FunctionName == nil {
- invalidParams.Add(request.NewErrParamRequired("FunctionName"))
- }
- if s.FunctionName != nil && len(*s.FunctionName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
- }
- if s.Qualifier != nil && len(*s.Qualifier) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Qualifier", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // This response contains the object for the Lambda function location (see .
- type GetFunctionOutput struct {
- _ struct{} `type:"structure"`
- // The object for the Lambda function location.
- Code *FunctionCodeLocation `type:"structure"`
- // A complex type that describes function metadata.
- Configuration *FunctionConfiguration `type:"structure"`
- }
- // 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()
- }
- type GetPolicyInput struct {
- _ struct{} `type:"structure"`
- // Function name whose resource policy you want to retrieve.
- //
- // You can specify the function name (for example, Thumbnail) or you can specify
- // Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail).
- // If you are using versioning, you can also provide a qualified function ARN
- // (ARN that is qualified with function version or alias name as suffix). AWS
- // Lambda also allows you to specify only the function name with the account
- // ID qualifier (for example, account-id:Thumbnail). Note that the length constraint
- // applies only to the ARN. If you specify only the function name, it is limited
- // to 64 character in length.
- //
- // FunctionName is a required field
- FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
- // You can specify this optional query parameter to specify a function version
- // or an alias name in which case this API will return all permissions associated
- // with the specific qualified ARN. If you don't provide this parameter, the
- // API will return permissions that apply to the unqualified function ARN.
- Qualifier *string `location:"querystring" locationName:"Qualifier" min:"1" type:"string"`
- }
- // String returns the string representation
- func (s GetPolicyInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetPolicyInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *GetPolicyInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetPolicyInput"}
- if s.FunctionName == nil {
- invalidParams.Add(request.NewErrParamRequired("FunctionName"))
- }
- if s.FunctionName != nil && len(*s.FunctionName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
- }
- if s.Qualifier != nil && len(*s.Qualifier) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Qualifier", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- type GetPolicyOutput struct {
- _ struct{} `type:"structure"`
- // The resource policy associated with the specified function. The response
- // returns the same as a string using a backslash ("\") as an escape character
- // in the JSON.
- Policy *string `type:"string"`
- }
- // String returns the string representation
- func (s GetPolicyOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetPolicyOutput) GoString() string {
- return s.String()
- }
- type InvokeAsyncInput struct {
- _ struct{} `deprecated:"true" type:"structure" payload:"InvokeArgs"`
- // The Lambda function name.
- //
- // 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
- }
- // Upon success, it returns empty response. Otherwise, throws an exception.
- 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()
- }
- type InvokeInput struct {
- _ struct{} `type:"structure" payload:"Payload"`
- // Using the ClientContext you can pass client-specific information to the Lambda
- // function you are invoking. You can then process the client information in
- // your Lambda function as you choose through the context variable. For an example
- // of a ClientContext JSON, see PutEvents (http://docs.aws.amazon.com/mobileanalytics/latest/ug/PutEvents.html)
- // in the Amazon Mobile Analytics API Reference and User Guide.
- //
- // The ClientContext JSON must be base64-encoded.
- ClientContext *string `location:"header" locationName:"X-Amz-Client-Context" type:"string"`
- // The Lambda function name.
- //
- // You can specify a function name (for example, Thumbnail) or you can specify
- // Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail).
- // AWS Lambda also allows you to specify a partial ARN (for example, account-id:Thumbnail).
- // Note that the length constraint applies only to the ARN. If you specify only
- // the function name, it is limited to 64 character in length.
- //
- // FunctionName is a required field
- FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
- // By default, the Invoke API assumes RequestResponse invocation type. You can
- // optionally request asynchronous execution by specifying Event as the InvocationType.
- // You can also use this parameter to request AWS Lambda to not execute the
- // function but do some verification, such as if the caller is authorized to
- // invoke the function and if the inputs are valid. You request this by specifying
- // DryRun as the InvocationType. This is useful in a cross-account scenario
- // when you want to verify access to a function without running it.
- InvocationType *string `location:"header" locationName:"X-Amz-Invocation-Type" type:"string" enum:"InvocationType"`
- // You can set this optional parameter to Tail in the request only if you specify
- // the InvocationType parameter with value RequestResponse. In this case, AWS
- // Lambda returns the base64-encoded last 4 KB of log data produced by your
- // Lambda function in the x-amz-log-result header.
- LogType *string `location:"header" locationName:"X-Amz-Log-Type" type:"string" enum:"LogType"`
- // JSON that you want to provide to your Lambda function as input.
- Payload []byte `type:"blob"`
- // You can use this optional parameter to specify a Lambda function version
- // or alias name. If you specify a function version, the API uses the qualified
- // function ARN to invoke a specific Lambda function. If you specify an alias
- // name, the API uses the alias ARN to invoke the Lambda function version to
- // which the alias points.
- //
- // If you don't provide this parameter, then the API uses unqualified function
- // ARN which results in invocation of the $LATEST version.
- Qualifier *string `location:"querystring" locationName:"Qualifier" min:"1" type:"string"`
- }
- // String returns the string representation
- func (s InvokeInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s InvokeInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *InvokeInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "InvokeInput"}
- if s.FunctionName == nil {
- invalidParams.Add(request.NewErrParamRequired("FunctionName"))
- }
- if s.FunctionName != nil && len(*s.FunctionName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
- }
- if s.Qualifier != nil && len(*s.Qualifier) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Qualifier", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // Upon success, returns an empty response. Otherwise, throws an exception.
- type InvokeOutput struct {
- _ struct{} `type:"structure" payload:"Payload"`
- // Indicates whether an error occurred while executing the Lambda function.
- // If an error occurred this field will have one of two values; Handled or Unhandled.
- // Handled errors are errors that are reported by the function while the Unhandled
- // errors are those detected and reported by AWS Lambda. Unhandled errors include
- // out of memory errors and function timeouts. For information about how to
- // report an Handled error, see Programming Model (http://docs.aws.amazon.com/lambda/latest/dg/programming-model.html).
- FunctionError *string `location:"header" locationName:"X-Amz-Function-Error" type:"string"`
- // It is the base64-encoded logs for the Lambda function invocation. This is
- // present only if the invocation type is RequestResponse and the logs were
- // requested.
- LogResult *string `location:"header" locationName:"X-Amz-Log-Result" type:"string"`
- // It is the JSON representation of the object returned by the Lambda function.
- // In This is present only if the invocation type is RequestResponse.
- //
- // In the event of a function error this field contains a message describing
- // the error. For the Handled errors the Lambda function will report this message.
- // For Unhandled errors AWS Lambda reports the message.
- Payload []byte `type:"blob"`
- // The HTTP status code will be in the 200 range for successful request. For
- // the RequestResonse 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()
- }
- type ListAliasesInput struct {
- _ struct{} `type:"structure"`
- // Lambda function name for which the alias is created.
- //
- // FunctionName is a required field
- FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
- // If you specify this optional parameter, the API returns only the aliases
- // that are pointing to the specific Lambda function version, otherwise the
- // API returns all of the aliases created for the Lambda function.
- FunctionVersion *string `location:"querystring" locationName:"FunctionVersion" min:"1" type:"string"`
- // Optional string. An opaque pagination token returned from a previous ListAliases
- // operation. If present, indicates where to continue the listing.
- Marker *string `location:"querystring" locationName:"Marker" type:"string"`
- // Optional integer. Specifies the maximum number of aliases to return in response.
- // This parameter value must be greater than 0.
- MaxItems *int64 `location:"querystring" locationName:"MaxItems" min:"1" type:"integer"`
- }
- // String returns the string representation
- func (s ListAliasesInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListAliasesInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *ListAliasesInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListAliasesInput"}
- if s.FunctionName == nil {
- invalidParams.Add(request.NewErrParamRequired("FunctionName"))
- }
- if s.FunctionName != nil && len(*s.FunctionName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
- }
- if s.FunctionVersion != nil && len(*s.FunctionVersion) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("FunctionVersion", 1))
- }
- if s.MaxItems != nil && *s.MaxItems < 1 {
- invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- type ListAliasesOutput struct {
- _ struct{} `type:"structure"`
- // A list of aliases.
- Aliases []*AliasConfiguration `type:"list"`
- // A string, present if there are more aliases.
- NextMarker *string `type:"string"`
- }
- // String returns the string representation
- func (s ListAliasesOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListAliasesOutput) GoString() string {
- return s.String()
- }
- type ListEventSourceMappingsInput struct {
- _ struct{} `type:"structure"`
- // The Amazon Resource Name (ARN) of the Amazon Kinesis stream. (This parameter
- // is optional.)
- EventSourceArn *string `location:"querystring" locationName:"EventSourceArn" type:"string"`
- // The name of the Lambda function.
- //
- // You can specify the function name (for example, Thumbnail) or you can specify
- // Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail).
- // If you are using versioning, you can also provide a qualified function ARN
- // (ARN that is qualified with function version or alias name as suffix). AWS
- // Lambda also allows you to specify only the function name with the account
- // ID qualifier (for example, account-id:Thumbnail). Note that the length constraint
- // applies only to the ARN. If you specify only the function name, it is limited
- // to 64 character in length.
- FunctionName *string `location:"querystring" locationName:"FunctionName" min:"1" type:"string"`
- // Optional string. An opaque pagination token returned from a previous ListEventSourceMappings
- // operation. If present, specifies to continue the list from where the returning
- // call left off.
- Marker *string `location:"querystring" locationName:"Marker" type:"string"`
- // Optional integer. Specifies the maximum number of event sources to return
- // in response. This value must be greater than 0.
- MaxItems *int64 `location:"querystring" locationName:"MaxItems" min:"1" type:"integer"`
- }
- // String returns the string representation
- func (s ListEventSourceMappingsInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListEventSourceMappingsInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *ListEventSourceMappingsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListEventSourceMappingsInput"}
- if s.FunctionName != nil && len(*s.FunctionName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
- }
- if s.MaxItems != nil && *s.MaxItems < 1 {
- invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // Contains a list of event sources (see )
- type ListEventSourceMappingsOutput struct {
- _ struct{} `type:"structure"`
- // An array of EventSourceMappingConfiguration objects.
- EventSourceMappings []*EventSourceMappingConfiguration `type:"list"`
- // A string, present if there are more event source mappings.
- NextMarker *string `type:"string"`
- }
- // String returns the string representation
- func (s ListEventSourceMappingsOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListEventSourceMappingsOutput) GoString() string {
- return s.String()
- }
- type ListFunctionsInput struct {
- _ struct{} `type:"structure"`
- // Optional string. An opaque pagination token returned from a previous ListFunctions
- // operation. If present, indicates where to continue the listing.
- Marker *string `location:"querystring" locationName:"Marker" type:"string"`
- // Optional integer. Specifies the maximum number of AWS Lambda functions to
- // return in response. This parameter value must be greater than 0.
- MaxItems *int64 `location:"querystring" locationName:"MaxItems" min:"1" type:"integer"`
- }
- // String returns the string representation
- func (s ListFunctionsInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListFunctionsInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *ListFunctionsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListFunctionsInput"}
- if s.MaxItems != nil && *s.MaxItems < 1 {
- invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // Contains a list of AWS Lambda function configurations (see FunctionConfiguration.
- type ListFunctionsOutput struct {
- _ struct{} `type:"structure"`
- // A list of Lambda functions.
- Functions []*FunctionConfiguration `type:"list"`
- // A string, present if there are more functions.
- NextMarker *string `type:"string"`
- }
- // String returns the string representation
- func (s ListFunctionsOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListFunctionsOutput) GoString() string {
- return s.String()
- }
- type ListVersionsByFunctionInput struct {
- _ struct{} `type:"structure"`
- // Function name whose versions to list. You can specify a function name (for
- // example, Thumbnail) or you can specify Amazon Resource Name (ARN) of the
- // function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail).
- // AWS Lambda also allows you to specify a partial ARN (for example, account-id:Thumbnail).
- // Note that the length constraint applies only to the ARN. If you specify only
- // the function name, it is limited to 64 character in length.
- //
- // FunctionName is a required field
- FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
- // Optional string. An opaque pagination token returned from a previous ListVersionsByFunction
- // operation. If present, indicates where to continue the listing.
- Marker *string `location:"querystring" locationName:"Marker" type:"string"`
- // Optional integer. Specifies the maximum number of AWS Lambda function versions
- // to return in response. This parameter value must be greater than 0.
- MaxItems *int64 `location:"querystring" locationName:"MaxItems" min:"1" type:"integer"`
- }
- // String returns the string representation
- func (s ListVersionsByFunctionInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListVersionsByFunctionInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *ListVersionsByFunctionInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListVersionsByFunctionInput"}
- if s.FunctionName == nil {
- invalidParams.Add(request.NewErrParamRequired("FunctionName"))
- }
- if s.FunctionName != nil && len(*s.FunctionName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
- }
- if s.MaxItems != nil && *s.MaxItems < 1 {
- invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- type ListVersionsByFunctionOutput struct {
- _ struct{} `type:"structure"`
- // A string, present if there are more function versions.
- NextMarker *string `type:"string"`
- // A list of Lambda function versions.
- Versions []*FunctionConfiguration `type:"list"`
- }
- // String returns the string representation
- func (s ListVersionsByFunctionOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListVersionsByFunctionOutput) GoString() string {
- return s.String()
- }
- type PublishVersionInput struct {
- _ struct{} `type:"structure"`
- // The SHA256 hash of the deployment package you want to publish. This provides
- // validation on the code you are publishing. If you provide this parameter
- // value must match the SHA256 of the $LATEST version for the publication to
- // succeed.
- CodeSha256 *string `type:"string"`
- // The description for the version you are publishing. If not provided, AWS
- // Lambda copies the description from the $LATEST version.
- Description *string `type:"string"`
- // The Lambda function name. You can specify a function name (for example, Thumbnail)
- // or you can specify Amazon Resource Name (ARN) of the function (for example,
- // arn:aws:lambda:us-west-2:account-id:function:ThumbNail). AWS Lambda also
- // allows you to specify a partial ARN (for example, account-id:Thumbnail).
- // Note that the length constraint applies only to the ARN. If you specify only
- // the function name, it is limited to 64 character in length.
- //
- // FunctionName is a required field
- FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s PublishVersionInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s PublishVersionInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *PublishVersionInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PublishVersionInput"}
- if s.FunctionName == nil {
- invalidParams.Add(request.NewErrParamRequired("FunctionName"))
- }
- if s.FunctionName != nil && len(*s.FunctionName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- type RemovePermissionInput struct {
- _ struct{} `type:"structure"`
- // Lambda function whose resource policy you want to remove a permission from.
- //
- // You can specify a function name (for example, Thumbnail) or you can specify
- // Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail).
- // AWS Lambda also allows you to specify a partial ARN (for example, account-id:Thumbnail).
- // Note that the length constraint applies only to the ARN. If you specify only
- // the function name, it is limited to 64 character in length.
- //
- // FunctionName is a required field
- FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
- // You can specify this optional parameter to remove permission associated with
- // a specific function version or function alias. If you don't specify this
- // parameter, the API removes permission associated with the unqualified function
- // ARN.
- Qualifier *string `location:"querystring" locationName:"Qualifier" min:"1" type:"string"`
- // Statement ID of the permission to remove.
- //
- // StatementId is a required field
- StatementId *string `location:"uri" locationName:"StatementId" min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s RemovePermissionInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s RemovePermissionInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *RemovePermissionInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "RemovePermissionInput"}
- if s.FunctionName == nil {
- invalidParams.Add(request.NewErrParamRequired("FunctionName"))
- }
- if s.FunctionName != nil && len(*s.FunctionName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
- }
- if s.Qualifier != nil && len(*s.Qualifier) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Qualifier", 1))
- }
- if s.StatementId == nil {
- invalidParams.Add(request.NewErrParamRequired("StatementId"))
- }
- if s.StatementId != nil && len(*s.StatementId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("StatementId", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- 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 UpdateAliasInput struct {
- _ struct{} `type:"structure"`
- // You can change the description of the alias using this parameter.
- Description *string `type:"string"`
- // The function name for which the alias is created.
- //
- // FunctionName is a required field
- FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
- // Using this parameter you can change the Lambda function version to which
- // the alias points.
- FunctionVersion *string `min:"1" type:"string"`
- // The alias name.
- //
- // Name is a required field
- Name *string `location:"uri" locationName:"Name" min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s UpdateAliasInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s UpdateAliasInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *UpdateAliasInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "UpdateAliasInput"}
- if s.FunctionName == nil {
- invalidParams.Add(request.NewErrParamRequired("FunctionName"))
- }
- if s.FunctionName != nil && len(*s.FunctionName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
- }
- if s.FunctionVersion != nil && len(*s.FunctionVersion) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("FunctionVersion", 1))
- }
- if s.Name == nil {
- invalidParams.Add(request.NewErrParamRequired("Name"))
- }
- if s.Name != nil && len(*s.Name) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Name", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- type UpdateEventSourceMappingInput struct {
- _ struct{} `type:"structure"`
- // The maximum number of stream records that can be sent to your Lambda function
- // for a single invocation.
- BatchSize *int64 `min:"1" type:"integer"`
- // Specifies whether AWS Lambda should actively poll the stream or not. If disabled,
- // AWS Lambda will not poll the stream.
- Enabled *bool `type:"boolean"`
- // The Lambda function to which you want the stream records sent.
- //
- // You can specify a function name (for example, Thumbnail) or you can specify
- // Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail).
- // AWS Lambda also allows you to specify a partial ARN (for example, account-id:Thumbnail).
- //
- // If you are using versioning, you can also provide a qualified function ARN
- // (ARN that is qualified with function version or alias name as suffix). For
- // more information about versioning, see AWS Lambda Function Versioning and
- // Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html)
- //
- // Note that the length constraint applies only to the ARN. If you specify only
- // the function name, it is limited to 64 character in length.
- FunctionName *string `min:"1" type:"string"`
- // The event source mapping identifier.
- //
- // UUID is a required field
- UUID *string `location:"uri" locationName:"UUID" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s UpdateEventSourceMappingInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s UpdateEventSourceMappingInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *UpdateEventSourceMappingInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "UpdateEventSourceMappingInput"}
- if s.BatchSize != nil && *s.BatchSize < 1 {
- invalidParams.Add(request.NewErrParamMinValue("BatchSize", 1))
- }
- if s.FunctionName != nil && len(*s.FunctionName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
- }
- if s.UUID == nil {
- invalidParams.Add(request.NewErrParamRequired("UUID"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- type UpdateFunctionCodeInput struct {
- _ struct{} `type:"structure"`
- // The existing Lambda function name whose code you want to replace.
- //
- // You can specify a function name (for example, Thumbnail) or you can specify
- // Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail).
- // AWS Lambda also allows you to specify a partial ARN (for example, account-id:Thumbnail).
- // Note that the length constraint applies only to the ARN. If you specify only
- // the function name, it is limited to 64 character in length.
- //
- // FunctionName is a required field
- FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
- // This boolean parameter can be used to request AWS Lambda to update the Lambda
- // function and publish a version as an atomic operation.
- Publish *bool `type:"boolean"`
- // Amazon S3 bucket name where the .zip file containing your deployment package
- // is stored. This bucket must reside in the same AWS region where you are creating
- // the Lambda function.
- S3Bucket *string `min:"3" type:"string"`
- // The Amazon S3 object (the deployment package) key name you want to upload.
- S3Key *string `min:"1" type:"string"`
- // The Amazon S3 object (the deployment package) version you want to upload.
- S3ObjectVersion *string `min:"1" type:"string"`
- // The contents of your zip file containing your deployment package. If you
- // are using the web API directly, the contents of the zip file must be base64-encoded.
- // If you are using the AWS SDKs or the AWS CLI, the SDKs or CLI will do the
- // encoding for you. For more information about creating a .zip file, go to
- // Execution Permissions (http://docs.aws.amazon.com/lambda/latest/dg/intro-permission-model.html#lambda-intro-execution-role.html)
- // in the AWS Lambda Developer Guide.
- //
- // ZipFile is automatically base64 encoded/decoded by the SDK.
- ZipFile []byte `type:"blob"`
- }
- // String returns the string representation
- func (s UpdateFunctionCodeInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s UpdateFunctionCodeInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *UpdateFunctionCodeInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "UpdateFunctionCodeInput"}
- if s.FunctionName == nil {
- invalidParams.Add(request.NewErrParamRequired("FunctionName"))
- }
- if s.FunctionName != nil && len(*s.FunctionName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
- }
- if s.S3Bucket != nil && len(*s.S3Bucket) < 3 {
- invalidParams.Add(request.NewErrParamMinLen("S3Bucket", 3))
- }
- if s.S3Key != nil && len(*s.S3Key) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("S3Key", 1))
- }
- if s.S3ObjectVersion != nil && len(*s.S3ObjectVersion) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("S3ObjectVersion", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- type UpdateFunctionConfigurationInput struct {
- _ struct{} `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 name of the Lambda function.
- //
- // You can specify a function name (for example, Thumbnail) or you can specify
- // Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail).
- // AWS Lambda also allows you to specify a partial ARN (for example, account-id:Thumbnail).
- // Note that the length constraint applies only to the ARN. If you specify only
- // the function name, it is limited to 64 character in length.
- //
- // FunctionName is a required field
- FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"`
- // The function that Lambda calls to begin executing your function. For Node.js,
- // it is the module-name.export value in your function.
- Handler *string `type:"string"`
- // The amount of memory, in MB, your Lambda function is given. AWS Lambda uses
- // this memory size to infer the amount of CPU allocated to your function. Your
- // function use-case determines your CPU and memory requirements. For example,
- // a database operation might need less memory compared to an image processing
- // function. The default value is 128 MB. The value must be a multiple of 64
- // MB.
- MemorySize *int64 `min:"128" type:"integer"`
- // The Amazon Resource Name (ARN) of the IAM role that Lambda will assume when
- // it executes your function.
- Role *string `type:"string"`
- // The runtime environment for the Lambda function.
- //
- // To use the Node.js runtime v4.3, set the value to "nodejs4.3". To use earlier
- // runtime (v0.10.42), set the value to "nodejs".
- Runtime *string `type:"string" enum:"Runtime"`
- // The function execution time at which AWS Lambda should terminate the function.
- // Because the execution time has cost implications, we recommend you set this
- // value based on your expected execution time. The default is 3 seconds.
- Timeout *int64 `min:"1" type:"integer"`
- // If your Lambda function accesses resources in a VPC, you provide this parameter
- // identifying the list of security group IDs and subnet IDs. These must belong
- // to the same VPC. You must provide at least one security group and one subnet
- // ID.
- VpcConfig *VpcConfig `type:"structure"`
- }
- // String returns the string representation
- func (s UpdateFunctionConfigurationInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s UpdateFunctionConfigurationInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *UpdateFunctionConfigurationInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "UpdateFunctionConfigurationInput"}
- if s.FunctionName == nil {
- invalidParams.Add(request.NewErrParamRequired("FunctionName"))
- }
- if s.FunctionName != nil && len(*s.FunctionName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1))
- }
- if s.MemorySize != nil && *s.MemorySize < 128 {
- invalidParams.Add(request.NewErrParamMinValue("MemorySize", 128))
- }
- if s.Timeout != nil && *s.Timeout < 1 {
- invalidParams.Add(request.NewErrParamMinValue("Timeout", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // If your Lambda function accesses resources in a VPC, you provide this parameter
- // identifying the list of security group IDs and subnet IDs. These must belong
- // to the same VPC. You must provide at least one security group and one subnet
- // ID.
- type VpcConfig struct {
- _ struct{} `type:"structure"`
- // A list of one or more security groups IDs in your VPC.
- SecurityGroupIds []*string `type:"list"`
- // A list of one or more subnet IDs in your VPC.
- SubnetIds []*string `type:"list"`
- }
- // String returns the string representation
- func (s VpcConfig) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s VpcConfig) GoString() string {
- return s.String()
- }
- // VPC configuration associated with your Lambda function.
- type VpcConfigResponse struct {
- _ struct{} `type:"structure"`
- // A list of security group IDs associated with the Lambda function.
- SecurityGroupIds []*string `type:"list"`
- // A list of subnet IDs associated with the Lambda function.
- SubnetIds []*string `type:"list"`
- // The VPC ID associated with you Lambda function.
- VpcId *string `type:"string"`
- }
- // String returns the string representation
- func (s VpcConfigResponse) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s VpcConfigResponse) GoString() string {
- return s.String()
- }
- const (
- // EventSourcePositionTrimHorizon is a EventSourcePosition enum value
- EventSourcePositionTrimHorizon = "TRIM_HORIZON"
- // EventSourcePositionLatest is a EventSourcePosition enum value
- EventSourcePositionLatest = "LATEST"
- )
- 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"
- // RuntimeJava8 is a Runtime enum value
- RuntimeJava8 = "java8"
- // RuntimePython27 is a Runtime enum value
- RuntimePython27 = "python2.7"
- )
- const (
- // ThrottleReasonConcurrentInvocationLimitExceeded is a ThrottleReason enum value
- ThrottleReasonConcurrentInvocationLimitExceeded = "ConcurrentInvocationLimitExceeded"
- // ThrottleReasonFunctionInvocationRateLimitExceeded is a ThrottleReason enum value
- ThrottleReasonFunctionInvocationRateLimitExceeded = "FunctionInvocationRateLimitExceeded"
- // ThrottleReasonCallerRateLimitExceeded is a ThrottleReason enum value
- ThrottleReasonCallerRateLimitExceeded = "CallerRateLimitExceeded"
- )
|