api.go 289 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613
  1. // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
  2. // Package apigateway provides a client for Amazon API Gateway.
  3. package apigateway
  4. import (
  5. "time"
  6. "github.com/aws/aws-sdk-go/aws/awsutil"
  7. "github.com/aws/aws-sdk-go/aws/request"
  8. "github.com/aws/aws-sdk-go/private/protocol"
  9. "github.com/aws/aws-sdk-go/private/protocol/restjson"
  10. )
  11. const opCreateApiKey = "CreateApiKey"
  12. // CreateApiKeyRequest generates a "aws/request.Request" representing the
  13. // client's request for the CreateApiKey operation. The "output" return
  14. // value can be used to capture response data after the request's "Send" method
  15. // is called.
  16. //
  17. // Creating a request object using this method should be used when you want to inject
  18. // custom logic into the request's lifecycle using a custom handler, or if you want to
  19. // access properties on the request object before or after sending the request. If
  20. // you just want the service response, call the CreateApiKey method directly
  21. // instead.
  22. //
  23. // Note: You must call the "Send" method on the returned request object in order
  24. // to execute the request.
  25. //
  26. // // Example sending a request using the CreateApiKeyRequest method.
  27. // req, resp := client.CreateApiKeyRequest(params)
  28. //
  29. // err := req.Send()
  30. // if err == nil { // resp is now filled
  31. // fmt.Println(resp)
  32. // }
  33. //
  34. func (c *APIGateway) CreateApiKeyRequest(input *CreateApiKeyInput) (req *request.Request, output *ApiKey) {
  35. op := &request.Operation{
  36. Name: opCreateApiKey,
  37. HTTPMethod: "POST",
  38. HTTPPath: "/apikeys",
  39. }
  40. if input == nil {
  41. input = &CreateApiKeyInput{}
  42. }
  43. req = c.newRequest(op, input, output)
  44. output = &ApiKey{}
  45. req.Data = output
  46. return
  47. }
  48. // Create an ApiKey resource.
  49. func (c *APIGateway) CreateApiKey(input *CreateApiKeyInput) (*ApiKey, error) {
  50. req, out := c.CreateApiKeyRequest(input)
  51. err := req.Send()
  52. return out, err
  53. }
  54. const opCreateAuthorizer = "CreateAuthorizer"
  55. // CreateAuthorizerRequest generates a "aws/request.Request" representing the
  56. // client's request for the CreateAuthorizer operation. The "output" return
  57. // value can be used to capture response data after the request's "Send" method
  58. // is called.
  59. //
  60. // Creating a request object using this method should be used when you want to inject
  61. // custom logic into the request's lifecycle using a custom handler, or if you want to
  62. // access properties on the request object before or after sending the request. If
  63. // you just want the service response, call the CreateAuthorizer method directly
  64. // instead.
  65. //
  66. // Note: You must call the "Send" method on the returned request object in order
  67. // to execute the request.
  68. //
  69. // // Example sending a request using the CreateAuthorizerRequest method.
  70. // req, resp := client.CreateAuthorizerRequest(params)
  71. //
  72. // err := req.Send()
  73. // if err == nil { // resp is now filled
  74. // fmt.Println(resp)
  75. // }
  76. //
  77. func (c *APIGateway) CreateAuthorizerRequest(input *CreateAuthorizerInput) (req *request.Request, output *Authorizer) {
  78. op := &request.Operation{
  79. Name: opCreateAuthorizer,
  80. HTTPMethod: "POST",
  81. HTTPPath: "/restapis/{restapi_id}/authorizers",
  82. }
  83. if input == nil {
  84. input = &CreateAuthorizerInput{}
  85. }
  86. req = c.newRequest(op, input, output)
  87. output = &Authorizer{}
  88. req.Data = output
  89. return
  90. }
  91. // Adds a new Authorizer resource to an existing RestApi resource.
  92. func (c *APIGateway) CreateAuthorizer(input *CreateAuthorizerInput) (*Authorizer, error) {
  93. req, out := c.CreateAuthorizerRequest(input)
  94. err := req.Send()
  95. return out, err
  96. }
  97. const opCreateBasePathMapping = "CreateBasePathMapping"
  98. // CreateBasePathMappingRequest generates a "aws/request.Request" representing the
  99. // client's request for the CreateBasePathMapping operation. The "output" return
  100. // value can be used to capture response data after the request's "Send" method
  101. // is called.
  102. //
  103. // Creating a request object using this method should be used when you want to inject
  104. // custom logic into the request's lifecycle using a custom handler, or if you want to
  105. // access properties on the request object before or after sending the request. If
  106. // you just want the service response, call the CreateBasePathMapping method directly
  107. // instead.
  108. //
  109. // Note: You must call the "Send" method on the returned request object in order
  110. // to execute the request.
  111. //
  112. // // Example sending a request using the CreateBasePathMappingRequest method.
  113. // req, resp := client.CreateBasePathMappingRequest(params)
  114. //
  115. // err := req.Send()
  116. // if err == nil { // resp is now filled
  117. // fmt.Println(resp)
  118. // }
  119. //
  120. func (c *APIGateway) CreateBasePathMappingRequest(input *CreateBasePathMappingInput) (req *request.Request, output *BasePathMapping) {
  121. op := &request.Operation{
  122. Name: opCreateBasePathMapping,
  123. HTTPMethod: "POST",
  124. HTTPPath: "/domainnames/{domain_name}/basepathmappings",
  125. }
  126. if input == nil {
  127. input = &CreateBasePathMappingInput{}
  128. }
  129. req = c.newRequest(op, input, output)
  130. output = &BasePathMapping{}
  131. req.Data = output
  132. return
  133. }
  134. // Creates a new BasePathMapping resource.
  135. func (c *APIGateway) CreateBasePathMapping(input *CreateBasePathMappingInput) (*BasePathMapping, error) {
  136. req, out := c.CreateBasePathMappingRequest(input)
  137. err := req.Send()
  138. return out, err
  139. }
  140. const opCreateDeployment = "CreateDeployment"
  141. // CreateDeploymentRequest generates a "aws/request.Request" representing the
  142. // client's request for the CreateDeployment operation. The "output" return
  143. // value can be used to capture response data after the request's "Send" method
  144. // is called.
  145. //
  146. // Creating a request object using this method should be used when you want to inject
  147. // custom logic into the request's lifecycle using a custom handler, or if you want to
  148. // access properties on the request object before or after sending the request. If
  149. // you just want the service response, call the CreateDeployment method directly
  150. // instead.
  151. //
  152. // Note: You must call the "Send" method on the returned request object in order
  153. // to execute the request.
  154. //
  155. // // Example sending a request using the CreateDeploymentRequest method.
  156. // req, resp := client.CreateDeploymentRequest(params)
  157. //
  158. // err := req.Send()
  159. // if err == nil { // resp is now filled
  160. // fmt.Println(resp)
  161. // }
  162. //
  163. func (c *APIGateway) CreateDeploymentRequest(input *CreateDeploymentInput) (req *request.Request, output *Deployment) {
  164. op := &request.Operation{
  165. Name: opCreateDeployment,
  166. HTTPMethod: "POST",
  167. HTTPPath: "/restapis/{restapi_id}/deployments",
  168. }
  169. if input == nil {
  170. input = &CreateDeploymentInput{}
  171. }
  172. req = c.newRequest(op, input, output)
  173. output = &Deployment{}
  174. req.Data = output
  175. return
  176. }
  177. // Creates a Deployment resource, which makes a specified RestApi callable over
  178. // the internet.
  179. func (c *APIGateway) CreateDeployment(input *CreateDeploymentInput) (*Deployment, error) {
  180. req, out := c.CreateDeploymentRequest(input)
  181. err := req.Send()
  182. return out, err
  183. }
  184. const opCreateDomainName = "CreateDomainName"
  185. // CreateDomainNameRequest generates a "aws/request.Request" representing the
  186. // client's request for the CreateDomainName operation. The "output" return
  187. // value can be used to capture response data after the request's "Send" method
  188. // is called.
  189. //
  190. // Creating a request object using this method should be used when you want to inject
  191. // custom logic into the request's lifecycle using a custom handler, or if you want to
  192. // access properties on the request object before or after sending the request. If
  193. // you just want the service response, call the CreateDomainName method directly
  194. // instead.
  195. //
  196. // Note: You must call the "Send" method on the returned request object in order
  197. // to execute the request.
  198. //
  199. // // Example sending a request using the CreateDomainNameRequest method.
  200. // req, resp := client.CreateDomainNameRequest(params)
  201. //
  202. // err := req.Send()
  203. // if err == nil { // resp is now filled
  204. // fmt.Println(resp)
  205. // }
  206. //
  207. func (c *APIGateway) CreateDomainNameRequest(input *CreateDomainNameInput) (req *request.Request, output *DomainName) {
  208. op := &request.Operation{
  209. Name: opCreateDomainName,
  210. HTTPMethod: "POST",
  211. HTTPPath: "/domainnames",
  212. }
  213. if input == nil {
  214. input = &CreateDomainNameInput{}
  215. }
  216. req = c.newRequest(op, input, output)
  217. output = &DomainName{}
  218. req.Data = output
  219. return
  220. }
  221. // Creates a new domain name.
  222. func (c *APIGateway) CreateDomainName(input *CreateDomainNameInput) (*DomainName, error) {
  223. req, out := c.CreateDomainNameRequest(input)
  224. err := req.Send()
  225. return out, err
  226. }
  227. const opCreateModel = "CreateModel"
  228. // CreateModelRequest generates a "aws/request.Request" representing the
  229. // client's request for the CreateModel operation. The "output" return
  230. // value can be used to capture response data after the request's "Send" method
  231. // is called.
  232. //
  233. // Creating a request object using this method should be used when you want to inject
  234. // custom logic into the request's lifecycle using a custom handler, or if you want to
  235. // access properties on the request object before or after sending the request. If
  236. // you just want the service response, call the CreateModel method directly
  237. // instead.
  238. //
  239. // Note: You must call the "Send" method on the returned request object in order
  240. // to execute the request.
  241. //
  242. // // Example sending a request using the CreateModelRequest method.
  243. // req, resp := client.CreateModelRequest(params)
  244. //
  245. // err := req.Send()
  246. // if err == nil { // resp is now filled
  247. // fmt.Println(resp)
  248. // }
  249. //
  250. func (c *APIGateway) CreateModelRequest(input *CreateModelInput) (req *request.Request, output *Model) {
  251. op := &request.Operation{
  252. Name: opCreateModel,
  253. HTTPMethod: "POST",
  254. HTTPPath: "/restapis/{restapi_id}/models",
  255. }
  256. if input == nil {
  257. input = &CreateModelInput{}
  258. }
  259. req = c.newRequest(op, input, output)
  260. output = &Model{}
  261. req.Data = output
  262. return
  263. }
  264. // Adds a new Model resource to an existing RestApi resource.
  265. func (c *APIGateway) CreateModel(input *CreateModelInput) (*Model, error) {
  266. req, out := c.CreateModelRequest(input)
  267. err := req.Send()
  268. return out, err
  269. }
  270. const opCreateResource = "CreateResource"
  271. // CreateResourceRequest generates a "aws/request.Request" representing the
  272. // client's request for the CreateResource operation. The "output" return
  273. // value can be used to capture response data after the request's "Send" method
  274. // is called.
  275. //
  276. // Creating a request object using this method should be used when you want to inject
  277. // custom logic into the request's lifecycle using a custom handler, or if you want to
  278. // access properties on the request object before or after sending the request. If
  279. // you just want the service response, call the CreateResource method directly
  280. // instead.
  281. //
  282. // Note: You must call the "Send" method on the returned request object in order
  283. // to execute the request.
  284. //
  285. // // Example sending a request using the CreateResourceRequest method.
  286. // req, resp := client.CreateResourceRequest(params)
  287. //
  288. // err := req.Send()
  289. // if err == nil { // resp is now filled
  290. // fmt.Println(resp)
  291. // }
  292. //
  293. func (c *APIGateway) CreateResourceRequest(input *CreateResourceInput) (req *request.Request, output *Resource) {
  294. op := &request.Operation{
  295. Name: opCreateResource,
  296. HTTPMethod: "POST",
  297. HTTPPath: "/restapis/{restapi_id}/resources/{parent_id}",
  298. }
  299. if input == nil {
  300. input = &CreateResourceInput{}
  301. }
  302. req = c.newRequest(op, input, output)
  303. output = &Resource{}
  304. req.Data = output
  305. return
  306. }
  307. // Creates a Resource resource.
  308. func (c *APIGateway) CreateResource(input *CreateResourceInput) (*Resource, error) {
  309. req, out := c.CreateResourceRequest(input)
  310. err := req.Send()
  311. return out, err
  312. }
  313. const opCreateRestApi = "CreateRestApi"
  314. // CreateRestApiRequest generates a "aws/request.Request" representing the
  315. // client's request for the CreateRestApi operation. The "output" return
  316. // value can be used to capture response data after the request's "Send" method
  317. // is called.
  318. //
  319. // Creating a request object using this method should be used when you want to inject
  320. // custom logic into the request's lifecycle using a custom handler, or if you want to
  321. // access properties on the request object before or after sending the request. If
  322. // you just want the service response, call the CreateRestApi method directly
  323. // instead.
  324. //
  325. // Note: You must call the "Send" method on the returned request object in order
  326. // to execute the request.
  327. //
  328. // // Example sending a request using the CreateRestApiRequest method.
  329. // req, resp := client.CreateRestApiRequest(params)
  330. //
  331. // err := req.Send()
  332. // if err == nil { // resp is now filled
  333. // fmt.Println(resp)
  334. // }
  335. //
  336. func (c *APIGateway) CreateRestApiRequest(input *CreateRestApiInput) (req *request.Request, output *RestApi) {
  337. op := &request.Operation{
  338. Name: opCreateRestApi,
  339. HTTPMethod: "POST",
  340. HTTPPath: "/restapis",
  341. }
  342. if input == nil {
  343. input = &CreateRestApiInput{}
  344. }
  345. req = c.newRequest(op, input, output)
  346. output = &RestApi{}
  347. req.Data = output
  348. return
  349. }
  350. // Creates a new RestApi resource.
  351. func (c *APIGateway) CreateRestApi(input *CreateRestApiInput) (*RestApi, error) {
  352. req, out := c.CreateRestApiRequest(input)
  353. err := req.Send()
  354. return out, err
  355. }
  356. const opCreateStage = "CreateStage"
  357. // CreateStageRequest generates a "aws/request.Request" representing the
  358. // client's request for the CreateStage operation. The "output" return
  359. // value can be used to capture response data after the request's "Send" method
  360. // is called.
  361. //
  362. // Creating a request object using this method should be used when you want to inject
  363. // custom logic into the request's lifecycle using a custom handler, or if you want to
  364. // access properties on the request object before or after sending the request. If
  365. // you just want the service response, call the CreateStage method directly
  366. // instead.
  367. //
  368. // Note: You must call the "Send" method on the returned request object in order
  369. // to execute the request.
  370. //
  371. // // Example sending a request using the CreateStageRequest method.
  372. // req, resp := client.CreateStageRequest(params)
  373. //
  374. // err := req.Send()
  375. // if err == nil { // resp is now filled
  376. // fmt.Println(resp)
  377. // }
  378. //
  379. func (c *APIGateway) CreateStageRequest(input *CreateStageInput) (req *request.Request, output *Stage) {
  380. op := &request.Operation{
  381. Name: opCreateStage,
  382. HTTPMethod: "POST",
  383. HTTPPath: "/restapis/{restapi_id}/stages",
  384. }
  385. if input == nil {
  386. input = &CreateStageInput{}
  387. }
  388. req = c.newRequest(op, input, output)
  389. output = &Stage{}
  390. req.Data = output
  391. return
  392. }
  393. // Creates a new Stage resource that references a pre-existing Deployment for
  394. // the API.
  395. func (c *APIGateway) CreateStage(input *CreateStageInput) (*Stage, error) {
  396. req, out := c.CreateStageRequest(input)
  397. err := req.Send()
  398. return out, err
  399. }
  400. const opDeleteApiKey = "DeleteApiKey"
  401. // DeleteApiKeyRequest generates a "aws/request.Request" representing the
  402. // client's request for the DeleteApiKey operation. The "output" return
  403. // value can be used to capture response data after the request's "Send" method
  404. // is called.
  405. //
  406. // Creating a request object using this method should be used when you want to inject
  407. // custom logic into the request's lifecycle using a custom handler, or if you want to
  408. // access properties on the request object before or after sending the request. If
  409. // you just want the service response, call the DeleteApiKey method directly
  410. // instead.
  411. //
  412. // Note: You must call the "Send" method on the returned request object in order
  413. // to execute the request.
  414. //
  415. // // Example sending a request using the DeleteApiKeyRequest method.
  416. // req, resp := client.DeleteApiKeyRequest(params)
  417. //
  418. // err := req.Send()
  419. // if err == nil { // resp is now filled
  420. // fmt.Println(resp)
  421. // }
  422. //
  423. func (c *APIGateway) DeleteApiKeyRequest(input *DeleteApiKeyInput) (req *request.Request, output *DeleteApiKeyOutput) {
  424. op := &request.Operation{
  425. Name: opDeleteApiKey,
  426. HTTPMethod: "DELETE",
  427. HTTPPath: "/apikeys/{api_Key}",
  428. }
  429. if input == nil {
  430. input = &DeleteApiKeyInput{}
  431. }
  432. req = c.newRequest(op, input, output)
  433. req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
  434. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  435. output = &DeleteApiKeyOutput{}
  436. req.Data = output
  437. return
  438. }
  439. // Deletes the ApiKey resource.
  440. func (c *APIGateway) DeleteApiKey(input *DeleteApiKeyInput) (*DeleteApiKeyOutput, error) {
  441. req, out := c.DeleteApiKeyRequest(input)
  442. err := req.Send()
  443. return out, err
  444. }
  445. const opDeleteAuthorizer = "DeleteAuthorizer"
  446. // DeleteAuthorizerRequest generates a "aws/request.Request" representing the
  447. // client's request for the DeleteAuthorizer operation. The "output" return
  448. // value can be used to capture response data after the request's "Send" method
  449. // is called.
  450. //
  451. // Creating a request object using this method should be used when you want to inject
  452. // custom logic into the request's lifecycle using a custom handler, or if you want to
  453. // access properties on the request object before or after sending the request. If
  454. // you just want the service response, call the DeleteAuthorizer method directly
  455. // instead.
  456. //
  457. // Note: You must call the "Send" method on the returned request object in order
  458. // to execute the request.
  459. //
  460. // // Example sending a request using the DeleteAuthorizerRequest method.
  461. // req, resp := client.DeleteAuthorizerRequest(params)
  462. //
  463. // err := req.Send()
  464. // if err == nil { // resp is now filled
  465. // fmt.Println(resp)
  466. // }
  467. //
  468. func (c *APIGateway) DeleteAuthorizerRequest(input *DeleteAuthorizerInput) (req *request.Request, output *DeleteAuthorizerOutput) {
  469. op := &request.Operation{
  470. Name: opDeleteAuthorizer,
  471. HTTPMethod: "DELETE",
  472. HTTPPath: "/restapis/{restapi_id}/authorizers/{authorizer_id}",
  473. }
  474. if input == nil {
  475. input = &DeleteAuthorizerInput{}
  476. }
  477. req = c.newRequest(op, input, output)
  478. req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
  479. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  480. output = &DeleteAuthorizerOutput{}
  481. req.Data = output
  482. return
  483. }
  484. // Deletes an existing Authorizer resource.
  485. func (c *APIGateway) DeleteAuthorizer(input *DeleteAuthorizerInput) (*DeleteAuthorizerOutput, error) {
  486. req, out := c.DeleteAuthorizerRequest(input)
  487. err := req.Send()
  488. return out, err
  489. }
  490. const opDeleteBasePathMapping = "DeleteBasePathMapping"
  491. // DeleteBasePathMappingRequest generates a "aws/request.Request" representing the
  492. // client's request for the DeleteBasePathMapping operation. The "output" return
  493. // value can be used to capture response data after the request's "Send" method
  494. // is called.
  495. //
  496. // Creating a request object using this method should be used when you want to inject
  497. // custom logic into the request's lifecycle using a custom handler, or if you want to
  498. // access properties on the request object before or after sending the request. If
  499. // you just want the service response, call the DeleteBasePathMapping method directly
  500. // instead.
  501. //
  502. // Note: You must call the "Send" method on the returned request object in order
  503. // to execute the request.
  504. //
  505. // // Example sending a request using the DeleteBasePathMappingRequest method.
  506. // req, resp := client.DeleteBasePathMappingRequest(params)
  507. //
  508. // err := req.Send()
  509. // if err == nil { // resp is now filled
  510. // fmt.Println(resp)
  511. // }
  512. //
  513. func (c *APIGateway) DeleteBasePathMappingRequest(input *DeleteBasePathMappingInput) (req *request.Request, output *DeleteBasePathMappingOutput) {
  514. op := &request.Operation{
  515. Name: opDeleteBasePathMapping,
  516. HTTPMethod: "DELETE",
  517. HTTPPath: "/domainnames/{domain_name}/basepathmappings/{base_path}",
  518. }
  519. if input == nil {
  520. input = &DeleteBasePathMappingInput{}
  521. }
  522. req = c.newRequest(op, input, output)
  523. req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
  524. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  525. output = &DeleteBasePathMappingOutput{}
  526. req.Data = output
  527. return
  528. }
  529. // Deletes the BasePathMapping resource.
  530. func (c *APIGateway) DeleteBasePathMapping(input *DeleteBasePathMappingInput) (*DeleteBasePathMappingOutput, error) {
  531. req, out := c.DeleteBasePathMappingRequest(input)
  532. err := req.Send()
  533. return out, err
  534. }
  535. const opDeleteClientCertificate = "DeleteClientCertificate"
  536. // DeleteClientCertificateRequest generates a "aws/request.Request" representing the
  537. // client's request for the DeleteClientCertificate operation. The "output" return
  538. // value can be used to capture response data after the request's "Send" method
  539. // is called.
  540. //
  541. // Creating a request object using this method should be used when you want to inject
  542. // custom logic into the request's lifecycle using a custom handler, or if you want to
  543. // access properties on the request object before or after sending the request. If
  544. // you just want the service response, call the DeleteClientCertificate method directly
  545. // instead.
  546. //
  547. // Note: You must call the "Send" method on the returned request object in order
  548. // to execute the request.
  549. //
  550. // // Example sending a request using the DeleteClientCertificateRequest method.
  551. // req, resp := client.DeleteClientCertificateRequest(params)
  552. //
  553. // err := req.Send()
  554. // if err == nil { // resp is now filled
  555. // fmt.Println(resp)
  556. // }
  557. //
  558. func (c *APIGateway) DeleteClientCertificateRequest(input *DeleteClientCertificateInput) (req *request.Request, output *DeleteClientCertificateOutput) {
  559. op := &request.Operation{
  560. Name: opDeleteClientCertificate,
  561. HTTPMethod: "DELETE",
  562. HTTPPath: "/clientcertificates/{clientcertificate_id}",
  563. }
  564. if input == nil {
  565. input = &DeleteClientCertificateInput{}
  566. }
  567. req = c.newRequest(op, input, output)
  568. req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
  569. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  570. output = &DeleteClientCertificateOutput{}
  571. req.Data = output
  572. return
  573. }
  574. // Deletes the ClientCertificate resource.
  575. func (c *APIGateway) DeleteClientCertificate(input *DeleteClientCertificateInput) (*DeleteClientCertificateOutput, error) {
  576. req, out := c.DeleteClientCertificateRequest(input)
  577. err := req.Send()
  578. return out, err
  579. }
  580. const opDeleteDeployment = "DeleteDeployment"
  581. // DeleteDeploymentRequest generates a "aws/request.Request" representing the
  582. // client's request for the DeleteDeployment operation. The "output" return
  583. // value can be used to capture response data after the request's "Send" method
  584. // is called.
  585. //
  586. // Creating a request object using this method should be used when you want to inject
  587. // custom logic into the request's lifecycle using a custom handler, or if you want to
  588. // access properties on the request object before or after sending the request. If
  589. // you just want the service response, call the DeleteDeployment method directly
  590. // instead.
  591. //
  592. // Note: You must call the "Send" method on the returned request object in order
  593. // to execute the request.
  594. //
  595. // // Example sending a request using the DeleteDeploymentRequest method.
  596. // req, resp := client.DeleteDeploymentRequest(params)
  597. //
  598. // err := req.Send()
  599. // if err == nil { // resp is now filled
  600. // fmt.Println(resp)
  601. // }
  602. //
  603. func (c *APIGateway) DeleteDeploymentRequest(input *DeleteDeploymentInput) (req *request.Request, output *DeleteDeploymentOutput) {
  604. op := &request.Operation{
  605. Name: opDeleteDeployment,
  606. HTTPMethod: "DELETE",
  607. HTTPPath: "/restapis/{restapi_id}/deployments/{deployment_id}",
  608. }
  609. if input == nil {
  610. input = &DeleteDeploymentInput{}
  611. }
  612. req = c.newRequest(op, input, output)
  613. req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
  614. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  615. output = &DeleteDeploymentOutput{}
  616. req.Data = output
  617. return
  618. }
  619. // Deletes a Deployment resource. Deleting a deployment will only succeed if
  620. // there are no Stage resources associated with it.
  621. func (c *APIGateway) DeleteDeployment(input *DeleteDeploymentInput) (*DeleteDeploymentOutput, error) {
  622. req, out := c.DeleteDeploymentRequest(input)
  623. err := req.Send()
  624. return out, err
  625. }
  626. const opDeleteDomainName = "DeleteDomainName"
  627. // DeleteDomainNameRequest generates a "aws/request.Request" representing the
  628. // client's request for the DeleteDomainName operation. The "output" return
  629. // value can be used to capture response data after the request's "Send" method
  630. // is called.
  631. //
  632. // Creating a request object using this method should be used when you want to inject
  633. // custom logic into the request's lifecycle using a custom handler, or if you want to
  634. // access properties on the request object before or after sending the request. If
  635. // you just want the service response, call the DeleteDomainName method directly
  636. // instead.
  637. //
  638. // Note: You must call the "Send" method on the returned request object in order
  639. // to execute the request.
  640. //
  641. // // Example sending a request using the DeleteDomainNameRequest method.
  642. // req, resp := client.DeleteDomainNameRequest(params)
  643. //
  644. // err := req.Send()
  645. // if err == nil { // resp is now filled
  646. // fmt.Println(resp)
  647. // }
  648. //
  649. func (c *APIGateway) DeleteDomainNameRequest(input *DeleteDomainNameInput) (req *request.Request, output *DeleteDomainNameOutput) {
  650. op := &request.Operation{
  651. Name: opDeleteDomainName,
  652. HTTPMethod: "DELETE",
  653. HTTPPath: "/domainnames/{domain_name}",
  654. }
  655. if input == nil {
  656. input = &DeleteDomainNameInput{}
  657. }
  658. req = c.newRequest(op, input, output)
  659. req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
  660. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  661. output = &DeleteDomainNameOutput{}
  662. req.Data = output
  663. return
  664. }
  665. // Deletes the DomainName resource.
  666. func (c *APIGateway) DeleteDomainName(input *DeleteDomainNameInput) (*DeleteDomainNameOutput, error) {
  667. req, out := c.DeleteDomainNameRequest(input)
  668. err := req.Send()
  669. return out, err
  670. }
  671. const opDeleteIntegration = "DeleteIntegration"
  672. // DeleteIntegrationRequest generates a "aws/request.Request" representing the
  673. // client's request for the DeleteIntegration operation. The "output" return
  674. // value can be used to capture response data after the request's "Send" method
  675. // is called.
  676. //
  677. // Creating a request object using this method should be used when you want to inject
  678. // custom logic into the request's lifecycle using a custom handler, or if you want to
  679. // access properties on the request object before or after sending the request. If
  680. // you just want the service response, call the DeleteIntegration method directly
  681. // instead.
  682. //
  683. // Note: You must call the "Send" method on the returned request object in order
  684. // to execute the request.
  685. //
  686. // // Example sending a request using the DeleteIntegrationRequest method.
  687. // req, resp := client.DeleteIntegrationRequest(params)
  688. //
  689. // err := req.Send()
  690. // if err == nil { // resp is now filled
  691. // fmt.Println(resp)
  692. // }
  693. //
  694. func (c *APIGateway) DeleteIntegrationRequest(input *DeleteIntegrationInput) (req *request.Request, output *DeleteIntegrationOutput) {
  695. op := &request.Operation{
  696. Name: opDeleteIntegration,
  697. HTTPMethod: "DELETE",
  698. HTTPPath: "/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}/integration",
  699. }
  700. if input == nil {
  701. input = &DeleteIntegrationInput{}
  702. }
  703. req = c.newRequest(op, input, output)
  704. req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
  705. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  706. output = &DeleteIntegrationOutput{}
  707. req.Data = output
  708. return
  709. }
  710. // Represents a delete integration.
  711. func (c *APIGateway) DeleteIntegration(input *DeleteIntegrationInput) (*DeleteIntegrationOutput, error) {
  712. req, out := c.DeleteIntegrationRequest(input)
  713. err := req.Send()
  714. return out, err
  715. }
  716. const opDeleteIntegrationResponse = "DeleteIntegrationResponse"
  717. // DeleteIntegrationResponseRequest generates a "aws/request.Request" representing the
  718. // client's request for the DeleteIntegrationResponse operation. The "output" return
  719. // value can be used to capture response data after the request's "Send" method
  720. // is called.
  721. //
  722. // Creating a request object using this method should be used when you want to inject
  723. // custom logic into the request's lifecycle using a custom handler, or if you want to
  724. // access properties on the request object before or after sending the request. If
  725. // you just want the service response, call the DeleteIntegrationResponse method directly
  726. // instead.
  727. //
  728. // Note: You must call the "Send" method on the returned request object in order
  729. // to execute the request.
  730. //
  731. // // Example sending a request using the DeleteIntegrationResponseRequest method.
  732. // req, resp := client.DeleteIntegrationResponseRequest(params)
  733. //
  734. // err := req.Send()
  735. // if err == nil { // resp is now filled
  736. // fmt.Println(resp)
  737. // }
  738. //
  739. func (c *APIGateway) DeleteIntegrationResponseRequest(input *DeleteIntegrationResponseInput) (req *request.Request, output *DeleteIntegrationResponseOutput) {
  740. op := &request.Operation{
  741. Name: opDeleteIntegrationResponse,
  742. HTTPMethod: "DELETE",
  743. HTTPPath: "/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}/integration/responses/{status_code}",
  744. }
  745. if input == nil {
  746. input = &DeleteIntegrationResponseInput{}
  747. }
  748. req = c.newRequest(op, input, output)
  749. req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
  750. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  751. output = &DeleteIntegrationResponseOutput{}
  752. req.Data = output
  753. return
  754. }
  755. // Represents a delete integration response.
  756. func (c *APIGateway) DeleteIntegrationResponse(input *DeleteIntegrationResponseInput) (*DeleteIntegrationResponseOutput, error) {
  757. req, out := c.DeleteIntegrationResponseRequest(input)
  758. err := req.Send()
  759. return out, err
  760. }
  761. const opDeleteMethod = "DeleteMethod"
  762. // DeleteMethodRequest generates a "aws/request.Request" representing the
  763. // client's request for the DeleteMethod operation. The "output" return
  764. // value can be used to capture response data after the request's "Send" method
  765. // is called.
  766. //
  767. // Creating a request object using this method should be used when you want to inject
  768. // custom logic into the request's lifecycle using a custom handler, or if you want to
  769. // access properties on the request object before or after sending the request. If
  770. // you just want the service response, call the DeleteMethod method directly
  771. // instead.
  772. //
  773. // Note: You must call the "Send" method on the returned request object in order
  774. // to execute the request.
  775. //
  776. // // Example sending a request using the DeleteMethodRequest method.
  777. // req, resp := client.DeleteMethodRequest(params)
  778. //
  779. // err := req.Send()
  780. // if err == nil { // resp is now filled
  781. // fmt.Println(resp)
  782. // }
  783. //
  784. func (c *APIGateway) DeleteMethodRequest(input *DeleteMethodInput) (req *request.Request, output *DeleteMethodOutput) {
  785. op := &request.Operation{
  786. Name: opDeleteMethod,
  787. HTTPMethod: "DELETE",
  788. HTTPPath: "/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}",
  789. }
  790. if input == nil {
  791. input = &DeleteMethodInput{}
  792. }
  793. req = c.newRequest(op, input, output)
  794. req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
  795. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  796. output = &DeleteMethodOutput{}
  797. req.Data = output
  798. return
  799. }
  800. // Deletes an existing Method resource.
  801. func (c *APIGateway) DeleteMethod(input *DeleteMethodInput) (*DeleteMethodOutput, error) {
  802. req, out := c.DeleteMethodRequest(input)
  803. err := req.Send()
  804. return out, err
  805. }
  806. const opDeleteMethodResponse = "DeleteMethodResponse"
  807. // DeleteMethodResponseRequest generates a "aws/request.Request" representing the
  808. // client's request for the DeleteMethodResponse operation. The "output" return
  809. // value can be used to capture response data after the request's "Send" method
  810. // is called.
  811. //
  812. // Creating a request object using this method should be used when you want to inject
  813. // custom logic into the request's lifecycle using a custom handler, or if you want to
  814. // access properties on the request object before or after sending the request. If
  815. // you just want the service response, call the DeleteMethodResponse method directly
  816. // instead.
  817. //
  818. // Note: You must call the "Send" method on the returned request object in order
  819. // to execute the request.
  820. //
  821. // // Example sending a request using the DeleteMethodResponseRequest method.
  822. // req, resp := client.DeleteMethodResponseRequest(params)
  823. //
  824. // err := req.Send()
  825. // if err == nil { // resp is now filled
  826. // fmt.Println(resp)
  827. // }
  828. //
  829. func (c *APIGateway) DeleteMethodResponseRequest(input *DeleteMethodResponseInput) (req *request.Request, output *DeleteMethodResponseOutput) {
  830. op := &request.Operation{
  831. Name: opDeleteMethodResponse,
  832. HTTPMethod: "DELETE",
  833. HTTPPath: "/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}/responses/{status_code}",
  834. }
  835. if input == nil {
  836. input = &DeleteMethodResponseInput{}
  837. }
  838. req = c.newRequest(op, input, output)
  839. req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
  840. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  841. output = &DeleteMethodResponseOutput{}
  842. req.Data = output
  843. return
  844. }
  845. // Deletes an existing MethodResponse resource.
  846. func (c *APIGateway) DeleteMethodResponse(input *DeleteMethodResponseInput) (*DeleteMethodResponseOutput, error) {
  847. req, out := c.DeleteMethodResponseRequest(input)
  848. err := req.Send()
  849. return out, err
  850. }
  851. const opDeleteModel = "DeleteModel"
  852. // DeleteModelRequest generates a "aws/request.Request" representing the
  853. // client's request for the DeleteModel operation. The "output" return
  854. // value can be used to capture response data after the request's "Send" method
  855. // is called.
  856. //
  857. // Creating a request object using this method should be used when you want to inject
  858. // custom logic into the request's lifecycle using a custom handler, or if you want to
  859. // access properties on the request object before or after sending the request. If
  860. // you just want the service response, call the DeleteModel method directly
  861. // instead.
  862. //
  863. // Note: You must call the "Send" method on the returned request object in order
  864. // to execute the request.
  865. //
  866. // // Example sending a request using the DeleteModelRequest method.
  867. // req, resp := client.DeleteModelRequest(params)
  868. //
  869. // err := req.Send()
  870. // if err == nil { // resp is now filled
  871. // fmt.Println(resp)
  872. // }
  873. //
  874. func (c *APIGateway) DeleteModelRequest(input *DeleteModelInput) (req *request.Request, output *DeleteModelOutput) {
  875. op := &request.Operation{
  876. Name: opDeleteModel,
  877. HTTPMethod: "DELETE",
  878. HTTPPath: "/restapis/{restapi_id}/models/{model_name}",
  879. }
  880. if input == nil {
  881. input = &DeleteModelInput{}
  882. }
  883. req = c.newRequest(op, input, output)
  884. req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
  885. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  886. output = &DeleteModelOutput{}
  887. req.Data = output
  888. return
  889. }
  890. // Deletes a model.
  891. func (c *APIGateway) DeleteModel(input *DeleteModelInput) (*DeleteModelOutput, error) {
  892. req, out := c.DeleteModelRequest(input)
  893. err := req.Send()
  894. return out, err
  895. }
  896. const opDeleteResource = "DeleteResource"
  897. // DeleteResourceRequest generates a "aws/request.Request" representing the
  898. // client's request for the DeleteResource operation. The "output" return
  899. // value can be used to capture response data after the request's "Send" method
  900. // is called.
  901. //
  902. // Creating a request object using this method should be used when you want to inject
  903. // custom logic into the request's lifecycle using a custom handler, or if you want to
  904. // access properties on the request object before or after sending the request. If
  905. // you just want the service response, call the DeleteResource method directly
  906. // instead.
  907. //
  908. // Note: You must call the "Send" method on the returned request object in order
  909. // to execute the request.
  910. //
  911. // // Example sending a request using the DeleteResourceRequest method.
  912. // req, resp := client.DeleteResourceRequest(params)
  913. //
  914. // err := req.Send()
  915. // if err == nil { // resp is now filled
  916. // fmt.Println(resp)
  917. // }
  918. //
  919. func (c *APIGateway) DeleteResourceRequest(input *DeleteResourceInput) (req *request.Request, output *DeleteResourceOutput) {
  920. op := &request.Operation{
  921. Name: opDeleteResource,
  922. HTTPMethod: "DELETE",
  923. HTTPPath: "/restapis/{restapi_id}/resources/{resource_id}",
  924. }
  925. if input == nil {
  926. input = &DeleteResourceInput{}
  927. }
  928. req = c.newRequest(op, input, output)
  929. req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
  930. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  931. output = &DeleteResourceOutput{}
  932. req.Data = output
  933. return
  934. }
  935. // Deletes a Resource resource.
  936. func (c *APIGateway) DeleteResource(input *DeleteResourceInput) (*DeleteResourceOutput, error) {
  937. req, out := c.DeleteResourceRequest(input)
  938. err := req.Send()
  939. return out, err
  940. }
  941. const opDeleteRestApi = "DeleteRestApi"
  942. // DeleteRestApiRequest generates a "aws/request.Request" representing the
  943. // client's request for the DeleteRestApi operation. The "output" return
  944. // value can be used to capture response data after the request's "Send" method
  945. // is called.
  946. //
  947. // Creating a request object using this method should be used when you want to inject
  948. // custom logic into the request's lifecycle using a custom handler, or if you want to
  949. // access properties on the request object before or after sending the request. If
  950. // you just want the service response, call the DeleteRestApi method directly
  951. // instead.
  952. //
  953. // Note: You must call the "Send" method on the returned request object in order
  954. // to execute the request.
  955. //
  956. // // Example sending a request using the DeleteRestApiRequest method.
  957. // req, resp := client.DeleteRestApiRequest(params)
  958. //
  959. // err := req.Send()
  960. // if err == nil { // resp is now filled
  961. // fmt.Println(resp)
  962. // }
  963. //
  964. func (c *APIGateway) DeleteRestApiRequest(input *DeleteRestApiInput) (req *request.Request, output *DeleteRestApiOutput) {
  965. op := &request.Operation{
  966. Name: opDeleteRestApi,
  967. HTTPMethod: "DELETE",
  968. HTTPPath: "/restapis/{restapi_id}",
  969. }
  970. if input == nil {
  971. input = &DeleteRestApiInput{}
  972. }
  973. req = c.newRequest(op, input, output)
  974. req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
  975. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  976. output = &DeleteRestApiOutput{}
  977. req.Data = output
  978. return
  979. }
  980. // Deletes the specified API.
  981. func (c *APIGateway) DeleteRestApi(input *DeleteRestApiInput) (*DeleteRestApiOutput, error) {
  982. req, out := c.DeleteRestApiRequest(input)
  983. err := req.Send()
  984. return out, err
  985. }
  986. const opDeleteStage = "DeleteStage"
  987. // DeleteStageRequest generates a "aws/request.Request" representing the
  988. // client's request for the DeleteStage operation. The "output" return
  989. // value can be used to capture response data after the request's "Send" method
  990. // is called.
  991. //
  992. // Creating a request object using this method should be used when you want to inject
  993. // custom logic into the request's lifecycle using a custom handler, or if you want to
  994. // access properties on the request object before or after sending the request. If
  995. // you just want the service response, call the DeleteStage method directly
  996. // instead.
  997. //
  998. // Note: You must call the "Send" method on the returned request object in order
  999. // to execute the request.
  1000. //
  1001. // // Example sending a request using the DeleteStageRequest method.
  1002. // req, resp := client.DeleteStageRequest(params)
  1003. //
  1004. // err := req.Send()
  1005. // if err == nil { // resp is now filled
  1006. // fmt.Println(resp)
  1007. // }
  1008. //
  1009. func (c *APIGateway) DeleteStageRequest(input *DeleteStageInput) (req *request.Request, output *DeleteStageOutput) {
  1010. op := &request.Operation{
  1011. Name: opDeleteStage,
  1012. HTTPMethod: "DELETE",
  1013. HTTPPath: "/restapis/{restapi_id}/stages/{stage_name}",
  1014. }
  1015. if input == nil {
  1016. input = &DeleteStageInput{}
  1017. }
  1018. req = c.newRequest(op, input, output)
  1019. req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
  1020. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  1021. output = &DeleteStageOutput{}
  1022. req.Data = output
  1023. return
  1024. }
  1025. // Deletes a Stage resource.
  1026. func (c *APIGateway) DeleteStage(input *DeleteStageInput) (*DeleteStageOutput, error) {
  1027. req, out := c.DeleteStageRequest(input)
  1028. err := req.Send()
  1029. return out, err
  1030. }
  1031. const opFlushStageAuthorizersCache = "FlushStageAuthorizersCache"
  1032. // FlushStageAuthorizersCacheRequest generates a "aws/request.Request" representing the
  1033. // client's request for the FlushStageAuthorizersCache operation. The "output" return
  1034. // value can be used to capture response data after the request's "Send" method
  1035. // is called.
  1036. //
  1037. // Creating a request object using this method should be used when you want to inject
  1038. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1039. // access properties on the request object before or after sending the request. If
  1040. // you just want the service response, call the FlushStageAuthorizersCache method directly
  1041. // instead.
  1042. //
  1043. // Note: You must call the "Send" method on the returned request object in order
  1044. // to execute the request.
  1045. //
  1046. // // Example sending a request using the FlushStageAuthorizersCacheRequest method.
  1047. // req, resp := client.FlushStageAuthorizersCacheRequest(params)
  1048. //
  1049. // err := req.Send()
  1050. // if err == nil { // resp is now filled
  1051. // fmt.Println(resp)
  1052. // }
  1053. //
  1054. func (c *APIGateway) FlushStageAuthorizersCacheRequest(input *FlushStageAuthorizersCacheInput) (req *request.Request, output *FlushStageAuthorizersCacheOutput) {
  1055. op := &request.Operation{
  1056. Name: opFlushStageAuthorizersCache,
  1057. HTTPMethod: "DELETE",
  1058. HTTPPath: "/restapis/{restapi_id}/stages/{stage_name}/cache/authorizers",
  1059. }
  1060. if input == nil {
  1061. input = &FlushStageAuthorizersCacheInput{}
  1062. }
  1063. req = c.newRequest(op, input, output)
  1064. req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
  1065. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  1066. output = &FlushStageAuthorizersCacheOutput{}
  1067. req.Data = output
  1068. return
  1069. }
  1070. // Flushes all authorizer cache entries on a stage.
  1071. func (c *APIGateway) FlushStageAuthorizersCache(input *FlushStageAuthorizersCacheInput) (*FlushStageAuthorizersCacheOutput, error) {
  1072. req, out := c.FlushStageAuthorizersCacheRequest(input)
  1073. err := req.Send()
  1074. return out, err
  1075. }
  1076. const opFlushStageCache = "FlushStageCache"
  1077. // FlushStageCacheRequest generates a "aws/request.Request" representing the
  1078. // client's request for the FlushStageCache operation. The "output" return
  1079. // value can be used to capture response data after the request's "Send" method
  1080. // is called.
  1081. //
  1082. // Creating a request object using this method should be used when you want to inject
  1083. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1084. // access properties on the request object before or after sending the request. If
  1085. // you just want the service response, call the FlushStageCache method directly
  1086. // instead.
  1087. //
  1088. // Note: You must call the "Send" method on the returned request object in order
  1089. // to execute the request.
  1090. //
  1091. // // Example sending a request using the FlushStageCacheRequest method.
  1092. // req, resp := client.FlushStageCacheRequest(params)
  1093. //
  1094. // err := req.Send()
  1095. // if err == nil { // resp is now filled
  1096. // fmt.Println(resp)
  1097. // }
  1098. //
  1099. func (c *APIGateway) FlushStageCacheRequest(input *FlushStageCacheInput) (req *request.Request, output *FlushStageCacheOutput) {
  1100. op := &request.Operation{
  1101. Name: opFlushStageCache,
  1102. HTTPMethod: "DELETE",
  1103. HTTPPath: "/restapis/{restapi_id}/stages/{stage_name}/cache/data",
  1104. }
  1105. if input == nil {
  1106. input = &FlushStageCacheInput{}
  1107. }
  1108. req = c.newRequest(op, input, output)
  1109. req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
  1110. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  1111. output = &FlushStageCacheOutput{}
  1112. req.Data = output
  1113. return
  1114. }
  1115. // Flushes a stage's cache.
  1116. func (c *APIGateway) FlushStageCache(input *FlushStageCacheInput) (*FlushStageCacheOutput, error) {
  1117. req, out := c.FlushStageCacheRequest(input)
  1118. err := req.Send()
  1119. return out, err
  1120. }
  1121. const opGenerateClientCertificate = "GenerateClientCertificate"
  1122. // GenerateClientCertificateRequest generates a "aws/request.Request" representing the
  1123. // client's request for the GenerateClientCertificate operation. The "output" return
  1124. // value can be used to capture response data after the request's "Send" method
  1125. // is called.
  1126. //
  1127. // Creating a request object using this method should be used when you want to inject
  1128. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1129. // access properties on the request object before or after sending the request. If
  1130. // you just want the service response, call the GenerateClientCertificate method directly
  1131. // instead.
  1132. //
  1133. // Note: You must call the "Send" method on the returned request object in order
  1134. // to execute the request.
  1135. //
  1136. // // Example sending a request using the GenerateClientCertificateRequest method.
  1137. // req, resp := client.GenerateClientCertificateRequest(params)
  1138. //
  1139. // err := req.Send()
  1140. // if err == nil { // resp is now filled
  1141. // fmt.Println(resp)
  1142. // }
  1143. //
  1144. func (c *APIGateway) GenerateClientCertificateRequest(input *GenerateClientCertificateInput) (req *request.Request, output *ClientCertificate) {
  1145. op := &request.Operation{
  1146. Name: opGenerateClientCertificate,
  1147. HTTPMethod: "POST",
  1148. HTTPPath: "/clientcertificates",
  1149. }
  1150. if input == nil {
  1151. input = &GenerateClientCertificateInput{}
  1152. }
  1153. req = c.newRequest(op, input, output)
  1154. output = &ClientCertificate{}
  1155. req.Data = output
  1156. return
  1157. }
  1158. // Generates a ClientCertificate resource.
  1159. func (c *APIGateway) GenerateClientCertificate(input *GenerateClientCertificateInput) (*ClientCertificate, error) {
  1160. req, out := c.GenerateClientCertificateRequest(input)
  1161. err := req.Send()
  1162. return out, err
  1163. }
  1164. const opGetAccount = "GetAccount"
  1165. // GetAccountRequest generates a "aws/request.Request" representing the
  1166. // client's request for the GetAccount operation. The "output" return
  1167. // value can be used to capture response data after the request's "Send" method
  1168. // is called.
  1169. //
  1170. // Creating a request object using this method should be used when you want to inject
  1171. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1172. // access properties on the request object before or after sending the request. If
  1173. // you just want the service response, call the GetAccount method directly
  1174. // instead.
  1175. //
  1176. // Note: You must call the "Send" method on the returned request object in order
  1177. // to execute the request.
  1178. //
  1179. // // Example sending a request using the GetAccountRequest method.
  1180. // req, resp := client.GetAccountRequest(params)
  1181. //
  1182. // err := req.Send()
  1183. // if err == nil { // resp is now filled
  1184. // fmt.Println(resp)
  1185. // }
  1186. //
  1187. func (c *APIGateway) GetAccountRequest(input *GetAccountInput) (req *request.Request, output *Account) {
  1188. op := &request.Operation{
  1189. Name: opGetAccount,
  1190. HTTPMethod: "GET",
  1191. HTTPPath: "/account",
  1192. }
  1193. if input == nil {
  1194. input = &GetAccountInput{}
  1195. }
  1196. req = c.newRequest(op, input, output)
  1197. output = &Account{}
  1198. req.Data = output
  1199. return
  1200. }
  1201. // Gets information about the current Account resource.
  1202. func (c *APIGateway) GetAccount(input *GetAccountInput) (*Account, error) {
  1203. req, out := c.GetAccountRequest(input)
  1204. err := req.Send()
  1205. return out, err
  1206. }
  1207. const opGetApiKey = "GetApiKey"
  1208. // GetApiKeyRequest generates a "aws/request.Request" representing the
  1209. // client's request for the GetApiKey operation. The "output" return
  1210. // value can be used to capture response data after the request's "Send" method
  1211. // is called.
  1212. //
  1213. // Creating a request object using this method should be used when you want to inject
  1214. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1215. // access properties on the request object before or after sending the request. If
  1216. // you just want the service response, call the GetApiKey method directly
  1217. // instead.
  1218. //
  1219. // Note: You must call the "Send" method on the returned request object in order
  1220. // to execute the request.
  1221. //
  1222. // // Example sending a request using the GetApiKeyRequest method.
  1223. // req, resp := client.GetApiKeyRequest(params)
  1224. //
  1225. // err := req.Send()
  1226. // if err == nil { // resp is now filled
  1227. // fmt.Println(resp)
  1228. // }
  1229. //
  1230. func (c *APIGateway) GetApiKeyRequest(input *GetApiKeyInput) (req *request.Request, output *ApiKey) {
  1231. op := &request.Operation{
  1232. Name: opGetApiKey,
  1233. HTTPMethod: "GET",
  1234. HTTPPath: "/apikeys/{api_Key}",
  1235. }
  1236. if input == nil {
  1237. input = &GetApiKeyInput{}
  1238. }
  1239. req = c.newRequest(op, input, output)
  1240. output = &ApiKey{}
  1241. req.Data = output
  1242. return
  1243. }
  1244. // Gets information about the current ApiKey resource.
  1245. func (c *APIGateway) GetApiKey(input *GetApiKeyInput) (*ApiKey, error) {
  1246. req, out := c.GetApiKeyRequest(input)
  1247. err := req.Send()
  1248. return out, err
  1249. }
  1250. const opGetApiKeys = "GetApiKeys"
  1251. // GetApiKeysRequest generates a "aws/request.Request" representing the
  1252. // client's request for the GetApiKeys operation. The "output" return
  1253. // value can be used to capture response data after the request's "Send" method
  1254. // is called.
  1255. //
  1256. // Creating a request object using this method should be used when you want to inject
  1257. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1258. // access properties on the request object before or after sending the request. If
  1259. // you just want the service response, call the GetApiKeys method directly
  1260. // instead.
  1261. //
  1262. // Note: You must call the "Send" method on the returned request object in order
  1263. // to execute the request.
  1264. //
  1265. // // Example sending a request using the GetApiKeysRequest method.
  1266. // req, resp := client.GetApiKeysRequest(params)
  1267. //
  1268. // err := req.Send()
  1269. // if err == nil { // resp is now filled
  1270. // fmt.Println(resp)
  1271. // }
  1272. //
  1273. func (c *APIGateway) GetApiKeysRequest(input *GetApiKeysInput) (req *request.Request, output *GetApiKeysOutput) {
  1274. op := &request.Operation{
  1275. Name: opGetApiKeys,
  1276. HTTPMethod: "GET",
  1277. HTTPPath: "/apikeys",
  1278. Paginator: &request.Paginator{
  1279. InputTokens: []string{"position"},
  1280. OutputTokens: []string{"position"},
  1281. LimitToken: "limit",
  1282. TruncationToken: "",
  1283. },
  1284. }
  1285. if input == nil {
  1286. input = &GetApiKeysInput{}
  1287. }
  1288. req = c.newRequest(op, input, output)
  1289. output = &GetApiKeysOutput{}
  1290. req.Data = output
  1291. return
  1292. }
  1293. // Gets information about the current ApiKeys resource.
  1294. func (c *APIGateway) GetApiKeys(input *GetApiKeysInput) (*GetApiKeysOutput, error) {
  1295. req, out := c.GetApiKeysRequest(input)
  1296. err := req.Send()
  1297. return out, err
  1298. }
  1299. // GetApiKeysPages iterates over the pages of a GetApiKeys operation,
  1300. // calling the "fn" function with the response data for each page. To stop
  1301. // iterating, return false from the fn function.
  1302. //
  1303. // See GetApiKeys method for more information on how to use this operation.
  1304. //
  1305. // Note: This operation can generate multiple requests to a service.
  1306. //
  1307. // // Example iterating over at most 3 pages of a GetApiKeys operation.
  1308. // pageNum := 0
  1309. // err := client.GetApiKeysPages(params,
  1310. // func(page *GetApiKeysOutput, lastPage bool) bool {
  1311. // pageNum++
  1312. // fmt.Println(page)
  1313. // return pageNum <= 3
  1314. // })
  1315. //
  1316. func (c *APIGateway) GetApiKeysPages(input *GetApiKeysInput, fn func(p *GetApiKeysOutput, lastPage bool) (shouldContinue bool)) error {
  1317. page, _ := c.GetApiKeysRequest(input)
  1318. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  1319. return page.EachPage(func(p interface{}, lastPage bool) bool {
  1320. return fn(p.(*GetApiKeysOutput), lastPage)
  1321. })
  1322. }
  1323. const opGetAuthorizer = "GetAuthorizer"
  1324. // GetAuthorizerRequest generates a "aws/request.Request" representing the
  1325. // client's request for the GetAuthorizer operation. The "output" return
  1326. // value can be used to capture response data after the request's "Send" method
  1327. // is called.
  1328. //
  1329. // Creating a request object using this method should be used when you want to inject
  1330. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1331. // access properties on the request object before or after sending the request. If
  1332. // you just want the service response, call the GetAuthorizer method directly
  1333. // instead.
  1334. //
  1335. // Note: You must call the "Send" method on the returned request object in order
  1336. // to execute the request.
  1337. //
  1338. // // Example sending a request using the GetAuthorizerRequest method.
  1339. // req, resp := client.GetAuthorizerRequest(params)
  1340. //
  1341. // err := req.Send()
  1342. // if err == nil { // resp is now filled
  1343. // fmt.Println(resp)
  1344. // }
  1345. //
  1346. func (c *APIGateway) GetAuthorizerRequest(input *GetAuthorizerInput) (req *request.Request, output *Authorizer) {
  1347. op := &request.Operation{
  1348. Name: opGetAuthorizer,
  1349. HTTPMethod: "GET",
  1350. HTTPPath: "/restapis/{restapi_id}/authorizers/{authorizer_id}",
  1351. }
  1352. if input == nil {
  1353. input = &GetAuthorizerInput{}
  1354. }
  1355. req = c.newRequest(op, input, output)
  1356. output = &Authorizer{}
  1357. req.Data = output
  1358. return
  1359. }
  1360. // Describe an existing Authorizer resource.
  1361. func (c *APIGateway) GetAuthorizer(input *GetAuthorizerInput) (*Authorizer, error) {
  1362. req, out := c.GetAuthorizerRequest(input)
  1363. err := req.Send()
  1364. return out, err
  1365. }
  1366. const opGetAuthorizers = "GetAuthorizers"
  1367. // GetAuthorizersRequest generates a "aws/request.Request" representing the
  1368. // client's request for the GetAuthorizers operation. The "output" return
  1369. // value can be used to capture response data after the request's "Send" method
  1370. // is called.
  1371. //
  1372. // Creating a request object using this method should be used when you want to inject
  1373. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1374. // access properties on the request object before or after sending the request. If
  1375. // you just want the service response, call the GetAuthorizers method directly
  1376. // instead.
  1377. //
  1378. // Note: You must call the "Send" method on the returned request object in order
  1379. // to execute the request.
  1380. //
  1381. // // Example sending a request using the GetAuthorizersRequest method.
  1382. // req, resp := client.GetAuthorizersRequest(params)
  1383. //
  1384. // err := req.Send()
  1385. // if err == nil { // resp is now filled
  1386. // fmt.Println(resp)
  1387. // }
  1388. //
  1389. func (c *APIGateway) GetAuthorizersRequest(input *GetAuthorizersInput) (req *request.Request, output *GetAuthorizersOutput) {
  1390. op := &request.Operation{
  1391. Name: opGetAuthorizers,
  1392. HTTPMethod: "GET",
  1393. HTTPPath: "/restapis/{restapi_id}/authorizers",
  1394. }
  1395. if input == nil {
  1396. input = &GetAuthorizersInput{}
  1397. }
  1398. req = c.newRequest(op, input, output)
  1399. output = &GetAuthorizersOutput{}
  1400. req.Data = output
  1401. return
  1402. }
  1403. // Describe an existing Authorizers resource.
  1404. func (c *APIGateway) GetAuthorizers(input *GetAuthorizersInput) (*GetAuthorizersOutput, error) {
  1405. req, out := c.GetAuthorizersRequest(input)
  1406. err := req.Send()
  1407. return out, err
  1408. }
  1409. const opGetBasePathMapping = "GetBasePathMapping"
  1410. // GetBasePathMappingRequest generates a "aws/request.Request" representing the
  1411. // client's request for the GetBasePathMapping operation. The "output" return
  1412. // value can be used to capture response data after the request's "Send" method
  1413. // is called.
  1414. //
  1415. // Creating a request object using this method should be used when you want to inject
  1416. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1417. // access properties on the request object before or after sending the request. If
  1418. // you just want the service response, call the GetBasePathMapping method directly
  1419. // instead.
  1420. //
  1421. // Note: You must call the "Send" method on the returned request object in order
  1422. // to execute the request.
  1423. //
  1424. // // Example sending a request using the GetBasePathMappingRequest method.
  1425. // req, resp := client.GetBasePathMappingRequest(params)
  1426. //
  1427. // err := req.Send()
  1428. // if err == nil { // resp is now filled
  1429. // fmt.Println(resp)
  1430. // }
  1431. //
  1432. func (c *APIGateway) GetBasePathMappingRequest(input *GetBasePathMappingInput) (req *request.Request, output *BasePathMapping) {
  1433. op := &request.Operation{
  1434. Name: opGetBasePathMapping,
  1435. HTTPMethod: "GET",
  1436. HTTPPath: "/domainnames/{domain_name}/basepathmappings/{base_path}",
  1437. }
  1438. if input == nil {
  1439. input = &GetBasePathMappingInput{}
  1440. }
  1441. req = c.newRequest(op, input, output)
  1442. output = &BasePathMapping{}
  1443. req.Data = output
  1444. return
  1445. }
  1446. // Describe a BasePathMapping resource.
  1447. func (c *APIGateway) GetBasePathMapping(input *GetBasePathMappingInput) (*BasePathMapping, error) {
  1448. req, out := c.GetBasePathMappingRequest(input)
  1449. err := req.Send()
  1450. return out, err
  1451. }
  1452. const opGetBasePathMappings = "GetBasePathMappings"
  1453. // GetBasePathMappingsRequest generates a "aws/request.Request" representing the
  1454. // client's request for the GetBasePathMappings operation. The "output" return
  1455. // value can be used to capture response data after the request's "Send" method
  1456. // is called.
  1457. //
  1458. // Creating a request object using this method should be used when you want to inject
  1459. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1460. // access properties on the request object before or after sending the request. If
  1461. // you just want the service response, call the GetBasePathMappings method directly
  1462. // instead.
  1463. //
  1464. // Note: You must call the "Send" method on the returned request object in order
  1465. // to execute the request.
  1466. //
  1467. // // Example sending a request using the GetBasePathMappingsRequest method.
  1468. // req, resp := client.GetBasePathMappingsRequest(params)
  1469. //
  1470. // err := req.Send()
  1471. // if err == nil { // resp is now filled
  1472. // fmt.Println(resp)
  1473. // }
  1474. //
  1475. func (c *APIGateway) GetBasePathMappingsRequest(input *GetBasePathMappingsInput) (req *request.Request, output *GetBasePathMappingsOutput) {
  1476. op := &request.Operation{
  1477. Name: opGetBasePathMappings,
  1478. HTTPMethod: "GET",
  1479. HTTPPath: "/domainnames/{domain_name}/basepathmappings",
  1480. Paginator: &request.Paginator{
  1481. InputTokens: []string{"position"},
  1482. OutputTokens: []string{"position"},
  1483. LimitToken: "limit",
  1484. TruncationToken: "",
  1485. },
  1486. }
  1487. if input == nil {
  1488. input = &GetBasePathMappingsInput{}
  1489. }
  1490. req = c.newRequest(op, input, output)
  1491. output = &GetBasePathMappingsOutput{}
  1492. req.Data = output
  1493. return
  1494. }
  1495. // Represents a collection of BasePathMapping resources.
  1496. func (c *APIGateway) GetBasePathMappings(input *GetBasePathMappingsInput) (*GetBasePathMappingsOutput, error) {
  1497. req, out := c.GetBasePathMappingsRequest(input)
  1498. err := req.Send()
  1499. return out, err
  1500. }
  1501. // GetBasePathMappingsPages iterates over the pages of a GetBasePathMappings operation,
  1502. // calling the "fn" function with the response data for each page. To stop
  1503. // iterating, return false from the fn function.
  1504. //
  1505. // See GetBasePathMappings method for more information on how to use this operation.
  1506. //
  1507. // Note: This operation can generate multiple requests to a service.
  1508. //
  1509. // // Example iterating over at most 3 pages of a GetBasePathMappings operation.
  1510. // pageNum := 0
  1511. // err := client.GetBasePathMappingsPages(params,
  1512. // func(page *GetBasePathMappingsOutput, lastPage bool) bool {
  1513. // pageNum++
  1514. // fmt.Println(page)
  1515. // return pageNum <= 3
  1516. // })
  1517. //
  1518. func (c *APIGateway) GetBasePathMappingsPages(input *GetBasePathMappingsInput, fn func(p *GetBasePathMappingsOutput, lastPage bool) (shouldContinue bool)) error {
  1519. page, _ := c.GetBasePathMappingsRequest(input)
  1520. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  1521. return page.EachPage(func(p interface{}, lastPage bool) bool {
  1522. return fn(p.(*GetBasePathMappingsOutput), lastPage)
  1523. })
  1524. }
  1525. const opGetClientCertificate = "GetClientCertificate"
  1526. // GetClientCertificateRequest generates a "aws/request.Request" representing the
  1527. // client's request for the GetClientCertificate operation. The "output" return
  1528. // value can be used to capture response data after the request's "Send" method
  1529. // is called.
  1530. //
  1531. // Creating a request object using this method should be used when you want to inject
  1532. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1533. // access properties on the request object before or after sending the request. If
  1534. // you just want the service response, call the GetClientCertificate method directly
  1535. // instead.
  1536. //
  1537. // Note: You must call the "Send" method on the returned request object in order
  1538. // to execute the request.
  1539. //
  1540. // // Example sending a request using the GetClientCertificateRequest method.
  1541. // req, resp := client.GetClientCertificateRequest(params)
  1542. //
  1543. // err := req.Send()
  1544. // if err == nil { // resp is now filled
  1545. // fmt.Println(resp)
  1546. // }
  1547. //
  1548. func (c *APIGateway) GetClientCertificateRequest(input *GetClientCertificateInput) (req *request.Request, output *ClientCertificate) {
  1549. op := &request.Operation{
  1550. Name: opGetClientCertificate,
  1551. HTTPMethod: "GET",
  1552. HTTPPath: "/clientcertificates/{clientcertificate_id}",
  1553. }
  1554. if input == nil {
  1555. input = &GetClientCertificateInput{}
  1556. }
  1557. req = c.newRequest(op, input, output)
  1558. output = &ClientCertificate{}
  1559. req.Data = output
  1560. return
  1561. }
  1562. // Gets information about the current ClientCertificate resource.
  1563. func (c *APIGateway) GetClientCertificate(input *GetClientCertificateInput) (*ClientCertificate, error) {
  1564. req, out := c.GetClientCertificateRequest(input)
  1565. err := req.Send()
  1566. return out, err
  1567. }
  1568. const opGetClientCertificates = "GetClientCertificates"
  1569. // GetClientCertificatesRequest generates a "aws/request.Request" representing the
  1570. // client's request for the GetClientCertificates operation. The "output" return
  1571. // value can be used to capture response data after the request's "Send" method
  1572. // is called.
  1573. //
  1574. // Creating a request object using this method should be used when you want to inject
  1575. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1576. // access properties on the request object before or after sending the request. If
  1577. // you just want the service response, call the GetClientCertificates method directly
  1578. // instead.
  1579. //
  1580. // Note: You must call the "Send" method on the returned request object in order
  1581. // to execute the request.
  1582. //
  1583. // // Example sending a request using the GetClientCertificatesRequest method.
  1584. // req, resp := client.GetClientCertificatesRequest(params)
  1585. //
  1586. // err := req.Send()
  1587. // if err == nil { // resp is now filled
  1588. // fmt.Println(resp)
  1589. // }
  1590. //
  1591. func (c *APIGateway) GetClientCertificatesRequest(input *GetClientCertificatesInput) (req *request.Request, output *GetClientCertificatesOutput) {
  1592. op := &request.Operation{
  1593. Name: opGetClientCertificates,
  1594. HTTPMethod: "GET",
  1595. HTTPPath: "/clientcertificates",
  1596. Paginator: &request.Paginator{
  1597. InputTokens: []string{"position"},
  1598. OutputTokens: []string{"position"},
  1599. LimitToken: "limit",
  1600. TruncationToken: "",
  1601. },
  1602. }
  1603. if input == nil {
  1604. input = &GetClientCertificatesInput{}
  1605. }
  1606. req = c.newRequest(op, input, output)
  1607. output = &GetClientCertificatesOutput{}
  1608. req.Data = output
  1609. return
  1610. }
  1611. // Gets a collection of ClientCertificate resources.
  1612. func (c *APIGateway) GetClientCertificates(input *GetClientCertificatesInput) (*GetClientCertificatesOutput, error) {
  1613. req, out := c.GetClientCertificatesRequest(input)
  1614. err := req.Send()
  1615. return out, err
  1616. }
  1617. // GetClientCertificatesPages iterates over the pages of a GetClientCertificates operation,
  1618. // calling the "fn" function with the response data for each page. To stop
  1619. // iterating, return false from the fn function.
  1620. //
  1621. // See GetClientCertificates method for more information on how to use this operation.
  1622. //
  1623. // Note: This operation can generate multiple requests to a service.
  1624. //
  1625. // // Example iterating over at most 3 pages of a GetClientCertificates operation.
  1626. // pageNum := 0
  1627. // err := client.GetClientCertificatesPages(params,
  1628. // func(page *GetClientCertificatesOutput, lastPage bool) bool {
  1629. // pageNum++
  1630. // fmt.Println(page)
  1631. // return pageNum <= 3
  1632. // })
  1633. //
  1634. func (c *APIGateway) GetClientCertificatesPages(input *GetClientCertificatesInput, fn func(p *GetClientCertificatesOutput, lastPage bool) (shouldContinue bool)) error {
  1635. page, _ := c.GetClientCertificatesRequest(input)
  1636. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  1637. return page.EachPage(func(p interface{}, lastPage bool) bool {
  1638. return fn(p.(*GetClientCertificatesOutput), lastPage)
  1639. })
  1640. }
  1641. const opGetDeployment = "GetDeployment"
  1642. // GetDeploymentRequest generates a "aws/request.Request" representing the
  1643. // client's request for the GetDeployment operation. The "output" return
  1644. // value can be used to capture response data after the request's "Send" method
  1645. // is called.
  1646. //
  1647. // Creating a request object using this method should be used when you want to inject
  1648. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1649. // access properties on the request object before or after sending the request. If
  1650. // you just want the service response, call the GetDeployment method directly
  1651. // instead.
  1652. //
  1653. // Note: You must call the "Send" method on the returned request object in order
  1654. // to execute the request.
  1655. //
  1656. // // Example sending a request using the GetDeploymentRequest method.
  1657. // req, resp := client.GetDeploymentRequest(params)
  1658. //
  1659. // err := req.Send()
  1660. // if err == nil { // resp is now filled
  1661. // fmt.Println(resp)
  1662. // }
  1663. //
  1664. func (c *APIGateway) GetDeploymentRequest(input *GetDeploymentInput) (req *request.Request, output *Deployment) {
  1665. op := &request.Operation{
  1666. Name: opGetDeployment,
  1667. HTTPMethod: "GET",
  1668. HTTPPath: "/restapis/{restapi_id}/deployments/{deployment_id}",
  1669. }
  1670. if input == nil {
  1671. input = &GetDeploymentInput{}
  1672. }
  1673. req = c.newRequest(op, input, output)
  1674. output = &Deployment{}
  1675. req.Data = output
  1676. return
  1677. }
  1678. // Gets information about a Deployment resource.
  1679. func (c *APIGateway) GetDeployment(input *GetDeploymentInput) (*Deployment, error) {
  1680. req, out := c.GetDeploymentRequest(input)
  1681. err := req.Send()
  1682. return out, err
  1683. }
  1684. const opGetDeployments = "GetDeployments"
  1685. // GetDeploymentsRequest generates a "aws/request.Request" representing the
  1686. // client's request for the GetDeployments operation. The "output" return
  1687. // value can be used to capture response data after the request's "Send" method
  1688. // is called.
  1689. //
  1690. // Creating a request object using this method should be used when you want to inject
  1691. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1692. // access properties on the request object before or after sending the request. If
  1693. // you just want the service response, call the GetDeployments method directly
  1694. // instead.
  1695. //
  1696. // Note: You must call the "Send" method on the returned request object in order
  1697. // to execute the request.
  1698. //
  1699. // // Example sending a request using the GetDeploymentsRequest method.
  1700. // req, resp := client.GetDeploymentsRequest(params)
  1701. //
  1702. // err := req.Send()
  1703. // if err == nil { // resp is now filled
  1704. // fmt.Println(resp)
  1705. // }
  1706. //
  1707. func (c *APIGateway) GetDeploymentsRequest(input *GetDeploymentsInput) (req *request.Request, output *GetDeploymentsOutput) {
  1708. op := &request.Operation{
  1709. Name: opGetDeployments,
  1710. HTTPMethod: "GET",
  1711. HTTPPath: "/restapis/{restapi_id}/deployments",
  1712. Paginator: &request.Paginator{
  1713. InputTokens: []string{"position"},
  1714. OutputTokens: []string{"position"},
  1715. LimitToken: "limit",
  1716. TruncationToken: "",
  1717. },
  1718. }
  1719. if input == nil {
  1720. input = &GetDeploymentsInput{}
  1721. }
  1722. req = c.newRequest(op, input, output)
  1723. output = &GetDeploymentsOutput{}
  1724. req.Data = output
  1725. return
  1726. }
  1727. // Gets information about a Deployments collection.
  1728. func (c *APIGateway) GetDeployments(input *GetDeploymentsInput) (*GetDeploymentsOutput, error) {
  1729. req, out := c.GetDeploymentsRequest(input)
  1730. err := req.Send()
  1731. return out, err
  1732. }
  1733. // GetDeploymentsPages iterates over the pages of a GetDeployments operation,
  1734. // calling the "fn" function with the response data for each page. To stop
  1735. // iterating, return false from the fn function.
  1736. //
  1737. // See GetDeployments method for more information on how to use this operation.
  1738. //
  1739. // Note: This operation can generate multiple requests to a service.
  1740. //
  1741. // // Example iterating over at most 3 pages of a GetDeployments operation.
  1742. // pageNum := 0
  1743. // err := client.GetDeploymentsPages(params,
  1744. // func(page *GetDeploymentsOutput, lastPage bool) bool {
  1745. // pageNum++
  1746. // fmt.Println(page)
  1747. // return pageNum <= 3
  1748. // })
  1749. //
  1750. func (c *APIGateway) GetDeploymentsPages(input *GetDeploymentsInput, fn func(p *GetDeploymentsOutput, lastPage bool) (shouldContinue bool)) error {
  1751. page, _ := c.GetDeploymentsRequest(input)
  1752. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  1753. return page.EachPage(func(p interface{}, lastPage bool) bool {
  1754. return fn(p.(*GetDeploymentsOutput), lastPage)
  1755. })
  1756. }
  1757. const opGetDomainName = "GetDomainName"
  1758. // GetDomainNameRequest generates a "aws/request.Request" representing the
  1759. // client's request for the GetDomainName operation. The "output" return
  1760. // value can be used to capture response data after the request's "Send" method
  1761. // is called.
  1762. //
  1763. // Creating a request object using this method should be used when you want to inject
  1764. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1765. // access properties on the request object before or after sending the request. If
  1766. // you just want the service response, call the GetDomainName method directly
  1767. // instead.
  1768. //
  1769. // Note: You must call the "Send" method on the returned request object in order
  1770. // to execute the request.
  1771. //
  1772. // // Example sending a request using the GetDomainNameRequest method.
  1773. // req, resp := client.GetDomainNameRequest(params)
  1774. //
  1775. // err := req.Send()
  1776. // if err == nil { // resp is now filled
  1777. // fmt.Println(resp)
  1778. // }
  1779. //
  1780. func (c *APIGateway) GetDomainNameRequest(input *GetDomainNameInput) (req *request.Request, output *DomainName) {
  1781. op := &request.Operation{
  1782. Name: opGetDomainName,
  1783. HTTPMethod: "GET",
  1784. HTTPPath: "/domainnames/{domain_name}",
  1785. }
  1786. if input == nil {
  1787. input = &GetDomainNameInput{}
  1788. }
  1789. req = c.newRequest(op, input, output)
  1790. output = &DomainName{}
  1791. req.Data = output
  1792. return
  1793. }
  1794. // Represents a domain name that is contained in a simpler, more intuitive URL
  1795. // that can be called.
  1796. func (c *APIGateway) GetDomainName(input *GetDomainNameInput) (*DomainName, error) {
  1797. req, out := c.GetDomainNameRequest(input)
  1798. err := req.Send()
  1799. return out, err
  1800. }
  1801. const opGetDomainNames = "GetDomainNames"
  1802. // GetDomainNamesRequest generates a "aws/request.Request" representing the
  1803. // client's request for the GetDomainNames operation. The "output" return
  1804. // value can be used to capture response data after the request's "Send" method
  1805. // is called.
  1806. //
  1807. // Creating a request object using this method should be used when you want to inject
  1808. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1809. // access properties on the request object before or after sending the request. If
  1810. // you just want the service response, call the GetDomainNames method directly
  1811. // instead.
  1812. //
  1813. // Note: You must call the "Send" method on the returned request object in order
  1814. // to execute the request.
  1815. //
  1816. // // Example sending a request using the GetDomainNamesRequest method.
  1817. // req, resp := client.GetDomainNamesRequest(params)
  1818. //
  1819. // err := req.Send()
  1820. // if err == nil { // resp is now filled
  1821. // fmt.Println(resp)
  1822. // }
  1823. //
  1824. func (c *APIGateway) GetDomainNamesRequest(input *GetDomainNamesInput) (req *request.Request, output *GetDomainNamesOutput) {
  1825. op := &request.Operation{
  1826. Name: opGetDomainNames,
  1827. HTTPMethod: "GET",
  1828. HTTPPath: "/domainnames",
  1829. Paginator: &request.Paginator{
  1830. InputTokens: []string{"position"},
  1831. OutputTokens: []string{"position"},
  1832. LimitToken: "limit",
  1833. TruncationToken: "",
  1834. },
  1835. }
  1836. if input == nil {
  1837. input = &GetDomainNamesInput{}
  1838. }
  1839. req = c.newRequest(op, input, output)
  1840. output = &GetDomainNamesOutput{}
  1841. req.Data = output
  1842. return
  1843. }
  1844. // Represents a collection of DomainName resources.
  1845. func (c *APIGateway) GetDomainNames(input *GetDomainNamesInput) (*GetDomainNamesOutput, error) {
  1846. req, out := c.GetDomainNamesRequest(input)
  1847. err := req.Send()
  1848. return out, err
  1849. }
  1850. // GetDomainNamesPages iterates over the pages of a GetDomainNames operation,
  1851. // calling the "fn" function with the response data for each page. To stop
  1852. // iterating, return false from the fn function.
  1853. //
  1854. // See GetDomainNames method for more information on how to use this operation.
  1855. //
  1856. // Note: This operation can generate multiple requests to a service.
  1857. //
  1858. // // Example iterating over at most 3 pages of a GetDomainNames operation.
  1859. // pageNum := 0
  1860. // err := client.GetDomainNamesPages(params,
  1861. // func(page *GetDomainNamesOutput, lastPage bool) bool {
  1862. // pageNum++
  1863. // fmt.Println(page)
  1864. // return pageNum <= 3
  1865. // })
  1866. //
  1867. func (c *APIGateway) GetDomainNamesPages(input *GetDomainNamesInput, fn func(p *GetDomainNamesOutput, lastPage bool) (shouldContinue bool)) error {
  1868. page, _ := c.GetDomainNamesRequest(input)
  1869. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  1870. return page.EachPage(func(p interface{}, lastPage bool) bool {
  1871. return fn(p.(*GetDomainNamesOutput), lastPage)
  1872. })
  1873. }
  1874. const opGetExport = "GetExport"
  1875. // GetExportRequest generates a "aws/request.Request" representing the
  1876. // client's request for the GetExport operation. The "output" return
  1877. // value can be used to capture response data after the request's "Send" method
  1878. // is called.
  1879. //
  1880. // Creating a request object using this method should be used when you want to inject
  1881. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1882. // access properties on the request object before or after sending the request. If
  1883. // you just want the service response, call the GetExport method directly
  1884. // instead.
  1885. //
  1886. // Note: You must call the "Send" method on the returned request object in order
  1887. // to execute the request.
  1888. //
  1889. // // Example sending a request using the GetExportRequest method.
  1890. // req, resp := client.GetExportRequest(params)
  1891. //
  1892. // err := req.Send()
  1893. // if err == nil { // resp is now filled
  1894. // fmt.Println(resp)
  1895. // }
  1896. //
  1897. func (c *APIGateway) GetExportRequest(input *GetExportInput) (req *request.Request, output *GetExportOutput) {
  1898. op := &request.Operation{
  1899. Name: opGetExport,
  1900. HTTPMethod: "GET",
  1901. HTTPPath: "/restapis/{restapi_id}/stages/{stage_name}/exports/{export_type}",
  1902. }
  1903. if input == nil {
  1904. input = &GetExportInput{}
  1905. }
  1906. req = c.newRequest(op, input, output)
  1907. output = &GetExportOutput{}
  1908. req.Data = output
  1909. return
  1910. }
  1911. // Exports a deployed version of a RestApi in a specified format.
  1912. func (c *APIGateway) GetExport(input *GetExportInput) (*GetExportOutput, error) {
  1913. req, out := c.GetExportRequest(input)
  1914. err := req.Send()
  1915. return out, err
  1916. }
  1917. const opGetIntegration = "GetIntegration"
  1918. // GetIntegrationRequest generates a "aws/request.Request" representing the
  1919. // client's request for the GetIntegration operation. The "output" return
  1920. // value can be used to capture response data after the request's "Send" method
  1921. // is called.
  1922. //
  1923. // Creating a request object using this method should be used when you want to inject
  1924. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1925. // access properties on the request object before or after sending the request. If
  1926. // you just want the service response, call the GetIntegration method directly
  1927. // instead.
  1928. //
  1929. // Note: You must call the "Send" method on the returned request object in order
  1930. // to execute the request.
  1931. //
  1932. // // Example sending a request using the GetIntegrationRequest method.
  1933. // req, resp := client.GetIntegrationRequest(params)
  1934. //
  1935. // err := req.Send()
  1936. // if err == nil { // resp is now filled
  1937. // fmt.Println(resp)
  1938. // }
  1939. //
  1940. func (c *APIGateway) GetIntegrationRequest(input *GetIntegrationInput) (req *request.Request, output *Integration) {
  1941. op := &request.Operation{
  1942. Name: opGetIntegration,
  1943. HTTPMethod: "GET",
  1944. HTTPPath: "/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}/integration",
  1945. }
  1946. if input == nil {
  1947. input = &GetIntegrationInput{}
  1948. }
  1949. req = c.newRequest(op, input, output)
  1950. output = &Integration{}
  1951. req.Data = output
  1952. return
  1953. }
  1954. // Represents a get integration.
  1955. func (c *APIGateway) GetIntegration(input *GetIntegrationInput) (*Integration, error) {
  1956. req, out := c.GetIntegrationRequest(input)
  1957. err := req.Send()
  1958. return out, err
  1959. }
  1960. const opGetIntegrationResponse = "GetIntegrationResponse"
  1961. // GetIntegrationResponseRequest generates a "aws/request.Request" representing the
  1962. // client's request for the GetIntegrationResponse operation. The "output" return
  1963. // value can be used to capture response data after the request's "Send" method
  1964. // is called.
  1965. //
  1966. // Creating a request object using this method should be used when you want to inject
  1967. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1968. // access properties on the request object before or after sending the request. If
  1969. // you just want the service response, call the GetIntegrationResponse method directly
  1970. // instead.
  1971. //
  1972. // Note: You must call the "Send" method on the returned request object in order
  1973. // to execute the request.
  1974. //
  1975. // // Example sending a request using the GetIntegrationResponseRequest method.
  1976. // req, resp := client.GetIntegrationResponseRequest(params)
  1977. //
  1978. // err := req.Send()
  1979. // if err == nil { // resp is now filled
  1980. // fmt.Println(resp)
  1981. // }
  1982. //
  1983. func (c *APIGateway) GetIntegrationResponseRequest(input *GetIntegrationResponseInput) (req *request.Request, output *IntegrationResponse) {
  1984. op := &request.Operation{
  1985. Name: opGetIntegrationResponse,
  1986. HTTPMethod: "GET",
  1987. HTTPPath: "/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}/integration/responses/{status_code}",
  1988. }
  1989. if input == nil {
  1990. input = &GetIntegrationResponseInput{}
  1991. }
  1992. req = c.newRequest(op, input, output)
  1993. output = &IntegrationResponse{}
  1994. req.Data = output
  1995. return
  1996. }
  1997. // Represents a get integration response.
  1998. func (c *APIGateway) GetIntegrationResponse(input *GetIntegrationResponseInput) (*IntegrationResponse, error) {
  1999. req, out := c.GetIntegrationResponseRequest(input)
  2000. err := req.Send()
  2001. return out, err
  2002. }
  2003. const opGetMethod = "GetMethod"
  2004. // GetMethodRequest generates a "aws/request.Request" representing the
  2005. // client's request for the GetMethod operation. The "output" return
  2006. // value can be used to capture response data after the request's "Send" method
  2007. // is called.
  2008. //
  2009. // Creating a request object using this method should be used when you want to inject
  2010. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2011. // access properties on the request object before or after sending the request. If
  2012. // you just want the service response, call the GetMethod method directly
  2013. // instead.
  2014. //
  2015. // Note: You must call the "Send" method on the returned request object in order
  2016. // to execute the request.
  2017. //
  2018. // // Example sending a request using the GetMethodRequest method.
  2019. // req, resp := client.GetMethodRequest(params)
  2020. //
  2021. // err := req.Send()
  2022. // if err == nil { // resp is now filled
  2023. // fmt.Println(resp)
  2024. // }
  2025. //
  2026. func (c *APIGateway) GetMethodRequest(input *GetMethodInput) (req *request.Request, output *Method) {
  2027. op := &request.Operation{
  2028. Name: opGetMethod,
  2029. HTTPMethod: "GET",
  2030. HTTPPath: "/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}",
  2031. }
  2032. if input == nil {
  2033. input = &GetMethodInput{}
  2034. }
  2035. req = c.newRequest(op, input, output)
  2036. output = &Method{}
  2037. req.Data = output
  2038. return
  2039. }
  2040. // Describe an existing Method resource.
  2041. func (c *APIGateway) GetMethod(input *GetMethodInput) (*Method, error) {
  2042. req, out := c.GetMethodRequest(input)
  2043. err := req.Send()
  2044. return out, err
  2045. }
  2046. const opGetMethodResponse = "GetMethodResponse"
  2047. // GetMethodResponseRequest generates a "aws/request.Request" representing the
  2048. // client's request for the GetMethodResponse operation. The "output" return
  2049. // value can be used to capture response data after the request's "Send" method
  2050. // is called.
  2051. //
  2052. // Creating a request object using this method should be used when you want to inject
  2053. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2054. // access properties on the request object before or after sending the request. If
  2055. // you just want the service response, call the GetMethodResponse method directly
  2056. // instead.
  2057. //
  2058. // Note: You must call the "Send" method on the returned request object in order
  2059. // to execute the request.
  2060. //
  2061. // // Example sending a request using the GetMethodResponseRequest method.
  2062. // req, resp := client.GetMethodResponseRequest(params)
  2063. //
  2064. // err := req.Send()
  2065. // if err == nil { // resp is now filled
  2066. // fmt.Println(resp)
  2067. // }
  2068. //
  2069. func (c *APIGateway) GetMethodResponseRequest(input *GetMethodResponseInput) (req *request.Request, output *MethodResponse) {
  2070. op := &request.Operation{
  2071. Name: opGetMethodResponse,
  2072. HTTPMethod: "GET",
  2073. HTTPPath: "/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}/responses/{status_code}",
  2074. }
  2075. if input == nil {
  2076. input = &GetMethodResponseInput{}
  2077. }
  2078. req = c.newRequest(op, input, output)
  2079. output = &MethodResponse{}
  2080. req.Data = output
  2081. return
  2082. }
  2083. // Describes a MethodResponse resource.
  2084. func (c *APIGateway) GetMethodResponse(input *GetMethodResponseInput) (*MethodResponse, error) {
  2085. req, out := c.GetMethodResponseRequest(input)
  2086. err := req.Send()
  2087. return out, err
  2088. }
  2089. const opGetModel = "GetModel"
  2090. // GetModelRequest generates a "aws/request.Request" representing the
  2091. // client's request for the GetModel operation. The "output" return
  2092. // value can be used to capture response data after the request's "Send" method
  2093. // is called.
  2094. //
  2095. // Creating a request object using this method should be used when you want to inject
  2096. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2097. // access properties on the request object before or after sending the request. If
  2098. // you just want the service response, call the GetModel method directly
  2099. // instead.
  2100. //
  2101. // Note: You must call the "Send" method on the returned request object in order
  2102. // to execute the request.
  2103. //
  2104. // // Example sending a request using the GetModelRequest method.
  2105. // req, resp := client.GetModelRequest(params)
  2106. //
  2107. // err := req.Send()
  2108. // if err == nil { // resp is now filled
  2109. // fmt.Println(resp)
  2110. // }
  2111. //
  2112. func (c *APIGateway) GetModelRequest(input *GetModelInput) (req *request.Request, output *Model) {
  2113. op := &request.Operation{
  2114. Name: opGetModel,
  2115. HTTPMethod: "GET",
  2116. HTTPPath: "/restapis/{restapi_id}/models/{model_name}",
  2117. }
  2118. if input == nil {
  2119. input = &GetModelInput{}
  2120. }
  2121. req = c.newRequest(op, input, output)
  2122. output = &Model{}
  2123. req.Data = output
  2124. return
  2125. }
  2126. // Describes an existing model defined for a RestApi resource.
  2127. func (c *APIGateway) GetModel(input *GetModelInput) (*Model, error) {
  2128. req, out := c.GetModelRequest(input)
  2129. err := req.Send()
  2130. return out, err
  2131. }
  2132. const opGetModelTemplate = "GetModelTemplate"
  2133. // GetModelTemplateRequest generates a "aws/request.Request" representing the
  2134. // client's request for the GetModelTemplate operation. The "output" return
  2135. // value can be used to capture response data after the request's "Send" method
  2136. // is called.
  2137. //
  2138. // Creating a request object using this method should be used when you want to inject
  2139. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2140. // access properties on the request object before or after sending the request. If
  2141. // you just want the service response, call the GetModelTemplate method directly
  2142. // instead.
  2143. //
  2144. // Note: You must call the "Send" method on the returned request object in order
  2145. // to execute the request.
  2146. //
  2147. // // Example sending a request using the GetModelTemplateRequest method.
  2148. // req, resp := client.GetModelTemplateRequest(params)
  2149. //
  2150. // err := req.Send()
  2151. // if err == nil { // resp is now filled
  2152. // fmt.Println(resp)
  2153. // }
  2154. //
  2155. func (c *APIGateway) GetModelTemplateRequest(input *GetModelTemplateInput) (req *request.Request, output *GetModelTemplateOutput) {
  2156. op := &request.Operation{
  2157. Name: opGetModelTemplate,
  2158. HTTPMethod: "GET",
  2159. HTTPPath: "/restapis/{restapi_id}/models/{model_name}/default_template",
  2160. }
  2161. if input == nil {
  2162. input = &GetModelTemplateInput{}
  2163. }
  2164. req = c.newRequest(op, input, output)
  2165. output = &GetModelTemplateOutput{}
  2166. req.Data = output
  2167. return
  2168. }
  2169. // Generates a sample mapping template that can be used to transform a payload
  2170. // into the structure of a model.
  2171. func (c *APIGateway) GetModelTemplate(input *GetModelTemplateInput) (*GetModelTemplateOutput, error) {
  2172. req, out := c.GetModelTemplateRequest(input)
  2173. err := req.Send()
  2174. return out, err
  2175. }
  2176. const opGetModels = "GetModels"
  2177. // GetModelsRequest generates a "aws/request.Request" representing the
  2178. // client's request for the GetModels operation. The "output" return
  2179. // value can be used to capture response data after the request's "Send" method
  2180. // is called.
  2181. //
  2182. // Creating a request object using this method should be used when you want to inject
  2183. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2184. // access properties on the request object before or after sending the request. If
  2185. // you just want the service response, call the GetModels method directly
  2186. // instead.
  2187. //
  2188. // Note: You must call the "Send" method on the returned request object in order
  2189. // to execute the request.
  2190. //
  2191. // // Example sending a request using the GetModelsRequest method.
  2192. // req, resp := client.GetModelsRequest(params)
  2193. //
  2194. // err := req.Send()
  2195. // if err == nil { // resp is now filled
  2196. // fmt.Println(resp)
  2197. // }
  2198. //
  2199. func (c *APIGateway) GetModelsRequest(input *GetModelsInput) (req *request.Request, output *GetModelsOutput) {
  2200. op := &request.Operation{
  2201. Name: opGetModels,
  2202. HTTPMethod: "GET",
  2203. HTTPPath: "/restapis/{restapi_id}/models",
  2204. Paginator: &request.Paginator{
  2205. InputTokens: []string{"position"},
  2206. OutputTokens: []string{"position"},
  2207. LimitToken: "limit",
  2208. TruncationToken: "",
  2209. },
  2210. }
  2211. if input == nil {
  2212. input = &GetModelsInput{}
  2213. }
  2214. req = c.newRequest(op, input, output)
  2215. output = &GetModelsOutput{}
  2216. req.Data = output
  2217. return
  2218. }
  2219. // Describes existing Models defined for a RestApi resource.
  2220. func (c *APIGateway) GetModels(input *GetModelsInput) (*GetModelsOutput, error) {
  2221. req, out := c.GetModelsRequest(input)
  2222. err := req.Send()
  2223. return out, err
  2224. }
  2225. // GetModelsPages iterates over the pages of a GetModels operation,
  2226. // calling the "fn" function with the response data for each page. To stop
  2227. // iterating, return false from the fn function.
  2228. //
  2229. // See GetModels method for more information on how to use this operation.
  2230. //
  2231. // Note: This operation can generate multiple requests to a service.
  2232. //
  2233. // // Example iterating over at most 3 pages of a GetModels operation.
  2234. // pageNum := 0
  2235. // err := client.GetModelsPages(params,
  2236. // func(page *GetModelsOutput, lastPage bool) bool {
  2237. // pageNum++
  2238. // fmt.Println(page)
  2239. // return pageNum <= 3
  2240. // })
  2241. //
  2242. func (c *APIGateway) GetModelsPages(input *GetModelsInput, fn func(p *GetModelsOutput, lastPage bool) (shouldContinue bool)) error {
  2243. page, _ := c.GetModelsRequest(input)
  2244. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  2245. return page.EachPage(func(p interface{}, lastPage bool) bool {
  2246. return fn(p.(*GetModelsOutput), lastPage)
  2247. })
  2248. }
  2249. const opGetResource = "GetResource"
  2250. // GetResourceRequest generates a "aws/request.Request" representing the
  2251. // client's request for the GetResource operation. The "output" return
  2252. // value can be used to capture response data after the request's "Send" method
  2253. // is called.
  2254. //
  2255. // Creating a request object using this method should be used when you want to inject
  2256. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2257. // access properties on the request object before or after sending the request. If
  2258. // you just want the service response, call the GetResource method directly
  2259. // instead.
  2260. //
  2261. // Note: You must call the "Send" method on the returned request object in order
  2262. // to execute the request.
  2263. //
  2264. // // Example sending a request using the GetResourceRequest method.
  2265. // req, resp := client.GetResourceRequest(params)
  2266. //
  2267. // err := req.Send()
  2268. // if err == nil { // resp is now filled
  2269. // fmt.Println(resp)
  2270. // }
  2271. //
  2272. func (c *APIGateway) GetResourceRequest(input *GetResourceInput) (req *request.Request, output *Resource) {
  2273. op := &request.Operation{
  2274. Name: opGetResource,
  2275. HTTPMethod: "GET",
  2276. HTTPPath: "/restapis/{restapi_id}/resources/{resource_id}",
  2277. }
  2278. if input == nil {
  2279. input = &GetResourceInput{}
  2280. }
  2281. req = c.newRequest(op, input, output)
  2282. output = &Resource{}
  2283. req.Data = output
  2284. return
  2285. }
  2286. // Lists information about a resource.
  2287. func (c *APIGateway) GetResource(input *GetResourceInput) (*Resource, error) {
  2288. req, out := c.GetResourceRequest(input)
  2289. err := req.Send()
  2290. return out, err
  2291. }
  2292. const opGetResources = "GetResources"
  2293. // GetResourcesRequest generates a "aws/request.Request" representing the
  2294. // client's request for the GetResources operation. The "output" return
  2295. // value can be used to capture response data after the request's "Send" method
  2296. // is called.
  2297. //
  2298. // Creating a request object using this method should be used when you want to inject
  2299. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2300. // access properties on the request object before or after sending the request. If
  2301. // you just want the service response, call the GetResources method directly
  2302. // instead.
  2303. //
  2304. // Note: You must call the "Send" method on the returned request object in order
  2305. // to execute the request.
  2306. //
  2307. // // Example sending a request using the GetResourcesRequest method.
  2308. // req, resp := client.GetResourcesRequest(params)
  2309. //
  2310. // err := req.Send()
  2311. // if err == nil { // resp is now filled
  2312. // fmt.Println(resp)
  2313. // }
  2314. //
  2315. func (c *APIGateway) GetResourcesRequest(input *GetResourcesInput) (req *request.Request, output *GetResourcesOutput) {
  2316. op := &request.Operation{
  2317. Name: opGetResources,
  2318. HTTPMethod: "GET",
  2319. HTTPPath: "/restapis/{restapi_id}/resources",
  2320. Paginator: &request.Paginator{
  2321. InputTokens: []string{"position"},
  2322. OutputTokens: []string{"position"},
  2323. LimitToken: "limit",
  2324. TruncationToken: "",
  2325. },
  2326. }
  2327. if input == nil {
  2328. input = &GetResourcesInput{}
  2329. }
  2330. req = c.newRequest(op, input, output)
  2331. output = &GetResourcesOutput{}
  2332. req.Data = output
  2333. return
  2334. }
  2335. // Lists information about a collection of Resource resources.
  2336. func (c *APIGateway) GetResources(input *GetResourcesInput) (*GetResourcesOutput, error) {
  2337. req, out := c.GetResourcesRequest(input)
  2338. err := req.Send()
  2339. return out, err
  2340. }
  2341. // GetResourcesPages iterates over the pages of a GetResources operation,
  2342. // calling the "fn" function with the response data for each page. To stop
  2343. // iterating, return false from the fn function.
  2344. //
  2345. // See GetResources method for more information on how to use this operation.
  2346. //
  2347. // Note: This operation can generate multiple requests to a service.
  2348. //
  2349. // // Example iterating over at most 3 pages of a GetResources operation.
  2350. // pageNum := 0
  2351. // err := client.GetResourcesPages(params,
  2352. // func(page *GetResourcesOutput, lastPage bool) bool {
  2353. // pageNum++
  2354. // fmt.Println(page)
  2355. // return pageNum <= 3
  2356. // })
  2357. //
  2358. func (c *APIGateway) GetResourcesPages(input *GetResourcesInput, fn func(p *GetResourcesOutput, lastPage bool) (shouldContinue bool)) error {
  2359. page, _ := c.GetResourcesRequest(input)
  2360. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  2361. return page.EachPage(func(p interface{}, lastPage bool) bool {
  2362. return fn(p.(*GetResourcesOutput), lastPage)
  2363. })
  2364. }
  2365. const opGetRestApi = "GetRestApi"
  2366. // GetRestApiRequest generates a "aws/request.Request" representing the
  2367. // client's request for the GetRestApi operation. The "output" return
  2368. // value can be used to capture response data after the request's "Send" method
  2369. // is called.
  2370. //
  2371. // Creating a request object using this method should be used when you want to inject
  2372. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2373. // access properties on the request object before or after sending the request. If
  2374. // you just want the service response, call the GetRestApi method directly
  2375. // instead.
  2376. //
  2377. // Note: You must call the "Send" method on the returned request object in order
  2378. // to execute the request.
  2379. //
  2380. // // Example sending a request using the GetRestApiRequest method.
  2381. // req, resp := client.GetRestApiRequest(params)
  2382. //
  2383. // err := req.Send()
  2384. // if err == nil { // resp is now filled
  2385. // fmt.Println(resp)
  2386. // }
  2387. //
  2388. func (c *APIGateway) GetRestApiRequest(input *GetRestApiInput) (req *request.Request, output *RestApi) {
  2389. op := &request.Operation{
  2390. Name: opGetRestApi,
  2391. HTTPMethod: "GET",
  2392. HTTPPath: "/restapis/{restapi_id}",
  2393. }
  2394. if input == nil {
  2395. input = &GetRestApiInput{}
  2396. }
  2397. req = c.newRequest(op, input, output)
  2398. output = &RestApi{}
  2399. req.Data = output
  2400. return
  2401. }
  2402. // Lists the RestApi resource in the collection.
  2403. func (c *APIGateway) GetRestApi(input *GetRestApiInput) (*RestApi, error) {
  2404. req, out := c.GetRestApiRequest(input)
  2405. err := req.Send()
  2406. return out, err
  2407. }
  2408. const opGetRestApis = "GetRestApis"
  2409. // GetRestApisRequest generates a "aws/request.Request" representing the
  2410. // client's request for the GetRestApis operation. The "output" return
  2411. // value can be used to capture response data after the request's "Send" method
  2412. // is called.
  2413. //
  2414. // Creating a request object using this method should be used when you want to inject
  2415. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2416. // access properties on the request object before or after sending the request. If
  2417. // you just want the service response, call the GetRestApis method directly
  2418. // instead.
  2419. //
  2420. // Note: You must call the "Send" method on the returned request object in order
  2421. // to execute the request.
  2422. //
  2423. // // Example sending a request using the GetRestApisRequest method.
  2424. // req, resp := client.GetRestApisRequest(params)
  2425. //
  2426. // err := req.Send()
  2427. // if err == nil { // resp is now filled
  2428. // fmt.Println(resp)
  2429. // }
  2430. //
  2431. func (c *APIGateway) GetRestApisRequest(input *GetRestApisInput) (req *request.Request, output *GetRestApisOutput) {
  2432. op := &request.Operation{
  2433. Name: opGetRestApis,
  2434. HTTPMethod: "GET",
  2435. HTTPPath: "/restapis",
  2436. Paginator: &request.Paginator{
  2437. InputTokens: []string{"position"},
  2438. OutputTokens: []string{"position"},
  2439. LimitToken: "limit",
  2440. TruncationToken: "",
  2441. },
  2442. }
  2443. if input == nil {
  2444. input = &GetRestApisInput{}
  2445. }
  2446. req = c.newRequest(op, input, output)
  2447. output = &GetRestApisOutput{}
  2448. req.Data = output
  2449. return
  2450. }
  2451. // Lists the RestApis resources for your collection.
  2452. func (c *APIGateway) GetRestApis(input *GetRestApisInput) (*GetRestApisOutput, error) {
  2453. req, out := c.GetRestApisRequest(input)
  2454. err := req.Send()
  2455. return out, err
  2456. }
  2457. // GetRestApisPages iterates over the pages of a GetRestApis operation,
  2458. // calling the "fn" function with the response data for each page. To stop
  2459. // iterating, return false from the fn function.
  2460. //
  2461. // See GetRestApis method for more information on how to use this operation.
  2462. //
  2463. // Note: This operation can generate multiple requests to a service.
  2464. //
  2465. // // Example iterating over at most 3 pages of a GetRestApis operation.
  2466. // pageNum := 0
  2467. // err := client.GetRestApisPages(params,
  2468. // func(page *GetRestApisOutput, lastPage bool) bool {
  2469. // pageNum++
  2470. // fmt.Println(page)
  2471. // return pageNum <= 3
  2472. // })
  2473. //
  2474. func (c *APIGateway) GetRestApisPages(input *GetRestApisInput, fn func(p *GetRestApisOutput, lastPage bool) (shouldContinue bool)) error {
  2475. page, _ := c.GetRestApisRequest(input)
  2476. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  2477. return page.EachPage(func(p interface{}, lastPage bool) bool {
  2478. return fn(p.(*GetRestApisOutput), lastPage)
  2479. })
  2480. }
  2481. const opGetSdk = "GetSdk"
  2482. // GetSdkRequest generates a "aws/request.Request" representing the
  2483. // client's request for the GetSdk operation. The "output" return
  2484. // value can be used to capture response data after the request's "Send" method
  2485. // is called.
  2486. //
  2487. // Creating a request object using this method should be used when you want to inject
  2488. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2489. // access properties on the request object before or after sending the request. If
  2490. // you just want the service response, call the GetSdk method directly
  2491. // instead.
  2492. //
  2493. // Note: You must call the "Send" method on the returned request object in order
  2494. // to execute the request.
  2495. //
  2496. // // Example sending a request using the GetSdkRequest method.
  2497. // req, resp := client.GetSdkRequest(params)
  2498. //
  2499. // err := req.Send()
  2500. // if err == nil { // resp is now filled
  2501. // fmt.Println(resp)
  2502. // }
  2503. //
  2504. func (c *APIGateway) GetSdkRequest(input *GetSdkInput) (req *request.Request, output *GetSdkOutput) {
  2505. op := &request.Operation{
  2506. Name: opGetSdk,
  2507. HTTPMethod: "GET",
  2508. HTTPPath: "/restapis/{restapi_id}/stages/{stage_name}/sdks/{sdk_type}",
  2509. }
  2510. if input == nil {
  2511. input = &GetSdkInput{}
  2512. }
  2513. req = c.newRequest(op, input, output)
  2514. output = &GetSdkOutput{}
  2515. req.Data = output
  2516. return
  2517. }
  2518. // Generates a client SDK for a RestApi and Stage.
  2519. func (c *APIGateway) GetSdk(input *GetSdkInput) (*GetSdkOutput, error) {
  2520. req, out := c.GetSdkRequest(input)
  2521. err := req.Send()
  2522. return out, err
  2523. }
  2524. const opGetStage = "GetStage"
  2525. // GetStageRequest generates a "aws/request.Request" representing the
  2526. // client's request for the GetStage operation. The "output" return
  2527. // value can be used to capture response data after the request's "Send" method
  2528. // is called.
  2529. //
  2530. // Creating a request object using this method should be used when you want to inject
  2531. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2532. // access properties on the request object before or after sending the request. If
  2533. // you just want the service response, call the GetStage method directly
  2534. // instead.
  2535. //
  2536. // Note: You must call the "Send" method on the returned request object in order
  2537. // to execute the request.
  2538. //
  2539. // // Example sending a request using the GetStageRequest method.
  2540. // req, resp := client.GetStageRequest(params)
  2541. //
  2542. // err := req.Send()
  2543. // if err == nil { // resp is now filled
  2544. // fmt.Println(resp)
  2545. // }
  2546. //
  2547. func (c *APIGateway) GetStageRequest(input *GetStageInput) (req *request.Request, output *Stage) {
  2548. op := &request.Operation{
  2549. Name: opGetStage,
  2550. HTTPMethod: "GET",
  2551. HTTPPath: "/restapis/{restapi_id}/stages/{stage_name}",
  2552. }
  2553. if input == nil {
  2554. input = &GetStageInput{}
  2555. }
  2556. req = c.newRequest(op, input, output)
  2557. output = &Stage{}
  2558. req.Data = output
  2559. return
  2560. }
  2561. // Gets information about a Stage resource.
  2562. func (c *APIGateway) GetStage(input *GetStageInput) (*Stage, error) {
  2563. req, out := c.GetStageRequest(input)
  2564. err := req.Send()
  2565. return out, err
  2566. }
  2567. const opGetStages = "GetStages"
  2568. // GetStagesRequest generates a "aws/request.Request" representing the
  2569. // client's request for the GetStages operation. The "output" return
  2570. // value can be used to capture response data after the request's "Send" method
  2571. // is called.
  2572. //
  2573. // Creating a request object using this method should be used when you want to inject
  2574. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2575. // access properties on the request object before or after sending the request. If
  2576. // you just want the service response, call the GetStages method directly
  2577. // instead.
  2578. //
  2579. // Note: You must call the "Send" method on the returned request object in order
  2580. // to execute the request.
  2581. //
  2582. // // Example sending a request using the GetStagesRequest method.
  2583. // req, resp := client.GetStagesRequest(params)
  2584. //
  2585. // err := req.Send()
  2586. // if err == nil { // resp is now filled
  2587. // fmt.Println(resp)
  2588. // }
  2589. //
  2590. func (c *APIGateway) GetStagesRequest(input *GetStagesInput) (req *request.Request, output *GetStagesOutput) {
  2591. op := &request.Operation{
  2592. Name: opGetStages,
  2593. HTTPMethod: "GET",
  2594. HTTPPath: "/restapis/{restapi_id}/stages",
  2595. }
  2596. if input == nil {
  2597. input = &GetStagesInput{}
  2598. }
  2599. req = c.newRequest(op, input, output)
  2600. output = &GetStagesOutput{}
  2601. req.Data = output
  2602. return
  2603. }
  2604. // Gets information about one or more Stage resources.
  2605. func (c *APIGateway) GetStages(input *GetStagesInput) (*GetStagesOutput, error) {
  2606. req, out := c.GetStagesRequest(input)
  2607. err := req.Send()
  2608. return out, err
  2609. }
  2610. const opImportRestApi = "ImportRestApi"
  2611. // ImportRestApiRequest generates a "aws/request.Request" representing the
  2612. // client's request for the ImportRestApi operation. The "output" return
  2613. // value can be used to capture response data after the request's "Send" method
  2614. // is called.
  2615. //
  2616. // Creating a request object using this method should be used when you want to inject
  2617. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2618. // access properties on the request object before or after sending the request. If
  2619. // you just want the service response, call the ImportRestApi method directly
  2620. // instead.
  2621. //
  2622. // Note: You must call the "Send" method on the returned request object in order
  2623. // to execute the request.
  2624. //
  2625. // // Example sending a request using the ImportRestApiRequest method.
  2626. // req, resp := client.ImportRestApiRequest(params)
  2627. //
  2628. // err := req.Send()
  2629. // if err == nil { // resp is now filled
  2630. // fmt.Println(resp)
  2631. // }
  2632. //
  2633. func (c *APIGateway) ImportRestApiRequest(input *ImportRestApiInput) (req *request.Request, output *RestApi) {
  2634. op := &request.Operation{
  2635. Name: opImportRestApi,
  2636. HTTPMethod: "POST",
  2637. HTTPPath: "/restapis?mode=import",
  2638. }
  2639. if input == nil {
  2640. input = &ImportRestApiInput{}
  2641. }
  2642. req = c.newRequest(op, input, output)
  2643. output = &RestApi{}
  2644. req.Data = output
  2645. return
  2646. }
  2647. // A feature of the Amazon API Gateway control service for creating a new API
  2648. // from an external API definition file.
  2649. func (c *APIGateway) ImportRestApi(input *ImportRestApiInput) (*RestApi, error) {
  2650. req, out := c.ImportRestApiRequest(input)
  2651. err := req.Send()
  2652. return out, err
  2653. }
  2654. const opPutIntegration = "PutIntegration"
  2655. // PutIntegrationRequest generates a "aws/request.Request" representing the
  2656. // client's request for the PutIntegration operation. The "output" return
  2657. // value can be used to capture response data after the request's "Send" method
  2658. // is called.
  2659. //
  2660. // Creating a request object using this method should be used when you want to inject
  2661. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2662. // access properties on the request object before or after sending the request. If
  2663. // you just want the service response, call the PutIntegration method directly
  2664. // instead.
  2665. //
  2666. // Note: You must call the "Send" method on the returned request object in order
  2667. // to execute the request.
  2668. //
  2669. // // Example sending a request using the PutIntegrationRequest method.
  2670. // req, resp := client.PutIntegrationRequest(params)
  2671. //
  2672. // err := req.Send()
  2673. // if err == nil { // resp is now filled
  2674. // fmt.Println(resp)
  2675. // }
  2676. //
  2677. func (c *APIGateway) PutIntegrationRequest(input *PutIntegrationInput) (req *request.Request, output *Integration) {
  2678. op := &request.Operation{
  2679. Name: opPutIntegration,
  2680. HTTPMethod: "PUT",
  2681. HTTPPath: "/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}/integration",
  2682. }
  2683. if input == nil {
  2684. input = &PutIntegrationInput{}
  2685. }
  2686. req = c.newRequest(op, input, output)
  2687. output = &Integration{}
  2688. req.Data = output
  2689. return
  2690. }
  2691. // Represents a put integration.
  2692. func (c *APIGateway) PutIntegration(input *PutIntegrationInput) (*Integration, error) {
  2693. req, out := c.PutIntegrationRequest(input)
  2694. err := req.Send()
  2695. return out, err
  2696. }
  2697. const opPutIntegrationResponse = "PutIntegrationResponse"
  2698. // PutIntegrationResponseRequest generates a "aws/request.Request" representing the
  2699. // client's request for the PutIntegrationResponse operation. The "output" return
  2700. // value can be used to capture response data after the request's "Send" method
  2701. // is called.
  2702. //
  2703. // Creating a request object using this method should be used when you want to inject
  2704. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2705. // access properties on the request object before or after sending the request. If
  2706. // you just want the service response, call the PutIntegrationResponse method directly
  2707. // instead.
  2708. //
  2709. // Note: You must call the "Send" method on the returned request object in order
  2710. // to execute the request.
  2711. //
  2712. // // Example sending a request using the PutIntegrationResponseRequest method.
  2713. // req, resp := client.PutIntegrationResponseRequest(params)
  2714. //
  2715. // err := req.Send()
  2716. // if err == nil { // resp is now filled
  2717. // fmt.Println(resp)
  2718. // }
  2719. //
  2720. func (c *APIGateway) PutIntegrationResponseRequest(input *PutIntegrationResponseInput) (req *request.Request, output *IntegrationResponse) {
  2721. op := &request.Operation{
  2722. Name: opPutIntegrationResponse,
  2723. HTTPMethod: "PUT",
  2724. HTTPPath: "/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}/integration/responses/{status_code}",
  2725. }
  2726. if input == nil {
  2727. input = &PutIntegrationResponseInput{}
  2728. }
  2729. req = c.newRequest(op, input, output)
  2730. output = &IntegrationResponse{}
  2731. req.Data = output
  2732. return
  2733. }
  2734. // Represents a put integration.
  2735. func (c *APIGateway) PutIntegrationResponse(input *PutIntegrationResponseInput) (*IntegrationResponse, error) {
  2736. req, out := c.PutIntegrationResponseRequest(input)
  2737. err := req.Send()
  2738. return out, err
  2739. }
  2740. const opPutMethod = "PutMethod"
  2741. // PutMethodRequest generates a "aws/request.Request" representing the
  2742. // client's request for the PutMethod operation. The "output" return
  2743. // value can be used to capture response data after the request's "Send" method
  2744. // is called.
  2745. //
  2746. // Creating a request object using this method should be used when you want to inject
  2747. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2748. // access properties on the request object before or after sending the request. If
  2749. // you just want the service response, call the PutMethod method directly
  2750. // instead.
  2751. //
  2752. // Note: You must call the "Send" method on the returned request object in order
  2753. // to execute the request.
  2754. //
  2755. // // Example sending a request using the PutMethodRequest method.
  2756. // req, resp := client.PutMethodRequest(params)
  2757. //
  2758. // err := req.Send()
  2759. // if err == nil { // resp is now filled
  2760. // fmt.Println(resp)
  2761. // }
  2762. //
  2763. func (c *APIGateway) PutMethodRequest(input *PutMethodInput) (req *request.Request, output *Method) {
  2764. op := &request.Operation{
  2765. Name: opPutMethod,
  2766. HTTPMethod: "PUT",
  2767. HTTPPath: "/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}",
  2768. }
  2769. if input == nil {
  2770. input = &PutMethodInput{}
  2771. }
  2772. req = c.newRequest(op, input, output)
  2773. output = &Method{}
  2774. req.Data = output
  2775. return
  2776. }
  2777. // Add a method to an existing Resource resource.
  2778. func (c *APIGateway) PutMethod(input *PutMethodInput) (*Method, error) {
  2779. req, out := c.PutMethodRequest(input)
  2780. err := req.Send()
  2781. return out, err
  2782. }
  2783. const opPutMethodResponse = "PutMethodResponse"
  2784. // PutMethodResponseRequest generates a "aws/request.Request" representing the
  2785. // client's request for the PutMethodResponse operation. The "output" return
  2786. // value can be used to capture response data after the request's "Send" method
  2787. // is called.
  2788. //
  2789. // Creating a request object using this method should be used when you want to inject
  2790. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2791. // access properties on the request object before or after sending the request. If
  2792. // you just want the service response, call the PutMethodResponse method directly
  2793. // instead.
  2794. //
  2795. // Note: You must call the "Send" method on the returned request object in order
  2796. // to execute the request.
  2797. //
  2798. // // Example sending a request using the PutMethodResponseRequest method.
  2799. // req, resp := client.PutMethodResponseRequest(params)
  2800. //
  2801. // err := req.Send()
  2802. // if err == nil { // resp is now filled
  2803. // fmt.Println(resp)
  2804. // }
  2805. //
  2806. func (c *APIGateway) PutMethodResponseRequest(input *PutMethodResponseInput) (req *request.Request, output *MethodResponse) {
  2807. op := &request.Operation{
  2808. Name: opPutMethodResponse,
  2809. HTTPMethod: "PUT",
  2810. HTTPPath: "/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}/responses/{status_code}",
  2811. }
  2812. if input == nil {
  2813. input = &PutMethodResponseInput{}
  2814. }
  2815. req = c.newRequest(op, input, output)
  2816. output = &MethodResponse{}
  2817. req.Data = output
  2818. return
  2819. }
  2820. // Adds a MethodResponse to an existing Method resource.
  2821. func (c *APIGateway) PutMethodResponse(input *PutMethodResponseInput) (*MethodResponse, error) {
  2822. req, out := c.PutMethodResponseRequest(input)
  2823. err := req.Send()
  2824. return out, err
  2825. }
  2826. const opPutRestApi = "PutRestApi"
  2827. // PutRestApiRequest generates a "aws/request.Request" representing the
  2828. // client's request for the PutRestApi operation. The "output" return
  2829. // value can be used to capture response data after the request's "Send" method
  2830. // is called.
  2831. //
  2832. // Creating a request object using this method should be used when you want to inject
  2833. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2834. // access properties on the request object before or after sending the request. If
  2835. // you just want the service response, call the PutRestApi method directly
  2836. // instead.
  2837. //
  2838. // Note: You must call the "Send" method on the returned request object in order
  2839. // to execute the request.
  2840. //
  2841. // // Example sending a request using the PutRestApiRequest method.
  2842. // req, resp := client.PutRestApiRequest(params)
  2843. //
  2844. // err := req.Send()
  2845. // if err == nil { // resp is now filled
  2846. // fmt.Println(resp)
  2847. // }
  2848. //
  2849. func (c *APIGateway) PutRestApiRequest(input *PutRestApiInput) (req *request.Request, output *RestApi) {
  2850. op := &request.Operation{
  2851. Name: opPutRestApi,
  2852. HTTPMethod: "PUT",
  2853. HTTPPath: "/restapis/{restapi_id}",
  2854. }
  2855. if input == nil {
  2856. input = &PutRestApiInput{}
  2857. }
  2858. req = c.newRequest(op, input, output)
  2859. output = &RestApi{}
  2860. req.Data = output
  2861. return
  2862. }
  2863. // A feature of the Amazon API Gateway control service for updating an existing
  2864. // API with an input of external API definitions. The update can take the form
  2865. // of merging the supplied definition into the existing API or overwriting the
  2866. // existing API.
  2867. func (c *APIGateway) PutRestApi(input *PutRestApiInput) (*RestApi, error) {
  2868. req, out := c.PutRestApiRequest(input)
  2869. err := req.Send()
  2870. return out, err
  2871. }
  2872. const opTestInvokeAuthorizer = "TestInvokeAuthorizer"
  2873. // TestInvokeAuthorizerRequest generates a "aws/request.Request" representing the
  2874. // client's request for the TestInvokeAuthorizer operation. The "output" return
  2875. // value can be used to capture response data after the request's "Send" method
  2876. // is called.
  2877. //
  2878. // Creating a request object using this method should be used when you want to inject
  2879. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2880. // access properties on the request object before or after sending the request. If
  2881. // you just want the service response, call the TestInvokeAuthorizer method directly
  2882. // instead.
  2883. //
  2884. // Note: You must call the "Send" method on the returned request object in order
  2885. // to execute the request.
  2886. //
  2887. // // Example sending a request using the TestInvokeAuthorizerRequest method.
  2888. // req, resp := client.TestInvokeAuthorizerRequest(params)
  2889. //
  2890. // err := req.Send()
  2891. // if err == nil { // resp is now filled
  2892. // fmt.Println(resp)
  2893. // }
  2894. //
  2895. func (c *APIGateway) TestInvokeAuthorizerRequest(input *TestInvokeAuthorizerInput) (req *request.Request, output *TestInvokeAuthorizerOutput) {
  2896. op := &request.Operation{
  2897. Name: opTestInvokeAuthorizer,
  2898. HTTPMethod: "POST",
  2899. HTTPPath: "/restapis/{restapi_id}/authorizers/{authorizer_id}",
  2900. }
  2901. if input == nil {
  2902. input = &TestInvokeAuthorizerInput{}
  2903. }
  2904. req = c.newRequest(op, input, output)
  2905. output = &TestInvokeAuthorizerOutput{}
  2906. req.Data = output
  2907. return
  2908. }
  2909. // Simulate the execution of an Authorizer in your RestApi with headers, parameters,
  2910. // and an incoming request body.
  2911. func (c *APIGateway) TestInvokeAuthorizer(input *TestInvokeAuthorizerInput) (*TestInvokeAuthorizerOutput, error) {
  2912. req, out := c.TestInvokeAuthorizerRequest(input)
  2913. err := req.Send()
  2914. return out, err
  2915. }
  2916. const opTestInvokeMethod = "TestInvokeMethod"
  2917. // TestInvokeMethodRequest generates a "aws/request.Request" representing the
  2918. // client's request for the TestInvokeMethod operation. The "output" return
  2919. // value can be used to capture response data after the request's "Send" method
  2920. // is called.
  2921. //
  2922. // Creating a request object using this method should be used when you want to inject
  2923. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2924. // access properties on the request object before or after sending the request. If
  2925. // you just want the service response, call the TestInvokeMethod method directly
  2926. // instead.
  2927. //
  2928. // Note: You must call the "Send" method on the returned request object in order
  2929. // to execute the request.
  2930. //
  2931. // // Example sending a request using the TestInvokeMethodRequest method.
  2932. // req, resp := client.TestInvokeMethodRequest(params)
  2933. //
  2934. // err := req.Send()
  2935. // if err == nil { // resp is now filled
  2936. // fmt.Println(resp)
  2937. // }
  2938. //
  2939. func (c *APIGateway) TestInvokeMethodRequest(input *TestInvokeMethodInput) (req *request.Request, output *TestInvokeMethodOutput) {
  2940. op := &request.Operation{
  2941. Name: opTestInvokeMethod,
  2942. HTTPMethod: "POST",
  2943. HTTPPath: "/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}",
  2944. }
  2945. if input == nil {
  2946. input = &TestInvokeMethodInput{}
  2947. }
  2948. req = c.newRequest(op, input, output)
  2949. output = &TestInvokeMethodOutput{}
  2950. req.Data = output
  2951. return
  2952. }
  2953. // Simulate the execution of a Method in your RestApi with headers, parameters,
  2954. // and an incoming request body.
  2955. func (c *APIGateway) TestInvokeMethod(input *TestInvokeMethodInput) (*TestInvokeMethodOutput, error) {
  2956. req, out := c.TestInvokeMethodRequest(input)
  2957. err := req.Send()
  2958. return out, err
  2959. }
  2960. const opUpdateAccount = "UpdateAccount"
  2961. // UpdateAccountRequest generates a "aws/request.Request" representing the
  2962. // client's request for the UpdateAccount operation. The "output" return
  2963. // value can be used to capture response data after the request's "Send" method
  2964. // is called.
  2965. //
  2966. // Creating a request object using this method should be used when you want to inject
  2967. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2968. // access properties on the request object before or after sending the request. If
  2969. // you just want the service response, call the UpdateAccount method directly
  2970. // instead.
  2971. //
  2972. // Note: You must call the "Send" method on the returned request object in order
  2973. // to execute the request.
  2974. //
  2975. // // Example sending a request using the UpdateAccountRequest method.
  2976. // req, resp := client.UpdateAccountRequest(params)
  2977. //
  2978. // err := req.Send()
  2979. // if err == nil { // resp is now filled
  2980. // fmt.Println(resp)
  2981. // }
  2982. //
  2983. func (c *APIGateway) UpdateAccountRequest(input *UpdateAccountInput) (req *request.Request, output *Account) {
  2984. op := &request.Operation{
  2985. Name: opUpdateAccount,
  2986. HTTPMethod: "PATCH",
  2987. HTTPPath: "/account",
  2988. }
  2989. if input == nil {
  2990. input = &UpdateAccountInput{}
  2991. }
  2992. req = c.newRequest(op, input, output)
  2993. output = &Account{}
  2994. req.Data = output
  2995. return
  2996. }
  2997. // Changes information about the current Account resource.
  2998. func (c *APIGateway) UpdateAccount(input *UpdateAccountInput) (*Account, error) {
  2999. req, out := c.UpdateAccountRequest(input)
  3000. err := req.Send()
  3001. return out, err
  3002. }
  3003. const opUpdateApiKey = "UpdateApiKey"
  3004. // UpdateApiKeyRequest generates a "aws/request.Request" representing the
  3005. // client's request for the UpdateApiKey operation. The "output" return
  3006. // value can be used to capture response data after the request's "Send" method
  3007. // is called.
  3008. //
  3009. // Creating a request object using this method should be used when you want to inject
  3010. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3011. // access properties on the request object before or after sending the request. If
  3012. // you just want the service response, call the UpdateApiKey method directly
  3013. // instead.
  3014. //
  3015. // Note: You must call the "Send" method on the returned request object in order
  3016. // to execute the request.
  3017. //
  3018. // // Example sending a request using the UpdateApiKeyRequest method.
  3019. // req, resp := client.UpdateApiKeyRequest(params)
  3020. //
  3021. // err := req.Send()
  3022. // if err == nil { // resp is now filled
  3023. // fmt.Println(resp)
  3024. // }
  3025. //
  3026. func (c *APIGateway) UpdateApiKeyRequest(input *UpdateApiKeyInput) (req *request.Request, output *ApiKey) {
  3027. op := &request.Operation{
  3028. Name: opUpdateApiKey,
  3029. HTTPMethod: "PATCH",
  3030. HTTPPath: "/apikeys/{api_Key}",
  3031. }
  3032. if input == nil {
  3033. input = &UpdateApiKeyInput{}
  3034. }
  3035. req = c.newRequest(op, input, output)
  3036. output = &ApiKey{}
  3037. req.Data = output
  3038. return
  3039. }
  3040. // Changes information about an ApiKey resource.
  3041. func (c *APIGateway) UpdateApiKey(input *UpdateApiKeyInput) (*ApiKey, error) {
  3042. req, out := c.UpdateApiKeyRequest(input)
  3043. err := req.Send()
  3044. return out, err
  3045. }
  3046. const opUpdateAuthorizer = "UpdateAuthorizer"
  3047. // UpdateAuthorizerRequest generates a "aws/request.Request" representing the
  3048. // client's request for the UpdateAuthorizer operation. The "output" return
  3049. // value can be used to capture response data after the request's "Send" method
  3050. // is called.
  3051. //
  3052. // Creating a request object using this method should be used when you want to inject
  3053. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3054. // access properties on the request object before or after sending the request. If
  3055. // you just want the service response, call the UpdateAuthorizer method directly
  3056. // instead.
  3057. //
  3058. // Note: You must call the "Send" method on the returned request object in order
  3059. // to execute the request.
  3060. //
  3061. // // Example sending a request using the UpdateAuthorizerRequest method.
  3062. // req, resp := client.UpdateAuthorizerRequest(params)
  3063. //
  3064. // err := req.Send()
  3065. // if err == nil { // resp is now filled
  3066. // fmt.Println(resp)
  3067. // }
  3068. //
  3069. func (c *APIGateway) UpdateAuthorizerRequest(input *UpdateAuthorizerInput) (req *request.Request, output *Authorizer) {
  3070. op := &request.Operation{
  3071. Name: opUpdateAuthorizer,
  3072. HTTPMethod: "PATCH",
  3073. HTTPPath: "/restapis/{restapi_id}/authorizers/{authorizer_id}",
  3074. }
  3075. if input == nil {
  3076. input = &UpdateAuthorizerInput{}
  3077. }
  3078. req = c.newRequest(op, input, output)
  3079. output = &Authorizer{}
  3080. req.Data = output
  3081. return
  3082. }
  3083. // Updates an existing Authorizer resource.
  3084. func (c *APIGateway) UpdateAuthorizer(input *UpdateAuthorizerInput) (*Authorizer, error) {
  3085. req, out := c.UpdateAuthorizerRequest(input)
  3086. err := req.Send()
  3087. return out, err
  3088. }
  3089. const opUpdateBasePathMapping = "UpdateBasePathMapping"
  3090. // UpdateBasePathMappingRequest generates a "aws/request.Request" representing the
  3091. // client's request for the UpdateBasePathMapping operation. The "output" return
  3092. // value can be used to capture response data after the request's "Send" method
  3093. // is called.
  3094. //
  3095. // Creating a request object using this method should be used when you want to inject
  3096. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3097. // access properties on the request object before or after sending the request. If
  3098. // you just want the service response, call the UpdateBasePathMapping method directly
  3099. // instead.
  3100. //
  3101. // Note: You must call the "Send" method on the returned request object in order
  3102. // to execute the request.
  3103. //
  3104. // // Example sending a request using the UpdateBasePathMappingRequest method.
  3105. // req, resp := client.UpdateBasePathMappingRequest(params)
  3106. //
  3107. // err := req.Send()
  3108. // if err == nil { // resp is now filled
  3109. // fmt.Println(resp)
  3110. // }
  3111. //
  3112. func (c *APIGateway) UpdateBasePathMappingRequest(input *UpdateBasePathMappingInput) (req *request.Request, output *BasePathMapping) {
  3113. op := &request.Operation{
  3114. Name: opUpdateBasePathMapping,
  3115. HTTPMethod: "PATCH",
  3116. HTTPPath: "/domainnames/{domain_name}/basepathmappings/{base_path}",
  3117. }
  3118. if input == nil {
  3119. input = &UpdateBasePathMappingInput{}
  3120. }
  3121. req = c.newRequest(op, input, output)
  3122. output = &BasePathMapping{}
  3123. req.Data = output
  3124. return
  3125. }
  3126. // Changes information about the BasePathMapping resource.
  3127. func (c *APIGateway) UpdateBasePathMapping(input *UpdateBasePathMappingInput) (*BasePathMapping, error) {
  3128. req, out := c.UpdateBasePathMappingRequest(input)
  3129. err := req.Send()
  3130. return out, err
  3131. }
  3132. const opUpdateClientCertificate = "UpdateClientCertificate"
  3133. // UpdateClientCertificateRequest generates a "aws/request.Request" representing the
  3134. // client's request for the UpdateClientCertificate operation. The "output" return
  3135. // value can be used to capture response data after the request's "Send" method
  3136. // is called.
  3137. //
  3138. // Creating a request object using this method should be used when you want to inject
  3139. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3140. // access properties on the request object before or after sending the request. If
  3141. // you just want the service response, call the UpdateClientCertificate method directly
  3142. // instead.
  3143. //
  3144. // Note: You must call the "Send" method on the returned request object in order
  3145. // to execute the request.
  3146. //
  3147. // // Example sending a request using the UpdateClientCertificateRequest method.
  3148. // req, resp := client.UpdateClientCertificateRequest(params)
  3149. //
  3150. // err := req.Send()
  3151. // if err == nil { // resp is now filled
  3152. // fmt.Println(resp)
  3153. // }
  3154. //
  3155. func (c *APIGateway) UpdateClientCertificateRequest(input *UpdateClientCertificateInput) (req *request.Request, output *ClientCertificate) {
  3156. op := &request.Operation{
  3157. Name: opUpdateClientCertificate,
  3158. HTTPMethod: "PATCH",
  3159. HTTPPath: "/clientcertificates/{clientcertificate_id}",
  3160. }
  3161. if input == nil {
  3162. input = &UpdateClientCertificateInput{}
  3163. }
  3164. req = c.newRequest(op, input, output)
  3165. output = &ClientCertificate{}
  3166. req.Data = output
  3167. return
  3168. }
  3169. // Changes information about an ClientCertificate resource.
  3170. func (c *APIGateway) UpdateClientCertificate(input *UpdateClientCertificateInput) (*ClientCertificate, error) {
  3171. req, out := c.UpdateClientCertificateRequest(input)
  3172. err := req.Send()
  3173. return out, err
  3174. }
  3175. const opUpdateDeployment = "UpdateDeployment"
  3176. // UpdateDeploymentRequest generates a "aws/request.Request" representing the
  3177. // client's request for the UpdateDeployment operation. The "output" return
  3178. // value can be used to capture response data after the request's "Send" method
  3179. // is called.
  3180. //
  3181. // Creating a request object using this method should be used when you want to inject
  3182. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3183. // access properties on the request object before or after sending the request. If
  3184. // you just want the service response, call the UpdateDeployment method directly
  3185. // instead.
  3186. //
  3187. // Note: You must call the "Send" method on the returned request object in order
  3188. // to execute the request.
  3189. //
  3190. // // Example sending a request using the UpdateDeploymentRequest method.
  3191. // req, resp := client.UpdateDeploymentRequest(params)
  3192. //
  3193. // err := req.Send()
  3194. // if err == nil { // resp is now filled
  3195. // fmt.Println(resp)
  3196. // }
  3197. //
  3198. func (c *APIGateway) UpdateDeploymentRequest(input *UpdateDeploymentInput) (req *request.Request, output *Deployment) {
  3199. op := &request.Operation{
  3200. Name: opUpdateDeployment,
  3201. HTTPMethod: "PATCH",
  3202. HTTPPath: "/restapis/{restapi_id}/deployments/{deployment_id}",
  3203. }
  3204. if input == nil {
  3205. input = &UpdateDeploymentInput{}
  3206. }
  3207. req = c.newRequest(op, input, output)
  3208. output = &Deployment{}
  3209. req.Data = output
  3210. return
  3211. }
  3212. // Changes information about a Deployment resource.
  3213. func (c *APIGateway) UpdateDeployment(input *UpdateDeploymentInput) (*Deployment, error) {
  3214. req, out := c.UpdateDeploymentRequest(input)
  3215. err := req.Send()
  3216. return out, err
  3217. }
  3218. const opUpdateDomainName = "UpdateDomainName"
  3219. // UpdateDomainNameRequest generates a "aws/request.Request" representing the
  3220. // client's request for the UpdateDomainName operation. The "output" return
  3221. // value can be used to capture response data after the request's "Send" method
  3222. // is called.
  3223. //
  3224. // Creating a request object using this method should be used when you want to inject
  3225. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3226. // access properties on the request object before or after sending the request. If
  3227. // you just want the service response, call the UpdateDomainName method directly
  3228. // instead.
  3229. //
  3230. // Note: You must call the "Send" method on the returned request object in order
  3231. // to execute the request.
  3232. //
  3233. // // Example sending a request using the UpdateDomainNameRequest method.
  3234. // req, resp := client.UpdateDomainNameRequest(params)
  3235. //
  3236. // err := req.Send()
  3237. // if err == nil { // resp is now filled
  3238. // fmt.Println(resp)
  3239. // }
  3240. //
  3241. func (c *APIGateway) UpdateDomainNameRequest(input *UpdateDomainNameInput) (req *request.Request, output *DomainName) {
  3242. op := &request.Operation{
  3243. Name: opUpdateDomainName,
  3244. HTTPMethod: "PATCH",
  3245. HTTPPath: "/domainnames/{domain_name}",
  3246. }
  3247. if input == nil {
  3248. input = &UpdateDomainNameInput{}
  3249. }
  3250. req = c.newRequest(op, input, output)
  3251. output = &DomainName{}
  3252. req.Data = output
  3253. return
  3254. }
  3255. // Changes information about the DomainName resource.
  3256. func (c *APIGateway) UpdateDomainName(input *UpdateDomainNameInput) (*DomainName, error) {
  3257. req, out := c.UpdateDomainNameRequest(input)
  3258. err := req.Send()
  3259. return out, err
  3260. }
  3261. const opUpdateIntegration = "UpdateIntegration"
  3262. // UpdateIntegrationRequest generates a "aws/request.Request" representing the
  3263. // client's request for the UpdateIntegration operation. The "output" return
  3264. // value can be used to capture response data after the request's "Send" method
  3265. // is called.
  3266. //
  3267. // Creating a request object using this method should be used when you want to inject
  3268. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3269. // access properties on the request object before or after sending the request. If
  3270. // you just want the service response, call the UpdateIntegration method directly
  3271. // instead.
  3272. //
  3273. // Note: You must call the "Send" method on the returned request object in order
  3274. // to execute the request.
  3275. //
  3276. // // Example sending a request using the UpdateIntegrationRequest method.
  3277. // req, resp := client.UpdateIntegrationRequest(params)
  3278. //
  3279. // err := req.Send()
  3280. // if err == nil { // resp is now filled
  3281. // fmt.Println(resp)
  3282. // }
  3283. //
  3284. func (c *APIGateway) UpdateIntegrationRequest(input *UpdateIntegrationInput) (req *request.Request, output *Integration) {
  3285. op := &request.Operation{
  3286. Name: opUpdateIntegration,
  3287. HTTPMethod: "PATCH",
  3288. HTTPPath: "/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}/integration",
  3289. }
  3290. if input == nil {
  3291. input = &UpdateIntegrationInput{}
  3292. }
  3293. req = c.newRequest(op, input, output)
  3294. output = &Integration{}
  3295. req.Data = output
  3296. return
  3297. }
  3298. // Represents an update integration.
  3299. func (c *APIGateway) UpdateIntegration(input *UpdateIntegrationInput) (*Integration, error) {
  3300. req, out := c.UpdateIntegrationRequest(input)
  3301. err := req.Send()
  3302. return out, err
  3303. }
  3304. const opUpdateIntegrationResponse = "UpdateIntegrationResponse"
  3305. // UpdateIntegrationResponseRequest generates a "aws/request.Request" representing the
  3306. // client's request for the UpdateIntegrationResponse operation. The "output" return
  3307. // value can be used to capture response data after the request's "Send" method
  3308. // is called.
  3309. //
  3310. // Creating a request object using this method should be used when you want to inject
  3311. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3312. // access properties on the request object before or after sending the request. If
  3313. // you just want the service response, call the UpdateIntegrationResponse method directly
  3314. // instead.
  3315. //
  3316. // Note: You must call the "Send" method on the returned request object in order
  3317. // to execute the request.
  3318. //
  3319. // // Example sending a request using the UpdateIntegrationResponseRequest method.
  3320. // req, resp := client.UpdateIntegrationResponseRequest(params)
  3321. //
  3322. // err := req.Send()
  3323. // if err == nil { // resp is now filled
  3324. // fmt.Println(resp)
  3325. // }
  3326. //
  3327. func (c *APIGateway) UpdateIntegrationResponseRequest(input *UpdateIntegrationResponseInput) (req *request.Request, output *IntegrationResponse) {
  3328. op := &request.Operation{
  3329. Name: opUpdateIntegrationResponse,
  3330. HTTPMethod: "PATCH",
  3331. HTTPPath: "/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}/integration/responses/{status_code}",
  3332. }
  3333. if input == nil {
  3334. input = &UpdateIntegrationResponseInput{}
  3335. }
  3336. req = c.newRequest(op, input, output)
  3337. output = &IntegrationResponse{}
  3338. req.Data = output
  3339. return
  3340. }
  3341. // Represents an update integration response.
  3342. func (c *APIGateway) UpdateIntegrationResponse(input *UpdateIntegrationResponseInput) (*IntegrationResponse, error) {
  3343. req, out := c.UpdateIntegrationResponseRequest(input)
  3344. err := req.Send()
  3345. return out, err
  3346. }
  3347. const opUpdateMethod = "UpdateMethod"
  3348. // UpdateMethodRequest generates a "aws/request.Request" representing the
  3349. // client's request for the UpdateMethod operation. The "output" return
  3350. // value can be used to capture response data after the request's "Send" method
  3351. // is called.
  3352. //
  3353. // Creating a request object using this method should be used when you want to inject
  3354. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3355. // access properties on the request object before or after sending the request. If
  3356. // you just want the service response, call the UpdateMethod method directly
  3357. // instead.
  3358. //
  3359. // Note: You must call the "Send" method on the returned request object in order
  3360. // to execute the request.
  3361. //
  3362. // // Example sending a request using the UpdateMethodRequest method.
  3363. // req, resp := client.UpdateMethodRequest(params)
  3364. //
  3365. // err := req.Send()
  3366. // if err == nil { // resp is now filled
  3367. // fmt.Println(resp)
  3368. // }
  3369. //
  3370. func (c *APIGateway) UpdateMethodRequest(input *UpdateMethodInput) (req *request.Request, output *Method) {
  3371. op := &request.Operation{
  3372. Name: opUpdateMethod,
  3373. HTTPMethod: "PATCH",
  3374. HTTPPath: "/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}",
  3375. }
  3376. if input == nil {
  3377. input = &UpdateMethodInput{}
  3378. }
  3379. req = c.newRequest(op, input, output)
  3380. output = &Method{}
  3381. req.Data = output
  3382. return
  3383. }
  3384. // Updates an existing Method resource.
  3385. func (c *APIGateway) UpdateMethod(input *UpdateMethodInput) (*Method, error) {
  3386. req, out := c.UpdateMethodRequest(input)
  3387. err := req.Send()
  3388. return out, err
  3389. }
  3390. const opUpdateMethodResponse = "UpdateMethodResponse"
  3391. // UpdateMethodResponseRequest generates a "aws/request.Request" representing the
  3392. // client's request for the UpdateMethodResponse operation. The "output" return
  3393. // value can be used to capture response data after the request's "Send" method
  3394. // is called.
  3395. //
  3396. // Creating a request object using this method should be used when you want to inject
  3397. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3398. // access properties on the request object before or after sending the request. If
  3399. // you just want the service response, call the UpdateMethodResponse method directly
  3400. // instead.
  3401. //
  3402. // Note: You must call the "Send" method on the returned request object in order
  3403. // to execute the request.
  3404. //
  3405. // // Example sending a request using the UpdateMethodResponseRequest method.
  3406. // req, resp := client.UpdateMethodResponseRequest(params)
  3407. //
  3408. // err := req.Send()
  3409. // if err == nil { // resp is now filled
  3410. // fmt.Println(resp)
  3411. // }
  3412. //
  3413. func (c *APIGateway) UpdateMethodResponseRequest(input *UpdateMethodResponseInput) (req *request.Request, output *MethodResponse) {
  3414. op := &request.Operation{
  3415. Name: opUpdateMethodResponse,
  3416. HTTPMethod: "PATCH",
  3417. HTTPPath: "/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}/responses/{status_code}",
  3418. }
  3419. if input == nil {
  3420. input = &UpdateMethodResponseInput{}
  3421. }
  3422. req = c.newRequest(op, input, output)
  3423. output = &MethodResponse{}
  3424. req.Data = output
  3425. return
  3426. }
  3427. // Updates an existing MethodResponse resource.
  3428. func (c *APIGateway) UpdateMethodResponse(input *UpdateMethodResponseInput) (*MethodResponse, error) {
  3429. req, out := c.UpdateMethodResponseRequest(input)
  3430. err := req.Send()
  3431. return out, err
  3432. }
  3433. const opUpdateModel = "UpdateModel"
  3434. // UpdateModelRequest generates a "aws/request.Request" representing the
  3435. // client's request for the UpdateModel operation. The "output" return
  3436. // value can be used to capture response data after the request's "Send" method
  3437. // is called.
  3438. //
  3439. // Creating a request object using this method should be used when you want to inject
  3440. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3441. // access properties on the request object before or after sending the request. If
  3442. // you just want the service response, call the UpdateModel method directly
  3443. // instead.
  3444. //
  3445. // Note: You must call the "Send" method on the returned request object in order
  3446. // to execute the request.
  3447. //
  3448. // // Example sending a request using the UpdateModelRequest method.
  3449. // req, resp := client.UpdateModelRequest(params)
  3450. //
  3451. // err := req.Send()
  3452. // if err == nil { // resp is now filled
  3453. // fmt.Println(resp)
  3454. // }
  3455. //
  3456. func (c *APIGateway) UpdateModelRequest(input *UpdateModelInput) (req *request.Request, output *Model) {
  3457. op := &request.Operation{
  3458. Name: opUpdateModel,
  3459. HTTPMethod: "PATCH",
  3460. HTTPPath: "/restapis/{restapi_id}/models/{model_name}",
  3461. }
  3462. if input == nil {
  3463. input = &UpdateModelInput{}
  3464. }
  3465. req = c.newRequest(op, input, output)
  3466. output = &Model{}
  3467. req.Data = output
  3468. return
  3469. }
  3470. // Changes information about a model.
  3471. func (c *APIGateway) UpdateModel(input *UpdateModelInput) (*Model, error) {
  3472. req, out := c.UpdateModelRequest(input)
  3473. err := req.Send()
  3474. return out, err
  3475. }
  3476. const opUpdateResource = "UpdateResource"
  3477. // UpdateResourceRequest generates a "aws/request.Request" representing the
  3478. // client's request for the UpdateResource operation. The "output" return
  3479. // value can be used to capture response data after the request's "Send" method
  3480. // is called.
  3481. //
  3482. // Creating a request object using this method should be used when you want to inject
  3483. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3484. // access properties on the request object before or after sending the request. If
  3485. // you just want the service response, call the UpdateResource method directly
  3486. // instead.
  3487. //
  3488. // Note: You must call the "Send" method on the returned request object in order
  3489. // to execute the request.
  3490. //
  3491. // // Example sending a request using the UpdateResourceRequest method.
  3492. // req, resp := client.UpdateResourceRequest(params)
  3493. //
  3494. // err := req.Send()
  3495. // if err == nil { // resp is now filled
  3496. // fmt.Println(resp)
  3497. // }
  3498. //
  3499. func (c *APIGateway) UpdateResourceRequest(input *UpdateResourceInput) (req *request.Request, output *Resource) {
  3500. op := &request.Operation{
  3501. Name: opUpdateResource,
  3502. HTTPMethod: "PATCH",
  3503. HTTPPath: "/restapis/{restapi_id}/resources/{resource_id}",
  3504. }
  3505. if input == nil {
  3506. input = &UpdateResourceInput{}
  3507. }
  3508. req = c.newRequest(op, input, output)
  3509. output = &Resource{}
  3510. req.Data = output
  3511. return
  3512. }
  3513. // Changes information about a Resource resource.
  3514. func (c *APIGateway) UpdateResource(input *UpdateResourceInput) (*Resource, error) {
  3515. req, out := c.UpdateResourceRequest(input)
  3516. err := req.Send()
  3517. return out, err
  3518. }
  3519. const opUpdateRestApi = "UpdateRestApi"
  3520. // UpdateRestApiRequest generates a "aws/request.Request" representing the
  3521. // client's request for the UpdateRestApi operation. The "output" return
  3522. // value can be used to capture response data after the request's "Send" method
  3523. // is called.
  3524. //
  3525. // Creating a request object using this method should be used when you want to inject
  3526. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3527. // access properties on the request object before or after sending the request. If
  3528. // you just want the service response, call the UpdateRestApi method directly
  3529. // instead.
  3530. //
  3531. // Note: You must call the "Send" method on the returned request object in order
  3532. // to execute the request.
  3533. //
  3534. // // Example sending a request using the UpdateRestApiRequest method.
  3535. // req, resp := client.UpdateRestApiRequest(params)
  3536. //
  3537. // err := req.Send()
  3538. // if err == nil { // resp is now filled
  3539. // fmt.Println(resp)
  3540. // }
  3541. //
  3542. func (c *APIGateway) UpdateRestApiRequest(input *UpdateRestApiInput) (req *request.Request, output *RestApi) {
  3543. op := &request.Operation{
  3544. Name: opUpdateRestApi,
  3545. HTTPMethod: "PATCH",
  3546. HTTPPath: "/restapis/{restapi_id}",
  3547. }
  3548. if input == nil {
  3549. input = &UpdateRestApiInput{}
  3550. }
  3551. req = c.newRequest(op, input, output)
  3552. output = &RestApi{}
  3553. req.Data = output
  3554. return
  3555. }
  3556. // Changes information about the specified API.
  3557. func (c *APIGateway) UpdateRestApi(input *UpdateRestApiInput) (*RestApi, error) {
  3558. req, out := c.UpdateRestApiRequest(input)
  3559. err := req.Send()
  3560. return out, err
  3561. }
  3562. const opUpdateStage = "UpdateStage"
  3563. // UpdateStageRequest generates a "aws/request.Request" representing the
  3564. // client's request for the UpdateStage operation. The "output" return
  3565. // value can be used to capture response data after the request's "Send" method
  3566. // is called.
  3567. //
  3568. // Creating a request object using this method should be used when you want to inject
  3569. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3570. // access properties on the request object before or after sending the request. If
  3571. // you just want the service response, call the UpdateStage method directly
  3572. // instead.
  3573. //
  3574. // Note: You must call the "Send" method on the returned request object in order
  3575. // to execute the request.
  3576. //
  3577. // // Example sending a request using the UpdateStageRequest method.
  3578. // req, resp := client.UpdateStageRequest(params)
  3579. //
  3580. // err := req.Send()
  3581. // if err == nil { // resp is now filled
  3582. // fmt.Println(resp)
  3583. // }
  3584. //
  3585. func (c *APIGateway) UpdateStageRequest(input *UpdateStageInput) (req *request.Request, output *Stage) {
  3586. op := &request.Operation{
  3587. Name: opUpdateStage,
  3588. HTTPMethod: "PATCH",
  3589. HTTPPath: "/restapis/{restapi_id}/stages/{stage_name}",
  3590. }
  3591. if input == nil {
  3592. input = &UpdateStageInput{}
  3593. }
  3594. req = c.newRequest(op, input, output)
  3595. output = &Stage{}
  3596. req.Data = output
  3597. return
  3598. }
  3599. // Changes information about a Stage resource.
  3600. func (c *APIGateway) UpdateStage(input *UpdateStageInput) (*Stage, error) {
  3601. req, out := c.UpdateStageRequest(input)
  3602. err := req.Send()
  3603. return out, err
  3604. }
  3605. // Represents an AWS account that is associated with Amazon API Gateway.
  3606. type Account struct {
  3607. _ struct{} `type:"structure"`
  3608. // Specifies the Amazon resource name (ARN) of an Amazon CloudWatch role for
  3609. // the current Account resource.
  3610. CloudwatchRoleArn *string `locationName:"cloudwatchRoleArn" type:"string"`
  3611. // Specifies the application programming interface (API) throttle settings for
  3612. // the current Account resource.
  3613. ThrottleSettings *ThrottleSettings `locationName:"throttleSettings" type:"structure"`
  3614. }
  3615. // String returns the string representation
  3616. func (s Account) String() string {
  3617. return awsutil.Prettify(s)
  3618. }
  3619. // GoString returns the string representation
  3620. func (s Account) GoString() string {
  3621. return s.String()
  3622. }
  3623. // A resource that can be distributed to callers for executing Method resources
  3624. // that require an API key. API keys can be mapped to any Stage on any RestApi,
  3625. // which indicates that the callers with the API key can make requests to that
  3626. // stage.
  3627. type ApiKey struct {
  3628. _ struct{} `type:"structure"`
  3629. // The date when the API Key was created, in ISO 8601 format (http://www.iso.org/iso/home/standards/iso8601.htm"
  3630. // target="_blank).
  3631. CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"`
  3632. // The description of the API Key.
  3633. Description *string `locationName:"description" type:"string"`
  3634. // Specifies whether the API Key can be used by callers.
  3635. Enabled *bool `locationName:"enabled" type:"boolean"`
  3636. // The identifier of the API Key.
  3637. Id *string `locationName:"id" type:"string"`
  3638. // When the API Key was last updated, in ISO 8601 format.
  3639. LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"unix"`
  3640. // The name of the API Key.
  3641. Name *string `locationName:"name" type:"string"`
  3642. // A list of Stage resources that are associated with the ApiKey resource.
  3643. StageKeys []*string `locationName:"stageKeys" type:"list"`
  3644. }
  3645. // String returns the string representation
  3646. func (s ApiKey) String() string {
  3647. return awsutil.Prettify(s)
  3648. }
  3649. // GoString returns the string representation
  3650. func (s ApiKey) GoString() string {
  3651. return s.String()
  3652. }
  3653. // Represents an authorization layer for methods. If enabled on a method, API
  3654. // Gateway will activate the authorizer when a client calls the method.
  3655. type Authorizer struct {
  3656. _ struct{} `type:"structure"`
  3657. // Optional customer-defined field, used in Swagger imports/exports. Has no
  3658. // functional impact.
  3659. AuthType *string `locationName:"authType" type:"string"`
  3660. // Specifies the credentials required for the authorizer, if any. Two options
  3661. // are available. To specify an IAM Role for Amazon API Gateway to assume, use
  3662. // the role's Amazon Resource Name (ARN). To use resource-based permissions
  3663. // on the Lambda function, specify null.
  3664. AuthorizerCredentials *string `locationName:"authorizerCredentials" type:"string"`
  3665. // The TTL in seconds of cached authorizer results. If greater than 0, API Gateway
  3666. // will cache authorizer responses. If this field is not set, the default value
  3667. // is 300. The maximum value is 3600, or 1 hour.
  3668. AuthorizerResultTtlInSeconds *int64 `locationName:"authorizerResultTtlInSeconds" type:"integer"`
  3669. // [Required] Specifies the authorizer's Uniform Resource Identifier (URI).
  3670. // For TOKEN authorizers, this must be a well-formed Lambda function URI. The
  3671. // URI should be of the form arn:aws:apigateway:{region}:lambda:path/{service_api}.
  3672. // Region is used to determine the right endpoint. In this case, path is used
  3673. // to indicate that the remaining substring in the URI should be treated as
  3674. // the path to the resource, including the initial /. For Lambda functions,
  3675. // this is usually of the form /2015-03-31/functions/[FunctionARN]/invocations
  3676. AuthorizerUri *string `locationName:"authorizerUri" type:"string"`
  3677. // The identifier for the authorizer resource.
  3678. Id *string `locationName:"id" type:"string"`
  3679. // [Required] The source of the identity in an incoming request. For TOKEN authorizers,
  3680. // this value is a mapping expression with the same syntax as integration parameter
  3681. // mappings. The only valid source for tokens is 'header', so the expression
  3682. // should match 'method.request.header.[headerName]'. The value of the header
  3683. // '[headerName]' will be interpreted as the incoming token.
  3684. IdentitySource *string `locationName:"identitySource" type:"string"`
  3685. // A validation expression for the incoming identity. For TOKEN authorizers,
  3686. // this value should be a regular expression. The incoming token from the client
  3687. // is matched against this expression, and will proceed if the token matches.
  3688. // If the token doesn't match, the client receives a 401 Unauthorized response.
  3689. IdentityValidationExpression *string `locationName:"identityValidationExpression" type:"string"`
  3690. // [Required] The name of the authorizer.
  3691. Name *string `locationName:"name" type:"string"`
  3692. ProviderARNs []*string `locationName:"providerARNs" type:"list"`
  3693. // [Required] The type of the authorizer. Currently, the only valid type is
  3694. // TOKEN.
  3695. Type *string `locationName:"type" type:"string" enum:"AuthorizerType"`
  3696. }
  3697. // String returns the string representation
  3698. func (s Authorizer) String() string {
  3699. return awsutil.Prettify(s)
  3700. }
  3701. // GoString returns the string representation
  3702. func (s Authorizer) GoString() string {
  3703. return s.String()
  3704. }
  3705. // Represents the base path that callers of the API that must provide as part
  3706. // of the URL after the domain name.
  3707. type BasePathMapping struct {
  3708. _ struct{} `type:"structure"`
  3709. // The base path name that callers of the API must provide as part of the URL
  3710. // after the domain name.
  3711. BasePath *string `locationName:"basePath" type:"string"`
  3712. // The name of the API.
  3713. RestApiId *string `locationName:"restApiId" type:"string"`
  3714. // The name of the API's stage.
  3715. Stage *string `locationName:"stage" type:"string"`
  3716. }
  3717. // String returns the string representation
  3718. func (s BasePathMapping) String() string {
  3719. return awsutil.Prettify(s)
  3720. }
  3721. // GoString returns the string representation
  3722. func (s BasePathMapping) GoString() string {
  3723. return s.String()
  3724. }
  3725. // Represents a Client Certificate used to configure client-side SSL authentication
  3726. // while sending requests to the integration endpoint.
  3727. type ClientCertificate struct {
  3728. _ struct{} `type:"structure"`
  3729. // The identifier of the Client Certificate.
  3730. ClientCertificateId *string `locationName:"clientCertificateId" type:"string"`
  3731. // The date when the Client Certificate was created, in ISO 8601 format (http://www.iso.org/iso/home/standards/iso8601.htm"
  3732. // target="_blank).
  3733. CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"`
  3734. // The description of the Client Certificate.
  3735. Description *string `locationName:"description" type:"string"`
  3736. // The date when the Client Certificate will expire, in ISO 8601 format (http://www.iso.org/iso/home/standards/iso8601.htm"
  3737. // target="_blank).
  3738. ExpirationDate *time.Time `locationName:"expirationDate" type:"timestamp" timestampFormat:"unix"`
  3739. // The PEM-encoded public key of the Client Certificate, that can be used to
  3740. // configure certificate authentication in the integration endpoint .
  3741. PemEncodedCertificate *string `locationName:"pemEncodedCertificate" type:"string"`
  3742. }
  3743. // String returns the string representation
  3744. func (s ClientCertificate) String() string {
  3745. return awsutil.Prettify(s)
  3746. }
  3747. // GoString returns the string representation
  3748. func (s ClientCertificate) GoString() string {
  3749. return s.String()
  3750. }
  3751. // Request to create an ApiKey resource.
  3752. type CreateApiKeyInput struct {
  3753. _ struct{} `type:"structure"`
  3754. // The description of the ApiKey.
  3755. Description *string `locationName:"description" type:"string"`
  3756. // Specifies whether the ApiKey can be used by callers.
  3757. Enabled *bool `locationName:"enabled" type:"boolean"`
  3758. // The name of the ApiKey.
  3759. Name *string `locationName:"name" type:"string"`
  3760. // Specifies whether the ApiKey can be used by callers.
  3761. StageKeys []*StageKey `locationName:"stageKeys" type:"list"`
  3762. }
  3763. // String returns the string representation
  3764. func (s CreateApiKeyInput) String() string {
  3765. return awsutil.Prettify(s)
  3766. }
  3767. // GoString returns the string representation
  3768. func (s CreateApiKeyInput) GoString() string {
  3769. return s.String()
  3770. }
  3771. // Request to add a new Authorizer to an existing RestApi resource.
  3772. type CreateAuthorizerInput struct {
  3773. _ struct{} `type:"structure"`
  3774. // Optional customer-defined field, used in Swagger imports/exports. Has no
  3775. // functional impact.
  3776. AuthType *string `locationName:"authType" type:"string"`
  3777. // Specifies the credentials required for the authorizer, if any.
  3778. AuthorizerCredentials *string `locationName:"authorizerCredentials" type:"string"`
  3779. // The TTL of cached authorizer results.
  3780. AuthorizerResultTtlInSeconds *int64 `locationName:"authorizerResultTtlInSeconds" type:"integer"`
  3781. // [Required] Specifies the authorizer's Uniform Resource Identifier (URI).
  3782. AuthorizerUri *string `locationName:"authorizerUri" type:"string"`
  3783. // [Required] The source of the identity in an incoming request.
  3784. IdentitySource *string `locationName:"identitySource" type:"string" required:"true"`
  3785. // A validation expression for the incoming identity.
  3786. IdentityValidationExpression *string `locationName:"identityValidationExpression" type:"string"`
  3787. // [Required] The name of the authorizer.
  3788. Name *string `locationName:"name" type:"string" required:"true"`
  3789. ProviderARNs []*string `locationName:"providerARNs" type:"list"`
  3790. // The RestApi identifier under which the Authorizer will be created.
  3791. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  3792. // [Required] The type of the authorizer.
  3793. Type *string `locationName:"type" type:"string" required:"true" enum:"AuthorizerType"`
  3794. }
  3795. // String returns the string representation
  3796. func (s CreateAuthorizerInput) String() string {
  3797. return awsutil.Prettify(s)
  3798. }
  3799. // GoString returns the string representation
  3800. func (s CreateAuthorizerInput) GoString() string {
  3801. return s.String()
  3802. }
  3803. // Validate inspects the fields of the type to determine if they are valid.
  3804. func (s *CreateAuthorizerInput) Validate() error {
  3805. invalidParams := request.ErrInvalidParams{Context: "CreateAuthorizerInput"}
  3806. if s.IdentitySource == nil {
  3807. invalidParams.Add(request.NewErrParamRequired("IdentitySource"))
  3808. }
  3809. if s.Name == nil {
  3810. invalidParams.Add(request.NewErrParamRequired("Name"))
  3811. }
  3812. if s.RestApiId == nil {
  3813. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  3814. }
  3815. if s.Type == nil {
  3816. invalidParams.Add(request.NewErrParamRequired("Type"))
  3817. }
  3818. if invalidParams.Len() > 0 {
  3819. return invalidParams
  3820. }
  3821. return nil
  3822. }
  3823. // Requests Amazon API Gateway to create a new BasePathMapping resource.
  3824. type CreateBasePathMappingInput struct {
  3825. _ struct{} `type:"structure"`
  3826. // The base path name that callers of the API must provide as part of the URL
  3827. // after the domain name. This value must be unique for all of the mappings
  3828. // across a single API. Leave this blank if you do not want callers to specify
  3829. // a base path name after the domain name.
  3830. BasePath *string `locationName:"basePath" type:"string"`
  3831. // The domain name of the BasePathMapping resource to create.
  3832. DomainName *string `location:"uri" locationName:"domain_name" type:"string" required:"true"`
  3833. // The name of the API that you want to apply this mapping to.
  3834. RestApiId *string `locationName:"restApiId" type:"string" required:"true"`
  3835. // The name of the API's stage that you want to use for this mapping. Leave
  3836. // this blank if you do not want callers to explicitly specify the stage name
  3837. // after any base path name.
  3838. Stage *string `locationName:"stage" type:"string"`
  3839. }
  3840. // String returns the string representation
  3841. func (s CreateBasePathMappingInput) String() string {
  3842. return awsutil.Prettify(s)
  3843. }
  3844. // GoString returns the string representation
  3845. func (s CreateBasePathMappingInput) GoString() string {
  3846. return s.String()
  3847. }
  3848. // Validate inspects the fields of the type to determine if they are valid.
  3849. func (s *CreateBasePathMappingInput) Validate() error {
  3850. invalidParams := request.ErrInvalidParams{Context: "CreateBasePathMappingInput"}
  3851. if s.DomainName == nil {
  3852. invalidParams.Add(request.NewErrParamRequired("DomainName"))
  3853. }
  3854. if s.RestApiId == nil {
  3855. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  3856. }
  3857. if invalidParams.Len() > 0 {
  3858. return invalidParams
  3859. }
  3860. return nil
  3861. }
  3862. // Requests Amazon API Gateway to create a Deployment resource.
  3863. type CreateDeploymentInput struct {
  3864. _ struct{} `type:"structure"`
  3865. // Enables a cache cluster for the Stage resource specified in the input.
  3866. CacheClusterEnabled *bool `locationName:"cacheClusterEnabled" type:"boolean"`
  3867. // Specifies the cache cluster size for the Stage resource specified in the
  3868. // input, if a cache cluster is enabled.
  3869. CacheClusterSize *string `locationName:"cacheClusterSize" type:"string" enum:"CacheClusterSize"`
  3870. // The description for the Deployment resource to create.
  3871. Description *string `locationName:"description" type:"string"`
  3872. // The RestApi resource identifier for the Deployment resource to create.
  3873. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  3874. // The description of the Stage resource for the Deployment resource to create.
  3875. StageDescription *string `locationName:"stageDescription" type:"string"`
  3876. // The name of the Stage resource for the Deployment resource to create.
  3877. StageName *string `locationName:"stageName" type:"string" required:"true"`
  3878. // A map that defines the stage variables for the Stage resource that is associated
  3879. // with the new deployment. Variable names can have alphanumeric characters,
  3880. // and the values must match [A-Za-z0-9-._~:/?#&=,]+.
  3881. Variables map[string]*string `locationName:"variables" type:"map"`
  3882. }
  3883. // String returns the string representation
  3884. func (s CreateDeploymentInput) String() string {
  3885. return awsutil.Prettify(s)
  3886. }
  3887. // GoString returns the string representation
  3888. func (s CreateDeploymentInput) GoString() string {
  3889. return s.String()
  3890. }
  3891. // Validate inspects the fields of the type to determine if they are valid.
  3892. func (s *CreateDeploymentInput) Validate() error {
  3893. invalidParams := request.ErrInvalidParams{Context: "CreateDeploymentInput"}
  3894. if s.RestApiId == nil {
  3895. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  3896. }
  3897. if s.StageName == nil {
  3898. invalidParams.Add(request.NewErrParamRequired("StageName"))
  3899. }
  3900. if invalidParams.Len() > 0 {
  3901. return invalidParams
  3902. }
  3903. return nil
  3904. }
  3905. // A request to create a new domain name.
  3906. type CreateDomainNameInput struct {
  3907. _ struct{} `type:"structure"`
  3908. // The body of the server certificate provided by your certificate authority.
  3909. CertificateBody *string `locationName:"certificateBody" type:"string" required:"true"`
  3910. // The intermediate certificates and optionally the root certificate, one after
  3911. // the other without any blank lines. If you include the root certificate, your
  3912. // certificate chain must start with intermediate certificates and end with
  3913. // the root certificate. Use the intermediate certificates that were provided
  3914. // by your certificate authority. Do not include any intermediaries that are
  3915. // not in the chain of trust path.
  3916. CertificateChain *string `locationName:"certificateChain" type:"string" required:"true"`
  3917. // The name of the certificate.
  3918. CertificateName *string `locationName:"certificateName" type:"string" required:"true"`
  3919. // Your certificate's private key.
  3920. CertificatePrivateKey *string `locationName:"certificatePrivateKey" type:"string" required:"true"`
  3921. // The name of the DomainName resource.
  3922. DomainName *string `locationName:"domainName" type:"string" required:"true"`
  3923. }
  3924. // String returns the string representation
  3925. func (s CreateDomainNameInput) String() string {
  3926. return awsutil.Prettify(s)
  3927. }
  3928. // GoString returns the string representation
  3929. func (s CreateDomainNameInput) GoString() string {
  3930. return s.String()
  3931. }
  3932. // Validate inspects the fields of the type to determine if they are valid.
  3933. func (s *CreateDomainNameInput) Validate() error {
  3934. invalidParams := request.ErrInvalidParams{Context: "CreateDomainNameInput"}
  3935. if s.CertificateBody == nil {
  3936. invalidParams.Add(request.NewErrParamRequired("CertificateBody"))
  3937. }
  3938. if s.CertificateChain == nil {
  3939. invalidParams.Add(request.NewErrParamRequired("CertificateChain"))
  3940. }
  3941. if s.CertificateName == nil {
  3942. invalidParams.Add(request.NewErrParamRequired("CertificateName"))
  3943. }
  3944. if s.CertificatePrivateKey == nil {
  3945. invalidParams.Add(request.NewErrParamRequired("CertificatePrivateKey"))
  3946. }
  3947. if s.DomainName == nil {
  3948. invalidParams.Add(request.NewErrParamRequired("DomainName"))
  3949. }
  3950. if invalidParams.Len() > 0 {
  3951. return invalidParams
  3952. }
  3953. return nil
  3954. }
  3955. // Request to add a new Model to an existing RestApi resource.
  3956. type CreateModelInput struct {
  3957. _ struct{} `type:"structure"`
  3958. // The content-type for the model.
  3959. ContentType *string `locationName:"contentType" type:"string" required:"true"`
  3960. // The description of the model.
  3961. Description *string `locationName:"description" type:"string"`
  3962. // The name of the model.
  3963. Name *string `locationName:"name" type:"string" required:"true"`
  3964. // The RestApi identifier under which the Model will be created.
  3965. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  3966. // The schema for the model. For application/json models, this should be JSON-schema
  3967. // draft v4 (http://json-schema.org/documentation.html" target="_blank) model.
  3968. Schema *string `locationName:"schema" type:"string"`
  3969. }
  3970. // String returns the string representation
  3971. func (s CreateModelInput) String() string {
  3972. return awsutil.Prettify(s)
  3973. }
  3974. // GoString returns the string representation
  3975. func (s CreateModelInput) GoString() string {
  3976. return s.String()
  3977. }
  3978. // Validate inspects the fields of the type to determine if they are valid.
  3979. func (s *CreateModelInput) Validate() error {
  3980. invalidParams := request.ErrInvalidParams{Context: "CreateModelInput"}
  3981. if s.ContentType == nil {
  3982. invalidParams.Add(request.NewErrParamRequired("ContentType"))
  3983. }
  3984. if s.Name == nil {
  3985. invalidParams.Add(request.NewErrParamRequired("Name"))
  3986. }
  3987. if s.RestApiId == nil {
  3988. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  3989. }
  3990. if invalidParams.Len() > 0 {
  3991. return invalidParams
  3992. }
  3993. return nil
  3994. }
  3995. // Requests Amazon API Gateway to create a Resource resource.
  3996. type CreateResourceInput struct {
  3997. _ struct{} `type:"structure"`
  3998. // The parent resource's identifier.
  3999. ParentId *string `location:"uri" locationName:"parent_id" type:"string" required:"true"`
  4000. // The last path segment for this resource.
  4001. PathPart *string `locationName:"pathPart" type:"string" required:"true"`
  4002. // The identifier of the RestApi for the resource.
  4003. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  4004. }
  4005. // String returns the string representation
  4006. func (s CreateResourceInput) String() string {
  4007. return awsutil.Prettify(s)
  4008. }
  4009. // GoString returns the string representation
  4010. func (s CreateResourceInput) GoString() string {
  4011. return s.String()
  4012. }
  4013. // Validate inspects the fields of the type to determine if they are valid.
  4014. func (s *CreateResourceInput) Validate() error {
  4015. invalidParams := request.ErrInvalidParams{Context: "CreateResourceInput"}
  4016. if s.ParentId == nil {
  4017. invalidParams.Add(request.NewErrParamRequired("ParentId"))
  4018. }
  4019. if s.PathPart == nil {
  4020. invalidParams.Add(request.NewErrParamRequired("PathPart"))
  4021. }
  4022. if s.RestApiId == nil {
  4023. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  4024. }
  4025. if invalidParams.Len() > 0 {
  4026. return invalidParams
  4027. }
  4028. return nil
  4029. }
  4030. // The POST Request to add a new RestApi resource to your collection.
  4031. type CreateRestApiInput struct {
  4032. _ struct{} `type:"structure"`
  4033. // The Id of the RestApi that you want to clone from.
  4034. CloneFrom *string `locationName:"cloneFrom" type:"string"`
  4035. // The description of the RestApi.
  4036. Description *string `locationName:"description" type:"string"`
  4037. // The name of the RestApi.
  4038. Name *string `locationName:"name" type:"string" required:"true"`
  4039. }
  4040. // String returns the string representation
  4041. func (s CreateRestApiInput) String() string {
  4042. return awsutil.Prettify(s)
  4043. }
  4044. // GoString returns the string representation
  4045. func (s CreateRestApiInput) GoString() string {
  4046. return s.String()
  4047. }
  4048. // Validate inspects the fields of the type to determine if they are valid.
  4049. func (s *CreateRestApiInput) Validate() error {
  4050. invalidParams := request.ErrInvalidParams{Context: "CreateRestApiInput"}
  4051. if s.Name == nil {
  4052. invalidParams.Add(request.NewErrParamRequired("Name"))
  4053. }
  4054. if invalidParams.Len() > 0 {
  4055. return invalidParams
  4056. }
  4057. return nil
  4058. }
  4059. // Requests Amazon API Gateway to create a Stage resource.
  4060. type CreateStageInput struct {
  4061. _ struct{} `type:"structure"`
  4062. // Whether cache clustering is enabled for the stage.
  4063. CacheClusterEnabled *bool `locationName:"cacheClusterEnabled" type:"boolean"`
  4064. // The stage's cache cluster size.
  4065. CacheClusterSize *string `locationName:"cacheClusterSize" type:"string" enum:"CacheClusterSize"`
  4066. // The identifier of the Deployment resource for the Stage resource.
  4067. DeploymentId *string `locationName:"deploymentId" type:"string" required:"true"`
  4068. // The description of the Stage resource.
  4069. Description *string `locationName:"description" type:"string"`
  4070. // The identifier of the RestApi resource for the Stage resource to create.
  4071. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  4072. // The name for the Stage resource.
  4073. StageName *string `locationName:"stageName" type:"string" required:"true"`
  4074. // A map that defines the stage variables for the new Stage resource. Variable
  4075. // names can have alphanumeric characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+.
  4076. Variables map[string]*string `locationName:"variables" type:"map"`
  4077. }
  4078. // String returns the string representation
  4079. func (s CreateStageInput) String() string {
  4080. return awsutil.Prettify(s)
  4081. }
  4082. // GoString returns the string representation
  4083. func (s CreateStageInput) GoString() string {
  4084. return s.String()
  4085. }
  4086. // Validate inspects the fields of the type to determine if they are valid.
  4087. func (s *CreateStageInput) Validate() error {
  4088. invalidParams := request.ErrInvalidParams{Context: "CreateStageInput"}
  4089. if s.DeploymentId == nil {
  4090. invalidParams.Add(request.NewErrParamRequired("DeploymentId"))
  4091. }
  4092. if s.RestApiId == nil {
  4093. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  4094. }
  4095. if s.StageName == nil {
  4096. invalidParams.Add(request.NewErrParamRequired("StageName"))
  4097. }
  4098. if invalidParams.Len() > 0 {
  4099. return invalidParams
  4100. }
  4101. return nil
  4102. }
  4103. // A request to delete the ApiKey resource.
  4104. type DeleteApiKeyInput struct {
  4105. _ struct{} `type:"structure"`
  4106. // The identifier of the ApiKey resource to be deleted.
  4107. ApiKey *string `location:"uri" locationName:"api_Key" type:"string" required:"true"`
  4108. }
  4109. // String returns the string representation
  4110. func (s DeleteApiKeyInput) String() string {
  4111. return awsutil.Prettify(s)
  4112. }
  4113. // GoString returns the string representation
  4114. func (s DeleteApiKeyInput) GoString() string {
  4115. return s.String()
  4116. }
  4117. // Validate inspects the fields of the type to determine if they are valid.
  4118. func (s *DeleteApiKeyInput) Validate() error {
  4119. invalidParams := request.ErrInvalidParams{Context: "DeleteApiKeyInput"}
  4120. if s.ApiKey == nil {
  4121. invalidParams.Add(request.NewErrParamRequired("ApiKey"))
  4122. }
  4123. if invalidParams.Len() > 0 {
  4124. return invalidParams
  4125. }
  4126. return nil
  4127. }
  4128. type DeleteApiKeyOutput struct {
  4129. _ struct{} `type:"structure"`
  4130. }
  4131. // String returns the string representation
  4132. func (s DeleteApiKeyOutput) String() string {
  4133. return awsutil.Prettify(s)
  4134. }
  4135. // GoString returns the string representation
  4136. func (s DeleteApiKeyOutput) GoString() string {
  4137. return s.String()
  4138. }
  4139. // Request to delete an existing Authorizer resource.
  4140. type DeleteAuthorizerInput struct {
  4141. _ struct{} `type:"structure"`
  4142. // The identifier of the Authorizer resource.
  4143. AuthorizerId *string `location:"uri" locationName:"authorizer_id" type:"string" required:"true"`
  4144. // The RestApi identifier for the Authorizer resource.
  4145. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  4146. }
  4147. // String returns the string representation
  4148. func (s DeleteAuthorizerInput) String() string {
  4149. return awsutil.Prettify(s)
  4150. }
  4151. // GoString returns the string representation
  4152. func (s DeleteAuthorizerInput) GoString() string {
  4153. return s.String()
  4154. }
  4155. // Validate inspects the fields of the type to determine if they are valid.
  4156. func (s *DeleteAuthorizerInput) Validate() error {
  4157. invalidParams := request.ErrInvalidParams{Context: "DeleteAuthorizerInput"}
  4158. if s.AuthorizerId == nil {
  4159. invalidParams.Add(request.NewErrParamRequired("AuthorizerId"))
  4160. }
  4161. if s.RestApiId == nil {
  4162. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  4163. }
  4164. if invalidParams.Len() > 0 {
  4165. return invalidParams
  4166. }
  4167. return nil
  4168. }
  4169. type DeleteAuthorizerOutput struct {
  4170. _ struct{} `type:"structure"`
  4171. }
  4172. // String returns the string representation
  4173. func (s DeleteAuthorizerOutput) String() string {
  4174. return awsutil.Prettify(s)
  4175. }
  4176. // GoString returns the string representation
  4177. func (s DeleteAuthorizerOutput) GoString() string {
  4178. return s.String()
  4179. }
  4180. // A request to delete the BasePathMapping resource.
  4181. type DeleteBasePathMappingInput struct {
  4182. _ struct{} `type:"structure"`
  4183. // The base path name of the BasePathMapping resource to delete.
  4184. BasePath *string `location:"uri" locationName:"base_path" type:"string" required:"true"`
  4185. // The domain name of the BasePathMapping resource to delete.
  4186. DomainName *string `location:"uri" locationName:"domain_name" type:"string" required:"true"`
  4187. }
  4188. // String returns the string representation
  4189. func (s DeleteBasePathMappingInput) String() string {
  4190. return awsutil.Prettify(s)
  4191. }
  4192. // GoString returns the string representation
  4193. func (s DeleteBasePathMappingInput) GoString() string {
  4194. return s.String()
  4195. }
  4196. // Validate inspects the fields of the type to determine if they are valid.
  4197. func (s *DeleteBasePathMappingInput) Validate() error {
  4198. invalidParams := request.ErrInvalidParams{Context: "DeleteBasePathMappingInput"}
  4199. if s.BasePath == nil {
  4200. invalidParams.Add(request.NewErrParamRequired("BasePath"))
  4201. }
  4202. if s.DomainName == nil {
  4203. invalidParams.Add(request.NewErrParamRequired("DomainName"))
  4204. }
  4205. if invalidParams.Len() > 0 {
  4206. return invalidParams
  4207. }
  4208. return nil
  4209. }
  4210. type DeleteBasePathMappingOutput struct {
  4211. _ struct{} `type:"structure"`
  4212. }
  4213. // String returns the string representation
  4214. func (s DeleteBasePathMappingOutput) String() string {
  4215. return awsutil.Prettify(s)
  4216. }
  4217. // GoString returns the string representation
  4218. func (s DeleteBasePathMappingOutput) GoString() string {
  4219. return s.String()
  4220. }
  4221. // A request to delete the ClientCertificate resource.
  4222. type DeleteClientCertificateInput struct {
  4223. _ struct{} `type:"structure"`
  4224. // The identifier of the ClientCertificate resource to be deleted.
  4225. ClientCertificateId *string `location:"uri" locationName:"clientcertificate_id" type:"string" required:"true"`
  4226. }
  4227. // String returns the string representation
  4228. func (s DeleteClientCertificateInput) String() string {
  4229. return awsutil.Prettify(s)
  4230. }
  4231. // GoString returns the string representation
  4232. func (s DeleteClientCertificateInput) GoString() string {
  4233. return s.String()
  4234. }
  4235. // Validate inspects the fields of the type to determine if they are valid.
  4236. func (s *DeleteClientCertificateInput) Validate() error {
  4237. invalidParams := request.ErrInvalidParams{Context: "DeleteClientCertificateInput"}
  4238. if s.ClientCertificateId == nil {
  4239. invalidParams.Add(request.NewErrParamRequired("ClientCertificateId"))
  4240. }
  4241. if invalidParams.Len() > 0 {
  4242. return invalidParams
  4243. }
  4244. return nil
  4245. }
  4246. type DeleteClientCertificateOutput struct {
  4247. _ struct{} `type:"structure"`
  4248. }
  4249. // String returns the string representation
  4250. func (s DeleteClientCertificateOutput) String() string {
  4251. return awsutil.Prettify(s)
  4252. }
  4253. // GoString returns the string representation
  4254. func (s DeleteClientCertificateOutput) GoString() string {
  4255. return s.String()
  4256. }
  4257. // Requests Amazon API Gateway to delete a Deployment resource.
  4258. type DeleteDeploymentInput struct {
  4259. _ struct{} `type:"structure"`
  4260. // The identifier of the Deployment resource to delete.
  4261. DeploymentId *string `location:"uri" locationName:"deployment_id" type:"string" required:"true"`
  4262. // The identifier of the RestApi resource for the Deployment resource to delete.
  4263. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  4264. }
  4265. // String returns the string representation
  4266. func (s DeleteDeploymentInput) String() string {
  4267. return awsutil.Prettify(s)
  4268. }
  4269. // GoString returns the string representation
  4270. func (s DeleteDeploymentInput) GoString() string {
  4271. return s.String()
  4272. }
  4273. // Validate inspects the fields of the type to determine if they are valid.
  4274. func (s *DeleteDeploymentInput) Validate() error {
  4275. invalidParams := request.ErrInvalidParams{Context: "DeleteDeploymentInput"}
  4276. if s.DeploymentId == nil {
  4277. invalidParams.Add(request.NewErrParamRequired("DeploymentId"))
  4278. }
  4279. if s.RestApiId == nil {
  4280. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  4281. }
  4282. if invalidParams.Len() > 0 {
  4283. return invalidParams
  4284. }
  4285. return nil
  4286. }
  4287. type DeleteDeploymentOutput struct {
  4288. _ struct{} `type:"structure"`
  4289. }
  4290. // String returns the string representation
  4291. func (s DeleteDeploymentOutput) String() string {
  4292. return awsutil.Prettify(s)
  4293. }
  4294. // GoString returns the string representation
  4295. func (s DeleteDeploymentOutput) GoString() string {
  4296. return s.String()
  4297. }
  4298. // A request to delete the DomainName resource.
  4299. type DeleteDomainNameInput struct {
  4300. _ struct{} `type:"structure"`
  4301. // The name of the DomainName resource to be deleted.
  4302. DomainName *string `location:"uri" locationName:"domain_name" type:"string" required:"true"`
  4303. }
  4304. // String returns the string representation
  4305. func (s DeleteDomainNameInput) String() string {
  4306. return awsutil.Prettify(s)
  4307. }
  4308. // GoString returns the string representation
  4309. func (s DeleteDomainNameInput) GoString() string {
  4310. return s.String()
  4311. }
  4312. // Validate inspects the fields of the type to determine if they are valid.
  4313. func (s *DeleteDomainNameInput) Validate() error {
  4314. invalidParams := request.ErrInvalidParams{Context: "DeleteDomainNameInput"}
  4315. if s.DomainName == nil {
  4316. invalidParams.Add(request.NewErrParamRequired("DomainName"))
  4317. }
  4318. if invalidParams.Len() > 0 {
  4319. return invalidParams
  4320. }
  4321. return nil
  4322. }
  4323. type DeleteDomainNameOutput struct {
  4324. _ struct{} `type:"structure"`
  4325. }
  4326. // String returns the string representation
  4327. func (s DeleteDomainNameOutput) String() string {
  4328. return awsutil.Prettify(s)
  4329. }
  4330. // GoString returns the string representation
  4331. func (s DeleteDomainNameOutput) GoString() string {
  4332. return s.String()
  4333. }
  4334. // Represents a delete integration request.
  4335. type DeleteIntegrationInput struct {
  4336. _ struct{} `type:"structure"`
  4337. // Specifies a delete integration request's HTTP method.
  4338. HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"`
  4339. // Specifies a delete integration request's resource identifier.
  4340. ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"`
  4341. // Specifies a delete integration request's API identifier.
  4342. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  4343. }
  4344. // String returns the string representation
  4345. func (s DeleteIntegrationInput) String() string {
  4346. return awsutil.Prettify(s)
  4347. }
  4348. // GoString returns the string representation
  4349. func (s DeleteIntegrationInput) GoString() string {
  4350. return s.String()
  4351. }
  4352. // Validate inspects the fields of the type to determine if they are valid.
  4353. func (s *DeleteIntegrationInput) Validate() error {
  4354. invalidParams := request.ErrInvalidParams{Context: "DeleteIntegrationInput"}
  4355. if s.HttpMethod == nil {
  4356. invalidParams.Add(request.NewErrParamRequired("HttpMethod"))
  4357. }
  4358. if s.ResourceId == nil {
  4359. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  4360. }
  4361. if s.RestApiId == nil {
  4362. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  4363. }
  4364. if invalidParams.Len() > 0 {
  4365. return invalidParams
  4366. }
  4367. return nil
  4368. }
  4369. type DeleteIntegrationOutput struct {
  4370. _ struct{} `type:"structure"`
  4371. }
  4372. // String returns the string representation
  4373. func (s DeleteIntegrationOutput) String() string {
  4374. return awsutil.Prettify(s)
  4375. }
  4376. // GoString returns the string representation
  4377. func (s DeleteIntegrationOutput) GoString() string {
  4378. return s.String()
  4379. }
  4380. // Represents a delete integration response request.
  4381. type DeleteIntegrationResponseInput struct {
  4382. _ struct{} `type:"structure"`
  4383. // Specifies a delete integration response request's HTTP method.
  4384. HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"`
  4385. // Specifies a delete integration response request's resource identifier.
  4386. ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"`
  4387. // Specifies a delete integration response request's API identifier.
  4388. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  4389. // Specifies a delete integration response request's status code.
  4390. StatusCode *string `location:"uri" locationName:"status_code" type:"string" required:"true"`
  4391. }
  4392. // String returns the string representation
  4393. func (s DeleteIntegrationResponseInput) String() string {
  4394. return awsutil.Prettify(s)
  4395. }
  4396. // GoString returns the string representation
  4397. func (s DeleteIntegrationResponseInput) GoString() string {
  4398. return s.String()
  4399. }
  4400. // Validate inspects the fields of the type to determine if they are valid.
  4401. func (s *DeleteIntegrationResponseInput) Validate() error {
  4402. invalidParams := request.ErrInvalidParams{Context: "DeleteIntegrationResponseInput"}
  4403. if s.HttpMethod == nil {
  4404. invalidParams.Add(request.NewErrParamRequired("HttpMethod"))
  4405. }
  4406. if s.ResourceId == nil {
  4407. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  4408. }
  4409. if s.RestApiId == nil {
  4410. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  4411. }
  4412. if s.StatusCode == nil {
  4413. invalidParams.Add(request.NewErrParamRequired("StatusCode"))
  4414. }
  4415. if invalidParams.Len() > 0 {
  4416. return invalidParams
  4417. }
  4418. return nil
  4419. }
  4420. type DeleteIntegrationResponseOutput struct {
  4421. _ struct{} `type:"structure"`
  4422. }
  4423. // String returns the string representation
  4424. func (s DeleteIntegrationResponseOutput) String() string {
  4425. return awsutil.Prettify(s)
  4426. }
  4427. // GoString returns the string representation
  4428. func (s DeleteIntegrationResponseOutput) GoString() string {
  4429. return s.String()
  4430. }
  4431. // Request to delete an existing Method resource.
  4432. type DeleteMethodInput struct {
  4433. _ struct{} `type:"structure"`
  4434. // The HTTP verb that identifies the Method resource.
  4435. HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"`
  4436. // The Resource identifier for the Method resource.
  4437. ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"`
  4438. // The RestApi identifier for the Method resource.
  4439. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  4440. }
  4441. // String returns the string representation
  4442. func (s DeleteMethodInput) String() string {
  4443. return awsutil.Prettify(s)
  4444. }
  4445. // GoString returns the string representation
  4446. func (s DeleteMethodInput) GoString() string {
  4447. return s.String()
  4448. }
  4449. // Validate inspects the fields of the type to determine if they are valid.
  4450. func (s *DeleteMethodInput) Validate() error {
  4451. invalidParams := request.ErrInvalidParams{Context: "DeleteMethodInput"}
  4452. if s.HttpMethod == nil {
  4453. invalidParams.Add(request.NewErrParamRequired("HttpMethod"))
  4454. }
  4455. if s.ResourceId == nil {
  4456. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  4457. }
  4458. if s.RestApiId == nil {
  4459. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  4460. }
  4461. if invalidParams.Len() > 0 {
  4462. return invalidParams
  4463. }
  4464. return nil
  4465. }
  4466. type DeleteMethodOutput struct {
  4467. _ struct{} `type:"structure"`
  4468. }
  4469. // String returns the string representation
  4470. func (s DeleteMethodOutput) String() string {
  4471. return awsutil.Prettify(s)
  4472. }
  4473. // GoString returns the string representation
  4474. func (s DeleteMethodOutput) GoString() string {
  4475. return s.String()
  4476. }
  4477. // A request to delete an existing MethodResponse resource.
  4478. type DeleteMethodResponseInput struct {
  4479. _ struct{} `type:"structure"`
  4480. // The HTTP verb identifier for the parent Method resource.
  4481. HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"`
  4482. // The Resource identifier for the MethodResponse resource.
  4483. ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"`
  4484. // The RestApi identifier for the MethodResponse resource.
  4485. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  4486. // The status code identifier for the MethodResponse resource.
  4487. StatusCode *string `location:"uri" locationName:"status_code" type:"string" required:"true"`
  4488. }
  4489. // String returns the string representation
  4490. func (s DeleteMethodResponseInput) String() string {
  4491. return awsutil.Prettify(s)
  4492. }
  4493. // GoString returns the string representation
  4494. func (s DeleteMethodResponseInput) GoString() string {
  4495. return s.String()
  4496. }
  4497. // Validate inspects the fields of the type to determine if they are valid.
  4498. func (s *DeleteMethodResponseInput) Validate() error {
  4499. invalidParams := request.ErrInvalidParams{Context: "DeleteMethodResponseInput"}
  4500. if s.HttpMethod == nil {
  4501. invalidParams.Add(request.NewErrParamRequired("HttpMethod"))
  4502. }
  4503. if s.ResourceId == nil {
  4504. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  4505. }
  4506. if s.RestApiId == nil {
  4507. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  4508. }
  4509. if s.StatusCode == nil {
  4510. invalidParams.Add(request.NewErrParamRequired("StatusCode"))
  4511. }
  4512. if invalidParams.Len() > 0 {
  4513. return invalidParams
  4514. }
  4515. return nil
  4516. }
  4517. type DeleteMethodResponseOutput struct {
  4518. _ struct{} `type:"structure"`
  4519. }
  4520. // String returns the string representation
  4521. func (s DeleteMethodResponseOutput) String() string {
  4522. return awsutil.Prettify(s)
  4523. }
  4524. // GoString returns the string representation
  4525. func (s DeleteMethodResponseOutput) GoString() string {
  4526. return s.String()
  4527. }
  4528. // Request to delete an existing model in an existing RestApi resource.
  4529. type DeleteModelInput struct {
  4530. _ struct{} `type:"structure"`
  4531. // The name of the model to delete.
  4532. ModelName *string `location:"uri" locationName:"model_name" type:"string" required:"true"`
  4533. // The RestApi under which the model will be deleted.
  4534. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  4535. }
  4536. // String returns the string representation
  4537. func (s DeleteModelInput) String() string {
  4538. return awsutil.Prettify(s)
  4539. }
  4540. // GoString returns the string representation
  4541. func (s DeleteModelInput) GoString() string {
  4542. return s.String()
  4543. }
  4544. // Validate inspects the fields of the type to determine if they are valid.
  4545. func (s *DeleteModelInput) Validate() error {
  4546. invalidParams := request.ErrInvalidParams{Context: "DeleteModelInput"}
  4547. if s.ModelName == nil {
  4548. invalidParams.Add(request.NewErrParamRequired("ModelName"))
  4549. }
  4550. if s.RestApiId == nil {
  4551. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  4552. }
  4553. if invalidParams.Len() > 0 {
  4554. return invalidParams
  4555. }
  4556. return nil
  4557. }
  4558. type DeleteModelOutput struct {
  4559. _ struct{} `type:"structure"`
  4560. }
  4561. // String returns the string representation
  4562. func (s DeleteModelOutput) String() string {
  4563. return awsutil.Prettify(s)
  4564. }
  4565. // GoString returns the string representation
  4566. func (s DeleteModelOutput) GoString() string {
  4567. return s.String()
  4568. }
  4569. // Request to delete a Resource.
  4570. type DeleteResourceInput struct {
  4571. _ struct{} `type:"structure"`
  4572. // The identifier of the Resource resource.
  4573. ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"`
  4574. // The RestApi identifier for the Resource resource.
  4575. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  4576. }
  4577. // String returns the string representation
  4578. func (s DeleteResourceInput) String() string {
  4579. return awsutil.Prettify(s)
  4580. }
  4581. // GoString returns the string representation
  4582. func (s DeleteResourceInput) GoString() string {
  4583. return s.String()
  4584. }
  4585. // Validate inspects the fields of the type to determine if they are valid.
  4586. func (s *DeleteResourceInput) Validate() error {
  4587. invalidParams := request.ErrInvalidParams{Context: "DeleteResourceInput"}
  4588. if s.ResourceId == nil {
  4589. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  4590. }
  4591. if s.RestApiId == nil {
  4592. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  4593. }
  4594. if invalidParams.Len() > 0 {
  4595. return invalidParams
  4596. }
  4597. return nil
  4598. }
  4599. type DeleteResourceOutput struct {
  4600. _ struct{} `type:"structure"`
  4601. }
  4602. // String returns the string representation
  4603. func (s DeleteResourceOutput) String() string {
  4604. return awsutil.Prettify(s)
  4605. }
  4606. // GoString returns the string representation
  4607. func (s DeleteResourceOutput) GoString() string {
  4608. return s.String()
  4609. }
  4610. // Request to delete the specified API from your collection.
  4611. type DeleteRestApiInput struct {
  4612. _ struct{} `type:"structure"`
  4613. // The ID of the RestApi you want to delete.
  4614. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  4615. }
  4616. // String returns the string representation
  4617. func (s DeleteRestApiInput) String() string {
  4618. return awsutil.Prettify(s)
  4619. }
  4620. // GoString returns the string representation
  4621. func (s DeleteRestApiInput) GoString() string {
  4622. return s.String()
  4623. }
  4624. // Validate inspects the fields of the type to determine if they are valid.
  4625. func (s *DeleteRestApiInput) Validate() error {
  4626. invalidParams := request.ErrInvalidParams{Context: "DeleteRestApiInput"}
  4627. if s.RestApiId == nil {
  4628. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  4629. }
  4630. if invalidParams.Len() > 0 {
  4631. return invalidParams
  4632. }
  4633. return nil
  4634. }
  4635. type DeleteRestApiOutput struct {
  4636. _ struct{} `type:"structure"`
  4637. }
  4638. // String returns the string representation
  4639. func (s DeleteRestApiOutput) String() string {
  4640. return awsutil.Prettify(s)
  4641. }
  4642. // GoString returns the string representation
  4643. func (s DeleteRestApiOutput) GoString() string {
  4644. return s.String()
  4645. }
  4646. // Requests Amazon API Gateway to delete a Stage resource.
  4647. type DeleteStageInput struct {
  4648. _ struct{} `type:"structure"`
  4649. // The identifier of the RestApi resource for the Stage resource to delete.
  4650. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  4651. // The name of the Stage resource to delete.
  4652. StageName *string `location:"uri" locationName:"stage_name" type:"string" required:"true"`
  4653. }
  4654. // String returns the string representation
  4655. func (s DeleteStageInput) String() string {
  4656. return awsutil.Prettify(s)
  4657. }
  4658. // GoString returns the string representation
  4659. func (s DeleteStageInput) GoString() string {
  4660. return s.String()
  4661. }
  4662. // Validate inspects the fields of the type to determine if they are valid.
  4663. func (s *DeleteStageInput) Validate() error {
  4664. invalidParams := request.ErrInvalidParams{Context: "DeleteStageInput"}
  4665. if s.RestApiId == nil {
  4666. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  4667. }
  4668. if s.StageName == nil {
  4669. invalidParams.Add(request.NewErrParamRequired("StageName"))
  4670. }
  4671. if invalidParams.Len() > 0 {
  4672. return invalidParams
  4673. }
  4674. return nil
  4675. }
  4676. type DeleteStageOutput struct {
  4677. _ struct{} `type:"structure"`
  4678. }
  4679. // String returns the string representation
  4680. func (s DeleteStageOutput) String() string {
  4681. return awsutil.Prettify(s)
  4682. }
  4683. // GoString returns the string representation
  4684. func (s DeleteStageOutput) GoString() string {
  4685. return s.String()
  4686. }
  4687. // An immutable representation of a RestApi resource that can be called by users
  4688. // using Stages. A deployment must be associated with a Stage for it to be callable
  4689. // over the Internet.
  4690. type Deployment struct {
  4691. _ struct{} `type:"structure"`
  4692. // Gets a summary of the RestApi at the date and time that the deployment resource
  4693. // was created.
  4694. ApiSummary map[string]map[string]*MethodSnapshot `locationName:"apiSummary" type:"map"`
  4695. // The date and time that the deployment resource was created.
  4696. CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"`
  4697. // The description for the deployment resource.
  4698. Description *string `locationName:"description" type:"string"`
  4699. // The identifier for the deployment resource.
  4700. Id *string `locationName:"id" type:"string"`
  4701. }
  4702. // String returns the string representation
  4703. func (s Deployment) String() string {
  4704. return awsutil.Prettify(s)
  4705. }
  4706. // GoString returns the string representation
  4707. func (s Deployment) GoString() string {
  4708. return s.String()
  4709. }
  4710. // Represents a domain name that is contained in a simpler, more intuitive URL
  4711. // that can be called.
  4712. type DomainName struct {
  4713. _ struct{} `type:"structure"`
  4714. // The name of the certificate.
  4715. CertificateName *string `locationName:"certificateName" type:"string"`
  4716. // The date when the certificate was uploaded, in ISO 8601 format (http://www.iso.org/iso/home/standards/iso8601.htm"
  4717. // target="_blank).
  4718. CertificateUploadDate *time.Time `locationName:"certificateUploadDate" type:"timestamp" timestampFormat:"unix"`
  4719. // The domain name of the Amazon CloudFront distribution. For more information,
  4720. // see the Amazon CloudFront documentation (http://aws.amazon.com/documentation/cloudfront/"
  4721. // target="_blank).
  4722. DistributionDomainName *string `locationName:"distributionDomainName" type:"string"`
  4723. // The name of the DomainName resource.
  4724. DomainName *string `locationName:"domainName" type:"string"`
  4725. }
  4726. // String returns the string representation
  4727. func (s DomainName) String() string {
  4728. return awsutil.Prettify(s)
  4729. }
  4730. // GoString returns the string representation
  4731. func (s DomainName) GoString() string {
  4732. return s.String()
  4733. }
  4734. // Request to flush authorizer cache entries on a specified stage.
  4735. type FlushStageAuthorizersCacheInput struct {
  4736. _ struct{} `type:"structure"`
  4737. // The API identifier of the stage to flush.
  4738. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  4739. // The name of the stage to flush.
  4740. StageName *string `location:"uri" locationName:"stage_name" type:"string" required:"true"`
  4741. }
  4742. // String returns the string representation
  4743. func (s FlushStageAuthorizersCacheInput) String() string {
  4744. return awsutil.Prettify(s)
  4745. }
  4746. // GoString returns the string representation
  4747. func (s FlushStageAuthorizersCacheInput) GoString() string {
  4748. return s.String()
  4749. }
  4750. // Validate inspects the fields of the type to determine if they are valid.
  4751. func (s *FlushStageAuthorizersCacheInput) Validate() error {
  4752. invalidParams := request.ErrInvalidParams{Context: "FlushStageAuthorizersCacheInput"}
  4753. if s.RestApiId == nil {
  4754. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  4755. }
  4756. if s.StageName == nil {
  4757. invalidParams.Add(request.NewErrParamRequired("StageName"))
  4758. }
  4759. if invalidParams.Len() > 0 {
  4760. return invalidParams
  4761. }
  4762. return nil
  4763. }
  4764. type FlushStageAuthorizersCacheOutput struct {
  4765. _ struct{} `type:"structure"`
  4766. }
  4767. // String returns the string representation
  4768. func (s FlushStageAuthorizersCacheOutput) String() string {
  4769. return awsutil.Prettify(s)
  4770. }
  4771. // GoString returns the string representation
  4772. func (s FlushStageAuthorizersCacheOutput) GoString() string {
  4773. return s.String()
  4774. }
  4775. // Requests Amazon API Gateway to flush a stage's cache.
  4776. type FlushStageCacheInput struct {
  4777. _ struct{} `type:"structure"`
  4778. // The API identifier of the stage to flush its cache.
  4779. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  4780. // The name of the stage to flush its cache.
  4781. StageName *string `location:"uri" locationName:"stage_name" type:"string" required:"true"`
  4782. }
  4783. // String returns the string representation
  4784. func (s FlushStageCacheInput) String() string {
  4785. return awsutil.Prettify(s)
  4786. }
  4787. // GoString returns the string representation
  4788. func (s FlushStageCacheInput) GoString() string {
  4789. return s.String()
  4790. }
  4791. // Validate inspects the fields of the type to determine if they are valid.
  4792. func (s *FlushStageCacheInput) Validate() error {
  4793. invalidParams := request.ErrInvalidParams{Context: "FlushStageCacheInput"}
  4794. if s.RestApiId == nil {
  4795. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  4796. }
  4797. if s.StageName == nil {
  4798. invalidParams.Add(request.NewErrParamRequired("StageName"))
  4799. }
  4800. if invalidParams.Len() > 0 {
  4801. return invalidParams
  4802. }
  4803. return nil
  4804. }
  4805. type FlushStageCacheOutput struct {
  4806. _ struct{} `type:"structure"`
  4807. }
  4808. // String returns the string representation
  4809. func (s FlushStageCacheOutput) String() string {
  4810. return awsutil.Prettify(s)
  4811. }
  4812. // GoString returns the string representation
  4813. func (s FlushStageCacheOutput) GoString() string {
  4814. return s.String()
  4815. }
  4816. // A request to generate a ClientCertificate resource.
  4817. type GenerateClientCertificateInput struct {
  4818. _ struct{} `type:"structure"`
  4819. // The description of the ClientCertificate.
  4820. Description *string `locationName:"description" type:"string"`
  4821. }
  4822. // String returns the string representation
  4823. func (s GenerateClientCertificateInput) String() string {
  4824. return awsutil.Prettify(s)
  4825. }
  4826. // GoString returns the string representation
  4827. func (s GenerateClientCertificateInput) GoString() string {
  4828. return s.String()
  4829. }
  4830. // Requests Amazon API Gateway to get information about the current Account
  4831. // resource.
  4832. type GetAccountInput struct {
  4833. _ struct{} `type:"structure"`
  4834. }
  4835. // String returns the string representation
  4836. func (s GetAccountInput) String() string {
  4837. return awsutil.Prettify(s)
  4838. }
  4839. // GoString returns the string representation
  4840. func (s GetAccountInput) GoString() string {
  4841. return s.String()
  4842. }
  4843. // A request to get information about the current ApiKey resource.
  4844. type GetApiKeyInput struct {
  4845. _ struct{} `type:"structure"`
  4846. // The identifier of the ApiKey resource.
  4847. ApiKey *string `location:"uri" locationName:"api_Key" type:"string" required:"true"`
  4848. }
  4849. // String returns the string representation
  4850. func (s GetApiKeyInput) String() string {
  4851. return awsutil.Prettify(s)
  4852. }
  4853. // GoString returns the string representation
  4854. func (s GetApiKeyInput) GoString() string {
  4855. return s.String()
  4856. }
  4857. // Validate inspects the fields of the type to determine if they are valid.
  4858. func (s *GetApiKeyInput) Validate() error {
  4859. invalidParams := request.ErrInvalidParams{Context: "GetApiKeyInput"}
  4860. if s.ApiKey == nil {
  4861. invalidParams.Add(request.NewErrParamRequired("ApiKey"))
  4862. }
  4863. if invalidParams.Len() > 0 {
  4864. return invalidParams
  4865. }
  4866. return nil
  4867. }
  4868. // A request to get information about the current ApiKeys resource.
  4869. type GetApiKeysInput struct {
  4870. _ struct{} `type:"structure"`
  4871. // The maximum number of ApiKeys to get information about.
  4872. Limit *int64 `location:"querystring" locationName:"limit" type:"integer"`
  4873. // The position of the current ApiKeys resource to get information about.
  4874. Position *string `location:"querystring" locationName:"position" type:"string"`
  4875. }
  4876. // String returns the string representation
  4877. func (s GetApiKeysInput) String() string {
  4878. return awsutil.Prettify(s)
  4879. }
  4880. // GoString returns the string representation
  4881. func (s GetApiKeysInput) GoString() string {
  4882. return s.String()
  4883. }
  4884. // Represents a collection of ApiKey resources.
  4885. type GetApiKeysOutput struct {
  4886. _ struct{} `type:"structure"`
  4887. // The current page of any ApiKey resources in the collection of ApiKey resources.
  4888. Items []*ApiKey `locationName:"item" type:"list"`
  4889. Position *string `locationName:"position" type:"string"`
  4890. }
  4891. // String returns the string representation
  4892. func (s GetApiKeysOutput) String() string {
  4893. return awsutil.Prettify(s)
  4894. }
  4895. // GoString returns the string representation
  4896. func (s GetApiKeysOutput) GoString() string {
  4897. return s.String()
  4898. }
  4899. // Request to describe an existing Authorizer resource.
  4900. type GetAuthorizerInput struct {
  4901. _ struct{} `type:"structure"`
  4902. // The identifier of the Authorizer resource.
  4903. AuthorizerId *string `location:"uri" locationName:"authorizer_id" type:"string" required:"true"`
  4904. // The RestApi identifier for the Authorizer resource.
  4905. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  4906. }
  4907. // String returns the string representation
  4908. func (s GetAuthorizerInput) String() string {
  4909. return awsutil.Prettify(s)
  4910. }
  4911. // GoString returns the string representation
  4912. func (s GetAuthorizerInput) GoString() string {
  4913. return s.String()
  4914. }
  4915. // Validate inspects the fields of the type to determine if they are valid.
  4916. func (s *GetAuthorizerInput) Validate() error {
  4917. invalidParams := request.ErrInvalidParams{Context: "GetAuthorizerInput"}
  4918. if s.AuthorizerId == nil {
  4919. invalidParams.Add(request.NewErrParamRequired("AuthorizerId"))
  4920. }
  4921. if s.RestApiId == nil {
  4922. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  4923. }
  4924. if invalidParams.Len() > 0 {
  4925. return invalidParams
  4926. }
  4927. return nil
  4928. }
  4929. // Request to describe an existing Authorizers resource.
  4930. type GetAuthorizersInput struct {
  4931. _ struct{} `type:"structure"`
  4932. // Limit the number of Authorizer resources in the response.
  4933. Limit *int64 `location:"querystring" locationName:"limit" type:"integer"`
  4934. // If not all Authorizer resources in the response were present, the position
  4935. // will specificy where to start the next page of results.
  4936. Position *string `location:"querystring" locationName:"position" type:"string"`
  4937. // The RestApi identifier for the Authorizers resource.
  4938. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  4939. }
  4940. // String returns the string representation
  4941. func (s GetAuthorizersInput) String() string {
  4942. return awsutil.Prettify(s)
  4943. }
  4944. // GoString returns the string representation
  4945. func (s GetAuthorizersInput) GoString() string {
  4946. return s.String()
  4947. }
  4948. // Validate inspects the fields of the type to determine if they are valid.
  4949. func (s *GetAuthorizersInput) Validate() error {
  4950. invalidParams := request.ErrInvalidParams{Context: "GetAuthorizersInput"}
  4951. if s.RestApiId == nil {
  4952. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  4953. }
  4954. if invalidParams.Len() > 0 {
  4955. return invalidParams
  4956. }
  4957. return nil
  4958. }
  4959. // Represents a collection of Authorizer resources.
  4960. type GetAuthorizersOutput struct {
  4961. _ struct{} `type:"structure"`
  4962. // Gets the current list of Authorizer resources in the collection.
  4963. Items []*Authorizer `locationName:"item" type:"list"`
  4964. Position *string `locationName:"position" type:"string"`
  4965. }
  4966. // String returns the string representation
  4967. func (s GetAuthorizersOutput) String() string {
  4968. return awsutil.Prettify(s)
  4969. }
  4970. // GoString returns the string representation
  4971. func (s GetAuthorizersOutput) GoString() string {
  4972. return s.String()
  4973. }
  4974. // Request to describe a BasePathMapping resource.
  4975. type GetBasePathMappingInput struct {
  4976. _ struct{} `type:"structure"`
  4977. // The base path name that callers of the API must provide as part of the URL
  4978. // after the domain name. This value must be unique for all of the mappings
  4979. // across a single API. Leave this blank if you do not want callers to specify
  4980. // any base path name after the domain name.
  4981. BasePath *string `location:"uri" locationName:"base_path" type:"string" required:"true"`
  4982. // The domain name of the BasePathMapping resource to be described.
  4983. DomainName *string `location:"uri" locationName:"domain_name" type:"string" required:"true"`
  4984. }
  4985. // String returns the string representation
  4986. func (s GetBasePathMappingInput) String() string {
  4987. return awsutil.Prettify(s)
  4988. }
  4989. // GoString returns the string representation
  4990. func (s GetBasePathMappingInput) GoString() string {
  4991. return s.String()
  4992. }
  4993. // Validate inspects the fields of the type to determine if they are valid.
  4994. func (s *GetBasePathMappingInput) Validate() error {
  4995. invalidParams := request.ErrInvalidParams{Context: "GetBasePathMappingInput"}
  4996. if s.BasePath == nil {
  4997. invalidParams.Add(request.NewErrParamRequired("BasePath"))
  4998. }
  4999. if s.DomainName == nil {
  5000. invalidParams.Add(request.NewErrParamRequired("DomainName"))
  5001. }
  5002. if invalidParams.Len() > 0 {
  5003. return invalidParams
  5004. }
  5005. return nil
  5006. }
  5007. // A request to get information about a collection of BasePathMapping resources.
  5008. type GetBasePathMappingsInput struct {
  5009. _ struct{} `type:"structure"`
  5010. // The domain name of a BasePathMapping resource.
  5011. DomainName *string `location:"uri" locationName:"domain_name" type:"string" required:"true"`
  5012. // The maximum number of BasePathMapping resources in the collection to get
  5013. // information about. The default limit is 25. It should be an integer between
  5014. // 1 - 500.
  5015. Limit *int64 `location:"querystring" locationName:"limit" type:"integer"`
  5016. // The position of the current BasePathMapping resource in the collection to
  5017. // get information about.
  5018. Position *string `location:"querystring" locationName:"position" type:"string"`
  5019. }
  5020. // String returns the string representation
  5021. func (s GetBasePathMappingsInput) String() string {
  5022. return awsutil.Prettify(s)
  5023. }
  5024. // GoString returns the string representation
  5025. func (s GetBasePathMappingsInput) GoString() string {
  5026. return s.String()
  5027. }
  5028. // Validate inspects the fields of the type to determine if they are valid.
  5029. func (s *GetBasePathMappingsInput) Validate() error {
  5030. invalidParams := request.ErrInvalidParams{Context: "GetBasePathMappingsInput"}
  5031. if s.DomainName == nil {
  5032. invalidParams.Add(request.NewErrParamRequired("DomainName"))
  5033. }
  5034. if invalidParams.Len() > 0 {
  5035. return invalidParams
  5036. }
  5037. return nil
  5038. }
  5039. // Represents a collection of BasePathMapping resources.
  5040. type GetBasePathMappingsOutput struct {
  5041. _ struct{} `type:"structure"`
  5042. // The current page of any BasePathMapping resources in the collection of base
  5043. // path mapping resources.
  5044. Items []*BasePathMapping `locationName:"item" type:"list"`
  5045. Position *string `locationName:"position" type:"string"`
  5046. }
  5047. // String returns the string representation
  5048. func (s GetBasePathMappingsOutput) String() string {
  5049. return awsutil.Prettify(s)
  5050. }
  5051. // GoString returns the string representation
  5052. func (s GetBasePathMappingsOutput) GoString() string {
  5053. return s.String()
  5054. }
  5055. // A request to get information about the current ClientCertificate resource.
  5056. type GetClientCertificateInput struct {
  5057. _ struct{} `type:"structure"`
  5058. // The identifier of the ClientCertificate resource to be described.
  5059. ClientCertificateId *string `location:"uri" locationName:"clientcertificate_id" type:"string" required:"true"`
  5060. }
  5061. // String returns the string representation
  5062. func (s GetClientCertificateInput) String() string {
  5063. return awsutil.Prettify(s)
  5064. }
  5065. // GoString returns the string representation
  5066. func (s GetClientCertificateInput) GoString() string {
  5067. return s.String()
  5068. }
  5069. // Validate inspects the fields of the type to determine if they are valid.
  5070. func (s *GetClientCertificateInput) Validate() error {
  5071. invalidParams := request.ErrInvalidParams{Context: "GetClientCertificateInput"}
  5072. if s.ClientCertificateId == nil {
  5073. invalidParams.Add(request.NewErrParamRequired("ClientCertificateId"))
  5074. }
  5075. if invalidParams.Len() > 0 {
  5076. return invalidParams
  5077. }
  5078. return nil
  5079. }
  5080. // A request to get information about a collection of ClientCertificate resources.
  5081. type GetClientCertificatesInput struct {
  5082. _ struct{} `type:"structure"`
  5083. // The maximum number of ClientCertificate resources in the collection to get
  5084. // information about. The default limit is 25. It should be an integer between
  5085. // 1 - 500.
  5086. Limit *int64 `location:"querystring" locationName:"limit" type:"integer"`
  5087. // The position of the current ClientCertificate resource in the collection
  5088. // to get information about.
  5089. Position *string `location:"querystring" locationName:"position" type:"string"`
  5090. }
  5091. // String returns the string representation
  5092. func (s GetClientCertificatesInput) String() string {
  5093. return awsutil.Prettify(s)
  5094. }
  5095. // GoString returns the string representation
  5096. func (s GetClientCertificatesInput) GoString() string {
  5097. return s.String()
  5098. }
  5099. // Represents a collection of ClientCertificate resources.
  5100. type GetClientCertificatesOutput struct {
  5101. _ struct{} `type:"structure"`
  5102. // The current page of any ClientCertificate resources in the collection of
  5103. // ClientCertificate resources.
  5104. Items []*ClientCertificate `locationName:"item" type:"list"`
  5105. Position *string `locationName:"position" type:"string"`
  5106. }
  5107. // String returns the string representation
  5108. func (s GetClientCertificatesOutput) String() string {
  5109. return awsutil.Prettify(s)
  5110. }
  5111. // GoString returns the string representation
  5112. func (s GetClientCertificatesOutput) GoString() string {
  5113. return s.String()
  5114. }
  5115. // Requests Amazon API Gateway to get information about a Deployment resource.
  5116. type GetDeploymentInput struct {
  5117. _ struct{} `type:"structure"`
  5118. // The identifier of the Deployment resource to get information about.
  5119. DeploymentId *string `location:"uri" locationName:"deployment_id" type:"string" required:"true"`
  5120. // The identifier of the RestApi resource for the Deployment resource to get
  5121. // information about.
  5122. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  5123. }
  5124. // String returns the string representation
  5125. func (s GetDeploymentInput) String() string {
  5126. return awsutil.Prettify(s)
  5127. }
  5128. // GoString returns the string representation
  5129. func (s GetDeploymentInput) GoString() string {
  5130. return s.String()
  5131. }
  5132. // Validate inspects the fields of the type to determine if they are valid.
  5133. func (s *GetDeploymentInput) Validate() error {
  5134. invalidParams := request.ErrInvalidParams{Context: "GetDeploymentInput"}
  5135. if s.DeploymentId == nil {
  5136. invalidParams.Add(request.NewErrParamRequired("DeploymentId"))
  5137. }
  5138. if s.RestApiId == nil {
  5139. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  5140. }
  5141. if invalidParams.Len() > 0 {
  5142. return invalidParams
  5143. }
  5144. return nil
  5145. }
  5146. // Requests Amazon API Gateway to get information about a Deployments collection.
  5147. type GetDeploymentsInput struct {
  5148. _ struct{} `type:"structure"`
  5149. // The maximum number of Deployment resources in the collection to get information
  5150. // about. The default limit is 25. It should be an integer between 1 - 500.
  5151. Limit *int64 `location:"querystring" locationName:"limit" type:"integer"`
  5152. // The position of the current Deployment resource in the collection to get
  5153. // information about.
  5154. Position *string `location:"querystring" locationName:"position" type:"string"`
  5155. // The identifier of the RestApi resource for the collection of Deployment resources
  5156. // to get information about.
  5157. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  5158. }
  5159. // String returns the string representation
  5160. func (s GetDeploymentsInput) String() string {
  5161. return awsutil.Prettify(s)
  5162. }
  5163. // GoString returns the string representation
  5164. func (s GetDeploymentsInput) GoString() string {
  5165. return s.String()
  5166. }
  5167. // Validate inspects the fields of the type to determine if they are valid.
  5168. func (s *GetDeploymentsInput) Validate() error {
  5169. invalidParams := request.ErrInvalidParams{Context: "GetDeploymentsInput"}
  5170. if s.RestApiId == nil {
  5171. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  5172. }
  5173. if invalidParams.Len() > 0 {
  5174. return invalidParams
  5175. }
  5176. return nil
  5177. }
  5178. // Represents a collection resource that contains zero or more references to
  5179. // your existing deployments, and links that guide you on ways to interact with
  5180. // your collection. The collection offers a paginated view of the contained
  5181. // deployments.
  5182. type GetDeploymentsOutput struct {
  5183. _ struct{} `type:"structure"`
  5184. // The current page of any Deployment resources in the collection of deployment
  5185. // resources.
  5186. Items []*Deployment `locationName:"item" type:"list"`
  5187. Position *string `locationName:"position" type:"string"`
  5188. }
  5189. // String returns the string representation
  5190. func (s GetDeploymentsOutput) String() string {
  5191. return awsutil.Prettify(s)
  5192. }
  5193. // GoString returns the string representation
  5194. func (s GetDeploymentsOutput) GoString() string {
  5195. return s.String()
  5196. }
  5197. // Request to get the name of a DomainName resource.
  5198. type GetDomainNameInput struct {
  5199. _ struct{} `type:"structure"`
  5200. // The name of the DomainName resource.
  5201. DomainName *string `location:"uri" locationName:"domain_name" type:"string" required:"true"`
  5202. }
  5203. // String returns the string representation
  5204. func (s GetDomainNameInput) String() string {
  5205. return awsutil.Prettify(s)
  5206. }
  5207. // GoString returns the string representation
  5208. func (s GetDomainNameInput) GoString() string {
  5209. return s.String()
  5210. }
  5211. // Validate inspects the fields of the type to determine if they are valid.
  5212. func (s *GetDomainNameInput) Validate() error {
  5213. invalidParams := request.ErrInvalidParams{Context: "GetDomainNameInput"}
  5214. if s.DomainName == nil {
  5215. invalidParams.Add(request.NewErrParamRequired("DomainName"))
  5216. }
  5217. if invalidParams.Len() > 0 {
  5218. return invalidParams
  5219. }
  5220. return nil
  5221. }
  5222. // Request to describe a collection of DomainName resources.
  5223. type GetDomainNamesInput struct {
  5224. _ struct{} `type:"structure"`
  5225. // The maximum number of DomainName resources in the collection to get information
  5226. // about. The default limit is 25. It should be an integer between 1 - 500.
  5227. Limit *int64 `location:"querystring" locationName:"limit" type:"integer"`
  5228. // The position of the current domain names to get information about.
  5229. Position *string `location:"querystring" locationName:"position" type:"string"`
  5230. }
  5231. // String returns the string representation
  5232. func (s GetDomainNamesInput) String() string {
  5233. return awsutil.Prettify(s)
  5234. }
  5235. // GoString returns the string representation
  5236. func (s GetDomainNamesInput) GoString() string {
  5237. return s.String()
  5238. }
  5239. // Represents a collection of DomainName resources.
  5240. type GetDomainNamesOutput struct {
  5241. _ struct{} `type:"structure"`
  5242. // The current page of any DomainName resources in the collection of DomainName
  5243. // resources.
  5244. Items []*DomainName `locationName:"item" type:"list"`
  5245. Position *string `locationName:"position" type:"string"`
  5246. }
  5247. // String returns the string representation
  5248. func (s GetDomainNamesOutput) String() string {
  5249. return awsutil.Prettify(s)
  5250. }
  5251. // GoString returns the string representation
  5252. func (s GetDomainNamesOutput) GoString() string {
  5253. return s.String()
  5254. }
  5255. // Request a new export of a RestApi for a particular Stage.
  5256. type GetExportInput struct {
  5257. _ struct{} `type:"structure"`
  5258. // The content-type of the export, for example 'application/json'. Currently
  5259. // 'application/json' and 'application/yaml' are supported for exportType 'swagger'.
  5260. // Should be specifed in the 'Accept' header for direct API requests.
  5261. Accepts *string `location:"header" locationName:"Accept" type:"string"`
  5262. // The type of export. Currently only 'swagger' is supported.
  5263. ExportType *string `location:"uri" locationName:"export_type" type:"string" required:"true"`
  5264. // A key-value map of query string parameters that specify properties of the
  5265. // export, depending on the requested exportType. For exportType 'swagger',
  5266. // any combination of the following parameters are supported: 'integrations'
  5267. // will export x-amazon-apigateway-integration extensions 'authorizers' will
  5268. // export x-amazon-apigateway-authorizer extensions 'postman' will export with
  5269. // Postman extensions, allowing for import to the Postman tool
  5270. Parameters map[string]*string `location:"querystring" locationName:"parameters" type:"map"`
  5271. // The identifier of the RestApi to be exported.
  5272. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  5273. // The name of the Stage that will be exported.
  5274. StageName *string `location:"uri" locationName:"stage_name" type:"string" required:"true"`
  5275. }
  5276. // String returns the string representation
  5277. func (s GetExportInput) String() string {
  5278. return awsutil.Prettify(s)
  5279. }
  5280. // GoString returns the string representation
  5281. func (s GetExportInput) GoString() string {
  5282. return s.String()
  5283. }
  5284. // Validate inspects the fields of the type to determine if they are valid.
  5285. func (s *GetExportInput) Validate() error {
  5286. invalidParams := request.ErrInvalidParams{Context: "GetExportInput"}
  5287. if s.ExportType == nil {
  5288. invalidParams.Add(request.NewErrParamRequired("ExportType"))
  5289. }
  5290. if s.RestApiId == nil {
  5291. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  5292. }
  5293. if s.StageName == nil {
  5294. invalidParams.Add(request.NewErrParamRequired("StageName"))
  5295. }
  5296. if invalidParams.Len() > 0 {
  5297. return invalidParams
  5298. }
  5299. return nil
  5300. }
  5301. // The binary blob response to GetExport, which contains the generated SDK.
  5302. type GetExportOutput struct {
  5303. _ struct{} `type:"structure" payload:"Body"`
  5304. // The binary blob response to GetExport, which contains the export.
  5305. Body []byte `locationName:"body" type:"blob"`
  5306. // The content-disposition header value in the HTTP reseponse.
  5307. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  5308. // The content-type header value in the HTTP response. This will correspond
  5309. // to a valid 'accept' type in the request.
  5310. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  5311. }
  5312. // String returns the string representation
  5313. func (s GetExportOutput) String() string {
  5314. return awsutil.Prettify(s)
  5315. }
  5316. // GoString returns the string representation
  5317. func (s GetExportOutput) GoString() string {
  5318. return s.String()
  5319. }
  5320. // Represents a get integration request.
  5321. type GetIntegrationInput struct {
  5322. _ struct{} `type:"structure"`
  5323. // Specifies a get integration request's HTTP method.
  5324. HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"`
  5325. // Specifies a get integration request's resource identifier
  5326. ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"`
  5327. // Specifies a get integration request's API identifier.
  5328. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  5329. }
  5330. // String returns the string representation
  5331. func (s GetIntegrationInput) String() string {
  5332. return awsutil.Prettify(s)
  5333. }
  5334. // GoString returns the string representation
  5335. func (s GetIntegrationInput) GoString() string {
  5336. return s.String()
  5337. }
  5338. // Validate inspects the fields of the type to determine if they are valid.
  5339. func (s *GetIntegrationInput) Validate() error {
  5340. invalidParams := request.ErrInvalidParams{Context: "GetIntegrationInput"}
  5341. if s.HttpMethod == nil {
  5342. invalidParams.Add(request.NewErrParamRequired("HttpMethod"))
  5343. }
  5344. if s.ResourceId == nil {
  5345. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  5346. }
  5347. if s.RestApiId == nil {
  5348. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  5349. }
  5350. if invalidParams.Len() > 0 {
  5351. return invalidParams
  5352. }
  5353. return nil
  5354. }
  5355. // Represents a get integration response request.
  5356. type GetIntegrationResponseInput struct {
  5357. _ struct{} `type:"structure"`
  5358. // Specifies a get integration response request's HTTP method.
  5359. HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"`
  5360. // Specifies a get integration response request's resource identifier.
  5361. ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"`
  5362. // Specifies a get integration response request's API identifier.
  5363. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  5364. // Specifies a get integration response request's status code.
  5365. StatusCode *string `location:"uri" locationName:"status_code" type:"string" required:"true"`
  5366. }
  5367. // String returns the string representation
  5368. func (s GetIntegrationResponseInput) String() string {
  5369. return awsutil.Prettify(s)
  5370. }
  5371. // GoString returns the string representation
  5372. func (s GetIntegrationResponseInput) GoString() string {
  5373. return s.String()
  5374. }
  5375. // Validate inspects the fields of the type to determine if they are valid.
  5376. func (s *GetIntegrationResponseInput) Validate() error {
  5377. invalidParams := request.ErrInvalidParams{Context: "GetIntegrationResponseInput"}
  5378. if s.HttpMethod == nil {
  5379. invalidParams.Add(request.NewErrParamRequired("HttpMethod"))
  5380. }
  5381. if s.ResourceId == nil {
  5382. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  5383. }
  5384. if s.RestApiId == nil {
  5385. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  5386. }
  5387. if s.StatusCode == nil {
  5388. invalidParams.Add(request.NewErrParamRequired("StatusCode"))
  5389. }
  5390. if invalidParams.Len() > 0 {
  5391. return invalidParams
  5392. }
  5393. return nil
  5394. }
  5395. // Request to describe an existing Method resource.
  5396. type GetMethodInput struct {
  5397. _ struct{} `type:"structure"`
  5398. // Specifies the put method request's HTTP method type.
  5399. HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"`
  5400. // The Resource identifier for the Method resource.
  5401. ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"`
  5402. // The RestApi identifier for the Method resource.
  5403. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  5404. }
  5405. // String returns the string representation
  5406. func (s GetMethodInput) String() string {
  5407. return awsutil.Prettify(s)
  5408. }
  5409. // GoString returns the string representation
  5410. func (s GetMethodInput) GoString() string {
  5411. return s.String()
  5412. }
  5413. // Validate inspects the fields of the type to determine if they are valid.
  5414. func (s *GetMethodInput) Validate() error {
  5415. invalidParams := request.ErrInvalidParams{Context: "GetMethodInput"}
  5416. if s.HttpMethod == nil {
  5417. invalidParams.Add(request.NewErrParamRequired("HttpMethod"))
  5418. }
  5419. if s.ResourceId == nil {
  5420. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  5421. }
  5422. if s.RestApiId == nil {
  5423. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  5424. }
  5425. if invalidParams.Len() > 0 {
  5426. return invalidParams
  5427. }
  5428. return nil
  5429. }
  5430. // Request to describe a MethodResponse resource.
  5431. type GetMethodResponseInput struct {
  5432. _ struct{} `type:"structure"`
  5433. // The HTTP verb identifier for the parent Method resource.
  5434. HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"`
  5435. // The Resource identifier for the MethodResponse resource.
  5436. ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"`
  5437. // The RestApi identifier for the MethodResponse resource.
  5438. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  5439. // The status code identifier for the MethodResponse resource.
  5440. StatusCode *string `location:"uri" locationName:"status_code" type:"string" required:"true"`
  5441. }
  5442. // String returns the string representation
  5443. func (s GetMethodResponseInput) String() string {
  5444. return awsutil.Prettify(s)
  5445. }
  5446. // GoString returns the string representation
  5447. func (s GetMethodResponseInput) GoString() string {
  5448. return s.String()
  5449. }
  5450. // Validate inspects the fields of the type to determine if they are valid.
  5451. func (s *GetMethodResponseInput) Validate() error {
  5452. invalidParams := request.ErrInvalidParams{Context: "GetMethodResponseInput"}
  5453. if s.HttpMethod == nil {
  5454. invalidParams.Add(request.NewErrParamRequired("HttpMethod"))
  5455. }
  5456. if s.ResourceId == nil {
  5457. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  5458. }
  5459. if s.RestApiId == nil {
  5460. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  5461. }
  5462. if s.StatusCode == nil {
  5463. invalidParams.Add(request.NewErrParamRequired("StatusCode"))
  5464. }
  5465. if invalidParams.Len() > 0 {
  5466. return invalidParams
  5467. }
  5468. return nil
  5469. }
  5470. // Request to list information about a model in an existing RestApi resource.
  5471. type GetModelInput struct {
  5472. _ struct{} `type:"structure"`
  5473. // Resolves all external model references and returns a flattened model schema.
  5474. Flatten *bool `location:"querystring" locationName:"flatten" type:"boolean"`
  5475. // The name of the model as an identifier.
  5476. ModelName *string `location:"uri" locationName:"model_name" type:"string" required:"true"`
  5477. // The RestApi identifier under which the Model exists.
  5478. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  5479. }
  5480. // String returns the string representation
  5481. func (s GetModelInput) String() string {
  5482. return awsutil.Prettify(s)
  5483. }
  5484. // GoString returns the string representation
  5485. func (s GetModelInput) GoString() string {
  5486. return s.String()
  5487. }
  5488. // Validate inspects the fields of the type to determine if they are valid.
  5489. func (s *GetModelInput) Validate() error {
  5490. invalidParams := request.ErrInvalidParams{Context: "GetModelInput"}
  5491. if s.ModelName == nil {
  5492. invalidParams.Add(request.NewErrParamRequired("ModelName"))
  5493. }
  5494. if s.RestApiId == nil {
  5495. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  5496. }
  5497. if invalidParams.Len() > 0 {
  5498. return invalidParams
  5499. }
  5500. return nil
  5501. }
  5502. // Request to generate a sample mapping template used to transform the payload.
  5503. type GetModelTemplateInput struct {
  5504. _ struct{} `type:"structure"`
  5505. // The name of the model for which to generate a template.
  5506. ModelName *string `location:"uri" locationName:"model_name" type:"string" required:"true"`
  5507. // The ID of the RestApi under which the model exists.
  5508. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  5509. }
  5510. // String returns the string representation
  5511. func (s GetModelTemplateInput) String() string {
  5512. return awsutil.Prettify(s)
  5513. }
  5514. // GoString returns the string representation
  5515. func (s GetModelTemplateInput) GoString() string {
  5516. return s.String()
  5517. }
  5518. // Validate inspects the fields of the type to determine if they are valid.
  5519. func (s *GetModelTemplateInput) Validate() error {
  5520. invalidParams := request.ErrInvalidParams{Context: "GetModelTemplateInput"}
  5521. if s.ModelName == nil {
  5522. invalidParams.Add(request.NewErrParamRequired("ModelName"))
  5523. }
  5524. if s.RestApiId == nil {
  5525. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  5526. }
  5527. if invalidParams.Len() > 0 {
  5528. return invalidParams
  5529. }
  5530. return nil
  5531. }
  5532. // Represents a mapping template used to transform a payload.
  5533. type GetModelTemplateOutput struct {
  5534. _ struct{} `type:"structure"`
  5535. // The Apache Velocity Template Language (VTL) (http://velocity.apache.org/engine/devel/vtl-reference-guide.html"
  5536. // target="_blank) template content used for the template resource.
  5537. Value *string `locationName:"value" type:"string"`
  5538. }
  5539. // String returns the string representation
  5540. func (s GetModelTemplateOutput) String() string {
  5541. return awsutil.Prettify(s)
  5542. }
  5543. // GoString returns the string representation
  5544. func (s GetModelTemplateOutput) GoString() string {
  5545. return s.String()
  5546. }
  5547. // Request to list existing Models defined for a RestApi resource.
  5548. type GetModelsInput struct {
  5549. _ struct{} `type:"structure"`
  5550. // The maximum number of models in the collection to get information about.
  5551. // The default limit is 25. It should be an integer between 1 - 500.
  5552. Limit *int64 `location:"querystring" locationName:"limit" type:"integer"`
  5553. // The position of the next set of results in the Models resource to get information
  5554. // about.
  5555. Position *string `location:"querystring" locationName:"position" type:"string"`
  5556. // The RestApi identifier.
  5557. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  5558. }
  5559. // String returns the string representation
  5560. func (s GetModelsInput) String() string {
  5561. return awsutil.Prettify(s)
  5562. }
  5563. // GoString returns the string representation
  5564. func (s GetModelsInput) GoString() string {
  5565. return s.String()
  5566. }
  5567. // Validate inspects the fields of the type to determine if they are valid.
  5568. func (s *GetModelsInput) Validate() error {
  5569. invalidParams := request.ErrInvalidParams{Context: "GetModelsInput"}
  5570. if s.RestApiId == nil {
  5571. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  5572. }
  5573. if invalidParams.Len() > 0 {
  5574. return invalidParams
  5575. }
  5576. return nil
  5577. }
  5578. // Represents a collection of Model resources.
  5579. type GetModelsOutput struct {
  5580. _ struct{} `type:"structure"`
  5581. // Gets the current Model resource in the collection.
  5582. Items []*Model `locationName:"item" type:"list"`
  5583. Position *string `locationName:"position" type:"string"`
  5584. }
  5585. // String returns the string representation
  5586. func (s GetModelsOutput) String() string {
  5587. return awsutil.Prettify(s)
  5588. }
  5589. // GoString returns the string representation
  5590. func (s GetModelsOutput) GoString() string {
  5591. return s.String()
  5592. }
  5593. // Request to list information about a resource.
  5594. type GetResourceInput struct {
  5595. _ struct{} `type:"structure"`
  5596. // The identifier for the Resource resource.
  5597. ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"`
  5598. // The RestApi identifier for the resource.
  5599. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  5600. }
  5601. // String returns the string representation
  5602. func (s GetResourceInput) String() string {
  5603. return awsutil.Prettify(s)
  5604. }
  5605. // GoString returns the string representation
  5606. func (s GetResourceInput) GoString() string {
  5607. return s.String()
  5608. }
  5609. // Validate inspects the fields of the type to determine if they are valid.
  5610. func (s *GetResourceInput) Validate() error {
  5611. invalidParams := request.ErrInvalidParams{Context: "GetResourceInput"}
  5612. if s.ResourceId == nil {
  5613. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  5614. }
  5615. if s.RestApiId == nil {
  5616. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  5617. }
  5618. if invalidParams.Len() > 0 {
  5619. return invalidParams
  5620. }
  5621. return nil
  5622. }
  5623. // Request to list information about a collection of resources.
  5624. type GetResourcesInput struct {
  5625. _ struct{} `type:"structure"`
  5626. // The maximum number of Resource resources in the collection to get information
  5627. // about. The default limit is 25. It should be an integer between 1 - 500.
  5628. Limit *int64 `location:"querystring" locationName:"limit" type:"integer"`
  5629. // The position of the next set of results in the current Resources resource
  5630. // to get information about.
  5631. Position *string `location:"querystring" locationName:"position" type:"string"`
  5632. // The RestApi identifier for the Resource.
  5633. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  5634. }
  5635. // String returns the string representation
  5636. func (s GetResourcesInput) String() string {
  5637. return awsutil.Prettify(s)
  5638. }
  5639. // GoString returns the string representation
  5640. func (s GetResourcesInput) GoString() string {
  5641. return s.String()
  5642. }
  5643. // Validate inspects the fields of the type to determine if they are valid.
  5644. func (s *GetResourcesInput) Validate() error {
  5645. invalidParams := request.ErrInvalidParams{Context: "GetResourcesInput"}
  5646. if s.RestApiId == nil {
  5647. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  5648. }
  5649. if invalidParams.Len() > 0 {
  5650. return invalidParams
  5651. }
  5652. return nil
  5653. }
  5654. // Represents a collection of Resource resources.
  5655. type GetResourcesOutput struct {
  5656. _ struct{} `type:"structure"`
  5657. // Gets the current Resource resource in the collection.
  5658. Items []*Resource `locationName:"item" type:"list"`
  5659. Position *string `locationName:"position" type:"string"`
  5660. }
  5661. // String returns the string representation
  5662. func (s GetResourcesOutput) String() string {
  5663. return awsutil.Prettify(s)
  5664. }
  5665. // GoString returns the string representation
  5666. func (s GetResourcesOutput) GoString() string {
  5667. return s.String()
  5668. }
  5669. // The GET request to list an existing RestApi defined for your collection.
  5670. type GetRestApiInput struct {
  5671. _ struct{} `type:"structure"`
  5672. // The identifier of the RestApi resource.
  5673. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  5674. }
  5675. // String returns the string representation
  5676. func (s GetRestApiInput) String() string {
  5677. return awsutil.Prettify(s)
  5678. }
  5679. // GoString returns the string representation
  5680. func (s GetRestApiInput) GoString() string {
  5681. return s.String()
  5682. }
  5683. // Validate inspects the fields of the type to determine if they are valid.
  5684. func (s *GetRestApiInput) Validate() error {
  5685. invalidParams := request.ErrInvalidParams{Context: "GetRestApiInput"}
  5686. if s.RestApiId == nil {
  5687. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  5688. }
  5689. if invalidParams.Len() > 0 {
  5690. return invalidParams
  5691. }
  5692. return nil
  5693. }
  5694. // The GET request to list existing RestApis defined for your collection.
  5695. type GetRestApisInput struct {
  5696. _ struct{} `type:"structure"`
  5697. // The maximum number of RestApi resources in the collection to get information
  5698. // about. The default limit is 25. It should be an integer between 1 - 500.
  5699. Limit *int64 `location:"querystring" locationName:"limit" type:"integer"`
  5700. // The position of the current RestApis resource in the collection to get information
  5701. // about.
  5702. Position *string `location:"querystring" locationName:"position" type:"string"`
  5703. }
  5704. // String returns the string representation
  5705. func (s GetRestApisInput) String() string {
  5706. return awsutil.Prettify(s)
  5707. }
  5708. // GoString returns the string representation
  5709. func (s GetRestApisInput) GoString() string {
  5710. return s.String()
  5711. }
  5712. // Contains references to your APIs and links that guide you in ways to interact
  5713. // with your collection. A collection offers a paginated view of your APIs.
  5714. type GetRestApisOutput struct {
  5715. _ struct{} `type:"structure"`
  5716. // An array of links to the current page of RestApi resources.
  5717. Items []*RestApi `locationName:"item" type:"list"`
  5718. Position *string `locationName:"position" type:"string"`
  5719. }
  5720. // String returns the string representation
  5721. func (s GetRestApisOutput) String() string {
  5722. return awsutil.Prettify(s)
  5723. }
  5724. // GoString returns the string representation
  5725. func (s GetRestApisOutput) GoString() string {
  5726. return s.String()
  5727. }
  5728. // Request a new generated client SDK for a RestApi and Stage.
  5729. type GetSdkInput struct {
  5730. _ struct{} `type:"structure"`
  5731. // A key-value map of query string parameters that specify properties of the
  5732. // SDK, depending on the requested sdkType. For sdkType 'objectivec', a parameter
  5733. // named "classPrefix" is required. For sdkType 'android', parameters named
  5734. // "groupId", "artifactId", "artifactVersion", and "invokerPackage" are required.
  5735. Parameters map[string]*string `location:"querystring" locationName:"parameters" type:"map"`
  5736. // The identifier of the RestApi that the SDK will use.
  5737. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  5738. // The language for the generated SDK. Currently javascript, android, and objectivec
  5739. // (for iOS) are supported.
  5740. SdkType *string `location:"uri" locationName:"sdk_type" type:"string" required:"true"`
  5741. // The name of the Stage that the SDK will use.
  5742. StageName *string `location:"uri" locationName:"stage_name" type:"string" required:"true"`
  5743. }
  5744. // String returns the string representation
  5745. func (s GetSdkInput) String() string {
  5746. return awsutil.Prettify(s)
  5747. }
  5748. // GoString returns the string representation
  5749. func (s GetSdkInput) GoString() string {
  5750. return s.String()
  5751. }
  5752. // Validate inspects the fields of the type to determine if they are valid.
  5753. func (s *GetSdkInput) Validate() error {
  5754. invalidParams := request.ErrInvalidParams{Context: "GetSdkInput"}
  5755. if s.RestApiId == nil {
  5756. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  5757. }
  5758. if s.SdkType == nil {
  5759. invalidParams.Add(request.NewErrParamRequired("SdkType"))
  5760. }
  5761. if s.StageName == nil {
  5762. invalidParams.Add(request.NewErrParamRequired("StageName"))
  5763. }
  5764. if invalidParams.Len() > 0 {
  5765. return invalidParams
  5766. }
  5767. return nil
  5768. }
  5769. // The binary blob response to GetSdk, which contains the generated SDK.
  5770. type GetSdkOutput struct {
  5771. _ struct{} `type:"structure" payload:"Body"`
  5772. // The binary blob response to GetSdk, which contains the generated SDK.
  5773. Body []byte `locationName:"body" type:"blob"`
  5774. // The content-disposition header value in the HTTP reseponse.
  5775. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  5776. // The content-type header value in the HTTP response.
  5777. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  5778. }
  5779. // String returns the string representation
  5780. func (s GetSdkOutput) String() string {
  5781. return awsutil.Prettify(s)
  5782. }
  5783. // GoString returns the string representation
  5784. func (s GetSdkOutput) GoString() string {
  5785. return s.String()
  5786. }
  5787. // Requests Amazon API Gateway to get information about a Stage resource.
  5788. type GetStageInput struct {
  5789. _ struct{} `type:"structure"`
  5790. // The identifier of the RestApi resource for the Stage resource to get information
  5791. // about.
  5792. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  5793. // The name of the Stage resource to get information about.
  5794. StageName *string `location:"uri" locationName:"stage_name" type:"string" required:"true"`
  5795. }
  5796. // String returns the string representation
  5797. func (s GetStageInput) String() string {
  5798. return awsutil.Prettify(s)
  5799. }
  5800. // GoString returns the string representation
  5801. func (s GetStageInput) GoString() string {
  5802. return s.String()
  5803. }
  5804. // Validate inspects the fields of the type to determine if they are valid.
  5805. func (s *GetStageInput) Validate() error {
  5806. invalidParams := request.ErrInvalidParams{Context: "GetStageInput"}
  5807. if s.RestApiId == nil {
  5808. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  5809. }
  5810. if s.StageName == nil {
  5811. invalidParams.Add(request.NewErrParamRequired("StageName"))
  5812. }
  5813. if invalidParams.Len() > 0 {
  5814. return invalidParams
  5815. }
  5816. return nil
  5817. }
  5818. // Requests Amazon API Gateway to get information about one or more Stage resources.
  5819. type GetStagesInput struct {
  5820. _ struct{} `type:"structure"`
  5821. // The stages' deployment identifiers.
  5822. DeploymentId *string `location:"querystring" locationName:"deploymentId" type:"string"`
  5823. // The stages' API identifiers.
  5824. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  5825. }
  5826. // String returns the string representation
  5827. func (s GetStagesInput) String() string {
  5828. return awsutil.Prettify(s)
  5829. }
  5830. // GoString returns the string representation
  5831. func (s GetStagesInput) GoString() string {
  5832. return s.String()
  5833. }
  5834. // Validate inspects the fields of the type to determine if they are valid.
  5835. func (s *GetStagesInput) Validate() error {
  5836. invalidParams := request.ErrInvalidParams{Context: "GetStagesInput"}
  5837. if s.RestApiId == nil {
  5838. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  5839. }
  5840. if invalidParams.Len() > 0 {
  5841. return invalidParams
  5842. }
  5843. return nil
  5844. }
  5845. // A list of Stage resource that are associated with the ApiKey resource.
  5846. type GetStagesOutput struct {
  5847. _ struct{} `type:"structure"`
  5848. // An individual Stage resource.
  5849. Item []*Stage `locationName:"item" type:"list"`
  5850. }
  5851. // String returns the string representation
  5852. func (s GetStagesOutput) String() string {
  5853. return awsutil.Prettify(s)
  5854. }
  5855. // GoString returns the string representation
  5856. func (s GetStagesOutput) GoString() string {
  5857. return s.String()
  5858. }
  5859. // A POST request to import an API to Amazon API Gateway using an input of an
  5860. // API definition file.
  5861. type ImportRestApiInput struct {
  5862. _ struct{} `type:"structure" payload:"Body"`
  5863. // The POST request body containing external API definitions. Currently, only
  5864. // Swagger definition JSON files are supported.
  5865. Body []byte `locationName:"body" type:"blob" required:"true"`
  5866. // A query parameter to indicate whether to rollback the API creation (true)
  5867. // or not (false) when a warning is encountered. The default value is false.
  5868. FailOnWarnings *bool `location:"querystring" locationName:"failonwarnings" type:"boolean"`
  5869. // Custom header parameters as part of the request.
  5870. Parameters map[string]*string `location:"querystring" locationName:"parameters" type:"map"`
  5871. }
  5872. // String returns the string representation
  5873. func (s ImportRestApiInput) String() string {
  5874. return awsutil.Prettify(s)
  5875. }
  5876. // GoString returns the string representation
  5877. func (s ImportRestApiInput) GoString() string {
  5878. return s.String()
  5879. }
  5880. // Validate inspects the fields of the type to determine if they are valid.
  5881. func (s *ImportRestApiInput) Validate() error {
  5882. invalidParams := request.ErrInvalidParams{Context: "ImportRestApiInput"}
  5883. if s.Body == nil {
  5884. invalidParams.Add(request.NewErrParamRequired("Body"))
  5885. }
  5886. if invalidParams.Len() > 0 {
  5887. return invalidParams
  5888. }
  5889. return nil
  5890. }
  5891. // Represents a HTTP, AWS, or Mock integration.
  5892. type Integration struct {
  5893. _ struct{} `type:"structure"`
  5894. // Specifies the integration's cache key parameters.
  5895. CacheKeyParameters []*string `locationName:"cacheKeyParameters" type:"list"`
  5896. // Specifies the integration's cache namespace.
  5897. CacheNamespace *string `locationName:"cacheNamespace" type:"string"`
  5898. // Specifies the credentials required for the integration, if any. For AWS integrations,
  5899. // three options are available. To specify an IAM Role for Amazon API Gateway
  5900. // to assume, use the role's Amazon Resource Name (ARN). To require that the
  5901. // caller's identity be passed through from the request, specify the string
  5902. // arn:aws:iam::\*:user/\*. To use resource-based permissions on supported AWS
  5903. // services, specify null.
  5904. Credentials *string `locationName:"credentials" type:"string"`
  5905. // Specifies the integration's HTTP method type.
  5906. HttpMethod *string `locationName:"httpMethod" type:"string"`
  5907. // Specifies the integration's responses.
  5908. IntegrationResponses map[string]*IntegrationResponse `locationName:"integrationResponses" type:"map"`
  5909. // Specifies the pass-through behavior for incoming requests based on the Content-Type
  5910. // header in the request, and the available requestTemplates defined on the
  5911. // Integration. There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES,
  5912. // and NEVER.
  5913. //
  5914. // WHEN_NO_MATCH passes the request body for unmapped content types through
  5915. // to the Integration backend without transformation.
  5916. //
  5917. // NEVER rejects unmapped content types with an HTTP 415 'Unsupported Media
  5918. // Type' response.
  5919. //
  5920. // WHEN_NO_TEMPLATES will allow pass-through when the Integration has NO content
  5921. // types mapped to templates. However if there is at least one content type
  5922. // defined, unmapped content types will be rejected with the same 415 response.
  5923. PassthroughBehavior *string `locationName:"passthroughBehavior" type:"string"`
  5924. // Represents requests parameters that are sent with the backend request. Request
  5925. // parameters are represented as a key/value map, with a destination as the
  5926. // key and a source as the value. A source must match an existing method request
  5927. // parameter, or a static value. Static values must be enclosed with single
  5928. // quotes, and be pre-encoded based on their destination in the request. The
  5929. // destination must match the pattern integration.request.{location}.{name},
  5930. // where location is either querystring, path, or header. name must be a valid,
  5931. // unique parameter name.
  5932. RequestParameters map[string]*string `locationName:"requestParameters" type:"map"`
  5933. // Represents a map of Velocity templates that are applied on the request payload
  5934. // based on the value of the Content-Type header sent by the client. The content
  5935. // type value is the key in this map, and the template (as a String) is the
  5936. // value.
  5937. RequestTemplates map[string]*string `locationName:"requestTemplates" type:"map"`
  5938. // Specifies the integration's type. The valid value is HTTP, AWS, or MOCK.
  5939. Type *string `locationName:"type" type:"string" enum:"IntegrationType"`
  5940. // Specifies the integration's Uniform Resource Identifier (URI). For HTTP integrations,
  5941. // the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986
  5942. // specification (https://www.ietf.org/rfc/rfc3986.txt" target="_blank). For
  5943. // AWS integrations, the URI should be of the form arn:aws:apigateway:{region}:{subdomain.service|service}:{path|action}/{service_api}.
  5944. // Region, subdomain and service are used to determine the right endpoint. For
  5945. // AWS services that use the Action= query string parameter, service_api should
  5946. // be a valid action for the desired service. For RESTful AWS service APIs,
  5947. // path is used to indicate that the remaining substring in the URI should be
  5948. // treated as the path to the resource, including the initial /.
  5949. Uri *string `locationName:"uri" type:"string"`
  5950. }
  5951. // String returns the string representation
  5952. func (s Integration) String() string {
  5953. return awsutil.Prettify(s)
  5954. }
  5955. // GoString returns the string representation
  5956. func (s Integration) GoString() string {
  5957. return s.String()
  5958. }
  5959. // Represents an integration response. The status code must map to an existing
  5960. // MethodResponse, and parameters and templates can be used to transform the
  5961. // backend response.
  5962. type IntegrationResponse struct {
  5963. _ struct{} `type:"structure"`
  5964. // Represents response parameters that can be read from the backend response.
  5965. // Response parameters are represented as a key/value map, with a destination
  5966. // as the key and a source as the value. A destination must match an existing
  5967. // response parameter in the MethodResponse. The source can be a header from
  5968. // the backend response, or a static value. Static values are specified using
  5969. // enclosing single quotes, and backend response headers can be read using the
  5970. // pattern integration.response.header.{name}.
  5971. ResponseParameters map[string]*string `locationName:"responseParameters" type:"map"`
  5972. // Specifies the templates used to transform the integration response body.
  5973. // Response templates are represented as a key/value map, with a content-type
  5974. // as the key and a template as the value.
  5975. ResponseTemplates map[string]*string `locationName:"responseTemplates" type:"map"`
  5976. // Specifies the regular expression (regex) pattern used to choose an integration
  5977. // response based on the response from the backend. If the backend is an AWS
  5978. // Lambda function, the AWS Lambda function error header is matched. For all
  5979. // other HTTP and AWS backends, the HTTP status code is matched.
  5980. SelectionPattern *string `locationName:"selectionPattern" type:"string"`
  5981. // Specifies the status code that is used to map the integration response to
  5982. // an existing MethodResponse.
  5983. StatusCode *string `locationName:"statusCode" type:"string"`
  5984. }
  5985. // String returns the string representation
  5986. func (s IntegrationResponse) String() string {
  5987. return awsutil.Prettify(s)
  5988. }
  5989. // GoString returns the string representation
  5990. func (s IntegrationResponse) GoString() string {
  5991. return s.String()
  5992. }
  5993. // Represents a method.
  5994. type Method struct {
  5995. _ struct{} `type:"structure"`
  5996. // Specifies whether the method requires a valid ApiKey.
  5997. ApiKeyRequired *bool `locationName:"apiKeyRequired" type:"boolean"`
  5998. // The method's authorization type.
  5999. AuthorizationType *string `locationName:"authorizationType" type:"string"`
  6000. // Specifies the identifier of an Authorizer to use on this Method. The authorizationType
  6001. // must be CUSTOM.
  6002. AuthorizerId *string `locationName:"authorizerId" type:"string"`
  6003. // The HTTP method.
  6004. HttpMethod *string `locationName:"httpMethod" type:"string"`
  6005. // The method's integration.
  6006. MethodIntegration *Integration `locationName:"methodIntegration" type:"structure"`
  6007. // Represents available responses that can be sent to the caller. Method responses
  6008. // are represented as a key/value map, with an HTTP status code as the key and
  6009. // a MethodResponse as the value. The status codes are available for the Integration
  6010. // responses to map to.
  6011. MethodResponses map[string]*MethodResponse `locationName:"methodResponses" type:"map"`
  6012. // Specifies the Model resources used for the request's content type. Request
  6013. // models are represented as a key/value map, with a content type as the key
  6014. // and a Model name as the value.
  6015. RequestModels map[string]*string `locationName:"requestModels" type:"map"`
  6016. // Represents request parameters that can be accepted by Amazon API Gateway.
  6017. // Request parameters are represented as a key/value map, with a source as the
  6018. // key and a Boolean flag as the value. The Boolean flag is used to specify
  6019. // whether the parameter is required. A source must match the pattern method.request.{location}.{name},
  6020. // where location is either querystring, path, or header. name is a valid, unique
  6021. // parameter name. Sources specified here are available to the integration for
  6022. // mapping to integration request parameters or templates.
  6023. RequestParameters map[string]*bool `locationName:"requestParameters" type:"map"`
  6024. }
  6025. // String returns the string representation
  6026. func (s Method) String() string {
  6027. return awsutil.Prettify(s)
  6028. }
  6029. // GoString returns the string representation
  6030. func (s Method) GoString() string {
  6031. return s.String()
  6032. }
  6033. // Represents a method response. Amazon API Gateway sends back the status code
  6034. // to the caller as the HTTP status code. Parameters and models can be used
  6035. // to transform the response from the method's integration.
  6036. type MethodResponse struct {
  6037. _ struct{} `type:"structure"`
  6038. // Specifies the Model resources used for the response's content-type. Response
  6039. // models are represented as a key/value map, with a content-type as the key
  6040. // and a Model name as the value.
  6041. ResponseModels map[string]*string `locationName:"responseModels" type:"map"`
  6042. // Represents response parameters that can be sent back to the caller by Amazon
  6043. // API Gateway. Response parameters are represented as a key/value map, with
  6044. // a destination as the key and a boolean flag as the value, which is used to
  6045. // specify whether the parameter is required. A destination must match the pattern
  6046. // method.response.header.{name}, where name is a valid, unique header name.
  6047. // Destinations specified here are available to the integration for mapping
  6048. // from integration response parameters.
  6049. ResponseParameters map[string]*bool `locationName:"responseParameters" type:"map"`
  6050. // The method response's status code.
  6051. StatusCode *string `locationName:"statusCode" type:"string"`
  6052. }
  6053. // String returns the string representation
  6054. func (s MethodResponse) String() string {
  6055. return awsutil.Prettify(s)
  6056. }
  6057. // GoString returns the string representation
  6058. func (s MethodResponse) GoString() string {
  6059. return s.String()
  6060. }
  6061. // Specifies the method setting properties.
  6062. type MethodSetting struct {
  6063. _ struct{} `type:"structure"`
  6064. // Specifies whether the cached responses are encrypted. The PATCH path for
  6065. // this setting is /{method_setting_key}/caching/dataEncrypted, and the value
  6066. // is a Boolean.
  6067. CacheDataEncrypted *bool `locationName:"cacheDataEncrypted" type:"boolean"`
  6068. // Specifies the time to live (TTL) in seconds, for cached responses. The higher
  6069. // a the TTL, the longer the response will be cached. The PATCH path for this
  6070. // setting is /{method_setting_key}/caching/ttlInSeconds, and the value is an
  6071. // integer.
  6072. CacheTtlInSeconds *int64 `locationName:"cacheTtlInSeconds" type:"integer"`
  6073. // Specifies whether responses should be cached and returned for requests. A
  6074. // cache cluster must be enabled on the stage for responses to be cached. The
  6075. // PATCH path for this setting is /{method_setting_key}/caching/enabled, and
  6076. // the value is a Boolean.
  6077. CachingEnabled *bool `locationName:"cachingEnabled" type:"boolean"`
  6078. // Specifies the whether data trace logging is enabled for this method, which
  6079. // effects the log entries pushed to Amazon CloudWatch Logs. The PATCH path
  6080. // for this setting is /{method_setting_key}/logging/dataTrace, and the value
  6081. // is a Boolean.
  6082. DataTraceEnabled *bool `locationName:"dataTraceEnabled" type:"boolean"`
  6083. // Specifies the logging level for this method, which effects the log entries
  6084. // pushed to Amazon CloudWatch Logs. The PATCH path for this setting is /{method_setting_key}/logging/loglevel,
  6085. // and the available levels are OFF, ERROR, and INFO.
  6086. LoggingLevel *string `locationName:"loggingLevel" type:"string"`
  6087. // Specifies whether Amazon CloudWatch metrics are enabled for this method.
  6088. // The PATCH path for this setting is /{method_setting_key}/metrics/enabled,
  6089. // and the value is a Boolean.
  6090. MetricsEnabled *bool `locationName:"metricsEnabled" type:"boolean"`
  6091. // Specifies whether authorization is required for a cache invalidation request.
  6092. // The PATCH path for this setting is /{method_setting_key}/caching/requireAuthorizationForCacheControl,
  6093. // and the value is a Boolean.
  6094. RequireAuthorizationForCacheControl *bool `locationName:"requireAuthorizationForCacheControl" type:"boolean"`
  6095. // Specifies the throttling burst limit. The PATCH path for this setting is
  6096. // /{method_setting_key}/throttling/burstLimit, and the value is an integer.
  6097. ThrottlingBurstLimit *int64 `locationName:"throttlingBurstLimit" type:"integer"`
  6098. // Specifies the throttling rate limit. The PATCH path for this setting is /{method_setting_key}/throttling/rateLimit,
  6099. // and the value is a double.
  6100. ThrottlingRateLimit *float64 `locationName:"throttlingRateLimit" type:"double"`
  6101. // Specifies the strategy on how to handle the unauthorized requests for cache
  6102. // invalidation. The PATCH path for this setting is /{method_setting_key}/caching/unauthorizedCacheControlHeaderStrategy,
  6103. // and the available values are FAIL_WITH_403, SUCCEED_WITH_RESPONSE_HEADER,
  6104. // SUCCEED_WITHOUT_RESPONSE_HEADER.
  6105. UnauthorizedCacheControlHeaderStrategy *string `locationName:"unauthorizedCacheControlHeaderStrategy" type:"string" enum:"UnauthorizedCacheControlHeaderStrategy"`
  6106. }
  6107. // String returns the string representation
  6108. func (s MethodSetting) String() string {
  6109. return awsutil.Prettify(s)
  6110. }
  6111. // GoString returns the string representation
  6112. func (s MethodSetting) GoString() string {
  6113. return s.String()
  6114. }
  6115. // Represents a summary of a Method resource, given a particular date and time.
  6116. type MethodSnapshot struct {
  6117. _ struct{} `type:"structure"`
  6118. // Specifies whether the method requires a valid ApiKey.
  6119. ApiKeyRequired *bool `locationName:"apiKeyRequired" type:"boolean"`
  6120. // Specifies the type of authorization used for the method.
  6121. AuthorizationType *string `locationName:"authorizationType" type:"string"`
  6122. }
  6123. // String returns the string representation
  6124. func (s MethodSnapshot) String() string {
  6125. return awsutil.Prettify(s)
  6126. }
  6127. // GoString returns the string representation
  6128. func (s MethodSnapshot) GoString() string {
  6129. return s.String()
  6130. }
  6131. // Represents the structure of a request or response payload for a method.
  6132. type Model struct {
  6133. _ struct{} `type:"structure"`
  6134. // The content-type for the model.
  6135. ContentType *string `locationName:"contentType" type:"string"`
  6136. // The description of the model.
  6137. Description *string `locationName:"description" type:"string"`
  6138. // The identifier for the model resource.
  6139. Id *string `locationName:"id" type:"string"`
  6140. // The name of the model.
  6141. Name *string `locationName:"name" type:"string"`
  6142. // The schema for the model. For application/json models, this should be JSON-schema
  6143. // draft v4 (http://json-schema.org/documentation.html" target="_blank) model.
  6144. Schema *string `locationName:"schema" type:"string"`
  6145. }
  6146. // String returns the string representation
  6147. func (s Model) String() string {
  6148. return awsutil.Prettify(s)
  6149. }
  6150. // GoString returns the string representation
  6151. func (s Model) GoString() string {
  6152. return s.String()
  6153. }
  6154. // A single patch operation to apply to the specified resource. Please refer
  6155. // to http://tools.ietf.org/html/rfc6902#section-4 for an explanation of how
  6156. // each operation is used.
  6157. type PatchOperation struct {
  6158. _ struct{} `type:"structure"`
  6159. // The "move" and "copy" operation object MUST contain a "from" member, which
  6160. // is a string containing a JSON Pointer value that references the location
  6161. // in the target document to move the value from.
  6162. From *string `locationName:"from" type:"string"`
  6163. // A patch operation whose value indicates the operation to perform. Its value
  6164. // MUST be one of "add", "remove", "replace", "move", "copy", or "test"; other
  6165. // values are errors.
  6166. Op *string `locationName:"op" type:"string" enum:"op"`
  6167. // Operation objects MUST have exactly one "path" member. That member's value
  6168. // is a string containing a `JSON-Pointer` value that references a location
  6169. // within the target document (the "target location") where the operation is
  6170. // performed.
  6171. Path *string `locationName:"path" type:"string"`
  6172. // The actual value content.
  6173. Value *string `locationName:"value" type:"string"`
  6174. }
  6175. // String returns the string representation
  6176. func (s PatchOperation) String() string {
  6177. return awsutil.Prettify(s)
  6178. }
  6179. // GoString returns the string representation
  6180. func (s PatchOperation) GoString() string {
  6181. return s.String()
  6182. }
  6183. // Represents a put integration request.
  6184. type PutIntegrationInput struct {
  6185. _ struct{} `type:"structure"`
  6186. // Specifies a put integration input's cache key parameters.
  6187. CacheKeyParameters []*string `locationName:"cacheKeyParameters" type:"list"`
  6188. // Specifies a put integration input's cache namespace.
  6189. CacheNamespace *string `locationName:"cacheNamespace" type:"string"`
  6190. // Specifies whether credentials are required for a put integration.
  6191. Credentials *string `locationName:"credentials" type:"string"`
  6192. // Specifies a put integration request's HTTP method.
  6193. HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"`
  6194. // Specifies a put integration HTTP method. When the integration type is HTTP
  6195. // or AWS, this field is required.
  6196. IntegrationHttpMethod *string `locationName:"httpMethod" type:"string"`
  6197. // Specifies the pass-through behavior for incoming requests based on the Content-Type
  6198. // header in the request, and the available requestTemplates defined on the
  6199. // Integration. There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES,
  6200. // and NEVER.
  6201. //
  6202. // WHEN_NO_MATCH passes the request body for unmapped content types through
  6203. // to the Integration backend without transformation.
  6204. //
  6205. // NEVER rejects unmapped content types with an HTTP 415 'Unsupported Media
  6206. // Type' response.
  6207. //
  6208. // WHEN_NO_TEMPLATES will allow pass-through when the Integration has NO content
  6209. // types mapped to templates. However if there is at least one content type
  6210. // defined, unmapped content types will be rejected with the same 415 response.
  6211. PassthroughBehavior *string `locationName:"passthroughBehavior" type:"string"`
  6212. // Represents request parameters that are sent with the backend request. Request
  6213. // parameters are represented as a key/value map, with a destination as the
  6214. // key and a source as the value. A source must match an existing method request
  6215. // parameter, or a static value. Static values must be enclosed with single
  6216. // quotes, and be pre-encoded based on their destination in the request. The
  6217. // destination must match the pattern integration.request.{location}.{name},
  6218. // where location is either querystring, path, or header. name must be a valid,
  6219. // unique parameter name.
  6220. RequestParameters map[string]*string `locationName:"requestParameters" type:"map"`
  6221. // Represents a map of Velocity templates that are applied on the request payload
  6222. // based on the value of the Content-Type header sent by the client. The content
  6223. // type value is the key in this map, and the template (as a String) is the
  6224. // value.
  6225. RequestTemplates map[string]*string `locationName:"requestTemplates" type:"map"`
  6226. // Specifies a put integration request's resource ID.
  6227. ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"`
  6228. // Specifies a put integration request's API identifier.
  6229. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  6230. // Specifies a put integration input's type.
  6231. Type *string `locationName:"type" type:"string" required:"true" enum:"IntegrationType"`
  6232. // Specifies a put integration input's Uniform Resource Identifier (URI). When
  6233. // the integration type is HTTP or AWS, this field is required. For integration
  6234. // with Lambda as an AWS service proxy, this value is of the 'arn:aws:apigateway:<region>:lambda:path/2015-03-31/functions/<functionArn>/invocations'
  6235. // format.
  6236. Uri *string `locationName:"uri" type:"string"`
  6237. }
  6238. // String returns the string representation
  6239. func (s PutIntegrationInput) String() string {
  6240. return awsutil.Prettify(s)
  6241. }
  6242. // GoString returns the string representation
  6243. func (s PutIntegrationInput) GoString() string {
  6244. return s.String()
  6245. }
  6246. // Validate inspects the fields of the type to determine if they are valid.
  6247. func (s *PutIntegrationInput) Validate() error {
  6248. invalidParams := request.ErrInvalidParams{Context: "PutIntegrationInput"}
  6249. if s.HttpMethod == nil {
  6250. invalidParams.Add(request.NewErrParamRequired("HttpMethod"))
  6251. }
  6252. if s.ResourceId == nil {
  6253. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  6254. }
  6255. if s.RestApiId == nil {
  6256. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  6257. }
  6258. if s.Type == nil {
  6259. invalidParams.Add(request.NewErrParamRequired("Type"))
  6260. }
  6261. if invalidParams.Len() > 0 {
  6262. return invalidParams
  6263. }
  6264. return nil
  6265. }
  6266. // Represents a put integration response request.
  6267. type PutIntegrationResponseInput struct {
  6268. _ struct{} `type:"structure"`
  6269. // Specifies a put integration response request's HTTP method.
  6270. HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"`
  6271. // Specifies a put integration response request's resource identifier.
  6272. ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"`
  6273. // Represents response parameters that can be read from the backend response.
  6274. // Response parameters are represented as a key/value map, with a destination
  6275. // as the key and a source as the value. A destination must match an existing
  6276. // response parameter in the Method. The source can be a header from the backend
  6277. // response, or a static value. Static values are specified using enclosing
  6278. // single quotes, and backend response headers can be read using the pattern
  6279. // integration.response.header.{name}.
  6280. ResponseParameters map[string]*string `locationName:"responseParameters" type:"map"`
  6281. // Specifies a put integration response's templates.
  6282. ResponseTemplates map[string]*string `locationName:"responseTemplates" type:"map"`
  6283. // Specifies a put integration response request's API identifier.
  6284. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  6285. // Specifies the selection pattern of a put integration response.
  6286. SelectionPattern *string `locationName:"selectionPattern" type:"string"`
  6287. // Specifies the status code that is used to map the integration response to
  6288. // an existing MethodResponse.
  6289. StatusCode *string `location:"uri" locationName:"status_code" type:"string" required:"true"`
  6290. }
  6291. // String returns the string representation
  6292. func (s PutIntegrationResponseInput) String() string {
  6293. return awsutil.Prettify(s)
  6294. }
  6295. // GoString returns the string representation
  6296. func (s PutIntegrationResponseInput) GoString() string {
  6297. return s.String()
  6298. }
  6299. // Validate inspects the fields of the type to determine if they are valid.
  6300. func (s *PutIntegrationResponseInput) Validate() error {
  6301. invalidParams := request.ErrInvalidParams{Context: "PutIntegrationResponseInput"}
  6302. if s.HttpMethod == nil {
  6303. invalidParams.Add(request.NewErrParamRequired("HttpMethod"))
  6304. }
  6305. if s.ResourceId == nil {
  6306. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  6307. }
  6308. if s.RestApiId == nil {
  6309. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  6310. }
  6311. if s.StatusCode == nil {
  6312. invalidParams.Add(request.NewErrParamRequired("StatusCode"))
  6313. }
  6314. if invalidParams.Len() > 0 {
  6315. return invalidParams
  6316. }
  6317. return nil
  6318. }
  6319. // Request to add a method to an existing Resource resource.
  6320. type PutMethodInput struct {
  6321. _ struct{} `type:"structure"`
  6322. // Specifies whether the method required a valid ApiKey.
  6323. ApiKeyRequired *bool `locationName:"apiKeyRequired" type:"boolean"`
  6324. // Specifies the type of authorization used for the method.
  6325. AuthorizationType *string `locationName:"authorizationType" type:"string" required:"true"`
  6326. // Specifies the identifier of an Authorizer to use on this Method, if the type
  6327. // is CUSTOM.
  6328. AuthorizerId *string `locationName:"authorizerId" type:"string"`
  6329. // Specifies the put method request's HTTP method type.
  6330. HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"`
  6331. // Specifies the Model resources used for the request's content type. Request
  6332. // models are represented as a key/value map, with a content type as the key
  6333. // and a Model name as the value.
  6334. RequestModels map[string]*string `locationName:"requestModels" type:"map"`
  6335. // Represents requests parameters that are sent with the backend request. Request
  6336. // parameters are represented as a key/value map, with a destination as the
  6337. // key and a source as the value. A source must match an existing method request
  6338. // parameter, or a static value. Static values must be enclosed with single
  6339. // quotes, and be pre-encoded based on their destination in the request. The
  6340. // destination must match the pattern integration.request.{location}.{name},
  6341. // where location is either querystring, path, or header. name must be a valid,
  6342. // unique parameter name.
  6343. RequestParameters map[string]*bool `locationName:"requestParameters" type:"map"`
  6344. // The Resource identifier for the new Method resource.
  6345. ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"`
  6346. // The RestApi identifier for the new Method resource.
  6347. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  6348. }
  6349. // String returns the string representation
  6350. func (s PutMethodInput) String() string {
  6351. return awsutil.Prettify(s)
  6352. }
  6353. // GoString returns the string representation
  6354. func (s PutMethodInput) GoString() string {
  6355. return s.String()
  6356. }
  6357. // Validate inspects the fields of the type to determine if they are valid.
  6358. func (s *PutMethodInput) Validate() error {
  6359. invalidParams := request.ErrInvalidParams{Context: "PutMethodInput"}
  6360. if s.AuthorizationType == nil {
  6361. invalidParams.Add(request.NewErrParamRequired("AuthorizationType"))
  6362. }
  6363. if s.HttpMethod == nil {
  6364. invalidParams.Add(request.NewErrParamRequired("HttpMethod"))
  6365. }
  6366. if s.ResourceId == nil {
  6367. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  6368. }
  6369. if s.RestApiId == nil {
  6370. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  6371. }
  6372. if invalidParams.Len() > 0 {
  6373. return invalidParams
  6374. }
  6375. return nil
  6376. }
  6377. // Request to add a MethodResponse to an existing Method resource.
  6378. type PutMethodResponseInput struct {
  6379. _ struct{} `type:"structure"`
  6380. // The HTTP verb that identifies the Method resource.
  6381. HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"`
  6382. // The Resource identifier for the Method resource.
  6383. ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"`
  6384. // Specifies the Model resources used for the response's content type. Response
  6385. // models are represented as a key/value map, with a content type as the key
  6386. // and a Model name as the value.
  6387. ResponseModels map[string]*string `locationName:"responseModels" type:"map"`
  6388. // Represents response parameters that can be sent back to the caller by Amazon
  6389. // API Gateway. Response parameters are represented as a key/value map, with
  6390. // a destination as the key and a Boolean flag as the value. The Boolean flag
  6391. // is used to specify whether the parameter is required. A destination must
  6392. // match the pattern method.response.header.{name}, where name is a valid, unique
  6393. // header name. Destinations specified here are available to the integration
  6394. // for mapping from integration response parameters.
  6395. ResponseParameters map[string]*bool `locationName:"responseParameters" type:"map"`
  6396. // The RestApi identifier for the Method resource.
  6397. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  6398. // The method response's status code.
  6399. StatusCode *string `location:"uri" locationName:"status_code" type:"string" required:"true"`
  6400. }
  6401. // String returns the string representation
  6402. func (s PutMethodResponseInput) String() string {
  6403. return awsutil.Prettify(s)
  6404. }
  6405. // GoString returns the string representation
  6406. func (s PutMethodResponseInput) GoString() string {
  6407. return s.String()
  6408. }
  6409. // Validate inspects the fields of the type to determine if they are valid.
  6410. func (s *PutMethodResponseInput) Validate() error {
  6411. invalidParams := request.ErrInvalidParams{Context: "PutMethodResponseInput"}
  6412. if s.HttpMethod == nil {
  6413. invalidParams.Add(request.NewErrParamRequired("HttpMethod"))
  6414. }
  6415. if s.ResourceId == nil {
  6416. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  6417. }
  6418. if s.RestApiId == nil {
  6419. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  6420. }
  6421. if s.StatusCode == nil {
  6422. invalidParams.Add(request.NewErrParamRequired("StatusCode"))
  6423. }
  6424. if invalidParams.Len() > 0 {
  6425. return invalidParams
  6426. }
  6427. return nil
  6428. }
  6429. // A PUT request to update an existing API, with external API definitions specified
  6430. // as the request body.
  6431. type PutRestApiInput struct {
  6432. _ struct{} `type:"structure" payload:"Body"`
  6433. // The PUT request body containing external API definitions. Currently, only
  6434. // Swagger definition JSON files are supported.
  6435. Body []byte `locationName:"body" type:"blob" required:"true"`
  6436. // A query parameter to indicate whether to rollback the API update (true) or
  6437. // not (false) when a warning is encountered. The default value is false.
  6438. FailOnWarnings *bool `location:"querystring" locationName:"failonwarnings" type:"boolean"`
  6439. // The mode query parameter to specify the update mode. Valid values are "merge"
  6440. // and "overwrite". By default, the update mode is "merge".
  6441. Mode *string `location:"querystring" locationName:"mode" type:"string" enum:"PutMode"`
  6442. // Custom headers supplied as part of the request.
  6443. Parameters map[string]*string `location:"querystring" locationName:"parameters" type:"map"`
  6444. // The identifier of the RestApi to be updated.
  6445. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  6446. }
  6447. // String returns the string representation
  6448. func (s PutRestApiInput) String() string {
  6449. return awsutil.Prettify(s)
  6450. }
  6451. // GoString returns the string representation
  6452. func (s PutRestApiInput) GoString() string {
  6453. return s.String()
  6454. }
  6455. // Validate inspects the fields of the type to determine if they are valid.
  6456. func (s *PutRestApiInput) Validate() error {
  6457. invalidParams := request.ErrInvalidParams{Context: "PutRestApiInput"}
  6458. if s.Body == nil {
  6459. invalidParams.Add(request.NewErrParamRequired("Body"))
  6460. }
  6461. if s.RestApiId == nil {
  6462. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  6463. }
  6464. if invalidParams.Len() > 0 {
  6465. return invalidParams
  6466. }
  6467. return nil
  6468. }
  6469. // Represents a resource.
  6470. type Resource struct {
  6471. _ struct{} `type:"structure"`
  6472. // The resource's identifier.
  6473. Id *string `locationName:"id" type:"string"`
  6474. // The parent resource's identifier.
  6475. ParentId *string `locationName:"parentId" type:"string"`
  6476. // The full path for this resource.
  6477. Path *string `locationName:"path" type:"string"`
  6478. // The last path segment for this resource.
  6479. PathPart *string `locationName:"pathPart" type:"string"`
  6480. // Map of methods for this resource, which is included only if the request uses
  6481. // the embed query option.
  6482. ResourceMethods map[string]*Method `locationName:"resourceMethods" type:"map"`
  6483. }
  6484. // String returns the string representation
  6485. func (s Resource) String() string {
  6486. return awsutil.Prettify(s)
  6487. }
  6488. // GoString returns the string representation
  6489. func (s Resource) GoString() string {
  6490. return s.String()
  6491. }
  6492. // Represents a REST API.
  6493. type RestApi struct {
  6494. _ struct{} `type:"structure"`
  6495. // The date when the API was created, in ISO 8601 format (http://www.iso.org/iso/home/standards/iso8601.htm"
  6496. // target="_blank).
  6497. CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"`
  6498. // The API's description.
  6499. Description *string `locationName:"description" type:"string"`
  6500. // The API's identifier. This identifier is unique across all of your APIs in
  6501. // Amazon API Gateway.
  6502. Id *string `locationName:"id" type:"string"`
  6503. // The API's name.
  6504. Name *string `locationName:"name" type:"string"`
  6505. Warnings []*string `locationName:"warnings" type:"list"`
  6506. }
  6507. // String returns the string representation
  6508. func (s RestApi) String() string {
  6509. return awsutil.Prettify(s)
  6510. }
  6511. // GoString returns the string representation
  6512. func (s RestApi) GoString() string {
  6513. return s.String()
  6514. }
  6515. // Represents a unique identifier for a version of a deployed RestApi that is
  6516. // callable by users.
  6517. type Stage struct {
  6518. _ struct{} `type:"structure"`
  6519. // Specifies whether a cache cluster is enabled for the stage.
  6520. CacheClusterEnabled *bool `locationName:"cacheClusterEnabled" type:"boolean"`
  6521. // The size of the cache cluster for the stage, if enabled.
  6522. CacheClusterSize *string `locationName:"cacheClusterSize" type:"string" enum:"CacheClusterSize"`
  6523. // The status of the cache cluster for the stage, if enabled.
  6524. CacheClusterStatus *string `locationName:"cacheClusterStatus" type:"string" enum:"CacheClusterStatus"`
  6525. ClientCertificateId *string `locationName:"clientCertificateId" type:"string"`
  6526. // The date and time that the stage was created, in ISO 8601 format (http://www.iso.org/iso/home/standards/iso8601.htm"
  6527. // target="_blank).
  6528. CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"`
  6529. // The identifier of the Deployment that the stage points to.
  6530. DeploymentId *string `locationName:"deploymentId" type:"string"`
  6531. // The stage's description.
  6532. Description *string `locationName:"description" type:"string"`
  6533. // The date and time that information about the stage was last updated, in ISO
  6534. // 8601 format (http://www.iso.org/iso/home/standards/iso8601.htm" target="_blank).
  6535. LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"unix"`
  6536. // A map that defines the method settings for a Stage resource. Keys are defined
  6537. // as {resource_path}/{http_method} for an individual method override, or \*/\*
  6538. // for the settings applied to all methods in the stage.
  6539. MethodSettings map[string]*MethodSetting `locationName:"methodSettings" type:"map"`
  6540. // The name of the stage is the first path segment in the Uniform Resource Identifier
  6541. // (URI) of a call to Amazon API Gateway.
  6542. StageName *string `locationName:"stageName" type:"string"`
  6543. // A map that defines the stage variables for a Stage resource. Variable names
  6544. // can have alphanumeric characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+.
  6545. Variables map[string]*string `locationName:"variables" type:"map"`
  6546. }
  6547. // String returns the string representation
  6548. func (s Stage) String() string {
  6549. return awsutil.Prettify(s)
  6550. }
  6551. // GoString returns the string representation
  6552. func (s Stage) GoString() string {
  6553. return s.String()
  6554. }
  6555. // A reference to a unique stage identified in the format {restApiId}/{stage}.
  6556. type StageKey struct {
  6557. _ struct{} `type:"structure"`
  6558. // A list of Stage resources that are associated with the ApiKey resource.
  6559. RestApiId *string `locationName:"restApiId" type:"string"`
  6560. // The stage name in the RestApi that the stage key references.
  6561. StageName *string `locationName:"stageName" type:"string"`
  6562. }
  6563. // String returns the string representation
  6564. func (s StageKey) String() string {
  6565. return awsutil.Prettify(s)
  6566. }
  6567. // GoString returns the string representation
  6568. func (s StageKey) GoString() string {
  6569. return s.String()
  6570. }
  6571. // Make a request to simulate the execution of an Authorizer.
  6572. type TestInvokeAuthorizerInput struct {
  6573. _ struct{} `type:"structure"`
  6574. // [Optional] A key-value map of additional context variables.
  6575. AdditionalContext map[string]*string `locationName:"additionalContext" type:"map"`
  6576. // Specifies a test invoke authorizer request's Authorizer ID.
  6577. AuthorizerId *string `location:"uri" locationName:"authorizer_id" type:"string" required:"true"`
  6578. // [Optional] The simulated request body of an incoming invocation request.
  6579. Body *string `locationName:"body" type:"string"`
  6580. // [Required] A key-value map of headers to simulate an incoming invocation
  6581. // request. This is where the incoming authorization token, or identity source,
  6582. // should be specified.
  6583. Headers map[string]*string `locationName:"headers" type:"map"`
  6584. // [Optional] The URI path, including query string, of the simulated invocation
  6585. // request. Use this to specify path parameters and query string parameters.
  6586. PathWithQueryString *string `locationName:"pathWithQueryString" type:"string"`
  6587. // Specifies a test invoke authorizer request's RestApi identifier.
  6588. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  6589. // A key-value map of stage variables to simulate an invocation on a deployed
  6590. // Stage.
  6591. StageVariables map[string]*string `locationName:"stageVariables" type:"map"`
  6592. }
  6593. // String returns the string representation
  6594. func (s TestInvokeAuthorizerInput) String() string {
  6595. return awsutil.Prettify(s)
  6596. }
  6597. // GoString returns the string representation
  6598. func (s TestInvokeAuthorizerInput) GoString() string {
  6599. return s.String()
  6600. }
  6601. // Validate inspects the fields of the type to determine if they are valid.
  6602. func (s *TestInvokeAuthorizerInput) Validate() error {
  6603. invalidParams := request.ErrInvalidParams{Context: "TestInvokeAuthorizerInput"}
  6604. if s.AuthorizerId == nil {
  6605. invalidParams.Add(request.NewErrParamRequired("AuthorizerId"))
  6606. }
  6607. if s.RestApiId == nil {
  6608. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  6609. }
  6610. if invalidParams.Len() > 0 {
  6611. return invalidParams
  6612. }
  6613. return nil
  6614. }
  6615. // Represents the response of the test invoke request in for a custom Authorizer
  6616. type TestInvokeAuthorizerOutput struct {
  6617. _ struct{} `type:"structure"`
  6618. Authorization map[string][]*string `locationName:"authorization" type:"map"`
  6619. Claims map[string]*string `locationName:"claims" type:"map"`
  6620. // The HTTP status code that the client would have received. Value is 0 if the
  6621. // authorizer succeeded.
  6622. ClientStatus *int64 `locationName:"clientStatus" type:"integer"`
  6623. // The execution latency of the test authorizer request
  6624. Latency *int64 `locationName:"latency" type:"long"`
  6625. // The Amazon API Gateway execution log for the test authorizer request.
  6626. Log *string `locationName:"log" type:"string"`
  6627. // The policy JSON document returned by the Authorizer
  6628. Policy *string `locationName:"policy" type:"string"`
  6629. // The principal identity returned by the Authorizer
  6630. PrincipalId *string `locationName:"principalId" type:"string"`
  6631. }
  6632. // String returns the string representation
  6633. func (s TestInvokeAuthorizerOutput) String() string {
  6634. return awsutil.Prettify(s)
  6635. }
  6636. // GoString returns the string representation
  6637. func (s TestInvokeAuthorizerOutput) GoString() string {
  6638. return s.String()
  6639. }
  6640. // Make a request to simulate the execution of a Method.
  6641. type TestInvokeMethodInput struct {
  6642. _ struct{} `type:"structure"`
  6643. // The simulated request body of an incoming invocation request.
  6644. Body *string `locationName:"body" type:"string"`
  6645. // A ClientCertificate identifier to use in the test invocation. API Gateway
  6646. // will use use the certificate when making the HTTPS request to the defined
  6647. // backend endpoint.
  6648. ClientCertificateId *string `locationName:"clientCertificateId" type:"string"`
  6649. // A key-value map of headers to simulate an incoming invocation request.
  6650. Headers map[string]*string `locationName:"headers" type:"map"`
  6651. // Specifies a test invoke method request's HTTP method.
  6652. HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"`
  6653. // The URI path, including query string, of the simulated invocation request.
  6654. // Use this to specify path parameters and query string parameters.
  6655. PathWithQueryString *string `locationName:"pathWithQueryString" type:"string"`
  6656. // Specifies a test invoke method request's resource ID.
  6657. ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"`
  6658. // Specifies a test invoke method request's API identifier.
  6659. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  6660. // A key-value map of stage variables to simulate an invocation on a deployed
  6661. // Stage.
  6662. StageVariables map[string]*string `locationName:"stageVariables" type:"map"`
  6663. }
  6664. // String returns the string representation
  6665. func (s TestInvokeMethodInput) String() string {
  6666. return awsutil.Prettify(s)
  6667. }
  6668. // GoString returns the string representation
  6669. func (s TestInvokeMethodInput) GoString() string {
  6670. return s.String()
  6671. }
  6672. // Validate inspects the fields of the type to determine if they are valid.
  6673. func (s *TestInvokeMethodInput) Validate() error {
  6674. invalidParams := request.ErrInvalidParams{Context: "TestInvokeMethodInput"}
  6675. if s.HttpMethod == nil {
  6676. invalidParams.Add(request.NewErrParamRequired("HttpMethod"))
  6677. }
  6678. if s.ResourceId == nil {
  6679. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  6680. }
  6681. if s.RestApiId == nil {
  6682. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  6683. }
  6684. if invalidParams.Len() > 0 {
  6685. return invalidParams
  6686. }
  6687. return nil
  6688. }
  6689. // Represents the response of the test invoke request in HTTP method.
  6690. type TestInvokeMethodOutput struct {
  6691. _ struct{} `type:"structure"`
  6692. // The body of HTTP response.
  6693. Body *string `locationName:"body" type:"string"`
  6694. // The headers of HTTP response.
  6695. Headers map[string]*string `locationName:"headers" type:"map"`
  6696. // The execution latency of the test invoke request.
  6697. Latency *int64 `locationName:"latency" type:"long"`
  6698. // The Amazon API Gateway execution log for the test invoke request.
  6699. Log *string `locationName:"log" type:"string"`
  6700. // The HTTP status code.
  6701. Status *int64 `locationName:"status" type:"integer"`
  6702. }
  6703. // String returns the string representation
  6704. func (s TestInvokeMethodOutput) String() string {
  6705. return awsutil.Prettify(s)
  6706. }
  6707. // GoString returns the string representation
  6708. func (s TestInvokeMethodOutput) GoString() string {
  6709. return s.String()
  6710. }
  6711. // Returns the throttle settings.
  6712. type ThrottleSettings struct {
  6713. _ struct{} `type:"structure"`
  6714. // Returns the burstLimit when ThrottleSettings is called.
  6715. BurstLimit *int64 `locationName:"burstLimit" type:"integer"`
  6716. // Returns the rateLimit when ThrottleSettings is called.
  6717. RateLimit *float64 `locationName:"rateLimit" type:"double"`
  6718. }
  6719. // String returns the string representation
  6720. func (s ThrottleSettings) String() string {
  6721. return awsutil.Prettify(s)
  6722. }
  6723. // GoString returns the string representation
  6724. func (s ThrottleSettings) GoString() string {
  6725. return s.String()
  6726. }
  6727. // Requests Amazon API Gateway to change information about the current Account
  6728. // resource.
  6729. type UpdateAccountInput struct {
  6730. _ struct{} `type:"structure"`
  6731. // A list of operations describing the updates to apply to the specified resource.
  6732. // The patches are applied in the order specified in the list.
  6733. PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"`
  6734. }
  6735. // String returns the string representation
  6736. func (s UpdateAccountInput) String() string {
  6737. return awsutil.Prettify(s)
  6738. }
  6739. // GoString returns the string representation
  6740. func (s UpdateAccountInput) GoString() string {
  6741. return s.String()
  6742. }
  6743. // A request to change information about an ApiKey resource.
  6744. type UpdateApiKeyInput struct {
  6745. _ struct{} `type:"structure"`
  6746. // The identifier of the ApiKey resource to be updated.
  6747. ApiKey *string `location:"uri" locationName:"api_Key" type:"string" required:"true"`
  6748. // A list of operations describing the updates to apply to the specified resource.
  6749. // The patches are applied in the order specified in the list.
  6750. PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"`
  6751. }
  6752. // String returns the string representation
  6753. func (s UpdateApiKeyInput) String() string {
  6754. return awsutil.Prettify(s)
  6755. }
  6756. // GoString returns the string representation
  6757. func (s UpdateApiKeyInput) GoString() string {
  6758. return s.String()
  6759. }
  6760. // Validate inspects the fields of the type to determine if they are valid.
  6761. func (s *UpdateApiKeyInput) Validate() error {
  6762. invalidParams := request.ErrInvalidParams{Context: "UpdateApiKeyInput"}
  6763. if s.ApiKey == nil {
  6764. invalidParams.Add(request.NewErrParamRequired("ApiKey"))
  6765. }
  6766. if invalidParams.Len() > 0 {
  6767. return invalidParams
  6768. }
  6769. return nil
  6770. }
  6771. // Request to update an existing Authorizer resource.
  6772. type UpdateAuthorizerInput struct {
  6773. _ struct{} `type:"structure"`
  6774. // The identifier of the Authorizer resource.
  6775. AuthorizerId *string `location:"uri" locationName:"authorizer_id" type:"string" required:"true"`
  6776. // A list of operations describing the updates to apply to the specified resource.
  6777. // The patches are applied in the order specified in the list.
  6778. PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"`
  6779. // The RestApi identifier for the Authorizer resource.
  6780. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  6781. }
  6782. // String returns the string representation
  6783. func (s UpdateAuthorizerInput) String() string {
  6784. return awsutil.Prettify(s)
  6785. }
  6786. // GoString returns the string representation
  6787. func (s UpdateAuthorizerInput) GoString() string {
  6788. return s.String()
  6789. }
  6790. // Validate inspects the fields of the type to determine if they are valid.
  6791. func (s *UpdateAuthorizerInput) Validate() error {
  6792. invalidParams := request.ErrInvalidParams{Context: "UpdateAuthorizerInput"}
  6793. if s.AuthorizerId == nil {
  6794. invalidParams.Add(request.NewErrParamRequired("AuthorizerId"))
  6795. }
  6796. if s.RestApiId == nil {
  6797. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  6798. }
  6799. if invalidParams.Len() > 0 {
  6800. return invalidParams
  6801. }
  6802. return nil
  6803. }
  6804. // A request to change information about the BasePathMapping resource.
  6805. type UpdateBasePathMappingInput struct {
  6806. _ struct{} `type:"structure"`
  6807. // The base path of the BasePathMapping resource to change.
  6808. BasePath *string `location:"uri" locationName:"base_path" type:"string" required:"true"`
  6809. // The domain name of the BasePathMapping resource to change.
  6810. DomainName *string `location:"uri" locationName:"domain_name" type:"string" required:"true"`
  6811. // A list of operations describing the updates to apply to the specified resource.
  6812. // The patches are applied in the order specified in the list.
  6813. PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"`
  6814. }
  6815. // String returns the string representation
  6816. func (s UpdateBasePathMappingInput) String() string {
  6817. return awsutil.Prettify(s)
  6818. }
  6819. // GoString returns the string representation
  6820. func (s UpdateBasePathMappingInput) GoString() string {
  6821. return s.String()
  6822. }
  6823. // Validate inspects the fields of the type to determine if they are valid.
  6824. func (s *UpdateBasePathMappingInput) Validate() error {
  6825. invalidParams := request.ErrInvalidParams{Context: "UpdateBasePathMappingInput"}
  6826. if s.BasePath == nil {
  6827. invalidParams.Add(request.NewErrParamRequired("BasePath"))
  6828. }
  6829. if s.DomainName == nil {
  6830. invalidParams.Add(request.NewErrParamRequired("DomainName"))
  6831. }
  6832. if invalidParams.Len() > 0 {
  6833. return invalidParams
  6834. }
  6835. return nil
  6836. }
  6837. // A request to change information about an ClientCertificate resource.
  6838. type UpdateClientCertificateInput struct {
  6839. _ struct{} `type:"structure"`
  6840. // The identifier of the ClientCertificate resource to be updated.
  6841. ClientCertificateId *string `location:"uri" locationName:"clientcertificate_id" type:"string" required:"true"`
  6842. // A list of operations describing the updates to apply to the specified resource.
  6843. // The patches are applied in the order specified in the list.
  6844. PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"`
  6845. }
  6846. // String returns the string representation
  6847. func (s UpdateClientCertificateInput) String() string {
  6848. return awsutil.Prettify(s)
  6849. }
  6850. // GoString returns the string representation
  6851. func (s UpdateClientCertificateInput) GoString() string {
  6852. return s.String()
  6853. }
  6854. // Validate inspects the fields of the type to determine if they are valid.
  6855. func (s *UpdateClientCertificateInput) Validate() error {
  6856. invalidParams := request.ErrInvalidParams{Context: "UpdateClientCertificateInput"}
  6857. if s.ClientCertificateId == nil {
  6858. invalidParams.Add(request.NewErrParamRequired("ClientCertificateId"))
  6859. }
  6860. if invalidParams.Len() > 0 {
  6861. return invalidParams
  6862. }
  6863. return nil
  6864. }
  6865. // Requests Amazon API Gateway to change information about a Deployment resource.
  6866. type UpdateDeploymentInput struct {
  6867. _ struct{} `type:"structure"`
  6868. // The replacment identifier for the Deployment resource to change information
  6869. // about.
  6870. DeploymentId *string `location:"uri" locationName:"deployment_id" type:"string" required:"true"`
  6871. // A list of operations describing the updates to apply to the specified resource.
  6872. // The patches are applied in the order specified in the list.
  6873. PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"`
  6874. // The replacement identifier of the RestApi resource for the Deployment resource
  6875. // to change information about.
  6876. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  6877. }
  6878. // String returns the string representation
  6879. func (s UpdateDeploymentInput) String() string {
  6880. return awsutil.Prettify(s)
  6881. }
  6882. // GoString returns the string representation
  6883. func (s UpdateDeploymentInput) GoString() string {
  6884. return s.String()
  6885. }
  6886. // Validate inspects the fields of the type to determine if they are valid.
  6887. func (s *UpdateDeploymentInput) Validate() error {
  6888. invalidParams := request.ErrInvalidParams{Context: "UpdateDeploymentInput"}
  6889. if s.DeploymentId == nil {
  6890. invalidParams.Add(request.NewErrParamRequired("DeploymentId"))
  6891. }
  6892. if s.RestApiId == nil {
  6893. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  6894. }
  6895. if invalidParams.Len() > 0 {
  6896. return invalidParams
  6897. }
  6898. return nil
  6899. }
  6900. // A request to change information about the DomainName resource.
  6901. type UpdateDomainNameInput struct {
  6902. _ struct{} `type:"structure"`
  6903. // The name of the DomainName resource to be changed.
  6904. DomainName *string `location:"uri" locationName:"domain_name" type:"string" required:"true"`
  6905. // A list of operations describing the updates to apply to the specified resource.
  6906. // The patches are applied in the order specified in the list.
  6907. PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"`
  6908. }
  6909. // String returns the string representation
  6910. func (s UpdateDomainNameInput) String() string {
  6911. return awsutil.Prettify(s)
  6912. }
  6913. // GoString returns the string representation
  6914. func (s UpdateDomainNameInput) GoString() string {
  6915. return s.String()
  6916. }
  6917. // Validate inspects the fields of the type to determine if they are valid.
  6918. func (s *UpdateDomainNameInput) Validate() error {
  6919. invalidParams := request.ErrInvalidParams{Context: "UpdateDomainNameInput"}
  6920. if s.DomainName == nil {
  6921. invalidParams.Add(request.NewErrParamRequired("DomainName"))
  6922. }
  6923. if invalidParams.Len() > 0 {
  6924. return invalidParams
  6925. }
  6926. return nil
  6927. }
  6928. // Represents an update integration request.
  6929. type UpdateIntegrationInput struct {
  6930. _ struct{} `type:"structure"`
  6931. // Represents an update integration request's HTTP method.
  6932. HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"`
  6933. // A list of operations describing the updates to apply to the specified resource.
  6934. // The patches are applied in the order specified in the list.
  6935. PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"`
  6936. // Represents an update integration request's resource identifier.
  6937. ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"`
  6938. // Represents an update integration request's API identifier.
  6939. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  6940. }
  6941. // String returns the string representation
  6942. func (s UpdateIntegrationInput) String() string {
  6943. return awsutil.Prettify(s)
  6944. }
  6945. // GoString returns the string representation
  6946. func (s UpdateIntegrationInput) GoString() string {
  6947. return s.String()
  6948. }
  6949. // Validate inspects the fields of the type to determine if they are valid.
  6950. func (s *UpdateIntegrationInput) Validate() error {
  6951. invalidParams := request.ErrInvalidParams{Context: "UpdateIntegrationInput"}
  6952. if s.HttpMethod == nil {
  6953. invalidParams.Add(request.NewErrParamRequired("HttpMethod"))
  6954. }
  6955. if s.ResourceId == nil {
  6956. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  6957. }
  6958. if s.RestApiId == nil {
  6959. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  6960. }
  6961. if invalidParams.Len() > 0 {
  6962. return invalidParams
  6963. }
  6964. return nil
  6965. }
  6966. // Represents an update integration response request.
  6967. type UpdateIntegrationResponseInput struct {
  6968. _ struct{} `type:"structure"`
  6969. // Specifies an update integration response request's HTTP method.
  6970. HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"`
  6971. // A list of operations describing the updates to apply to the specified resource.
  6972. // The patches are applied in the order specified in the list.
  6973. PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"`
  6974. // Specifies an update integration response request's resource identifier.
  6975. ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"`
  6976. // Specifies an update integration response request's API identifier.
  6977. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  6978. // Specifies an update integration response request's status code.
  6979. StatusCode *string `location:"uri" locationName:"status_code" type:"string" required:"true"`
  6980. }
  6981. // String returns the string representation
  6982. func (s UpdateIntegrationResponseInput) String() string {
  6983. return awsutil.Prettify(s)
  6984. }
  6985. // GoString returns the string representation
  6986. func (s UpdateIntegrationResponseInput) GoString() string {
  6987. return s.String()
  6988. }
  6989. // Validate inspects the fields of the type to determine if they are valid.
  6990. func (s *UpdateIntegrationResponseInput) Validate() error {
  6991. invalidParams := request.ErrInvalidParams{Context: "UpdateIntegrationResponseInput"}
  6992. if s.HttpMethod == nil {
  6993. invalidParams.Add(request.NewErrParamRequired("HttpMethod"))
  6994. }
  6995. if s.ResourceId == nil {
  6996. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  6997. }
  6998. if s.RestApiId == nil {
  6999. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  7000. }
  7001. if s.StatusCode == nil {
  7002. invalidParams.Add(request.NewErrParamRequired("StatusCode"))
  7003. }
  7004. if invalidParams.Len() > 0 {
  7005. return invalidParams
  7006. }
  7007. return nil
  7008. }
  7009. // Request to update an existing Method resource.
  7010. type UpdateMethodInput struct {
  7011. _ struct{} `type:"structure"`
  7012. // The HTTP verb that identifies the Method resource.
  7013. HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"`
  7014. // A list of operations describing the updates to apply to the specified resource.
  7015. // The patches are applied in the order specified in the list.
  7016. PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"`
  7017. // The Resource identifier for the Method resource.
  7018. ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"`
  7019. // The RestApi identifier for the Method resource.
  7020. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  7021. }
  7022. // String returns the string representation
  7023. func (s UpdateMethodInput) String() string {
  7024. return awsutil.Prettify(s)
  7025. }
  7026. // GoString returns the string representation
  7027. func (s UpdateMethodInput) GoString() string {
  7028. return s.String()
  7029. }
  7030. // Validate inspects the fields of the type to determine if they are valid.
  7031. func (s *UpdateMethodInput) Validate() error {
  7032. invalidParams := request.ErrInvalidParams{Context: "UpdateMethodInput"}
  7033. if s.HttpMethod == nil {
  7034. invalidParams.Add(request.NewErrParamRequired("HttpMethod"))
  7035. }
  7036. if s.ResourceId == nil {
  7037. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  7038. }
  7039. if s.RestApiId == nil {
  7040. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  7041. }
  7042. if invalidParams.Len() > 0 {
  7043. return invalidParams
  7044. }
  7045. return nil
  7046. }
  7047. // A request to update an existing MethodResponse resource.
  7048. type UpdateMethodResponseInput struct {
  7049. _ struct{} `type:"structure"`
  7050. // The HTTP verb identifier for the parent Method resource.
  7051. HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"`
  7052. // A list of operations describing the updates to apply to the specified resource.
  7053. // The patches are applied in the order specified in the list.
  7054. PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"`
  7055. // The Resource identifier for the MethodResponse resource.
  7056. ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"`
  7057. // The RestApi identifier for the MethodResponse resource.
  7058. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  7059. // The status code identifier for the MethodResponse resource.
  7060. StatusCode *string `location:"uri" locationName:"status_code" type:"string" required:"true"`
  7061. }
  7062. // String returns the string representation
  7063. func (s UpdateMethodResponseInput) String() string {
  7064. return awsutil.Prettify(s)
  7065. }
  7066. // GoString returns the string representation
  7067. func (s UpdateMethodResponseInput) GoString() string {
  7068. return s.String()
  7069. }
  7070. // Validate inspects the fields of the type to determine if they are valid.
  7071. func (s *UpdateMethodResponseInput) Validate() error {
  7072. invalidParams := request.ErrInvalidParams{Context: "UpdateMethodResponseInput"}
  7073. if s.HttpMethod == nil {
  7074. invalidParams.Add(request.NewErrParamRequired("HttpMethod"))
  7075. }
  7076. if s.ResourceId == nil {
  7077. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  7078. }
  7079. if s.RestApiId == nil {
  7080. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  7081. }
  7082. if s.StatusCode == nil {
  7083. invalidParams.Add(request.NewErrParamRequired("StatusCode"))
  7084. }
  7085. if invalidParams.Len() > 0 {
  7086. return invalidParams
  7087. }
  7088. return nil
  7089. }
  7090. // Request to update an existing model in an existing RestApi resource.
  7091. type UpdateModelInput struct {
  7092. _ struct{} `type:"structure"`
  7093. // The name of the model to update.
  7094. ModelName *string `location:"uri" locationName:"model_name" type:"string" required:"true"`
  7095. // A list of operations describing the updates to apply to the specified resource.
  7096. // The patches are applied in the order specified in the list.
  7097. PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"`
  7098. // The RestApi identifier under which the model exists.
  7099. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  7100. }
  7101. // String returns the string representation
  7102. func (s UpdateModelInput) String() string {
  7103. return awsutil.Prettify(s)
  7104. }
  7105. // GoString returns the string representation
  7106. func (s UpdateModelInput) GoString() string {
  7107. return s.String()
  7108. }
  7109. // Validate inspects the fields of the type to determine if they are valid.
  7110. func (s *UpdateModelInput) Validate() error {
  7111. invalidParams := request.ErrInvalidParams{Context: "UpdateModelInput"}
  7112. if s.ModelName == nil {
  7113. invalidParams.Add(request.NewErrParamRequired("ModelName"))
  7114. }
  7115. if s.RestApiId == nil {
  7116. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  7117. }
  7118. if invalidParams.Len() > 0 {
  7119. return invalidParams
  7120. }
  7121. return nil
  7122. }
  7123. // Request to change information about a Resource resource.
  7124. type UpdateResourceInput struct {
  7125. _ struct{} `type:"structure"`
  7126. // A list of operations describing the updates to apply to the specified resource.
  7127. // The patches are applied in the order specified in the list.
  7128. PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"`
  7129. // The identifier of the Resource resource.
  7130. ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"`
  7131. // The RestApi identifier for the Resource resource.
  7132. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  7133. }
  7134. // String returns the string representation
  7135. func (s UpdateResourceInput) String() string {
  7136. return awsutil.Prettify(s)
  7137. }
  7138. // GoString returns the string representation
  7139. func (s UpdateResourceInput) GoString() string {
  7140. return s.String()
  7141. }
  7142. // Validate inspects the fields of the type to determine if they are valid.
  7143. func (s *UpdateResourceInput) Validate() error {
  7144. invalidParams := request.ErrInvalidParams{Context: "UpdateResourceInput"}
  7145. if s.ResourceId == nil {
  7146. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  7147. }
  7148. if s.RestApiId == nil {
  7149. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  7150. }
  7151. if invalidParams.Len() > 0 {
  7152. return invalidParams
  7153. }
  7154. return nil
  7155. }
  7156. // Request to update an existing RestApi resource in your collection.
  7157. type UpdateRestApiInput struct {
  7158. _ struct{} `type:"structure"`
  7159. // A list of operations describing the updates to apply to the specified resource.
  7160. // The patches are applied in the order specified in the list.
  7161. PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"`
  7162. // The ID of the RestApi you want to update.
  7163. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  7164. }
  7165. // String returns the string representation
  7166. func (s UpdateRestApiInput) String() string {
  7167. return awsutil.Prettify(s)
  7168. }
  7169. // GoString returns the string representation
  7170. func (s UpdateRestApiInput) GoString() string {
  7171. return s.String()
  7172. }
  7173. // Validate inspects the fields of the type to determine if they are valid.
  7174. func (s *UpdateRestApiInput) Validate() error {
  7175. invalidParams := request.ErrInvalidParams{Context: "UpdateRestApiInput"}
  7176. if s.RestApiId == nil {
  7177. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  7178. }
  7179. if invalidParams.Len() > 0 {
  7180. return invalidParams
  7181. }
  7182. return nil
  7183. }
  7184. // Requests Amazon API Gateway to change information about a Stage resource.
  7185. type UpdateStageInput struct {
  7186. _ struct{} `type:"structure"`
  7187. // A list of operations describing the updates to apply to the specified resource.
  7188. // The patches are applied in the order specified in the list.
  7189. PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"`
  7190. // The identifier of the RestApi resource for the Stage resource to change information
  7191. // about.
  7192. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  7193. // The name of the Stage resource to change information about.
  7194. StageName *string `location:"uri" locationName:"stage_name" type:"string" required:"true"`
  7195. }
  7196. // String returns the string representation
  7197. func (s UpdateStageInput) String() string {
  7198. return awsutil.Prettify(s)
  7199. }
  7200. // GoString returns the string representation
  7201. func (s UpdateStageInput) GoString() string {
  7202. return s.String()
  7203. }
  7204. // Validate inspects the fields of the type to determine if they are valid.
  7205. func (s *UpdateStageInput) Validate() error {
  7206. invalidParams := request.ErrInvalidParams{Context: "UpdateStageInput"}
  7207. if s.RestApiId == nil {
  7208. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  7209. }
  7210. if s.StageName == nil {
  7211. invalidParams.Add(request.NewErrParamRequired("StageName"))
  7212. }
  7213. if invalidParams.Len() > 0 {
  7214. return invalidParams
  7215. }
  7216. return nil
  7217. }
  7218. // The authorizer type. Only current value is TOKEN.
  7219. const (
  7220. // @enum AuthorizerType
  7221. AuthorizerTypeToken = "TOKEN"
  7222. // @enum AuthorizerType
  7223. AuthorizerTypeCognitoUserPools = "COGNITO_USER_POOLS"
  7224. )
  7225. // Returns the size of the CacheCluster.
  7226. const (
  7227. // @enum CacheClusterSize
  7228. CacheClusterSize05 = "0.5"
  7229. // @enum CacheClusterSize
  7230. CacheClusterSize16 = "1.6"
  7231. // @enum CacheClusterSize
  7232. CacheClusterSize61 = "6.1"
  7233. // @enum CacheClusterSize
  7234. CacheClusterSize135 = "13.5"
  7235. // @enum CacheClusterSize
  7236. CacheClusterSize284 = "28.4"
  7237. // @enum CacheClusterSize
  7238. CacheClusterSize582 = "58.2"
  7239. // @enum CacheClusterSize
  7240. CacheClusterSize118 = "118"
  7241. // @enum CacheClusterSize
  7242. CacheClusterSize237 = "237"
  7243. )
  7244. // Returns the status of the CacheCluster.
  7245. const (
  7246. // @enum CacheClusterStatus
  7247. CacheClusterStatusCreateInProgress = "CREATE_IN_PROGRESS"
  7248. // @enum CacheClusterStatus
  7249. CacheClusterStatusAvailable = "AVAILABLE"
  7250. // @enum CacheClusterStatus
  7251. CacheClusterStatusDeleteInProgress = "DELETE_IN_PROGRESS"
  7252. // @enum CacheClusterStatus
  7253. CacheClusterStatusNotAvailable = "NOT_AVAILABLE"
  7254. // @enum CacheClusterStatus
  7255. CacheClusterStatusFlushInProgress = "FLUSH_IN_PROGRESS"
  7256. )
  7257. // The integration type. The valid value is HTTP, AWS, or MOCK.
  7258. const (
  7259. // @enum IntegrationType
  7260. IntegrationTypeHttp = "HTTP"
  7261. // @enum IntegrationType
  7262. IntegrationTypeAws = "AWS"
  7263. // @enum IntegrationType
  7264. IntegrationTypeMock = "MOCK"
  7265. )
  7266. const (
  7267. // @enum PutMode
  7268. PutModeMerge = "merge"
  7269. // @enum PutMode
  7270. PutModeOverwrite = "overwrite"
  7271. )
  7272. const (
  7273. // @enum UnauthorizedCacheControlHeaderStrategy
  7274. UnauthorizedCacheControlHeaderStrategyFailWith403 = "FAIL_WITH_403"
  7275. // @enum UnauthorizedCacheControlHeaderStrategy
  7276. UnauthorizedCacheControlHeaderStrategySucceedWithResponseHeader = "SUCCEED_WITH_RESPONSE_HEADER"
  7277. // @enum UnauthorizedCacheControlHeaderStrategy
  7278. UnauthorizedCacheControlHeaderStrategySucceedWithoutResponseHeader = "SUCCEED_WITHOUT_RESPONSE_HEADER"
  7279. )
  7280. const (
  7281. // @enum op
  7282. OpAdd = "add"
  7283. // @enum op
  7284. OpRemove = "remove"
  7285. // @enum op
  7286. OpReplace = "replace"
  7287. // @enum op
  7288. OpMove = "move"
  7289. // @enum op
  7290. OpCopy = "copy"
  7291. // @enum op
  7292. OpTest = "test"
  7293. )