api.go 424 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132
  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. // See CreateApiKey for usage and error information.
  18. //
  19. // Creating a request object using this method should be used when you want to inject
  20. // custom logic into the request's lifecycle using a custom handler, or if you want to
  21. // access properties on the request object before or after sending the request. If
  22. // you just want the service response, call the CreateApiKey method directly
  23. // instead.
  24. //
  25. // Note: You must call the "Send" method on the returned request object in order
  26. // to execute the request.
  27. //
  28. // // Example sending a request using the CreateApiKeyRequest method.
  29. // req, resp := client.CreateApiKeyRequest(params)
  30. //
  31. // err := req.Send()
  32. // if err == nil { // resp is now filled
  33. // fmt.Println(resp)
  34. // }
  35. //
  36. func (c *APIGateway) CreateApiKeyRequest(input *CreateApiKeyInput) (req *request.Request, output *ApiKey) {
  37. op := &request.Operation{
  38. Name: opCreateApiKey,
  39. HTTPMethod: "POST",
  40. HTTPPath: "/apikeys",
  41. }
  42. if input == nil {
  43. input = &CreateApiKeyInput{}
  44. }
  45. req = c.newRequest(op, input, output)
  46. output = &ApiKey{}
  47. req.Data = output
  48. return
  49. }
  50. // CreateApiKey API operation for Amazon API Gateway.
  51. //
  52. // Create an ApiKey resource.
  53. //
  54. // AWS CLI (http://docs.aws.amazon.com/cli/latest/reference/apigateway/create-api-key.html)
  55. //
  56. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  57. // with awserr.Error's Code and Message methods to get detailed information about
  58. // the error.
  59. //
  60. // See the AWS API reference guide for Amazon API Gateway's
  61. // API operation CreateApiKey for usage and error information.
  62. //
  63. // Returned Error Codes:
  64. // * UnauthorizedException
  65. //
  66. // * NotFoundException
  67. //
  68. // * TooManyRequestsException
  69. //
  70. // * LimitExceededException
  71. //
  72. // * BadRequestException
  73. //
  74. // * ConflictException
  75. //
  76. func (c *APIGateway) CreateApiKey(input *CreateApiKeyInput) (*ApiKey, error) {
  77. req, out := c.CreateApiKeyRequest(input)
  78. err := req.Send()
  79. return out, err
  80. }
  81. const opCreateAuthorizer = "CreateAuthorizer"
  82. // CreateAuthorizerRequest generates a "aws/request.Request" representing the
  83. // client's request for the CreateAuthorizer operation. The "output" return
  84. // value can be used to capture response data after the request's "Send" method
  85. // is called.
  86. //
  87. // See CreateAuthorizer for usage and error information.
  88. //
  89. // Creating a request object using this method should be used when you want to inject
  90. // custom logic into the request's lifecycle using a custom handler, or if you want to
  91. // access properties on the request object before or after sending the request. If
  92. // you just want the service response, call the CreateAuthorizer method directly
  93. // instead.
  94. //
  95. // Note: You must call the "Send" method on the returned request object in order
  96. // to execute the request.
  97. //
  98. // // Example sending a request using the CreateAuthorizerRequest method.
  99. // req, resp := client.CreateAuthorizerRequest(params)
  100. //
  101. // err := req.Send()
  102. // if err == nil { // resp is now filled
  103. // fmt.Println(resp)
  104. // }
  105. //
  106. func (c *APIGateway) CreateAuthorizerRequest(input *CreateAuthorizerInput) (req *request.Request, output *Authorizer) {
  107. op := &request.Operation{
  108. Name: opCreateAuthorizer,
  109. HTTPMethod: "POST",
  110. HTTPPath: "/restapis/{restapi_id}/authorizers",
  111. }
  112. if input == nil {
  113. input = &CreateAuthorizerInput{}
  114. }
  115. req = c.newRequest(op, input, output)
  116. output = &Authorizer{}
  117. req.Data = output
  118. return
  119. }
  120. // CreateAuthorizer API operation for Amazon API Gateway.
  121. //
  122. // Adds a new Authorizer resource to an existing RestApi resource.
  123. //
  124. // AWS CLI (http://docs.aws.amazon.com/cli/latest/reference/apigateway/create-authorizer.html)
  125. //
  126. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  127. // with awserr.Error's Code and Message methods to get detailed information about
  128. // the error.
  129. //
  130. // See the AWS API reference guide for Amazon API Gateway's
  131. // API operation CreateAuthorizer for usage and error information.
  132. //
  133. // Returned Error Codes:
  134. // * BadRequestException
  135. //
  136. // * UnauthorizedException
  137. //
  138. // * NotFoundException
  139. //
  140. // * LimitExceededException
  141. //
  142. // * TooManyRequestsException
  143. //
  144. func (c *APIGateway) CreateAuthorizer(input *CreateAuthorizerInput) (*Authorizer, error) {
  145. req, out := c.CreateAuthorizerRequest(input)
  146. err := req.Send()
  147. return out, err
  148. }
  149. const opCreateBasePathMapping = "CreateBasePathMapping"
  150. // CreateBasePathMappingRequest generates a "aws/request.Request" representing the
  151. // client's request for the CreateBasePathMapping operation. The "output" return
  152. // value can be used to capture response data after the request's "Send" method
  153. // is called.
  154. //
  155. // See CreateBasePathMapping for usage and error information.
  156. //
  157. // Creating a request object using this method should be used when you want to inject
  158. // custom logic into the request's lifecycle using a custom handler, or if you want to
  159. // access properties on the request object before or after sending the request. If
  160. // you just want the service response, call the CreateBasePathMapping method directly
  161. // instead.
  162. //
  163. // Note: You must call the "Send" method on the returned request object in order
  164. // to execute the request.
  165. //
  166. // // Example sending a request using the CreateBasePathMappingRequest method.
  167. // req, resp := client.CreateBasePathMappingRequest(params)
  168. //
  169. // err := req.Send()
  170. // if err == nil { // resp is now filled
  171. // fmt.Println(resp)
  172. // }
  173. //
  174. func (c *APIGateway) CreateBasePathMappingRequest(input *CreateBasePathMappingInput) (req *request.Request, output *BasePathMapping) {
  175. op := &request.Operation{
  176. Name: opCreateBasePathMapping,
  177. HTTPMethod: "POST",
  178. HTTPPath: "/domainnames/{domain_name}/basepathmappings",
  179. }
  180. if input == nil {
  181. input = &CreateBasePathMappingInput{}
  182. }
  183. req = c.newRequest(op, input, output)
  184. output = &BasePathMapping{}
  185. req.Data = output
  186. return
  187. }
  188. // CreateBasePathMapping API operation for Amazon API Gateway.
  189. //
  190. // Creates a new BasePathMapping resource.
  191. //
  192. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  193. // with awserr.Error's Code and Message methods to get detailed information about
  194. // the error.
  195. //
  196. // See the AWS API reference guide for Amazon API Gateway's
  197. // API operation CreateBasePathMapping for usage and error information.
  198. //
  199. // Returned Error Codes:
  200. // * UnauthorizedException
  201. //
  202. // * ConflictException
  203. //
  204. // * BadRequestException
  205. //
  206. // * NotFoundException
  207. //
  208. // * TooManyRequestsException
  209. //
  210. func (c *APIGateway) CreateBasePathMapping(input *CreateBasePathMappingInput) (*BasePathMapping, error) {
  211. req, out := c.CreateBasePathMappingRequest(input)
  212. err := req.Send()
  213. return out, err
  214. }
  215. const opCreateDeployment = "CreateDeployment"
  216. // CreateDeploymentRequest generates a "aws/request.Request" representing the
  217. // client's request for the CreateDeployment operation. The "output" return
  218. // value can be used to capture response data after the request's "Send" method
  219. // is called.
  220. //
  221. // See CreateDeployment for usage and error information.
  222. //
  223. // Creating a request object using this method should be used when you want to inject
  224. // custom logic into the request's lifecycle using a custom handler, or if you want to
  225. // access properties on the request object before or after sending the request. If
  226. // you just want the service response, call the CreateDeployment method directly
  227. // instead.
  228. //
  229. // Note: You must call the "Send" method on the returned request object in order
  230. // to execute the request.
  231. //
  232. // // Example sending a request using the CreateDeploymentRequest method.
  233. // req, resp := client.CreateDeploymentRequest(params)
  234. //
  235. // err := req.Send()
  236. // if err == nil { // resp is now filled
  237. // fmt.Println(resp)
  238. // }
  239. //
  240. func (c *APIGateway) CreateDeploymentRequest(input *CreateDeploymentInput) (req *request.Request, output *Deployment) {
  241. op := &request.Operation{
  242. Name: opCreateDeployment,
  243. HTTPMethod: "POST",
  244. HTTPPath: "/restapis/{restapi_id}/deployments",
  245. }
  246. if input == nil {
  247. input = &CreateDeploymentInput{}
  248. }
  249. req = c.newRequest(op, input, output)
  250. output = &Deployment{}
  251. req.Data = output
  252. return
  253. }
  254. // CreateDeployment API operation for Amazon API Gateway.
  255. //
  256. // Creates a Deployment resource, which makes a specified RestApi callable over
  257. // the internet.
  258. //
  259. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  260. // with awserr.Error's Code and Message methods to get detailed information about
  261. // the error.
  262. //
  263. // See the AWS API reference guide for Amazon API Gateway's
  264. // API operation CreateDeployment for usage and error information.
  265. //
  266. // Returned Error Codes:
  267. // * UnauthorizedException
  268. //
  269. // * BadRequestException
  270. //
  271. // * NotFoundException
  272. //
  273. // * ConflictException
  274. //
  275. // * LimitExceededException
  276. //
  277. // * TooManyRequestsException
  278. //
  279. // * ServiceUnavailableException
  280. //
  281. func (c *APIGateway) CreateDeployment(input *CreateDeploymentInput) (*Deployment, error) {
  282. req, out := c.CreateDeploymentRequest(input)
  283. err := req.Send()
  284. return out, err
  285. }
  286. const opCreateDomainName = "CreateDomainName"
  287. // CreateDomainNameRequest generates a "aws/request.Request" representing the
  288. // client's request for the CreateDomainName operation. The "output" return
  289. // value can be used to capture response data after the request's "Send" method
  290. // is called.
  291. //
  292. // See CreateDomainName for usage and error information.
  293. //
  294. // Creating a request object using this method should be used when you want to inject
  295. // custom logic into the request's lifecycle using a custom handler, or if you want to
  296. // access properties on the request object before or after sending the request. If
  297. // you just want the service response, call the CreateDomainName method directly
  298. // instead.
  299. //
  300. // Note: You must call the "Send" method on the returned request object in order
  301. // to execute the request.
  302. //
  303. // // Example sending a request using the CreateDomainNameRequest method.
  304. // req, resp := client.CreateDomainNameRequest(params)
  305. //
  306. // err := req.Send()
  307. // if err == nil { // resp is now filled
  308. // fmt.Println(resp)
  309. // }
  310. //
  311. func (c *APIGateway) CreateDomainNameRequest(input *CreateDomainNameInput) (req *request.Request, output *DomainName) {
  312. op := &request.Operation{
  313. Name: opCreateDomainName,
  314. HTTPMethod: "POST",
  315. HTTPPath: "/domainnames",
  316. }
  317. if input == nil {
  318. input = &CreateDomainNameInput{}
  319. }
  320. req = c.newRequest(op, input, output)
  321. output = &DomainName{}
  322. req.Data = output
  323. return
  324. }
  325. // CreateDomainName API operation for Amazon API Gateway.
  326. //
  327. // Creates a new domain name.
  328. //
  329. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  330. // with awserr.Error's Code and Message methods to get detailed information about
  331. // the error.
  332. //
  333. // See the AWS API reference guide for Amazon API Gateway's
  334. // API operation CreateDomainName for usage and error information.
  335. //
  336. // Returned Error Codes:
  337. // * UnauthorizedException
  338. //
  339. // * BadRequestException
  340. //
  341. // * ConflictException
  342. //
  343. // * TooManyRequestsException
  344. //
  345. func (c *APIGateway) CreateDomainName(input *CreateDomainNameInput) (*DomainName, error) {
  346. req, out := c.CreateDomainNameRequest(input)
  347. err := req.Send()
  348. return out, err
  349. }
  350. const opCreateModel = "CreateModel"
  351. // CreateModelRequest generates a "aws/request.Request" representing the
  352. // client's request for the CreateModel operation. The "output" return
  353. // value can be used to capture response data after the request's "Send" method
  354. // is called.
  355. //
  356. // See CreateModel for usage and error information.
  357. //
  358. // Creating a request object using this method should be used when you want to inject
  359. // custom logic into the request's lifecycle using a custom handler, or if you want to
  360. // access properties on the request object before or after sending the request. If
  361. // you just want the service response, call the CreateModel method directly
  362. // instead.
  363. //
  364. // Note: You must call the "Send" method on the returned request object in order
  365. // to execute the request.
  366. //
  367. // // Example sending a request using the CreateModelRequest method.
  368. // req, resp := client.CreateModelRequest(params)
  369. //
  370. // err := req.Send()
  371. // if err == nil { // resp is now filled
  372. // fmt.Println(resp)
  373. // }
  374. //
  375. func (c *APIGateway) CreateModelRequest(input *CreateModelInput) (req *request.Request, output *Model) {
  376. op := &request.Operation{
  377. Name: opCreateModel,
  378. HTTPMethod: "POST",
  379. HTTPPath: "/restapis/{restapi_id}/models",
  380. }
  381. if input == nil {
  382. input = &CreateModelInput{}
  383. }
  384. req = c.newRequest(op, input, output)
  385. output = &Model{}
  386. req.Data = output
  387. return
  388. }
  389. // CreateModel API operation for Amazon API Gateway.
  390. //
  391. // Adds a new Model resource to an existing RestApi resource.
  392. //
  393. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  394. // with awserr.Error's Code and Message methods to get detailed information about
  395. // the error.
  396. //
  397. // See the AWS API reference guide for Amazon API Gateway's
  398. // API operation CreateModel for usage and error information.
  399. //
  400. // Returned Error Codes:
  401. // * BadRequestException
  402. //
  403. // * UnauthorizedException
  404. //
  405. // * NotFoundException
  406. //
  407. // * ConflictException
  408. //
  409. // * LimitExceededException
  410. //
  411. // * TooManyRequestsException
  412. //
  413. func (c *APIGateway) CreateModel(input *CreateModelInput) (*Model, error) {
  414. req, out := c.CreateModelRequest(input)
  415. err := req.Send()
  416. return out, err
  417. }
  418. const opCreateResource = "CreateResource"
  419. // CreateResourceRequest generates a "aws/request.Request" representing the
  420. // client's request for the CreateResource operation. The "output" return
  421. // value can be used to capture response data after the request's "Send" method
  422. // is called.
  423. //
  424. // See CreateResource for usage and error information.
  425. //
  426. // Creating a request object using this method should be used when you want to inject
  427. // custom logic into the request's lifecycle using a custom handler, or if you want to
  428. // access properties on the request object before or after sending the request. If
  429. // you just want the service response, call the CreateResource method directly
  430. // instead.
  431. //
  432. // Note: You must call the "Send" method on the returned request object in order
  433. // to execute the request.
  434. //
  435. // // Example sending a request using the CreateResourceRequest method.
  436. // req, resp := client.CreateResourceRequest(params)
  437. //
  438. // err := req.Send()
  439. // if err == nil { // resp is now filled
  440. // fmt.Println(resp)
  441. // }
  442. //
  443. func (c *APIGateway) CreateResourceRequest(input *CreateResourceInput) (req *request.Request, output *Resource) {
  444. op := &request.Operation{
  445. Name: opCreateResource,
  446. HTTPMethod: "POST",
  447. HTTPPath: "/restapis/{restapi_id}/resources/{parent_id}",
  448. }
  449. if input == nil {
  450. input = &CreateResourceInput{}
  451. }
  452. req = c.newRequest(op, input, output)
  453. output = &Resource{}
  454. req.Data = output
  455. return
  456. }
  457. // CreateResource API operation for Amazon API Gateway.
  458. //
  459. // Creates a Resource resource.
  460. //
  461. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  462. // with awserr.Error's Code and Message methods to get detailed information about
  463. // the error.
  464. //
  465. // See the AWS API reference guide for Amazon API Gateway's
  466. // API operation CreateResource for usage and error information.
  467. //
  468. // Returned Error Codes:
  469. // * UnauthorizedException
  470. //
  471. // * NotFoundException
  472. //
  473. // * ConflictException
  474. //
  475. // * LimitExceededException
  476. //
  477. // * BadRequestException
  478. //
  479. // * TooManyRequestsException
  480. //
  481. func (c *APIGateway) CreateResource(input *CreateResourceInput) (*Resource, error) {
  482. req, out := c.CreateResourceRequest(input)
  483. err := req.Send()
  484. return out, err
  485. }
  486. const opCreateRestApi = "CreateRestApi"
  487. // CreateRestApiRequest generates a "aws/request.Request" representing the
  488. // client's request for the CreateRestApi operation. The "output" return
  489. // value can be used to capture response data after the request's "Send" method
  490. // is called.
  491. //
  492. // See CreateRestApi for usage and error information.
  493. //
  494. // Creating a request object using this method should be used when you want to inject
  495. // custom logic into the request's lifecycle using a custom handler, or if you want to
  496. // access properties on the request object before or after sending the request. If
  497. // you just want the service response, call the CreateRestApi method directly
  498. // instead.
  499. //
  500. // Note: You must call the "Send" method on the returned request object in order
  501. // to execute the request.
  502. //
  503. // // Example sending a request using the CreateRestApiRequest method.
  504. // req, resp := client.CreateRestApiRequest(params)
  505. //
  506. // err := req.Send()
  507. // if err == nil { // resp is now filled
  508. // fmt.Println(resp)
  509. // }
  510. //
  511. func (c *APIGateway) CreateRestApiRequest(input *CreateRestApiInput) (req *request.Request, output *RestApi) {
  512. op := &request.Operation{
  513. Name: opCreateRestApi,
  514. HTTPMethod: "POST",
  515. HTTPPath: "/restapis",
  516. }
  517. if input == nil {
  518. input = &CreateRestApiInput{}
  519. }
  520. req = c.newRequest(op, input, output)
  521. output = &RestApi{}
  522. req.Data = output
  523. return
  524. }
  525. // CreateRestApi API operation for Amazon API Gateway.
  526. //
  527. // Creates a new RestApi resource.
  528. //
  529. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  530. // with awserr.Error's Code and Message methods to get detailed information about
  531. // the error.
  532. //
  533. // See the AWS API reference guide for Amazon API Gateway's
  534. // API operation CreateRestApi for usage and error information.
  535. //
  536. // Returned Error Codes:
  537. // * UnauthorizedException
  538. //
  539. // * LimitExceededException
  540. //
  541. // * BadRequestException
  542. //
  543. // * TooManyRequestsException
  544. //
  545. func (c *APIGateway) CreateRestApi(input *CreateRestApiInput) (*RestApi, error) {
  546. req, out := c.CreateRestApiRequest(input)
  547. err := req.Send()
  548. return out, err
  549. }
  550. const opCreateStage = "CreateStage"
  551. // CreateStageRequest generates a "aws/request.Request" representing the
  552. // client's request for the CreateStage operation. The "output" return
  553. // value can be used to capture response data after the request's "Send" method
  554. // is called.
  555. //
  556. // See CreateStage for usage and error information.
  557. //
  558. // Creating a request object using this method should be used when you want to inject
  559. // custom logic into the request's lifecycle using a custom handler, or if you want to
  560. // access properties on the request object before or after sending the request. If
  561. // you just want the service response, call the CreateStage method directly
  562. // instead.
  563. //
  564. // Note: You must call the "Send" method on the returned request object in order
  565. // to execute the request.
  566. //
  567. // // Example sending a request using the CreateStageRequest method.
  568. // req, resp := client.CreateStageRequest(params)
  569. //
  570. // err := req.Send()
  571. // if err == nil { // resp is now filled
  572. // fmt.Println(resp)
  573. // }
  574. //
  575. func (c *APIGateway) CreateStageRequest(input *CreateStageInput) (req *request.Request, output *Stage) {
  576. op := &request.Operation{
  577. Name: opCreateStage,
  578. HTTPMethod: "POST",
  579. HTTPPath: "/restapis/{restapi_id}/stages",
  580. }
  581. if input == nil {
  582. input = &CreateStageInput{}
  583. }
  584. req = c.newRequest(op, input, output)
  585. output = &Stage{}
  586. req.Data = output
  587. return
  588. }
  589. // CreateStage API operation for Amazon API Gateway.
  590. //
  591. // Creates a new Stage resource that references a pre-existing Deployment for
  592. // the API.
  593. //
  594. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  595. // with awserr.Error's Code and Message methods to get detailed information about
  596. // the error.
  597. //
  598. // See the AWS API reference guide for Amazon API Gateway's
  599. // API operation CreateStage for usage and error information.
  600. //
  601. // Returned Error Codes:
  602. // * UnauthorizedException
  603. //
  604. // * BadRequestException
  605. //
  606. // * NotFoundException
  607. //
  608. // * ConflictException
  609. //
  610. // * LimitExceededException
  611. //
  612. // * TooManyRequestsException
  613. //
  614. func (c *APIGateway) CreateStage(input *CreateStageInput) (*Stage, error) {
  615. req, out := c.CreateStageRequest(input)
  616. err := req.Send()
  617. return out, err
  618. }
  619. const opCreateUsagePlan = "CreateUsagePlan"
  620. // CreateUsagePlanRequest generates a "aws/request.Request" representing the
  621. // client's request for the CreateUsagePlan operation. The "output" return
  622. // value can be used to capture response data after the request's "Send" method
  623. // is called.
  624. //
  625. // See CreateUsagePlan for usage and error information.
  626. //
  627. // Creating a request object using this method should be used when you want to inject
  628. // custom logic into the request's lifecycle using a custom handler, or if you want to
  629. // access properties on the request object before or after sending the request. If
  630. // you just want the service response, call the CreateUsagePlan method directly
  631. // instead.
  632. //
  633. // Note: You must call the "Send" method on the returned request object in order
  634. // to execute the request.
  635. //
  636. // // Example sending a request using the CreateUsagePlanRequest method.
  637. // req, resp := client.CreateUsagePlanRequest(params)
  638. //
  639. // err := req.Send()
  640. // if err == nil { // resp is now filled
  641. // fmt.Println(resp)
  642. // }
  643. //
  644. func (c *APIGateway) CreateUsagePlanRequest(input *CreateUsagePlanInput) (req *request.Request, output *UsagePlan) {
  645. op := &request.Operation{
  646. Name: opCreateUsagePlan,
  647. HTTPMethod: "POST",
  648. HTTPPath: "/usageplans",
  649. }
  650. if input == nil {
  651. input = &CreateUsagePlanInput{}
  652. }
  653. req = c.newRequest(op, input, output)
  654. output = &UsagePlan{}
  655. req.Data = output
  656. return
  657. }
  658. // CreateUsagePlan API operation for Amazon API Gateway.
  659. //
  660. // Creates a usage plan with the throttle and quota limits, as well as the associated
  661. // API stages, specified in the payload.
  662. //
  663. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  664. // with awserr.Error's Code and Message methods to get detailed information about
  665. // the error.
  666. //
  667. // See the AWS API reference guide for Amazon API Gateway's
  668. // API operation CreateUsagePlan for usage and error information.
  669. //
  670. // Returned Error Codes:
  671. // * BadRequestException
  672. //
  673. // * UnauthorizedException
  674. //
  675. // * TooManyRequestsException
  676. //
  677. // * LimitExceededException
  678. //
  679. // * ConflictException
  680. //
  681. func (c *APIGateway) CreateUsagePlan(input *CreateUsagePlanInput) (*UsagePlan, error) {
  682. req, out := c.CreateUsagePlanRequest(input)
  683. err := req.Send()
  684. return out, err
  685. }
  686. const opCreateUsagePlanKey = "CreateUsagePlanKey"
  687. // CreateUsagePlanKeyRequest generates a "aws/request.Request" representing the
  688. // client's request for the CreateUsagePlanKey operation. The "output" return
  689. // value can be used to capture response data after the request's "Send" method
  690. // is called.
  691. //
  692. // See CreateUsagePlanKey for usage and error information.
  693. //
  694. // Creating a request object using this method should be used when you want to inject
  695. // custom logic into the request's lifecycle using a custom handler, or if you want to
  696. // access properties on the request object before or after sending the request. If
  697. // you just want the service response, call the CreateUsagePlanKey method directly
  698. // instead.
  699. //
  700. // Note: You must call the "Send" method on the returned request object in order
  701. // to execute the request.
  702. //
  703. // // Example sending a request using the CreateUsagePlanKeyRequest method.
  704. // req, resp := client.CreateUsagePlanKeyRequest(params)
  705. //
  706. // err := req.Send()
  707. // if err == nil { // resp is now filled
  708. // fmt.Println(resp)
  709. // }
  710. //
  711. func (c *APIGateway) CreateUsagePlanKeyRequest(input *CreateUsagePlanKeyInput) (req *request.Request, output *UsagePlanKey) {
  712. op := &request.Operation{
  713. Name: opCreateUsagePlanKey,
  714. HTTPMethod: "POST",
  715. HTTPPath: "/usageplans/{usageplanId}/keys",
  716. }
  717. if input == nil {
  718. input = &CreateUsagePlanKeyInput{}
  719. }
  720. req = c.newRequest(op, input, output)
  721. output = &UsagePlanKey{}
  722. req.Data = output
  723. return
  724. }
  725. // CreateUsagePlanKey API operation for Amazon API Gateway.
  726. //
  727. // Creates a usage plan key for adding an existing API key to a usage plan.
  728. //
  729. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  730. // with awserr.Error's Code and Message methods to get detailed information about
  731. // the error.
  732. //
  733. // See the AWS API reference guide for Amazon API Gateway's
  734. // API operation CreateUsagePlanKey for usage and error information.
  735. //
  736. // Returned Error Codes:
  737. // * BadRequestException
  738. //
  739. // * ConflictException
  740. //
  741. // * UnauthorizedException
  742. //
  743. // * NotFoundException
  744. //
  745. // * TooManyRequestsException
  746. //
  747. func (c *APIGateway) CreateUsagePlanKey(input *CreateUsagePlanKeyInput) (*UsagePlanKey, error) {
  748. req, out := c.CreateUsagePlanKeyRequest(input)
  749. err := req.Send()
  750. return out, err
  751. }
  752. const opDeleteApiKey = "DeleteApiKey"
  753. // DeleteApiKeyRequest generates a "aws/request.Request" representing the
  754. // client's request for the DeleteApiKey operation. The "output" return
  755. // value can be used to capture response data after the request's "Send" method
  756. // is called.
  757. //
  758. // See DeleteApiKey for usage and error information.
  759. //
  760. // Creating a request object using this method should be used when you want to inject
  761. // custom logic into the request's lifecycle using a custom handler, or if you want to
  762. // access properties on the request object before or after sending the request. If
  763. // you just want the service response, call the DeleteApiKey method directly
  764. // instead.
  765. //
  766. // Note: You must call the "Send" method on the returned request object in order
  767. // to execute the request.
  768. //
  769. // // Example sending a request using the DeleteApiKeyRequest method.
  770. // req, resp := client.DeleteApiKeyRequest(params)
  771. //
  772. // err := req.Send()
  773. // if err == nil { // resp is now filled
  774. // fmt.Println(resp)
  775. // }
  776. //
  777. func (c *APIGateway) DeleteApiKeyRequest(input *DeleteApiKeyInput) (req *request.Request, output *DeleteApiKeyOutput) {
  778. op := &request.Operation{
  779. Name: opDeleteApiKey,
  780. HTTPMethod: "DELETE",
  781. HTTPPath: "/apikeys/{api_Key}",
  782. }
  783. if input == nil {
  784. input = &DeleteApiKeyInput{}
  785. }
  786. req = c.newRequest(op, input, output)
  787. req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
  788. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  789. output = &DeleteApiKeyOutput{}
  790. req.Data = output
  791. return
  792. }
  793. // DeleteApiKey API operation for Amazon API Gateway.
  794. //
  795. // Deletes the ApiKey resource.
  796. //
  797. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  798. // with awserr.Error's Code and Message methods to get detailed information about
  799. // the error.
  800. //
  801. // See the AWS API reference guide for Amazon API Gateway's
  802. // API operation DeleteApiKey for usage and error information.
  803. //
  804. // Returned Error Codes:
  805. // * UnauthorizedException
  806. //
  807. // * NotFoundException
  808. //
  809. // * TooManyRequestsException
  810. //
  811. func (c *APIGateway) DeleteApiKey(input *DeleteApiKeyInput) (*DeleteApiKeyOutput, error) {
  812. req, out := c.DeleteApiKeyRequest(input)
  813. err := req.Send()
  814. return out, err
  815. }
  816. const opDeleteAuthorizer = "DeleteAuthorizer"
  817. // DeleteAuthorizerRequest generates a "aws/request.Request" representing the
  818. // client's request for the DeleteAuthorizer operation. The "output" return
  819. // value can be used to capture response data after the request's "Send" method
  820. // is called.
  821. //
  822. // See DeleteAuthorizer for usage and error information.
  823. //
  824. // Creating a request object using this method should be used when you want to inject
  825. // custom logic into the request's lifecycle using a custom handler, or if you want to
  826. // access properties on the request object before or after sending the request. If
  827. // you just want the service response, call the DeleteAuthorizer method directly
  828. // instead.
  829. //
  830. // Note: You must call the "Send" method on the returned request object in order
  831. // to execute the request.
  832. //
  833. // // Example sending a request using the DeleteAuthorizerRequest method.
  834. // req, resp := client.DeleteAuthorizerRequest(params)
  835. //
  836. // err := req.Send()
  837. // if err == nil { // resp is now filled
  838. // fmt.Println(resp)
  839. // }
  840. //
  841. func (c *APIGateway) DeleteAuthorizerRequest(input *DeleteAuthorizerInput) (req *request.Request, output *DeleteAuthorizerOutput) {
  842. op := &request.Operation{
  843. Name: opDeleteAuthorizer,
  844. HTTPMethod: "DELETE",
  845. HTTPPath: "/restapis/{restapi_id}/authorizers/{authorizer_id}",
  846. }
  847. if input == nil {
  848. input = &DeleteAuthorizerInput{}
  849. }
  850. req = c.newRequest(op, input, output)
  851. req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
  852. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  853. output = &DeleteAuthorizerOutput{}
  854. req.Data = output
  855. return
  856. }
  857. // DeleteAuthorizer API operation for Amazon API Gateway.
  858. //
  859. // Deletes an existing Authorizer resource.
  860. //
  861. // AWS CLI (http://docs.aws.amazon.com/cli/latest/reference/apigateway/delete-authorizer.html)
  862. //
  863. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  864. // with awserr.Error's Code and Message methods to get detailed information about
  865. // the error.
  866. //
  867. // See the AWS API reference guide for Amazon API Gateway's
  868. // API operation DeleteAuthorizer for usage and error information.
  869. //
  870. // Returned Error Codes:
  871. // * UnauthorizedException
  872. //
  873. // * NotFoundException
  874. //
  875. // * TooManyRequestsException
  876. //
  877. // * BadRequestException
  878. //
  879. // * ConflictException
  880. //
  881. func (c *APIGateway) DeleteAuthorizer(input *DeleteAuthorizerInput) (*DeleteAuthorizerOutput, error) {
  882. req, out := c.DeleteAuthorizerRequest(input)
  883. err := req.Send()
  884. return out, err
  885. }
  886. const opDeleteBasePathMapping = "DeleteBasePathMapping"
  887. // DeleteBasePathMappingRequest generates a "aws/request.Request" representing the
  888. // client's request for the DeleteBasePathMapping operation. The "output" return
  889. // value can be used to capture response data after the request's "Send" method
  890. // is called.
  891. //
  892. // See DeleteBasePathMapping for usage and error information.
  893. //
  894. // Creating a request object using this method should be used when you want to inject
  895. // custom logic into the request's lifecycle using a custom handler, or if you want to
  896. // access properties on the request object before or after sending the request. If
  897. // you just want the service response, call the DeleteBasePathMapping method directly
  898. // instead.
  899. //
  900. // Note: You must call the "Send" method on the returned request object in order
  901. // to execute the request.
  902. //
  903. // // Example sending a request using the DeleteBasePathMappingRequest method.
  904. // req, resp := client.DeleteBasePathMappingRequest(params)
  905. //
  906. // err := req.Send()
  907. // if err == nil { // resp is now filled
  908. // fmt.Println(resp)
  909. // }
  910. //
  911. func (c *APIGateway) DeleteBasePathMappingRequest(input *DeleteBasePathMappingInput) (req *request.Request, output *DeleteBasePathMappingOutput) {
  912. op := &request.Operation{
  913. Name: opDeleteBasePathMapping,
  914. HTTPMethod: "DELETE",
  915. HTTPPath: "/domainnames/{domain_name}/basepathmappings/{base_path}",
  916. }
  917. if input == nil {
  918. input = &DeleteBasePathMappingInput{}
  919. }
  920. req = c.newRequest(op, input, output)
  921. req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
  922. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  923. output = &DeleteBasePathMappingOutput{}
  924. req.Data = output
  925. return
  926. }
  927. // DeleteBasePathMapping API operation for Amazon API Gateway.
  928. //
  929. // Deletes the BasePathMapping resource.
  930. //
  931. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  932. // with awserr.Error's Code and Message methods to get detailed information about
  933. // the error.
  934. //
  935. // See the AWS API reference guide for Amazon API Gateway's
  936. // API operation DeleteBasePathMapping for usage and error information.
  937. //
  938. // Returned Error Codes:
  939. // * UnauthorizedException
  940. //
  941. // * NotFoundException
  942. //
  943. // * TooManyRequestsException
  944. //
  945. func (c *APIGateway) DeleteBasePathMapping(input *DeleteBasePathMappingInput) (*DeleteBasePathMappingOutput, error) {
  946. req, out := c.DeleteBasePathMappingRequest(input)
  947. err := req.Send()
  948. return out, err
  949. }
  950. const opDeleteClientCertificate = "DeleteClientCertificate"
  951. // DeleteClientCertificateRequest generates a "aws/request.Request" representing the
  952. // client's request for the DeleteClientCertificate operation. The "output" return
  953. // value can be used to capture response data after the request's "Send" method
  954. // is called.
  955. //
  956. // See DeleteClientCertificate for usage and error information.
  957. //
  958. // Creating a request object using this method should be used when you want to inject
  959. // custom logic into the request's lifecycle using a custom handler, or if you want to
  960. // access properties on the request object before or after sending the request. If
  961. // you just want the service response, call the DeleteClientCertificate method directly
  962. // instead.
  963. //
  964. // Note: You must call the "Send" method on the returned request object in order
  965. // to execute the request.
  966. //
  967. // // Example sending a request using the DeleteClientCertificateRequest method.
  968. // req, resp := client.DeleteClientCertificateRequest(params)
  969. //
  970. // err := req.Send()
  971. // if err == nil { // resp is now filled
  972. // fmt.Println(resp)
  973. // }
  974. //
  975. func (c *APIGateway) DeleteClientCertificateRequest(input *DeleteClientCertificateInput) (req *request.Request, output *DeleteClientCertificateOutput) {
  976. op := &request.Operation{
  977. Name: opDeleteClientCertificate,
  978. HTTPMethod: "DELETE",
  979. HTTPPath: "/clientcertificates/{clientcertificate_id}",
  980. }
  981. if input == nil {
  982. input = &DeleteClientCertificateInput{}
  983. }
  984. req = c.newRequest(op, input, output)
  985. req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
  986. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  987. output = &DeleteClientCertificateOutput{}
  988. req.Data = output
  989. return
  990. }
  991. // DeleteClientCertificate API operation for Amazon API Gateway.
  992. //
  993. // Deletes the ClientCertificate resource.
  994. //
  995. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  996. // with awserr.Error's Code and Message methods to get detailed information about
  997. // the error.
  998. //
  999. // See the AWS API reference guide for Amazon API Gateway's
  1000. // API operation DeleteClientCertificate for usage and error information.
  1001. //
  1002. // Returned Error Codes:
  1003. // * UnauthorizedException
  1004. //
  1005. // * TooManyRequestsException
  1006. //
  1007. // * BadRequestException
  1008. //
  1009. // * NotFoundException
  1010. //
  1011. func (c *APIGateway) DeleteClientCertificate(input *DeleteClientCertificateInput) (*DeleteClientCertificateOutput, error) {
  1012. req, out := c.DeleteClientCertificateRequest(input)
  1013. err := req.Send()
  1014. return out, err
  1015. }
  1016. const opDeleteDeployment = "DeleteDeployment"
  1017. // DeleteDeploymentRequest generates a "aws/request.Request" representing the
  1018. // client's request for the DeleteDeployment operation. The "output" return
  1019. // value can be used to capture response data after the request's "Send" method
  1020. // is called.
  1021. //
  1022. // See DeleteDeployment for usage and error information.
  1023. //
  1024. // Creating a request object using this method should be used when you want to inject
  1025. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1026. // access properties on the request object before or after sending the request. If
  1027. // you just want the service response, call the DeleteDeployment method directly
  1028. // instead.
  1029. //
  1030. // Note: You must call the "Send" method on the returned request object in order
  1031. // to execute the request.
  1032. //
  1033. // // Example sending a request using the DeleteDeploymentRequest method.
  1034. // req, resp := client.DeleteDeploymentRequest(params)
  1035. //
  1036. // err := req.Send()
  1037. // if err == nil { // resp is now filled
  1038. // fmt.Println(resp)
  1039. // }
  1040. //
  1041. func (c *APIGateway) DeleteDeploymentRequest(input *DeleteDeploymentInput) (req *request.Request, output *DeleteDeploymentOutput) {
  1042. op := &request.Operation{
  1043. Name: opDeleteDeployment,
  1044. HTTPMethod: "DELETE",
  1045. HTTPPath: "/restapis/{restapi_id}/deployments/{deployment_id}",
  1046. }
  1047. if input == nil {
  1048. input = &DeleteDeploymentInput{}
  1049. }
  1050. req = c.newRequest(op, input, output)
  1051. req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
  1052. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  1053. output = &DeleteDeploymentOutput{}
  1054. req.Data = output
  1055. return
  1056. }
  1057. // DeleteDeployment API operation for Amazon API Gateway.
  1058. //
  1059. // Deletes a Deployment resource. Deleting a deployment will only succeed if
  1060. // there are no Stage resources associated with it.
  1061. //
  1062. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1063. // with awserr.Error's Code and Message methods to get detailed information about
  1064. // the error.
  1065. //
  1066. // See the AWS API reference guide for Amazon API Gateway's
  1067. // API operation DeleteDeployment for usage and error information.
  1068. //
  1069. // Returned Error Codes:
  1070. // * UnauthorizedException
  1071. //
  1072. // * NotFoundException
  1073. //
  1074. // * BadRequestException
  1075. //
  1076. // * TooManyRequestsException
  1077. //
  1078. func (c *APIGateway) DeleteDeployment(input *DeleteDeploymentInput) (*DeleteDeploymentOutput, error) {
  1079. req, out := c.DeleteDeploymentRequest(input)
  1080. err := req.Send()
  1081. return out, err
  1082. }
  1083. const opDeleteDomainName = "DeleteDomainName"
  1084. // DeleteDomainNameRequest generates a "aws/request.Request" representing the
  1085. // client's request for the DeleteDomainName operation. The "output" return
  1086. // value can be used to capture response data after the request's "Send" method
  1087. // is called.
  1088. //
  1089. // See DeleteDomainName for usage and error information.
  1090. //
  1091. // Creating a request object using this method should be used when you want to inject
  1092. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1093. // access properties on the request object before or after sending the request. If
  1094. // you just want the service response, call the DeleteDomainName method directly
  1095. // instead.
  1096. //
  1097. // Note: You must call the "Send" method on the returned request object in order
  1098. // to execute the request.
  1099. //
  1100. // // Example sending a request using the DeleteDomainNameRequest method.
  1101. // req, resp := client.DeleteDomainNameRequest(params)
  1102. //
  1103. // err := req.Send()
  1104. // if err == nil { // resp is now filled
  1105. // fmt.Println(resp)
  1106. // }
  1107. //
  1108. func (c *APIGateway) DeleteDomainNameRequest(input *DeleteDomainNameInput) (req *request.Request, output *DeleteDomainNameOutput) {
  1109. op := &request.Operation{
  1110. Name: opDeleteDomainName,
  1111. HTTPMethod: "DELETE",
  1112. HTTPPath: "/domainnames/{domain_name}",
  1113. }
  1114. if input == nil {
  1115. input = &DeleteDomainNameInput{}
  1116. }
  1117. req = c.newRequest(op, input, output)
  1118. req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
  1119. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  1120. output = &DeleteDomainNameOutput{}
  1121. req.Data = output
  1122. return
  1123. }
  1124. // DeleteDomainName API operation for Amazon API Gateway.
  1125. //
  1126. // Deletes the DomainName resource.
  1127. //
  1128. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1129. // with awserr.Error's Code and Message methods to get detailed information about
  1130. // the error.
  1131. //
  1132. // See the AWS API reference guide for Amazon API Gateway's
  1133. // API operation DeleteDomainName for usage and error information.
  1134. //
  1135. // Returned Error Codes:
  1136. // * UnauthorizedException
  1137. //
  1138. // * NotFoundException
  1139. //
  1140. // * TooManyRequestsException
  1141. //
  1142. func (c *APIGateway) DeleteDomainName(input *DeleteDomainNameInput) (*DeleteDomainNameOutput, error) {
  1143. req, out := c.DeleteDomainNameRequest(input)
  1144. err := req.Send()
  1145. return out, err
  1146. }
  1147. const opDeleteIntegration = "DeleteIntegration"
  1148. // DeleteIntegrationRequest generates a "aws/request.Request" representing the
  1149. // client's request for the DeleteIntegration operation. The "output" return
  1150. // value can be used to capture response data after the request's "Send" method
  1151. // is called.
  1152. //
  1153. // See DeleteIntegration for usage and error information.
  1154. //
  1155. // Creating a request object using this method should be used when you want to inject
  1156. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1157. // access properties on the request object before or after sending the request. If
  1158. // you just want the service response, call the DeleteIntegration method directly
  1159. // instead.
  1160. //
  1161. // Note: You must call the "Send" method on the returned request object in order
  1162. // to execute the request.
  1163. //
  1164. // // Example sending a request using the DeleteIntegrationRequest method.
  1165. // req, resp := client.DeleteIntegrationRequest(params)
  1166. //
  1167. // err := req.Send()
  1168. // if err == nil { // resp is now filled
  1169. // fmt.Println(resp)
  1170. // }
  1171. //
  1172. func (c *APIGateway) DeleteIntegrationRequest(input *DeleteIntegrationInput) (req *request.Request, output *DeleteIntegrationOutput) {
  1173. op := &request.Operation{
  1174. Name: opDeleteIntegration,
  1175. HTTPMethod: "DELETE",
  1176. HTTPPath: "/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}/integration",
  1177. }
  1178. if input == nil {
  1179. input = &DeleteIntegrationInput{}
  1180. }
  1181. req = c.newRequest(op, input, output)
  1182. req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
  1183. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  1184. output = &DeleteIntegrationOutput{}
  1185. req.Data = output
  1186. return
  1187. }
  1188. // DeleteIntegration API operation for Amazon API Gateway.
  1189. //
  1190. // Represents a delete integration.
  1191. //
  1192. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1193. // with awserr.Error's Code and Message methods to get detailed information about
  1194. // the error.
  1195. //
  1196. // See the AWS API reference guide for Amazon API Gateway's
  1197. // API operation DeleteIntegration for usage and error information.
  1198. //
  1199. // Returned Error Codes:
  1200. // * UnauthorizedException
  1201. //
  1202. // * NotFoundException
  1203. //
  1204. // * TooManyRequestsException
  1205. //
  1206. // * ConflictException
  1207. //
  1208. func (c *APIGateway) DeleteIntegration(input *DeleteIntegrationInput) (*DeleteIntegrationOutput, error) {
  1209. req, out := c.DeleteIntegrationRequest(input)
  1210. err := req.Send()
  1211. return out, err
  1212. }
  1213. const opDeleteIntegrationResponse = "DeleteIntegrationResponse"
  1214. // DeleteIntegrationResponseRequest generates a "aws/request.Request" representing the
  1215. // client's request for the DeleteIntegrationResponse operation. The "output" return
  1216. // value can be used to capture response data after the request's "Send" method
  1217. // is called.
  1218. //
  1219. // See DeleteIntegrationResponse for usage and error information.
  1220. //
  1221. // Creating a request object using this method should be used when you want to inject
  1222. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1223. // access properties on the request object before or after sending the request. If
  1224. // you just want the service response, call the DeleteIntegrationResponse method directly
  1225. // instead.
  1226. //
  1227. // Note: You must call the "Send" method on the returned request object in order
  1228. // to execute the request.
  1229. //
  1230. // // Example sending a request using the DeleteIntegrationResponseRequest method.
  1231. // req, resp := client.DeleteIntegrationResponseRequest(params)
  1232. //
  1233. // err := req.Send()
  1234. // if err == nil { // resp is now filled
  1235. // fmt.Println(resp)
  1236. // }
  1237. //
  1238. func (c *APIGateway) DeleteIntegrationResponseRequest(input *DeleteIntegrationResponseInput) (req *request.Request, output *DeleteIntegrationResponseOutput) {
  1239. op := &request.Operation{
  1240. Name: opDeleteIntegrationResponse,
  1241. HTTPMethod: "DELETE",
  1242. HTTPPath: "/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}/integration/responses/{status_code}",
  1243. }
  1244. if input == nil {
  1245. input = &DeleteIntegrationResponseInput{}
  1246. }
  1247. req = c.newRequest(op, input, output)
  1248. req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
  1249. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  1250. output = &DeleteIntegrationResponseOutput{}
  1251. req.Data = output
  1252. return
  1253. }
  1254. // DeleteIntegrationResponse API operation for Amazon API Gateway.
  1255. //
  1256. // Represents a delete integration response.
  1257. //
  1258. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1259. // with awserr.Error's Code and Message methods to get detailed information about
  1260. // the error.
  1261. //
  1262. // See the AWS API reference guide for Amazon API Gateway's
  1263. // API operation DeleteIntegrationResponse for usage and error information.
  1264. //
  1265. // Returned Error Codes:
  1266. // * UnauthorizedException
  1267. //
  1268. // * NotFoundException
  1269. //
  1270. // * TooManyRequestsException
  1271. //
  1272. // * BadRequestException
  1273. //
  1274. // * ConflictException
  1275. //
  1276. func (c *APIGateway) DeleteIntegrationResponse(input *DeleteIntegrationResponseInput) (*DeleteIntegrationResponseOutput, error) {
  1277. req, out := c.DeleteIntegrationResponseRequest(input)
  1278. err := req.Send()
  1279. return out, err
  1280. }
  1281. const opDeleteMethod = "DeleteMethod"
  1282. // DeleteMethodRequest generates a "aws/request.Request" representing the
  1283. // client's request for the DeleteMethod operation. The "output" return
  1284. // value can be used to capture response data after the request's "Send" method
  1285. // is called.
  1286. //
  1287. // See DeleteMethod for usage and error information.
  1288. //
  1289. // Creating a request object using this method should be used when you want to inject
  1290. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1291. // access properties on the request object before or after sending the request. If
  1292. // you just want the service response, call the DeleteMethod method directly
  1293. // instead.
  1294. //
  1295. // Note: You must call the "Send" method on the returned request object in order
  1296. // to execute the request.
  1297. //
  1298. // // Example sending a request using the DeleteMethodRequest method.
  1299. // req, resp := client.DeleteMethodRequest(params)
  1300. //
  1301. // err := req.Send()
  1302. // if err == nil { // resp is now filled
  1303. // fmt.Println(resp)
  1304. // }
  1305. //
  1306. func (c *APIGateway) DeleteMethodRequest(input *DeleteMethodInput) (req *request.Request, output *DeleteMethodOutput) {
  1307. op := &request.Operation{
  1308. Name: opDeleteMethod,
  1309. HTTPMethod: "DELETE",
  1310. HTTPPath: "/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}",
  1311. }
  1312. if input == nil {
  1313. input = &DeleteMethodInput{}
  1314. }
  1315. req = c.newRequest(op, input, output)
  1316. req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
  1317. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  1318. output = &DeleteMethodOutput{}
  1319. req.Data = output
  1320. return
  1321. }
  1322. // DeleteMethod API operation for Amazon API Gateway.
  1323. //
  1324. // Deletes an existing Method resource.
  1325. //
  1326. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1327. // with awserr.Error's Code and Message methods to get detailed information about
  1328. // the error.
  1329. //
  1330. // See the AWS API reference guide for Amazon API Gateway's
  1331. // API operation DeleteMethod for usage and error information.
  1332. //
  1333. // Returned Error Codes:
  1334. // * UnauthorizedException
  1335. //
  1336. // * NotFoundException
  1337. //
  1338. // * TooManyRequestsException
  1339. //
  1340. // * ConflictException
  1341. //
  1342. func (c *APIGateway) DeleteMethod(input *DeleteMethodInput) (*DeleteMethodOutput, error) {
  1343. req, out := c.DeleteMethodRequest(input)
  1344. err := req.Send()
  1345. return out, err
  1346. }
  1347. const opDeleteMethodResponse = "DeleteMethodResponse"
  1348. // DeleteMethodResponseRequest generates a "aws/request.Request" representing the
  1349. // client's request for the DeleteMethodResponse operation. The "output" return
  1350. // value can be used to capture response data after the request's "Send" method
  1351. // is called.
  1352. //
  1353. // See DeleteMethodResponse for usage and error information.
  1354. //
  1355. // Creating a request object using this method should be used when you want to inject
  1356. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1357. // access properties on the request object before or after sending the request. If
  1358. // you just want the service response, call the DeleteMethodResponse method directly
  1359. // instead.
  1360. //
  1361. // Note: You must call the "Send" method on the returned request object in order
  1362. // to execute the request.
  1363. //
  1364. // // Example sending a request using the DeleteMethodResponseRequest method.
  1365. // req, resp := client.DeleteMethodResponseRequest(params)
  1366. //
  1367. // err := req.Send()
  1368. // if err == nil { // resp is now filled
  1369. // fmt.Println(resp)
  1370. // }
  1371. //
  1372. func (c *APIGateway) DeleteMethodResponseRequest(input *DeleteMethodResponseInput) (req *request.Request, output *DeleteMethodResponseOutput) {
  1373. op := &request.Operation{
  1374. Name: opDeleteMethodResponse,
  1375. HTTPMethod: "DELETE",
  1376. HTTPPath: "/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}/responses/{status_code}",
  1377. }
  1378. if input == nil {
  1379. input = &DeleteMethodResponseInput{}
  1380. }
  1381. req = c.newRequest(op, input, output)
  1382. req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
  1383. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  1384. output = &DeleteMethodResponseOutput{}
  1385. req.Data = output
  1386. return
  1387. }
  1388. // DeleteMethodResponse API operation for Amazon API Gateway.
  1389. //
  1390. // Deletes an existing MethodResponse resource.
  1391. //
  1392. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1393. // with awserr.Error's Code and Message methods to get detailed information about
  1394. // the error.
  1395. //
  1396. // See the AWS API reference guide for Amazon API Gateway's
  1397. // API operation DeleteMethodResponse for usage and error information.
  1398. //
  1399. // Returned Error Codes:
  1400. // * UnauthorizedException
  1401. //
  1402. // * NotFoundException
  1403. //
  1404. // * TooManyRequestsException
  1405. //
  1406. // * BadRequestException
  1407. //
  1408. // * ConflictException
  1409. //
  1410. func (c *APIGateway) DeleteMethodResponse(input *DeleteMethodResponseInput) (*DeleteMethodResponseOutput, error) {
  1411. req, out := c.DeleteMethodResponseRequest(input)
  1412. err := req.Send()
  1413. return out, err
  1414. }
  1415. const opDeleteModel = "DeleteModel"
  1416. // DeleteModelRequest generates a "aws/request.Request" representing the
  1417. // client's request for the DeleteModel operation. The "output" return
  1418. // value can be used to capture response data after the request's "Send" method
  1419. // is called.
  1420. //
  1421. // See DeleteModel for usage and error information.
  1422. //
  1423. // Creating a request object using this method should be used when you want to inject
  1424. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1425. // access properties on the request object before or after sending the request. If
  1426. // you just want the service response, call the DeleteModel method directly
  1427. // instead.
  1428. //
  1429. // Note: You must call the "Send" method on the returned request object in order
  1430. // to execute the request.
  1431. //
  1432. // // Example sending a request using the DeleteModelRequest method.
  1433. // req, resp := client.DeleteModelRequest(params)
  1434. //
  1435. // err := req.Send()
  1436. // if err == nil { // resp is now filled
  1437. // fmt.Println(resp)
  1438. // }
  1439. //
  1440. func (c *APIGateway) DeleteModelRequest(input *DeleteModelInput) (req *request.Request, output *DeleteModelOutput) {
  1441. op := &request.Operation{
  1442. Name: opDeleteModel,
  1443. HTTPMethod: "DELETE",
  1444. HTTPPath: "/restapis/{restapi_id}/models/{model_name}",
  1445. }
  1446. if input == nil {
  1447. input = &DeleteModelInput{}
  1448. }
  1449. req = c.newRequest(op, input, output)
  1450. req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
  1451. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  1452. output = &DeleteModelOutput{}
  1453. req.Data = output
  1454. return
  1455. }
  1456. // DeleteModel API operation for Amazon API Gateway.
  1457. //
  1458. // Deletes a model.
  1459. //
  1460. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1461. // with awserr.Error's Code and Message methods to get detailed information about
  1462. // the error.
  1463. //
  1464. // See the AWS API reference guide for Amazon API Gateway's
  1465. // API operation DeleteModel for usage and error information.
  1466. //
  1467. // Returned Error Codes:
  1468. // * UnauthorizedException
  1469. //
  1470. // * NotFoundException
  1471. //
  1472. // * TooManyRequestsException
  1473. //
  1474. // * BadRequestException
  1475. //
  1476. // * ConflictException
  1477. //
  1478. func (c *APIGateway) DeleteModel(input *DeleteModelInput) (*DeleteModelOutput, error) {
  1479. req, out := c.DeleteModelRequest(input)
  1480. err := req.Send()
  1481. return out, err
  1482. }
  1483. const opDeleteResource = "DeleteResource"
  1484. // DeleteResourceRequest generates a "aws/request.Request" representing the
  1485. // client's request for the DeleteResource operation. The "output" return
  1486. // value can be used to capture response data after the request's "Send" method
  1487. // is called.
  1488. //
  1489. // See DeleteResource for usage and error information.
  1490. //
  1491. // Creating a request object using this method should be used when you want to inject
  1492. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1493. // access properties on the request object before or after sending the request. If
  1494. // you just want the service response, call the DeleteResource method directly
  1495. // instead.
  1496. //
  1497. // Note: You must call the "Send" method on the returned request object in order
  1498. // to execute the request.
  1499. //
  1500. // // Example sending a request using the DeleteResourceRequest method.
  1501. // req, resp := client.DeleteResourceRequest(params)
  1502. //
  1503. // err := req.Send()
  1504. // if err == nil { // resp is now filled
  1505. // fmt.Println(resp)
  1506. // }
  1507. //
  1508. func (c *APIGateway) DeleteResourceRequest(input *DeleteResourceInput) (req *request.Request, output *DeleteResourceOutput) {
  1509. op := &request.Operation{
  1510. Name: opDeleteResource,
  1511. HTTPMethod: "DELETE",
  1512. HTTPPath: "/restapis/{restapi_id}/resources/{resource_id}",
  1513. }
  1514. if input == nil {
  1515. input = &DeleteResourceInput{}
  1516. }
  1517. req = c.newRequest(op, input, output)
  1518. req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
  1519. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  1520. output = &DeleteResourceOutput{}
  1521. req.Data = output
  1522. return
  1523. }
  1524. // DeleteResource API operation for Amazon API Gateway.
  1525. //
  1526. // Deletes a Resource resource.
  1527. //
  1528. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1529. // with awserr.Error's Code and Message methods to get detailed information about
  1530. // the error.
  1531. //
  1532. // See the AWS API reference guide for Amazon API Gateway's
  1533. // API operation DeleteResource for usage and error information.
  1534. //
  1535. // Returned Error Codes:
  1536. // * UnauthorizedException
  1537. //
  1538. // * NotFoundException
  1539. //
  1540. // * BadRequestException
  1541. //
  1542. // * ConflictException
  1543. //
  1544. // * TooManyRequestsException
  1545. //
  1546. func (c *APIGateway) DeleteResource(input *DeleteResourceInput) (*DeleteResourceOutput, error) {
  1547. req, out := c.DeleteResourceRequest(input)
  1548. err := req.Send()
  1549. return out, err
  1550. }
  1551. const opDeleteRestApi = "DeleteRestApi"
  1552. // DeleteRestApiRequest generates a "aws/request.Request" representing the
  1553. // client's request for the DeleteRestApi operation. The "output" return
  1554. // value can be used to capture response data after the request's "Send" method
  1555. // is called.
  1556. //
  1557. // See DeleteRestApi for usage and error information.
  1558. //
  1559. // Creating a request object using this method should be used when you want to inject
  1560. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1561. // access properties on the request object before or after sending the request. If
  1562. // you just want the service response, call the DeleteRestApi method directly
  1563. // instead.
  1564. //
  1565. // Note: You must call the "Send" method on the returned request object in order
  1566. // to execute the request.
  1567. //
  1568. // // Example sending a request using the DeleteRestApiRequest method.
  1569. // req, resp := client.DeleteRestApiRequest(params)
  1570. //
  1571. // err := req.Send()
  1572. // if err == nil { // resp is now filled
  1573. // fmt.Println(resp)
  1574. // }
  1575. //
  1576. func (c *APIGateway) DeleteRestApiRequest(input *DeleteRestApiInput) (req *request.Request, output *DeleteRestApiOutput) {
  1577. op := &request.Operation{
  1578. Name: opDeleteRestApi,
  1579. HTTPMethod: "DELETE",
  1580. HTTPPath: "/restapis/{restapi_id}",
  1581. }
  1582. if input == nil {
  1583. input = &DeleteRestApiInput{}
  1584. }
  1585. req = c.newRequest(op, input, output)
  1586. req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
  1587. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  1588. output = &DeleteRestApiOutput{}
  1589. req.Data = output
  1590. return
  1591. }
  1592. // DeleteRestApi API operation for Amazon API Gateway.
  1593. //
  1594. // Deletes the specified API.
  1595. //
  1596. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1597. // with awserr.Error's Code and Message methods to get detailed information about
  1598. // the error.
  1599. //
  1600. // See the AWS API reference guide for Amazon API Gateway's
  1601. // API operation DeleteRestApi for usage and error information.
  1602. //
  1603. // Returned Error Codes:
  1604. // * UnauthorizedException
  1605. //
  1606. // * NotFoundException
  1607. //
  1608. // * TooManyRequestsException
  1609. //
  1610. // * BadRequestException
  1611. //
  1612. func (c *APIGateway) DeleteRestApi(input *DeleteRestApiInput) (*DeleteRestApiOutput, error) {
  1613. req, out := c.DeleteRestApiRequest(input)
  1614. err := req.Send()
  1615. return out, err
  1616. }
  1617. const opDeleteStage = "DeleteStage"
  1618. // DeleteStageRequest generates a "aws/request.Request" representing the
  1619. // client's request for the DeleteStage operation. The "output" return
  1620. // value can be used to capture response data after the request's "Send" method
  1621. // is called.
  1622. //
  1623. // See DeleteStage for usage and error information.
  1624. //
  1625. // Creating a request object using this method should be used when you want to inject
  1626. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1627. // access properties on the request object before or after sending the request. If
  1628. // you just want the service response, call the DeleteStage method directly
  1629. // instead.
  1630. //
  1631. // Note: You must call the "Send" method on the returned request object in order
  1632. // to execute the request.
  1633. //
  1634. // // Example sending a request using the DeleteStageRequest method.
  1635. // req, resp := client.DeleteStageRequest(params)
  1636. //
  1637. // err := req.Send()
  1638. // if err == nil { // resp is now filled
  1639. // fmt.Println(resp)
  1640. // }
  1641. //
  1642. func (c *APIGateway) DeleteStageRequest(input *DeleteStageInput) (req *request.Request, output *DeleteStageOutput) {
  1643. op := &request.Operation{
  1644. Name: opDeleteStage,
  1645. HTTPMethod: "DELETE",
  1646. HTTPPath: "/restapis/{restapi_id}/stages/{stage_name}",
  1647. }
  1648. if input == nil {
  1649. input = &DeleteStageInput{}
  1650. }
  1651. req = c.newRequest(op, input, output)
  1652. req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
  1653. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  1654. output = &DeleteStageOutput{}
  1655. req.Data = output
  1656. return
  1657. }
  1658. // DeleteStage API operation for Amazon API Gateway.
  1659. //
  1660. // Deletes a Stage resource.
  1661. //
  1662. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1663. // with awserr.Error's Code and Message methods to get detailed information about
  1664. // the error.
  1665. //
  1666. // See the AWS API reference guide for Amazon API Gateway's
  1667. // API operation DeleteStage for usage and error information.
  1668. //
  1669. // Returned Error Codes:
  1670. // * UnauthorizedException
  1671. //
  1672. // * NotFoundException
  1673. //
  1674. // * TooManyRequestsException
  1675. //
  1676. // * BadRequestException
  1677. //
  1678. func (c *APIGateway) DeleteStage(input *DeleteStageInput) (*DeleteStageOutput, error) {
  1679. req, out := c.DeleteStageRequest(input)
  1680. err := req.Send()
  1681. return out, err
  1682. }
  1683. const opDeleteUsagePlan = "DeleteUsagePlan"
  1684. // DeleteUsagePlanRequest generates a "aws/request.Request" representing the
  1685. // client's request for the DeleteUsagePlan operation. The "output" return
  1686. // value can be used to capture response data after the request's "Send" method
  1687. // is called.
  1688. //
  1689. // See DeleteUsagePlan for usage and error information.
  1690. //
  1691. // Creating a request object using this method should be used when you want to inject
  1692. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1693. // access properties on the request object before or after sending the request. If
  1694. // you just want the service response, call the DeleteUsagePlan method directly
  1695. // instead.
  1696. //
  1697. // Note: You must call the "Send" method on the returned request object in order
  1698. // to execute the request.
  1699. //
  1700. // // Example sending a request using the DeleteUsagePlanRequest method.
  1701. // req, resp := client.DeleteUsagePlanRequest(params)
  1702. //
  1703. // err := req.Send()
  1704. // if err == nil { // resp is now filled
  1705. // fmt.Println(resp)
  1706. // }
  1707. //
  1708. func (c *APIGateway) DeleteUsagePlanRequest(input *DeleteUsagePlanInput) (req *request.Request, output *DeleteUsagePlanOutput) {
  1709. op := &request.Operation{
  1710. Name: opDeleteUsagePlan,
  1711. HTTPMethod: "DELETE",
  1712. HTTPPath: "/usageplans/{usageplanId}",
  1713. }
  1714. if input == nil {
  1715. input = &DeleteUsagePlanInput{}
  1716. }
  1717. req = c.newRequest(op, input, output)
  1718. req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
  1719. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  1720. output = &DeleteUsagePlanOutput{}
  1721. req.Data = output
  1722. return
  1723. }
  1724. // DeleteUsagePlan API operation for Amazon API Gateway.
  1725. //
  1726. // Deletes a usage plan of a given plan Id.
  1727. //
  1728. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1729. // with awserr.Error's Code and Message methods to get detailed information about
  1730. // the error.
  1731. //
  1732. // See the AWS API reference guide for Amazon API Gateway's
  1733. // API operation DeleteUsagePlan for usage and error information.
  1734. //
  1735. // Returned Error Codes:
  1736. // * UnauthorizedException
  1737. //
  1738. // * TooManyRequestsException
  1739. //
  1740. // * BadRequestException
  1741. //
  1742. // * NotFoundException
  1743. //
  1744. func (c *APIGateway) DeleteUsagePlan(input *DeleteUsagePlanInput) (*DeleteUsagePlanOutput, error) {
  1745. req, out := c.DeleteUsagePlanRequest(input)
  1746. err := req.Send()
  1747. return out, err
  1748. }
  1749. const opDeleteUsagePlanKey = "DeleteUsagePlanKey"
  1750. // DeleteUsagePlanKeyRequest generates a "aws/request.Request" representing the
  1751. // client's request for the DeleteUsagePlanKey operation. The "output" return
  1752. // value can be used to capture response data after the request's "Send" method
  1753. // is called.
  1754. //
  1755. // See DeleteUsagePlanKey for usage and error information.
  1756. //
  1757. // Creating a request object using this method should be used when you want to inject
  1758. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1759. // access properties on the request object before or after sending the request. If
  1760. // you just want the service response, call the DeleteUsagePlanKey method directly
  1761. // instead.
  1762. //
  1763. // Note: You must call the "Send" method on the returned request object in order
  1764. // to execute the request.
  1765. //
  1766. // // Example sending a request using the DeleteUsagePlanKeyRequest method.
  1767. // req, resp := client.DeleteUsagePlanKeyRequest(params)
  1768. //
  1769. // err := req.Send()
  1770. // if err == nil { // resp is now filled
  1771. // fmt.Println(resp)
  1772. // }
  1773. //
  1774. func (c *APIGateway) DeleteUsagePlanKeyRequest(input *DeleteUsagePlanKeyInput) (req *request.Request, output *DeleteUsagePlanKeyOutput) {
  1775. op := &request.Operation{
  1776. Name: opDeleteUsagePlanKey,
  1777. HTTPMethod: "DELETE",
  1778. HTTPPath: "/usageplans/{usageplanId}/keys/{keyId}",
  1779. }
  1780. if input == nil {
  1781. input = &DeleteUsagePlanKeyInput{}
  1782. }
  1783. req = c.newRequest(op, input, output)
  1784. req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
  1785. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  1786. output = &DeleteUsagePlanKeyOutput{}
  1787. req.Data = output
  1788. return
  1789. }
  1790. // DeleteUsagePlanKey API operation for Amazon API Gateway.
  1791. //
  1792. // Deletes a usage plan key and remove the underlying API key from the associated
  1793. // usage plan.
  1794. //
  1795. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1796. // with awserr.Error's Code and Message methods to get detailed information about
  1797. // the error.
  1798. //
  1799. // See the AWS API reference guide for Amazon API Gateway's
  1800. // API operation DeleteUsagePlanKey for usage and error information.
  1801. //
  1802. // Returned Error Codes:
  1803. // * BadRequestException
  1804. //
  1805. // * ConflictException
  1806. //
  1807. // * UnauthorizedException
  1808. //
  1809. // * NotFoundException
  1810. //
  1811. // * TooManyRequestsException
  1812. //
  1813. func (c *APIGateway) DeleteUsagePlanKey(input *DeleteUsagePlanKeyInput) (*DeleteUsagePlanKeyOutput, error) {
  1814. req, out := c.DeleteUsagePlanKeyRequest(input)
  1815. err := req.Send()
  1816. return out, err
  1817. }
  1818. const opFlushStageAuthorizersCache = "FlushStageAuthorizersCache"
  1819. // FlushStageAuthorizersCacheRequest generates a "aws/request.Request" representing the
  1820. // client's request for the FlushStageAuthorizersCache operation. The "output" return
  1821. // value can be used to capture response data after the request's "Send" method
  1822. // is called.
  1823. //
  1824. // See FlushStageAuthorizersCache for usage and error information.
  1825. //
  1826. // Creating a request object using this method should be used when you want to inject
  1827. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1828. // access properties on the request object before or after sending the request. If
  1829. // you just want the service response, call the FlushStageAuthorizersCache method directly
  1830. // instead.
  1831. //
  1832. // Note: You must call the "Send" method on the returned request object in order
  1833. // to execute the request.
  1834. //
  1835. // // Example sending a request using the FlushStageAuthorizersCacheRequest method.
  1836. // req, resp := client.FlushStageAuthorizersCacheRequest(params)
  1837. //
  1838. // err := req.Send()
  1839. // if err == nil { // resp is now filled
  1840. // fmt.Println(resp)
  1841. // }
  1842. //
  1843. func (c *APIGateway) FlushStageAuthorizersCacheRequest(input *FlushStageAuthorizersCacheInput) (req *request.Request, output *FlushStageAuthorizersCacheOutput) {
  1844. op := &request.Operation{
  1845. Name: opFlushStageAuthorizersCache,
  1846. HTTPMethod: "DELETE",
  1847. HTTPPath: "/restapis/{restapi_id}/stages/{stage_name}/cache/authorizers",
  1848. }
  1849. if input == nil {
  1850. input = &FlushStageAuthorizersCacheInput{}
  1851. }
  1852. req = c.newRequest(op, input, output)
  1853. req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
  1854. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  1855. output = &FlushStageAuthorizersCacheOutput{}
  1856. req.Data = output
  1857. return
  1858. }
  1859. // FlushStageAuthorizersCache API operation for Amazon API Gateway.
  1860. //
  1861. // Flushes all authorizer cache entries on a stage.
  1862. //
  1863. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1864. // with awserr.Error's Code and Message methods to get detailed information about
  1865. // the error.
  1866. //
  1867. // See the AWS API reference guide for Amazon API Gateway's
  1868. // API operation FlushStageAuthorizersCache for usage and error information.
  1869. //
  1870. // Returned Error Codes:
  1871. // * UnauthorizedException
  1872. //
  1873. // * NotFoundException
  1874. //
  1875. // * BadRequestException
  1876. //
  1877. // * TooManyRequestsException
  1878. //
  1879. func (c *APIGateway) FlushStageAuthorizersCache(input *FlushStageAuthorizersCacheInput) (*FlushStageAuthorizersCacheOutput, error) {
  1880. req, out := c.FlushStageAuthorizersCacheRequest(input)
  1881. err := req.Send()
  1882. return out, err
  1883. }
  1884. const opFlushStageCache = "FlushStageCache"
  1885. // FlushStageCacheRequest generates a "aws/request.Request" representing the
  1886. // client's request for the FlushStageCache operation. The "output" return
  1887. // value can be used to capture response data after the request's "Send" method
  1888. // is called.
  1889. //
  1890. // See FlushStageCache for usage and error information.
  1891. //
  1892. // Creating a request object using this method should be used when you want to inject
  1893. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1894. // access properties on the request object before or after sending the request. If
  1895. // you just want the service response, call the FlushStageCache method directly
  1896. // instead.
  1897. //
  1898. // Note: You must call the "Send" method on the returned request object in order
  1899. // to execute the request.
  1900. //
  1901. // // Example sending a request using the FlushStageCacheRequest method.
  1902. // req, resp := client.FlushStageCacheRequest(params)
  1903. //
  1904. // err := req.Send()
  1905. // if err == nil { // resp is now filled
  1906. // fmt.Println(resp)
  1907. // }
  1908. //
  1909. func (c *APIGateway) FlushStageCacheRequest(input *FlushStageCacheInput) (req *request.Request, output *FlushStageCacheOutput) {
  1910. op := &request.Operation{
  1911. Name: opFlushStageCache,
  1912. HTTPMethod: "DELETE",
  1913. HTTPPath: "/restapis/{restapi_id}/stages/{stage_name}/cache/data",
  1914. }
  1915. if input == nil {
  1916. input = &FlushStageCacheInput{}
  1917. }
  1918. req = c.newRequest(op, input, output)
  1919. req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
  1920. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  1921. output = &FlushStageCacheOutput{}
  1922. req.Data = output
  1923. return
  1924. }
  1925. // FlushStageCache API operation for Amazon API Gateway.
  1926. //
  1927. // Flushes a stage's cache.
  1928. //
  1929. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1930. // with awserr.Error's Code and Message methods to get detailed information about
  1931. // the error.
  1932. //
  1933. // See the AWS API reference guide for Amazon API Gateway's
  1934. // API operation FlushStageCache for usage and error information.
  1935. //
  1936. // Returned Error Codes:
  1937. // * UnauthorizedException
  1938. //
  1939. // * NotFoundException
  1940. //
  1941. // * BadRequestException
  1942. //
  1943. // * TooManyRequestsException
  1944. //
  1945. func (c *APIGateway) FlushStageCache(input *FlushStageCacheInput) (*FlushStageCacheOutput, error) {
  1946. req, out := c.FlushStageCacheRequest(input)
  1947. err := req.Send()
  1948. return out, err
  1949. }
  1950. const opGenerateClientCertificate = "GenerateClientCertificate"
  1951. // GenerateClientCertificateRequest generates a "aws/request.Request" representing the
  1952. // client's request for the GenerateClientCertificate operation. The "output" return
  1953. // value can be used to capture response data after the request's "Send" method
  1954. // is called.
  1955. //
  1956. // See GenerateClientCertificate for usage and error information.
  1957. //
  1958. // Creating a request object using this method should be used when you want to inject
  1959. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1960. // access properties on the request object before or after sending the request. If
  1961. // you just want the service response, call the GenerateClientCertificate method directly
  1962. // instead.
  1963. //
  1964. // Note: You must call the "Send" method on the returned request object in order
  1965. // to execute the request.
  1966. //
  1967. // // Example sending a request using the GenerateClientCertificateRequest method.
  1968. // req, resp := client.GenerateClientCertificateRequest(params)
  1969. //
  1970. // err := req.Send()
  1971. // if err == nil { // resp is now filled
  1972. // fmt.Println(resp)
  1973. // }
  1974. //
  1975. func (c *APIGateway) GenerateClientCertificateRequest(input *GenerateClientCertificateInput) (req *request.Request, output *ClientCertificate) {
  1976. op := &request.Operation{
  1977. Name: opGenerateClientCertificate,
  1978. HTTPMethod: "POST",
  1979. HTTPPath: "/clientcertificates",
  1980. }
  1981. if input == nil {
  1982. input = &GenerateClientCertificateInput{}
  1983. }
  1984. req = c.newRequest(op, input, output)
  1985. output = &ClientCertificate{}
  1986. req.Data = output
  1987. return
  1988. }
  1989. // GenerateClientCertificate API operation for Amazon API Gateway.
  1990. //
  1991. // Generates a ClientCertificate resource.
  1992. //
  1993. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1994. // with awserr.Error's Code and Message methods to get detailed information about
  1995. // the error.
  1996. //
  1997. // See the AWS API reference guide for Amazon API Gateway's
  1998. // API operation GenerateClientCertificate for usage and error information.
  1999. //
  2000. // Returned Error Codes:
  2001. // * UnauthorizedException
  2002. //
  2003. // * TooManyRequestsException
  2004. //
  2005. // * LimitExceededException
  2006. //
  2007. func (c *APIGateway) GenerateClientCertificate(input *GenerateClientCertificateInput) (*ClientCertificate, error) {
  2008. req, out := c.GenerateClientCertificateRequest(input)
  2009. err := req.Send()
  2010. return out, err
  2011. }
  2012. const opGetAccount = "GetAccount"
  2013. // GetAccountRequest generates a "aws/request.Request" representing the
  2014. // client's request for the GetAccount operation. The "output" return
  2015. // value can be used to capture response data after the request's "Send" method
  2016. // is called.
  2017. //
  2018. // See GetAccount for usage and error information.
  2019. //
  2020. // Creating a request object using this method should be used when you want to inject
  2021. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2022. // access properties on the request object before or after sending the request. If
  2023. // you just want the service response, call the GetAccount method directly
  2024. // instead.
  2025. //
  2026. // Note: You must call the "Send" method on the returned request object in order
  2027. // to execute the request.
  2028. //
  2029. // // Example sending a request using the GetAccountRequest method.
  2030. // req, resp := client.GetAccountRequest(params)
  2031. //
  2032. // err := req.Send()
  2033. // if err == nil { // resp is now filled
  2034. // fmt.Println(resp)
  2035. // }
  2036. //
  2037. func (c *APIGateway) GetAccountRequest(input *GetAccountInput) (req *request.Request, output *Account) {
  2038. op := &request.Operation{
  2039. Name: opGetAccount,
  2040. HTTPMethod: "GET",
  2041. HTTPPath: "/account",
  2042. }
  2043. if input == nil {
  2044. input = &GetAccountInput{}
  2045. }
  2046. req = c.newRequest(op, input, output)
  2047. output = &Account{}
  2048. req.Data = output
  2049. return
  2050. }
  2051. // GetAccount API operation for Amazon API Gateway.
  2052. //
  2053. // Gets information about the current Account resource.
  2054. //
  2055. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2056. // with awserr.Error's Code and Message methods to get detailed information about
  2057. // the error.
  2058. //
  2059. // See the AWS API reference guide for Amazon API Gateway's
  2060. // API operation GetAccount for usage and error information.
  2061. //
  2062. // Returned Error Codes:
  2063. // * UnauthorizedException
  2064. //
  2065. // * NotFoundException
  2066. //
  2067. // * TooManyRequestsException
  2068. //
  2069. func (c *APIGateway) GetAccount(input *GetAccountInput) (*Account, error) {
  2070. req, out := c.GetAccountRequest(input)
  2071. err := req.Send()
  2072. return out, err
  2073. }
  2074. const opGetApiKey = "GetApiKey"
  2075. // GetApiKeyRequest generates a "aws/request.Request" representing the
  2076. // client's request for the GetApiKey operation. The "output" return
  2077. // value can be used to capture response data after the request's "Send" method
  2078. // is called.
  2079. //
  2080. // See GetApiKey for usage and error information.
  2081. //
  2082. // Creating a request object using this method should be used when you want to inject
  2083. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2084. // access properties on the request object before or after sending the request. If
  2085. // you just want the service response, call the GetApiKey method directly
  2086. // instead.
  2087. //
  2088. // Note: You must call the "Send" method on the returned request object in order
  2089. // to execute the request.
  2090. //
  2091. // // Example sending a request using the GetApiKeyRequest method.
  2092. // req, resp := client.GetApiKeyRequest(params)
  2093. //
  2094. // err := req.Send()
  2095. // if err == nil { // resp is now filled
  2096. // fmt.Println(resp)
  2097. // }
  2098. //
  2099. func (c *APIGateway) GetApiKeyRequest(input *GetApiKeyInput) (req *request.Request, output *ApiKey) {
  2100. op := &request.Operation{
  2101. Name: opGetApiKey,
  2102. HTTPMethod: "GET",
  2103. HTTPPath: "/apikeys/{api_Key}",
  2104. }
  2105. if input == nil {
  2106. input = &GetApiKeyInput{}
  2107. }
  2108. req = c.newRequest(op, input, output)
  2109. output = &ApiKey{}
  2110. req.Data = output
  2111. return
  2112. }
  2113. // GetApiKey API operation for Amazon API Gateway.
  2114. //
  2115. // Gets information about the current ApiKey resource.
  2116. //
  2117. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2118. // with awserr.Error's Code and Message methods to get detailed information about
  2119. // the error.
  2120. //
  2121. // See the AWS API reference guide for Amazon API Gateway's
  2122. // API operation GetApiKey for usage and error information.
  2123. //
  2124. // Returned Error Codes:
  2125. // * UnauthorizedException
  2126. //
  2127. // * NotFoundException
  2128. //
  2129. // * TooManyRequestsException
  2130. //
  2131. func (c *APIGateway) GetApiKey(input *GetApiKeyInput) (*ApiKey, error) {
  2132. req, out := c.GetApiKeyRequest(input)
  2133. err := req.Send()
  2134. return out, err
  2135. }
  2136. const opGetApiKeys = "GetApiKeys"
  2137. // GetApiKeysRequest generates a "aws/request.Request" representing the
  2138. // client's request for the GetApiKeys operation. The "output" return
  2139. // value can be used to capture response data after the request's "Send" method
  2140. // is called.
  2141. //
  2142. // See GetApiKeys for usage and error information.
  2143. //
  2144. // Creating a request object using this method should be used when you want to inject
  2145. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2146. // access properties on the request object before or after sending the request. If
  2147. // you just want the service response, call the GetApiKeys method directly
  2148. // instead.
  2149. //
  2150. // Note: You must call the "Send" method on the returned request object in order
  2151. // to execute the request.
  2152. //
  2153. // // Example sending a request using the GetApiKeysRequest method.
  2154. // req, resp := client.GetApiKeysRequest(params)
  2155. //
  2156. // err := req.Send()
  2157. // if err == nil { // resp is now filled
  2158. // fmt.Println(resp)
  2159. // }
  2160. //
  2161. func (c *APIGateway) GetApiKeysRequest(input *GetApiKeysInput) (req *request.Request, output *GetApiKeysOutput) {
  2162. op := &request.Operation{
  2163. Name: opGetApiKeys,
  2164. HTTPMethod: "GET",
  2165. HTTPPath: "/apikeys",
  2166. Paginator: &request.Paginator{
  2167. InputTokens: []string{"position"},
  2168. OutputTokens: []string{"position"},
  2169. LimitToken: "limit",
  2170. TruncationToken: "",
  2171. },
  2172. }
  2173. if input == nil {
  2174. input = &GetApiKeysInput{}
  2175. }
  2176. req = c.newRequest(op, input, output)
  2177. output = &GetApiKeysOutput{}
  2178. req.Data = output
  2179. return
  2180. }
  2181. // GetApiKeys API operation for Amazon API Gateway.
  2182. //
  2183. // Gets information about the current ApiKeys resource.
  2184. //
  2185. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2186. // with awserr.Error's Code and Message methods to get detailed information about
  2187. // the error.
  2188. //
  2189. // See the AWS API reference guide for Amazon API Gateway's
  2190. // API operation GetApiKeys for usage and error information.
  2191. //
  2192. // Returned Error Codes:
  2193. // * BadRequestException
  2194. //
  2195. // * UnauthorizedException
  2196. //
  2197. // * TooManyRequestsException
  2198. //
  2199. func (c *APIGateway) GetApiKeys(input *GetApiKeysInput) (*GetApiKeysOutput, error) {
  2200. req, out := c.GetApiKeysRequest(input)
  2201. err := req.Send()
  2202. return out, err
  2203. }
  2204. // GetApiKeysPages iterates over the pages of a GetApiKeys operation,
  2205. // calling the "fn" function with the response data for each page. To stop
  2206. // iterating, return false from the fn function.
  2207. //
  2208. // See GetApiKeys method for more information on how to use this operation.
  2209. //
  2210. // Note: This operation can generate multiple requests to a service.
  2211. //
  2212. // // Example iterating over at most 3 pages of a GetApiKeys operation.
  2213. // pageNum := 0
  2214. // err := client.GetApiKeysPages(params,
  2215. // func(page *GetApiKeysOutput, lastPage bool) bool {
  2216. // pageNum++
  2217. // fmt.Println(page)
  2218. // return pageNum <= 3
  2219. // })
  2220. //
  2221. func (c *APIGateway) GetApiKeysPages(input *GetApiKeysInput, fn func(p *GetApiKeysOutput, lastPage bool) (shouldContinue bool)) error {
  2222. page, _ := c.GetApiKeysRequest(input)
  2223. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  2224. return page.EachPage(func(p interface{}, lastPage bool) bool {
  2225. return fn(p.(*GetApiKeysOutput), lastPage)
  2226. })
  2227. }
  2228. const opGetAuthorizer = "GetAuthorizer"
  2229. // GetAuthorizerRequest generates a "aws/request.Request" representing the
  2230. // client's request for the GetAuthorizer operation. The "output" return
  2231. // value can be used to capture response data after the request's "Send" method
  2232. // is called.
  2233. //
  2234. // See GetAuthorizer for usage and error information.
  2235. //
  2236. // Creating a request object using this method should be used when you want to inject
  2237. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2238. // access properties on the request object before or after sending the request. If
  2239. // you just want the service response, call the GetAuthorizer method directly
  2240. // instead.
  2241. //
  2242. // Note: You must call the "Send" method on the returned request object in order
  2243. // to execute the request.
  2244. //
  2245. // // Example sending a request using the GetAuthorizerRequest method.
  2246. // req, resp := client.GetAuthorizerRequest(params)
  2247. //
  2248. // err := req.Send()
  2249. // if err == nil { // resp is now filled
  2250. // fmt.Println(resp)
  2251. // }
  2252. //
  2253. func (c *APIGateway) GetAuthorizerRequest(input *GetAuthorizerInput) (req *request.Request, output *Authorizer) {
  2254. op := &request.Operation{
  2255. Name: opGetAuthorizer,
  2256. HTTPMethod: "GET",
  2257. HTTPPath: "/restapis/{restapi_id}/authorizers/{authorizer_id}",
  2258. }
  2259. if input == nil {
  2260. input = &GetAuthorizerInput{}
  2261. }
  2262. req = c.newRequest(op, input, output)
  2263. output = &Authorizer{}
  2264. req.Data = output
  2265. return
  2266. }
  2267. // GetAuthorizer API operation for Amazon API Gateway.
  2268. //
  2269. // Describe an existing Authorizer resource.
  2270. //
  2271. // AWS CLI (http://docs.aws.amazon.com/cli/latest/reference/apigateway/get-authorizer.html)
  2272. //
  2273. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2274. // with awserr.Error's Code and Message methods to get detailed information about
  2275. // the error.
  2276. //
  2277. // See the AWS API reference guide for Amazon API Gateway's
  2278. // API operation GetAuthorizer for usage and error information.
  2279. //
  2280. // Returned Error Codes:
  2281. // * UnauthorizedException
  2282. //
  2283. // * NotFoundException
  2284. //
  2285. // * TooManyRequestsException
  2286. //
  2287. func (c *APIGateway) GetAuthorizer(input *GetAuthorizerInput) (*Authorizer, error) {
  2288. req, out := c.GetAuthorizerRequest(input)
  2289. err := req.Send()
  2290. return out, err
  2291. }
  2292. const opGetAuthorizers = "GetAuthorizers"
  2293. // GetAuthorizersRequest generates a "aws/request.Request" representing the
  2294. // client's request for the GetAuthorizers operation. The "output" return
  2295. // value can be used to capture response data after the request's "Send" method
  2296. // is called.
  2297. //
  2298. // See GetAuthorizers for usage and error information.
  2299. //
  2300. // Creating a request object using this method should be used when you want to inject
  2301. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2302. // access properties on the request object before or after sending the request. If
  2303. // you just want the service response, call the GetAuthorizers method directly
  2304. // instead.
  2305. //
  2306. // Note: You must call the "Send" method on the returned request object in order
  2307. // to execute the request.
  2308. //
  2309. // // Example sending a request using the GetAuthorizersRequest method.
  2310. // req, resp := client.GetAuthorizersRequest(params)
  2311. //
  2312. // err := req.Send()
  2313. // if err == nil { // resp is now filled
  2314. // fmt.Println(resp)
  2315. // }
  2316. //
  2317. func (c *APIGateway) GetAuthorizersRequest(input *GetAuthorizersInput) (req *request.Request, output *GetAuthorizersOutput) {
  2318. op := &request.Operation{
  2319. Name: opGetAuthorizers,
  2320. HTTPMethod: "GET",
  2321. HTTPPath: "/restapis/{restapi_id}/authorizers",
  2322. }
  2323. if input == nil {
  2324. input = &GetAuthorizersInput{}
  2325. }
  2326. req = c.newRequest(op, input, output)
  2327. output = &GetAuthorizersOutput{}
  2328. req.Data = output
  2329. return
  2330. }
  2331. // GetAuthorizers API operation for Amazon API Gateway.
  2332. //
  2333. // Describe an existing Authorizers resource.
  2334. //
  2335. // AWS CLI (http://docs.aws.amazon.com/cli/latest/reference/apigateway/get-authorizers.html)
  2336. //
  2337. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2338. // with awserr.Error's Code and Message methods to get detailed information about
  2339. // the error.
  2340. //
  2341. // See the AWS API reference guide for Amazon API Gateway's
  2342. // API operation GetAuthorizers for usage and error information.
  2343. //
  2344. // Returned Error Codes:
  2345. // * BadRequestException
  2346. //
  2347. // * UnauthorizedException
  2348. //
  2349. // * NotFoundException
  2350. //
  2351. // * TooManyRequestsException
  2352. //
  2353. func (c *APIGateway) GetAuthorizers(input *GetAuthorizersInput) (*GetAuthorizersOutput, error) {
  2354. req, out := c.GetAuthorizersRequest(input)
  2355. err := req.Send()
  2356. return out, err
  2357. }
  2358. const opGetBasePathMapping = "GetBasePathMapping"
  2359. // GetBasePathMappingRequest generates a "aws/request.Request" representing the
  2360. // client's request for the GetBasePathMapping operation. The "output" return
  2361. // value can be used to capture response data after the request's "Send" method
  2362. // is called.
  2363. //
  2364. // See GetBasePathMapping for usage and error information.
  2365. //
  2366. // Creating a request object using this method should be used when you want to inject
  2367. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2368. // access properties on the request object before or after sending the request. If
  2369. // you just want the service response, call the GetBasePathMapping method directly
  2370. // instead.
  2371. //
  2372. // Note: You must call the "Send" method on the returned request object in order
  2373. // to execute the request.
  2374. //
  2375. // // Example sending a request using the GetBasePathMappingRequest method.
  2376. // req, resp := client.GetBasePathMappingRequest(params)
  2377. //
  2378. // err := req.Send()
  2379. // if err == nil { // resp is now filled
  2380. // fmt.Println(resp)
  2381. // }
  2382. //
  2383. func (c *APIGateway) GetBasePathMappingRequest(input *GetBasePathMappingInput) (req *request.Request, output *BasePathMapping) {
  2384. op := &request.Operation{
  2385. Name: opGetBasePathMapping,
  2386. HTTPMethod: "GET",
  2387. HTTPPath: "/domainnames/{domain_name}/basepathmappings/{base_path}",
  2388. }
  2389. if input == nil {
  2390. input = &GetBasePathMappingInput{}
  2391. }
  2392. req = c.newRequest(op, input, output)
  2393. output = &BasePathMapping{}
  2394. req.Data = output
  2395. return
  2396. }
  2397. // GetBasePathMapping API operation for Amazon API Gateway.
  2398. //
  2399. // Describe a BasePathMapping resource.
  2400. //
  2401. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2402. // with awserr.Error's Code and Message methods to get detailed information about
  2403. // the error.
  2404. //
  2405. // See the AWS API reference guide for Amazon API Gateway's
  2406. // API operation GetBasePathMapping for usage and error information.
  2407. //
  2408. // Returned Error Codes:
  2409. // * UnauthorizedException
  2410. //
  2411. // * NotFoundException
  2412. //
  2413. // * TooManyRequestsException
  2414. //
  2415. func (c *APIGateway) GetBasePathMapping(input *GetBasePathMappingInput) (*BasePathMapping, error) {
  2416. req, out := c.GetBasePathMappingRequest(input)
  2417. err := req.Send()
  2418. return out, err
  2419. }
  2420. const opGetBasePathMappings = "GetBasePathMappings"
  2421. // GetBasePathMappingsRequest generates a "aws/request.Request" representing the
  2422. // client's request for the GetBasePathMappings operation. The "output" return
  2423. // value can be used to capture response data after the request's "Send" method
  2424. // is called.
  2425. //
  2426. // See GetBasePathMappings for usage and error information.
  2427. //
  2428. // Creating a request object using this method should be used when you want to inject
  2429. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2430. // access properties on the request object before or after sending the request. If
  2431. // you just want the service response, call the GetBasePathMappings method directly
  2432. // instead.
  2433. //
  2434. // Note: You must call the "Send" method on the returned request object in order
  2435. // to execute the request.
  2436. //
  2437. // // Example sending a request using the GetBasePathMappingsRequest method.
  2438. // req, resp := client.GetBasePathMappingsRequest(params)
  2439. //
  2440. // err := req.Send()
  2441. // if err == nil { // resp is now filled
  2442. // fmt.Println(resp)
  2443. // }
  2444. //
  2445. func (c *APIGateway) GetBasePathMappingsRequest(input *GetBasePathMappingsInput) (req *request.Request, output *GetBasePathMappingsOutput) {
  2446. op := &request.Operation{
  2447. Name: opGetBasePathMappings,
  2448. HTTPMethod: "GET",
  2449. HTTPPath: "/domainnames/{domain_name}/basepathmappings",
  2450. Paginator: &request.Paginator{
  2451. InputTokens: []string{"position"},
  2452. OutputTokens: []string{"position"},
  2453. LimitToken: "limit",
  2454. TruncationToken: "",
  2455. },
  2456. }
  2457. if input == nil {
  2458. input = &GetBasePathMappingsInput{}
  2459. }
  2460. req = c.newRequest(op, input, output)
  2461. output = &GetBasePathMappingsOutput{}
  2462. req.Data = output
  2463. return
  2464. }
  2465. // GetBasePathMappings API operation for Amazon API Gateway.
  2466. //
  2467. // Represents a collection of BasePathMapping resources.
  2468. //
  2469. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2470. // with awserr.Error's Code and Message methods to get detailed information about
  2471. // the error.
  2472. //
  2473. // See the AWS API reference guide for Amazon API Gateway's
  2474. // API operation GetBasePathMappings for usage and error information.
  2475. //
  2476. // Returned Error Codes:
  2477. // * UnauthorizedException
  2478. //
  2479. // * NotFoundException
  2480. //
  2481. // * TooManyRequestsException
  2482. //
  2483. func (c *APIGateway) GetBasePathMappings(input *GetBasePathMappingsInput) (*GetBasePathMappingsOutput, error) {
  2484. req, out := c.GetBasePathMappingsRequest(input)
  2485. err := req.Send()
  2486. return out, err
  2487. }
  2488. // GetBasePathMappingsPages iterates over the pages of a GetBasePathMappings operation,
  2489. // calling the "fn" function with the response data for each page. To stop
  2490. // iterating, return false from the fn function.
  2491. //
  2492. // See GetBasePathMappings method for more information on how to use this operation.
  2493. //
  2494. // Note: This operation can generate multiple requests to a service.
  2495. //
  2496. // // Example iterating over at most 3 pages of a GetBasePathMappings operation.
  2497. // pageNum := 0
  2498. // err := client.GetBasePathMappingsPages(params,
  2499. // func(page *GetBasePathMappingsOutput, lastPage bool) bool {
  2500. // pageNum++
  2501. // fmt.Println(page)
  2502. // return pageNum <= 3
  2503. // })
  2504. //
  2505. func (c *APIGateway) GetBasePathMappingsPages(input *GetBasePathMappingsInput, fn func(p *GetBasePathMappingsOutput, lastPage bool) (shouldContinue bool)) error {
  2506. page, _ := c.GetBasePathMappingsRequest(input)
  2507. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  2508. return page.EachPage(func(p interface{}, lastPage bool) bool {
  2509. return fn(p.(*GetBasePathMappingsOutput), lastPage)
  2510. })
  2511. }
  2512. const opGetClientCertificate = "GetClientCertificate"
  2513. // GetClientCertificateRequest generates a "aws/request.Request" representing the
  2514. // client's request for the GetClientCertificate operation. The "output" return
  2515. // value can be used to capture response data after the request's "Send" method
  2516. // is called.
  2517. //
  2518. // See GetClientCertificate for usage and error information.
  2519. //
  2520. // Creating a request object using this method should be used when you want to inject
  2521. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2522. // access properties on the request object before or after sending the request. If
  2523. // you just want the service response, call the GetClientCertificate method directly
  2524. // instead.
  2525. //
  2526. // Note: You must call the "Send" method on the returned request object in order
  2527. // to execute the request.
  2528. //
  2529. // // Example sending a request using the GetClientCertificateRequest method.
  2530. // req, resp := client.GetClientCertificateRequest(params)
  2531. //
  2532. // err := req.Send()
  2533. // if err == nil { // resp is now filled
  2534. // fmt.Println(resp)
  2535. // }
  2536. //
  2537. func (c *APIGateway) GetClientCertificateRequest(input *GetClientCertificateInput) (req *request.Request, output *ClientCertificate) {
  2538. op := &request.Operation{
  2539. Name: opGetClientCertificate,
  2540. HTTPMethod: "GET",
  2541. HTTPPath: "/clientcertificates/{clientcertificate_id}",
  2542. }
  2543. if input == nil {
  2544. input = &GetClientCertificateInput{}
  2545. }
  2546. req = c.newRequest(op, input, output)
  2547. output = &ClientCertificate{}
  2548. req.Data = output
  2549. return
  2550. }
  2551. // GetClientCertificate API operation for Amazon API Gateway.
  2552. //
  2553. // Gets information about the current ClientCertificate resource.
  2554. //
  2555. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2556. // with awserr.Error's Code and Message methods to get detailed information about
  2557. // the error.
  2558. //
  2559. // See the AWS API reference guide for Amazon API Gateway's
  2560. // API operation GetClientCertificate for usage and error information.
  2561. //
  2562. // Returned Error Codes:
  2563. // * UnauthorizedException
  2564. //
  2565. // * NotFoundException
  2566. //
  2567. // * TooManyRequestsException
  2568. //
  2569. func (c *APIGateway) GetClientCertificate(input *GetClientCertificateInput) (*ClientCertificate, error) {
  2570. req, out := c.GetClientCertificateRequest(input)
  2571. err := req.Send()
  2572. return out, err
  2573. }
  2574. const opGetClientCertificates = "GetClientCertificates"
  2575. // GetClientCertificatesRequest generates a "aws/request.Request" representing the
  2576. // client's request for the GetClientCertificates operation. The "output" return
  2577. // value can be used to capture response data after the request's "Send" method
  2578. // is called.
  2579. //
  2580. // See GetClientCertificates for usage and error information.
  2581. //
  2582. // Creating a request object using this method should be used when you want to inject
  2583. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2584. // access properties on the request object before or after sending the request. If
  2585. // you just want the service response, call the GetClientCertificates method directly
  2586. // instead.
  2587. //
  2588. // Note: You must call the "Send" method on the returned request object in order
  2589. // to execute the request.
  2590. //
  2591. // // Example sending a request using the GetClientCertificatesRequest method.
  2592. // req, resp := client.GetClientCertificatesRequest(params)
  2593. //
  2594. // err := req.Send()
  2595. // if err == nil { // resp is now filled
  2596. // fmt.Println(resp)
  2597. // }
  2598. //
  2599. func (c *APIGateway) GetClientCertificatesRequest(input *GetClientCertificatesInput) (req *request.Request, output *GetClientCertificatesOutput) {
  2600. op := &request.Operation{
  2601. Name: opGetClientCertificates,
  2602. HTTPMethod: "GET",
  2603. HTTPPath: "/clientcertificates",
  2604. Paginator: &request.Paginator{
  2605. InputTokens: []string{"position"},
  2606. OutputTokens: []string{"position"},
  2607. LimitToken: "limit",
  2608. TruncationToken: "",
  2609. },
  2610. }
  2611. if input == nil {
  2612. input = &GetClientCertificatesInput{}
  2613. }
  2614. req = c.newRequest(op, input, output)
  2615. output = &GetClientCertificatesOutput{}
  2616. req.Data = output
  2617. return
  2618. }
  2619. // GetClientCertificates API operation for Amazon API Gateway.
  2620. //
  2621. // Gets a collection of ClientCertificate resources.
  2622. //
  2623. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2624. // with awserr.Error's Code and Message methods to get detailed information about
  2625. // the error.
  2626. //
  2627. // See the AWS API reference guide for Amazon API Gateway's
  2628. // API operation GetClientCertificates for usage and error information.
  2629. //
  2630. // Returned Error Codes:
  2631. // * BadRequestException
  2632. //
  2633. // * UnauthorizedException
  2634. //
  2635. // * TooManyRequestsException
  2636. //
  2637. func (c *APIGateway) GetClientCertificates(input *GetClientCertificatesInput) (*GetClientCertificatesOutput, error) {
  2638. req, out := c.GetClientCertificatesRequest(input)
  2639. err := req.Send()
  2640. return out, err
  2641. }
  2642. // GetClientCertificatesPages iterates over the pages of a GetClientCertificates operation,
  2643. // calling the "fn" function with the response data for each page. To stop
  2644. // iterating, return false from the fn function.
  2645. //
  2646. // See GetClientCertificates method for more information on how to use this operation.
  2647. //
  2648. // Note: This operation can generate multiple requests to a service.
  2649. //
  2650. // // Example iterating over at most 3 pages of a GetClientCertificates operation.
  2651. // pageNum := 0
  2652. // err := client.GetClientCertificatesPages(params,
  2653. // func(page *GetClientCertificatesOutput, lastPage bool) bool {
  2654. // pageNum++
  2655. // fmt.Println(page)
  2656. // return pageNum <= 3
  2657. // })
  2658. //
  2659. func (c *APIGateway) GetClientCertificatesPages(input *GetClientCertificatesInput, fn func(p *GetClientCertificatesOutput, lastPage bool) (shouldContinue bool)) error {
  2660. page, _ := c.GetClientCertificatesRequest(input)
  2661. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  2662. return page.EachPage(func(p interface{}, lastPage bool) bool {
  2663. return fn(p.(*GetClientCertificatesOutput), lastPage)
  2664. })
  2665. }
  2666. const opGetDeployment = "GetDeployment"
  2667. // GetDeploymentRequest generates a "aws/request.Request" representing the
  2668. // client's request for the GetDeployment operation. The "output" return
  2669. // value can be used to capture response data after the request's "Send" method
  2670. // is called.
  2671. //
  2672. // See GetDeployment for usage and error information.
  2673. //
  2674. // Creating a request object using this method should be used when you want to inject
  2675. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2676. // access properties on the request object before or after sending the request. If
  2677. // you just want the service response, call the GetDeployment method directly
  2678. // instead.
  2679. //
  2680. // Note: You must call the "Send" method on the returned request object in order
  2681. // to execute the request.
  2682. //
  2683. // // Example sending a request using the GetDeploymentRequest method.
  2684. // req, resp := client.GetDeploymentRequest(params)
  2685. //
  2686. // err := req.Send()
  2687. // if err == nil { // resp is now filled
  2688. // fmt.Println(resp)
  2689. // }
  2690. //
  2691. func (c *APIGateway) GetDeploymentRequest(input *GetDeploymentInput) (req *request.Request, output *Deployment) {
  2692. op := &request.Operation{
  2693. Name: opGetDeployment,
  2694. HTTPMethod: "GET",
  2695. HTTPPath: "/restapis/{restapi_id}/deployments/{deployment_id}",
  2696. }
  2697. if input == nil {
  2698. input = &GetDeploymentInput{}
  2699. }
  2700. req = c.newRequest(op, input, output)
  2701. output = &Deployment{}
  2702. req.Data = output
  2703. return
  2704. }
  2705. // GetDeployment API operation for Amazon API Gateway.
  2706. //
  2707. // Gets information about a Deployment resource.
  2708. //
  2709. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2710. // with awserr.Error's Code and Message methods to get detailed information about
  2711. // the error.
  2712. //
  2713. // See the AWS API reference guide for Amazon API Gateway's
  2714. // API operation GetDeployment for usage and error information.
  2715. //
  2716. // Returned Error Codes:
  2717. // * UnauthorizedException
  2718. //
  2719. // * NotFoundException
  2720. //
  2721. // * TooManyRequestsException
  2722. //
  2723. // * ServiceUnavailableException
  2724. //
  2725. func (c *APIGateway) GetDeployment(input *GetDeploymentInput) (*Deployment, error) {
  2726. req, out := c.GetDeploymentRequest(input)
  2727. err := req.Send()
  2728. return out, err
  2729. }
  2730. const opGetDeployments = "GetDeployments"
  2731. // GetDeploymentsRequest generates a "aws/request.Request" representing the
  2732. // client's request for the GetDeployments operation. The "output" return
  2733. // value can be used to capture response data after the request's "Send" method
  2734. // is called.
  2735. //
  2736. // See GetDeployments for usage and error information.
  2737. //
  2738. // Creating a request object using this method should be used when you want to inject
  2739. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2740. // access properties on the request object before or after sending the request. If
  2741. // you just want the service response, call the GetDeployments method directly
  2742. // instead.
  2743. //
  2744. // Note: You must call the "Send" method on the returned request object in order
  2745. // to execute the request.
  2746. //
  2747. // // Example sending a request using the GetDeploymentsRequest method.
  2748. // req, resp := client.GetDeploymentsRequest(params)
  2749. //
  2750. // err := req.Send()
  2751. // if err == nil { // resp is now filled
  2752. // fmt.Println(resp)
  2753. // }
  2754. //
  2755. func (c *APIGateway) GetDeploymentsRequest(input *GetDeploymentsInput) (req *request.Request, output *GetDeploymentsOutput) {
  2756. op := &request.Operation{
  2757. Name: opGetDeployments,
  2758. HTTPMethod: "GET",
  2759. HTTPPath: "/restapis/{restapi_id}/deployments",
  2760. Paginator: &request.Paginator{
  2761. InputTokens: []string{"position"},
  2762. OutputTokens: []string{"position"},
  2763. LimitToken: "limit",
  2764. TruncationToken: "",
  2765. },
  2766. }
  2767. if input == nil {
  2768. input = &GetDeploymentsInput{}
  2769. }
  2770. req = c.newRequest(op, input, output)
  2771. output = &GetDeploymentsOutput{}
  2772. req.Data = output
  2773. return
  2774. }
  2775. // GetDeployments API operation for Amazon API Gateway.
  2776. //
  2777. // Gets information about a Deployments collection.
  2778. //
  2779. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2780. // with awserr.Error's Code and Message methods to get detailed information about
  2781. // the error.
  2782. //
  2783. // See the AWS API reference guide for Amazon API Gateway's
  2784. // API operation GetDeployments for usage and error information.
  2785. //
  2786. // Returned Error Codes:
  2787. // * BadRequestException
  2788. //
  2789. // * UnauthorizedException
  2790. //
  2791. // * TooManyRequestsException
  2792. //
  2793. // * ServiceUnavailableException
  2794. //
  2795. func (c *APIGateway) GetDeployments(input *GetDeploymentsInput) (*GetDeploymentsOutput, error) {
  2796. req, out := c.GetDeploymentsRequest(input)
  2797. err := req.Send()
  2798. return out, err
  2799. }
  2800. // GetDeploymentsPages iterates over the pages of a GetDeployments operation,
  2801. // calling the "fn" function with the response data for each page. To stop
  2802. // iterating, return false from the fn function.
  2803. //
  2804. // See GetDeployments method for more information on how to use this operation.
  2805. //
  2806. // Note: This operation can generate multiple requests to a service.
  2807. //
  2808. // // Example iterating over at most 3 pages of a GetDeployments operation.
  2809. // pageNum := 0
  2810. // err := client.GetDeploymentsPages(params,
  2811. // func(page *GetDeploymentsOutput, lastPage bool) bool {
  2812. // pageNum++
  2813. // fmt.Println(page)
  2814. // return pageNum <= 3
  2815. // })
  2816. //
  2817. func (c *APIGateway) GetDeploymentsPages(input *GetDeploymentsInput, fn func(p *GetDeploymentsOutput, lastPage bool) (shouldContinue bool)) error {
  2818. page, _ := c.GetDeploymentsRequest(input)
  2819. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  2820. return page.EachPage(func(p interface{}, lastPage bool) bool {
  2821. return fn(p.(*GetDeploymentsOutput), lastPage)
  2822. })
  2823. }
  2824. const opGetDomainName = "GetDomainName"
  2825. // GetDomainNameRequest generates a "aws/request.Request" representing the
  2826. // client's request for the GetDomainName operation. The "output" return
  2827. // value can be used to capture response data after the request's "Send" method
  2828. // is called.
  2829. //
  2830. // See GetDomainName for usage and error information.
  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 GetDomainName 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 GetDomainNameRequest method.
  2842. // req, resp := client.GetDomainNameRequest(params)
  2843. //
  2844. // err := req.Send()
  2845. // if err == nil { // resp is now filled
  2846. // fmt.Println(resp)
  2847. // }
  2848. //
  2849. func (c *APIGateway) GetDomainNameRequest(input *GetDomainNameInput) (req *request.Request, output *DomainName) {
  2850. op := &request.Operation{
  2851. Name: opGetDomainName,
  2852. HTTPMethod: "GET",
  2853. HTTPPath: "/domainnames/{domain_name}",
  2854. }
  2855. if input == nil {
  2856. input = &GetDomainNameInput{}
  2857. }
  2858. req = c.newRequest(op, input, output)
  2859. output = &DomainName{}
  2860. req.Data = output
  2861. return
  2862. }
  2863. // GetDomainName API operation for Amazon API Gateway.
  2864. //
  2865. // Represents a domain name that is contained in a simpler, more intuitive URL
  2866. // that can be called.
  2867. //
  2868. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2869. // with awserr.Error's Code and Message methods to get detailed information about
  2870. // the error.
  2871. //
  2872. // See the AWS API reference guide for Amazon API Gateway's
  2873. // API operation GetDomainName for usage and error information.
  2874. //
  2875. // Returned Error Codes:
  2876. // * UnauthorizedException
  2877. //
  2878. // * NotFoundException
  2879. //
  2880. // * ServiceUnavailableException
  2881. //
  2882. // * TooManyRequestsException
  2883. //
  2884. func (c *APIGateway) GetDomainName(input *GetDomainNameInput) (*DomainName, error) {
  2885. req, out := c.GetDomainNameRequest(input)
  2886. err := req.Send()
  2887. return out, err
  2888. }
  2889. const opGetDomainNames = "GetDomainNames"
  2890. // GetDomainNamesRequest generates a "aws/request.Request" representing the
  2891. // client's request for the GetDomainNames operation. The "output" return
  2892. // value can be used to capture response data after the request's "Send" method
  2893. // is called.
  2894. //
  2895. // See GetDomainNames for usage and error information.
  2896. //
  2897. // Creating a request object using this method should be used when you want to inject
  2898. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2899. // access properties on the request object before or after sending the request. If
  2900. // you just want the service response, call the GetDomainNames method directly
  2901. // instead.
  2902. //
  2903. // Note: You must call the "Send" method on the returned request object in order
  2904. // to execute the request.
  2905. //
  2906. // // Example sending a request using the GetDomainNamesRequest method.
  2907. // req, resp := client.GetDomainNamesRequest(params)
  2908. //
  2909. // err := req.Send()
  2910. // if err == nil { // resp is now filled
  2911. // fmt.Println(resp)
  2912. // }
  2913. //
  2914. func (c *APIGateway) GetDomainNamesRequest(input *GetDomainNamesInput) (req *request.Request, output *GetDomainNamesOutput) {
  2915. op := &request.Operation{
  2916. Name: opGetDomainNames,
  2917. HTTPMethod: "GET",
  2918. HTTPPath: "/domainnames",
  2919. Paginator: &request.Paginator{
  2920. InputTokens: []string{"position"},
  2921. OutputTokens: []string{"position"},
  2922. LimitToken: "limit",
  2923. TruncationToken: "",
  2924. },
  2925. }
  2926. if input == nil {
  2927. input = &GetDomainNamesInput{}
  2928. }
  2929. req = c.newRequest(op, input, output)
  2930. output = &GetDomainNamesOutput{}
  2931. req.Data = output
  2932. return
  2933. }
  2934. // GetDomainNames API operation for Amazon API Gateway.
  2935. //
  2936. // Represents a collection of DomainName resources.
  2937. //
  2938. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2939. // with awserr.Error's Code and Message methods to get detailed information about
  2940. // the error.
  2941. //
  2942. // See the AWS API reference guide for Amazon API Gateway's
  2943. // API operation GetDomainNames for usage and error information.
  2944. //
  2945. // Returned Error Codes:
  2946. // * BadRequestException
  2947. //
  2948. // * UnauthorizedException
  2949. //
  2950. // * TooManyRequestsException
  2951. //
  2952. func (c *APIGateway) GetDomainNames(input *GetDomainNamesInput) (*GetDomainNamesOutput, error) {
  2953. req, out := c.GetDomainNamesRequest(input)
  2954. err := req.Send()
  2955. return out, err
  2956. }
  2957. // GetDomainNamesPages iterates over the pages of a GetDomainNames operation,
  2958. // calling the "fn" function with the response data for each page. To stop
  2959. // iterating, return false from the fn function.
  2960. //
  2961. // See GetDomainNames method for more information on how to use this operation.
  2962. //
  2963. // Note: This operation can generate multiple requests to a service.
  2964. //
  2965. // // Example iterating over at most 3 pages of a GetDomainNames operation.
  2966. // pageNum := 0
  2967. // err := client.GetDomainNamesPages(params,
  2968. // func(page *GetDomainNamesOutput, lastPage bool) bool {
  2969. // pageNum++
  2970. // fmt.Println(page)
  2971. // return pageNum <= 3
  2972. // })
  2973. //
  2974. func (c *APIGateway) GetDomainNamesPages(input *GetDomainNamesInput, fn func(p *GetDomainNamesOutput, lastPage bool) (shouldContinue bool)) error {
  2975. page, _ := c.GetDomainNamesRequest(input)
  2976. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  2977. return page.EachPage(func(p interface{}, lastPage bool) bool {
  2978. return fn(p.(*GetDomainNamesOutput), lastPage)
  2979. })
  2980. }
  2981. const opGetExport = "GetExport"
  2982. // GetExportRequest generates a "aws/request.Request" representing the
  2983. // client's request for the GetExport operation. The "output" return
  2984. // value can be used to capture response data after the request's "Send" method
  2985. // is called.
  2986. //
  2987. // See GetExport for usage and error information.
  2988. //
  2989. // Creating a request object using this method should be used when you want to inject
  2990. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2991. // access properties on the request object before or after sending the request. If
  2992. // you just want the service response, call the GetExport method directly
  2993. // instead.
  2994. //
  2995. // Note: You must call the "Send" method on the returned request object in order
  2996. // to execute the request.
  2997. //
  2998. // // Example sending a request using the GetExportRequest method.
  2999. // req, resp := client.GetExportRequest(params)
  3000. //
  3001. // err := req.Send()
  3002. // if err == nil { // resp is now filled
  3003. // fmt.Println(resp)
  3004. // }
  3005. //
  3006. func (c *APIGateway) GetExportRequest(input *GetExportInput) (req *request.Request, output *GetExportOutput) {
  3007. op := &request.Operation{
  3008. Name: opGetExport,
  3009. HTTPMethod: "GET",
  3010. HTTPPath: "/restapis/{restapi_id}/stages/{stage_name}/exports/{export_type}",
  3011. }
  3012. if input == nil {
  3013. input = &GetExportInput{}
  3014. }
  3015. req = c.newRequest(op, input, output)
  3016. output = &GetExportOutput{}
  3017. req.Data = output
  3018. return
  3019. }
  3020. // GetExport API operation for Amazon API Gateway.
  3021. //
  3022. // Exports a deployed version of a RestApi in a specified format.
  3023. //
  3024. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3025. // with awserr.Error's Code and Message methods to get detailed information about
  3026. // the error.
  3027. //
  3028. // See the AWS API reference guide for Amazon API Gateway's
  3029. // API operation GetExport for usage and error information.
  3030. //
  3031. // Returned Error Codes:
  3032. // * UnauthorizedException
  3033. //
  3034. // * NotFoundException
  3035. //
  3036. // * BadRequestException
  3037. //
  3038. // * TooManyRequestsException
  3039. //
  3040. func (c *APIGateway) GetExport(input *GetExportInput) (*GetExportOutput, error) {
  3041. req, out := c.GetExportRequest(input)
  3042. err := req.Send()
  3043. return out, err
  3044. }
  3045. const opGetIntegration = "GetIntegration"
  3046. // GetIntegrationRequest generates a "aws/request.Request" representing the
  3047. // client's request for the GetIntegration operation. The "output" return
  3048. // value can be used to capture response data after the request's "Send" method
  3049. // is called.
  3050. //
  3051. // See GetIntegration for usage and error information.
  3052. //
  3053. // Creating a request object using this method should be used when you want to inject
  3054. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3055. // access properties on the request object before or after sending the request. If
  3056. // you just want the service response, call the GetIntegration method directly
  3057. // instead.
  3058. //
  3059. // Note: You must call the "Send" method on the returned request object in order
  3060. // to execute the request.
  3061. //
  3062. // // Example sending a request using the GetIntegrationRequest method.
  3063. // req, resp := client.GetIntegrationRequest(params)
  3064. //
  3065. // err := req.Send()
  3066. // if err == nil { // resp is now filled
  3067. // fmt.Println(resp)
  3068. // }
  3069. //
  3070. func (c *APIGateway) GetIntegrationRequest(input *GetIntegrationInput) (req *request.Request, output *Integration) {
  3071. op := &request.Operation{
  3072. Name: opGetIntegration,
  3073. HTTPMethod: "GET",
  3074. HTTPPath: "/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}/integration",
  3075. }
  3076. if input == nil {
  3077. input = &GetIntegrationInput{}
  3078. }
  3079. req = c.newRequest(op, input, output)
  3080. output = &Integration{}
  3081. req.Data = output
  3082. return
  3083. }
  3084. // GetIntegration API operation for Amazon API Gateway.
  3085. //
  3086. // Represents a get integration.
  3087. //
  3088. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3089. // with awserr.Error's Code and Message methods to get detailed information about
  3090. // the error.
  3091. //
  3092. // See the AWS API reference guide for Amazon API Gateway's
  3093. // API operation GetIntegration for usage and error information.
  3094. //
  3095. // Returned Error Codes:
  3096. // * UnauthorizedException
  3097. //
  3098. // * NotFoundException
  3099. //
  3100. // * TooManyRequestsException
  3101. //
  3102. func (c *APIGateway) GetIntegration(input *GetIntegrationInput) (*Integration, error) {
  3103. req, out := c.GetIntegrationRequest(input)
  3104. err := req.Send()
  3105. return out, err
  3106. }
  3107. const opGetIntegrationResponse = "GetIntegrationResponse"
  3108. // GetIntegrationResponseRequest generates a "aws/request.Request" representing the
  3109. // client's request for the GetIntegrationResponse operation. The "output" return
  3110. // value can be used to capture response data after the request's "Send" method
  3111. // is called.
  3112. //
  3113. // See GetIntegrationResponse for usage and error information.
  3114. //
  3115. // Creating a request object using this method should be used when you want to inject
  3116. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3117. // access properties on the request object before or after sending the request. If
  3118. // you just want the service response, call the GetIntegrationResponse method directly
  3119. // instead.
  3120. //
  3121. // Note: You must call the "Send" method on the returned request object in order
  3122. // to execute the request.
  3123. //
  3124. // // Example sending a request using the GetIntegrationResponseRequest method.
  3125. // req, resp := client.GetIntegrationResponseRequest(params)
  3126. //
  3127. // err := req.Send()
  3128. // if err == nil { // resp is now filled
  3129. // fmt.Println(resp)
  3130. // }
  3131. //
  3132. func (c *APIGateway) GetIntegrationResponseRequest(input *GetIntegrationResponseInput) (req *request.Request, output *IntegrationResponse) {
  3133. op := &request.Operation{
  3134. Name: opGetIntegrationResponse,
  3135. HTTPMethod: "GET",
  3136. HTTPPath: "/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}/integration/responses/{status_code}",
  3137. }
  3138. if input == nil {
  3139. input = &GetIntegrationResponseInput{}
  3140. }
  3141. req = c.newRequest(op, input, output)
  3142. output = &IntegrationResponse{}
  3143. req.Data = output
  3144. return
  3145. }
  3146. // GetIntegrationResponse API operation for Amazon API Gateway.
  3147. //
  3148. // Represents a get integration response.
  3149. //
  3150. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3151. // with awserr.Error's Code and Message methods to get detailed information about
  3152. // the error.
  3153. //
  3154. // See the AWS API reference guide for Amazon API Gateway's
  3155. // API operation GetIntegrationResponse for usage and error information.
  3156. //
  3157. // Returned Error Codes:
  3158. // * UnauthorizedException
  3159. //
  3160. // * NotFoundException
  3161. //
  3162. // * TooManyRequestsException
  3163. //
  3164. func (c *APIGateway) GetIntegrationResponse(input *GetIntegrationResponseInput) (*IntegrationResponse, error) {
  3165. req, out := c.GetIntegrationResponseRequest(input)
  3166. err := req.Send()
  3167. return out, err
  3168. }
  3169. const opGetMethod = "GetMethod"
  3170. // GetMethodRequest generates a "aws/request.Request" representing the
  3171. // client's request for the GetMethod operation. The "output" return
  3172. // value can be used to capture response data after the request's "Send" method
  3173. // is called.
  3174. //
  3175. // See GetMethod for usage and error information.
  3176. //
  3177. // Creating a request object using this method should be used when you want to inject
  3178. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3179. // access properties on the request object before or after sending the request. If
  3180. // you just want the service response, call the GetMethod method directly
  3181. // instead.
  3182. //
  3183. // Note: You must call the "Send" method on the returned request object in order
  3184. // to execute the request.
  3185. //
  3186. // // Example sending a request using the GetMethodRequest method.
  3187. // req, resp := client.GetMethodRequest(params)
  3188. //
  3189. // err := req.Send()
  3190. // if err == nil { // resp is now filled
  3191. // fmt.Println(resp)
  3192. // }
  3193. //
  3194. func (c *APIGateway) GetMethodRequest(input *GetMethodInput) (req *request.Request, output *Method) {
  3195. op := &request.Operation{
  3196. Name: opGetMethod,
  3197. HTTPMethod: "GET",
  3198. HTTPPath: "/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}",
  3199. }
  3200. if input == nil {
  3201. input = &GetMethodInput{}
  3202. }
  3203. req = c.newRequest(op, input, output)
  3204. output = &Method{}
  3205. req.Data = output
  3206. return
  3207. }
  3208. // GetMethod API operation for Amazon API Gateway.
  3209. //
  3210. // Describe an existing Method resource.
  3211. //
  3212. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3213. // with awserr.Error's Code and Message methods to get detailed information about
  3214. // the error.
  3215. //
  3216. // See the AWS API reference guide for Amazon API Gateway's
  3217. // API operation GetMethod for usage and error information.
  3218. //
  3219. // Returned Error Codes:
  3220. // * UnauthorizedException
  3221. //
  3222. // * NotFoundException
  3223. //
  3224. // * TooManyRequestsException
  3225. //
  3226. func (c *APIGateway) GetMethod(input *GetMethodInput) (*Method, error) {
  3227. req, out := c.GetMethodRequest(input)
  3228. err := req.Send()
  3229. return out, err
  3230. }
  3231. const opGetMethodResponse = "GetMethodResponse"
  3232. // GetMethodResponseRequest generates a "aws/request.Request" representing the
  3233. // client's request for the GetMethodResponse operation. The "output" return
  3234. // value can be used to capture response data after the request's "Send" method
  3235. // is called.
  3236. //
  3237. // See GetMethodResponse for usage and error information.
  3238. //
  3239. // Creating a request object using this method should be used when you want to inject
  3240. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3241. // access properties on the request object before or after sending the request. If
  3242. // you just want the service response, call the GetMethodResponse method directly
  3243. // instead.
  3244. //
  3245. // Note: You must call the "Send" method on the returned request object in order
  3246. // to execute the request.
  3247. //
  3248. // // Example sending a request using the GetMethodResponseRequest method.
  3249. // req, resp := client.GetMethodResponseRequest(params)
  3250. //
  3251. // err := req.Send()
  3252. // if err == nil { // resp is now filled
  3253. // fmt.Println(resp)
  3254. // }
  3255. //
  3256. func (c *APIGateway) GetMethodResponseRequest(input *GetMethodResponseInput) (req *request.Request, output *MethodResponse) {
  3257. op := &request.Operation{
  3258. Name: opGetMethodResponse,
  3259. HTTPMethod: "GET",
  3260. HTTPPath: "/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}/responses/{status_code}",
  3261. }
  3262. if input == nil {
  3263. input = &GetMethodResponseInput{}
  3264. }
  3265. req = c.newRequest(op, input, output)
  3266. output = &MethodResponse{}
  3267. req.Data = output
  3268. return
  3269. }
  3270. // GetMethodResponse API operation for Amazon API Gateway.
  3271. //
  3272. // Describes a MethodResponse resource.
  3273. //
  3274. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3275. // with awserr.Error's Code and Message methods to get detailed information about
  3276. // the error.
  3277. //
  3278. // See the AWS API reference guide for Amazon API Gateway's
  3279. // API operation GetMethodResponse for usage and error information.
  3280. //
  3281. // Returned Error Codes:
  3282. // * UnauthorizedException
  3283. //
  3284. // * NotFoundException
  3285. //
  3286. // * TooManyRequestsException
  3287. //
  3288. func (c *APIGateway) GetMethodResponse(input *GetMethodResponseInput) (*MethodResponse, error) {
  3289. req, out := c.GetMethodResponseRequest(input)
  3290. err := req.Send()
  3291. return out, err
  3292. }
  3293. const opGetModel = "GetModel"
  3294. // GetModelRequest generates a "aws/request.Request" representing the
  3295. // client's request for the GetModel operation. The "output" return
  3296. // value can be used to capture response data after the request's "Send" method
  3297. // is called.
  3298. //
  3299. // See GetModel for usage and error information.
  3300. //
  3301. // Creating a request object using this method should be used when you want to inject
  3302. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3303. // access properties on the request object before or after sending the request. If
  3304. // you just want the service response, call the GetModel method directly
  3305. // instead.
  3306. //
  3307. // Note: You must call the "Send" method on the returned request object in order
  3308. // to execute the request.
  3309. //
  3310. // // Example sending a request using the GetModelRequest method.
  3311. // req, resp := client.GetModelRequest(params)
  3312. //
  3313. // err := req.Send()
  3314. // if err == nil { // resp is now filled
  3315. // fmt.Println(resp)
  3316. // }
  3317. //
  3318. func (c *APIGateway) GetModelRequest(input *GetModelInput) (req *request.Request, output *Model) {
  3319. op := &request.Operation{
  3320. Name: opGetModel,
  3321. HTTPMethod: "GET",
  3322. HTTPPath: "/restapis/{restapi_id}/models/{model_name}",
  3323. }
  3324. if input == nil {
  3325. input = &GetModelInput{}
  3326. }
  3327. req = c.newRequest(op, input, output)
  3328. output = &Model{}
  3329. req.Data = output
  3330. return
  3331. }
  3332. // GetModel API operation for Amazon API Gateway.
  3333. //
  3334. // Describes an existing model defined for a RestApi resource.
  3335. //
  3336. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3337. // with awserr.Error's Code and Message methods to get detailed information about
  3338. // the error.
  3339. //
  3340. // See the AWS API reference guide for Amazon API Gateway's
  3341. // API operation GetModel for usage and error information.
  3342. //
  3343. // Returned Error Codes:
  3344. // * UnauthorizedException
  3345. //
  3346. // * NotFoundException
  3347. //
  3348. // * TooManyRequestsException
  3349. //
  3350. func (c *APIGateway) GetModel(input *GetModelInput) (*Model, error) {
  3351. req, out := c.GetModelRequest(input)
  3352. err := req.Send()
  3353. return out, err
  3354. }
  3355. const opGetModelTemplate = "GetModelTemplate"
  3356. // GetModelTemplateRequest generates a "aws/request.Request" representing the
  3357. // client's request for the GetModelTemplate operation. The "output" return
  3358. // value can be used to capture response data after the request's "Send" method
  3359. // is called.
  3360. //
  3361. // See GetModelTemplate for usage and error information.
  3362. //
  3363. // Creating a request object using this method should be used when you want to inject
  3364. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3365. // access properties on the request object before or after sending the request. If
  3366. // you just want the service response, call the GetModelTemplate method directly
  3367. // instead.
  3368. //
  3369. // Note: You must call the "Send" method on the returned request object in order
  3370. // to execute the request.
  3371. //
  3372. // // Example sending a request using the GetModelTemplateRequest method.
  3373. // req, resp := client.GetModelTemplateRequest(params)
  3374. //
  3375. // err := req.Send()
  3376. // if err == nil { // resp is now filled
  3377. // fmt.Println(resp)
  3378. // }
  3379. //
  3380. func (c *APIGateway) GetModelTemplateRequest(input *GetModelTemplateInput) (req *request.Request, output *GetModelTemplateOutput) {
  3381. op := &request.Operation{
  3382. Name: opGetModelTemplate,
  3383. HTTPMethod: "GET",
  3384. HTTPPath: "/restapis/{restapi_id}/models/{model_name}/default_template",
  3385. }
  3386. if input == nil {
  3387. input = &GetModelTemplateInput{}
  3388. }
  3389. req = c.newRequest(op, input, output)
  3390. output = &GetModelTemplateOutput{}
  3391. req.Data = output
  3392. return
  3393. }
  3394. // GetModelTemplate API operation for Amazon API Gateway.
  3395. //
  3396. // Generates a sample mapping template that can be used to transform a payload
  3397. // into the structure of a model.
  3398. //
  3399. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3400. // with awserr.Error's Code and Message methods to get detailed information about
  3401. // the error.
  3402. //
  3403. // See the AWS API reference guide for Amazon API Gateway's
  3404. // API operation GetModelTemplate for usage and error information.
  3405. //
  3406. // Returned Error Codes:
  3407. // * UnauthorizedException
  3408. //
  3409. // * NotFoundException
  3410. //
  3411. // * BadRequestException
  3412. //
  3413. // * TooManyRequestsException
  3414. //
  3415. func (c *APIGateway) GetModelTemplate(input *GetModelTemplateInput) (*GetModelTemplateOutput, error) {
  3416. req, out := c.GetModelTemplateRequest(input)
  3417. err := req.Send()
  3418. return out, err
  3419. }
  3420. const opGetModels = "GetModels"
  3421. // GetModelsRequest generates a "aws/request.Request" representing the
  3422. // client's request for the GetModels operation. The "output" return
  3423. // value can be used to capture response data after the request's "Send" method
  3424. // is called.
  3425. //
  3426. // See GetModels for usage and error information.
  3427. //
  3428. // Creating a request object using this method should be used when you want to inject
  3429. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3430. // access properties on the request object before or after sending the request. If
  3431. // you just want the service response, call the GetModels method directly
  3432. // instead.
  3433. //
  3434. // Note: You must call the "Send" method on the returned request object in order
  3435. // to execute the request.
  3436. //
  3437. // // Example sending a request using the GetModelsRequest method.
  3438. // req, resp := client.GetModelsRequest(params)
  3439. //
  3440. // err := req.Send()
  3441. // if err == nil { // resp is now filled
  3442. // fmt.Println(resp)
  3443. // }
  3444. //
  3445. func (c *APIGateway) GetModelsRequest(input *GetModelsInput) (req *request.Request, output *GetModelsOutput) {
  3446. op := &request.Operation{
  3447. Name: opGetModels,
  3448. HTTPMethod: "GET",
  3449. HTTPPath: "/restapis/{restapi_id}/models",
  3450. Paginator: &request.Paginator{
  3451. InputTokens: []string{"position"},
  3452. OutputTokens: []string{"position"},
  3453. LimitToken: "limit",
  3454. TruncationToken: "",
  3455. },
  3456. }
  3457. if input == nil {
  3458. input = &GetModelsInput{}
  3459. }
  3460. req = c.newRequest(op, input, output)
  3461. output = &GetModelsOutput{}
  3462. req.Data = output
  3463. return
  3464. }
  3465. // GetModels API operation for Amazon API Gateway.
  3466. //
  3467. // Describes existing Models defined for a RestApi resource.
  3468. //
  3469. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3470. // with awserr.Error's Code and Message methods to get detailed information about
  3471. // the error.
  3472. //
  3473. // See the AWS API reference guide for Amazon API Gateway's
  3474. // API operation GetModels for usage and error information.
  3475. //
  3476. // Returned Error Codes:
  3477. // * BadRequestException
  3478. //
  3479. // * UnauthorizedException
  3480. //
  3481. // * NotFoundException
  3482. //
  3483. // * TooManyRequestsException
  3484. //
  3485. func (c *APIGateway) GetModels(input *GetModelsInput) (*GetModelsOutput, error) {
  3486. req, out := c.GetModelsRequest(input)
  3487. err := req.Send()
  3488. return out, err
  3489. }
  3490. // GetModelsPages iterates over the pages of a GetModels operation,
  3491. // calling the "fn" function with the response data for each page. To stop
  3492. // iterating, return false from the fn function.
  3493. //
  3494. // See GetModels method for more information on how to use this operation.
  3495. //
  3496. // Note: This operation can generate multiple requests to a service.
  3497. //
  3498. // // Example iterating over at most 3 pages of a GetModels operation.
  3499. // pageNum := 0
  3500. // err := client.GetModelsPages(params,
  3501. // func(page *GetModelsOutput, lastPage bool) bool {
  3502. // pageNum++
  3503. // fmt.Println(page)
  3504. // return pageNum <= 3
  3505. // })
  3506. //
  3507. func (c *APIGateway) GetModelsPages(input *GetModelsInput, fn func(p *GetModelsOutput, lastPage bool) (shouldContinue bool)) error {
  3508. page, _ := c.GetModelsRequest(input)
  3509. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  3510. return page.EachPage(func(p interface{}, lastPage bool) bool {
  3511. return fn(p.(*GetModelsOutput), lastPage)
  3512. })
  3513. }
  3514. const opGetResource = "GetResource"
  3515. // GetResourceRequest generates a "aws/request.Request" representing the
  3516. // client's request for the GetResource operation. The "output" return
  3517. // value can be used to capture response data after the request's "Send" method
  3518. // is called.
  3519. //
  3520. // See GetResource for usage and error information.
  3521. //
  3522. // Creating a request object using this method should be used when you want to inject
  3523. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3524. // access properties on the request object before or after sending the request. If
  3525. // you just want the service response, call the GetResource method directly
  3526. // instead.
  3527. //
  3528. // Note: You must call the "Send" method on the returned request object in order
  3529. // to execute the request.
  3530. //
  3531. // // Example sending a request using the GetResourceRequest method.
  3532. // req, resp := client.GetResourceRequest(params)
  3533. //
  3534. // err := req.Send()
  3535. // if err == nil { // resp is now filled
  3536. // fmt.Println(resp)
  3537. // }
  3538. //
  3539. func (c *APIGateway) GetResourceRequest(input *GetResourceInput) (req *request.Request, output *Resource) {
  3540. op := &request.Operation{
  3541. Name: opGetResource,
  3542. HTTPMethod: "GET",
  3543. HTTPPath: "/restapis/{restapi_id}/resources/{resource_id}",
  3544. }
  3545. if input == nil {
  3546. input = &GetResourceInput{}
  3547. }
  3548. req = c.newRequest(op, input, output)
  3549. output = &Resource{}
  3550. req.Data = output
  3551. return
  3552. }
  3553. // GetResource API operation for Amazon API Gateway.
  3554. //
  3555. // Lists information about a resource.
  3556. //
  3557. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3558. // with awserr.Error's Code and Message methods to get detailed information about
  3559. // the error.
  3560. //
  3561. // See the AWS API reference guide for Amazon API Gateway's
  3562. // API operation GetResource for usage and error information.
  3563. //
  3564. // Returned Error Codes:
  3565. // * UnauthorizedException
  3566. //
  3567. // * NotFoundException
  3568. //
  3569. // * TooManyRequestsException
  3570. //
  3571. func (c *APIGateway) GetResource(input *GetResourceInput) (*Resource, error) {
  3572. req, out := c.GetResourceRequest(input)
  3573. err := req.Send()
  3574. return out, err
  3575. }
  3576. const opGetResources = "GetResources"
  3577. // GetResourcesRequest generates a "aws/request.Request" representing the
  3578. // client's request for the GetResources operation. The "output" return
  3579. // value can be used to capture response data after the request's "Send" method
  3580. // is called.
  3581. //
  3582. // See GetResources for usage and error information.
  3583. //
  3584. // Creating a request object using this method should be used when you want to inject
  3585. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3586. // access properties on the request object before or after sending the request. If
  3587. // you just want the service response, call the GetResources method directly
  3588. // instead.
  3589. //
  3590. // Note: You must call the "Send" method on the returned request object in order
  3591. // to execute the request.
  3592. //
  3593. // // Example sending a request using the GetResourcesRequest method.
  3594. // req, resp := client.GetResourcesRequest(params)
  3595. //
  3596. // err := req.Send()
  3597. // if err == nil { // resp is now filled
  3598. // fmt.Println(resp)
  3599. // }
  3600. //
  3601. func (c *APIGateway) GetResourcesRequest(input *GetResourcesInput) (req *request.Request, output *GetResourcesOutput) {
  3602. op := &request.Operation{
  3603. Name: opGetResources,
  3604. HTTPMethod: "GET",
  3605. HTTPPath: "/restapis/{restapi_id}/resources",
  3606. Paginator: &request.Paginator{
  3607. InputTokens: []string{"position"},
  3608. OutputTokens: []string{"position"},
  3609. LimitToken: "limit",
  3610. TruncationToken: "",
  3611. },
  3612. }
  3613. if input == nil {
  3614. input = &GetResourcesInput{}
  3615. }
  3616. req = c.newRequest(op, input, output)
  3617. output = &GetResourcesOutput{}
  3618. req.Data = output
  3619. return
  3620. }
  3621. // GetResources API operation for Amazon API Gateway.
  3622. //
  3623. // Lists information about a collection of Resource resources.
  3624. //
  3625. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3626. // with awserr.Error's Code and Message methods to get detailed information about
  3627. // the error.
  3628. //
  3629. // See the AWS API reference guide for Amazon API Gateway's
  3630. // API operation GetResources for usage and error information.
  3631. //
  3632. // Returned Error Codes:
  3633. // * BadRequestException
  3634. //
  3635. // * UnauthorizedException
  3636. //
  3637. // * NotFoundException
  3638. //
  3639. // * TooManyRequestsException
  3640. //
  3641. func (c *APIGateway) GetResources(input *GetResourcesInput) (*GetResourcesOutput, error) {
  3642. req, out := c.GetResourcesRequest(input)
  3643. err := req.Send()
  3644. return out, err
  3645. }
  3646. // GetResourcesPages iterates over the pages of a GetResources operation,
  3647. // calling the "fn" function with the response data for each page. To stop
  3648. // iterating, return false from the fn function.
  3649. //
  3650. // See GetResources method for more information on how to use this operation.
  3651. //
  3652. // Note: This operation can generate multiple requests to a service.
  3653. //
  3654. // // Example iterating over at most 3 pages of a GetResources operation.
  3655. // pageNum := 0
  3656. // err := client.GetResourcesPages(params,
  3657. // func(page *GetResourcesOutput, lastPage bool) bool {
  3658. // pageNum++
  3659. // fmt.Println(page)
  3660. // return pageNum <= 3
  3661. // })
  3662. //
  3663. func (c *APIGateway) GetResourcesPages(input *GetResourcesInput, fn func(p *GetResourcesOutput, lastPage bool) (shouldContinue bool)) error {
  3664. page, _ := c.GetResourcesRequest(input)
  3665. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  3666. return page.EachPage(func(p interface{}, lastPage bool) bool {
  3667. return fn(p.(*GetResourcesOutput), lastPage)
  3668. })
  3669. }
  3670. const opGetRestApi = "GetRestApi"
  3671. // GetRestApiRequest generates a "aws/request.Request" representing the
  3672. // client's request for the GetRestApi operation. The "output" return
  3673. // value can be used to capture response data after the request's "Send" method
  3674. // is called.
  3675. //
  3676. // See GetRestApi for usage and error information.
  3677. //
  3678. // Creating a request object using this method should be used when you want to inject
  3679. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3680. // access properties on the request object before or after sending the request. If
  3681. // you just want the service response, call the GetRestApi method directly
  3682. // instead.
  3683. //
  3684. // Note: You must call the "Send" method on the returned request object in order
  3685. // to execute the request.
  3686. //
  3687. // // Example sending a request using the GetRestApiRequest method.
  3688. // req, resp := client.GetRestApiRequest(params)
  3689. //
  3690. // err := req.Send()
  3691. // if err == nil { // resp is now filled
  3692. // fmt.Println(resp)
  3693. // }
  3694. //
  3695. func (c *APIGateway) GetRestApiRequest(input *GetRestApiInput) (req *request.Request, output *RestApi) {
  3696. op := &request.Operation{
  3697. Name: opGetRestApi,
  3698. HTTPMethod: "GET",
  3699. HTTPPath: "/restapis/{restapi_id}",
  3700. }
  3701. if input == nil {
  3702. input = &GetRestApiInput{}
  3703. }
  3704. req = c.newRequest(op, input, output)
  3705. output = &RestApi{}
  3706. req.Data = output
  3707. return
  3708. }
  3709. // GetRestApi API operation for Amazon API Gateway.
  3710. //
  3711. // Lists the RestApi resource in the collection.
  3712. //
  3713. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3714. // with awserr.Error's Code and Message methods to get detailed information about
  3715. // the error.
  3716. //
  3717. // See the AWS API reference guide for Amazon API Gateway's
  3718. // API operation GetRestApi for usage and error information.
  3719. //
  3720. // Returned Error Codes:
  3721. // * UnauthorizedException
  3722. //
  3723. // * NotFoundException
  3724. //
  3725. // * TooManyRequestsException
  3726. //
  3727. func (c *APIGateway) GetRestApi(input *GetRestApiInput) (*RestApi, error) {
  3728. req, out := c.GetRestApiRequest(input)
  3729. err := req.Send()
  3730. return out, err
  3731. }
  3732. const opGetRestApis = "GetRestApis"
  3733. // GetRestApisRequest generates a "aws/request.Request" representing the
  3734. // client's request for the GetRestApis operation. The "output" return
  3735. // value can be used to capture response data after the request's "Send" method
  3736. // is called.
  3737. //
  3738. // See GetRestApis for usage and error information.
  3739. //
  3740. // Creating a request object using this method should be used when you want to inject
  3741. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3742. // access properties on the request object before or after sending the request. If
  3743. // you just want the service response, call the GetRestApis method directly
  3744. // instead.
  3745. //
  3746. // Note: You must call the "Send" method on the returned request object in order
  3747. // to execute the request.
  3748. //
  3749. // // Example sending a request using the GetRestApisRequest method.
  3750. // req, resp := client.GetRestApisRequest(params)
  3751. //
  3752. // err := req.Send()
  3753. // if err == nil { // resp is now filled
  3754. // fmt.Println(resp)
  3755. // }
  3756. //
  3757. func (c *APIGateway) GetRestApisRequest(input *GetRestApisInput) (req *request.Request, output *GetRestApisOutput) {
  3758. op := &request.Operation{
  3759. Name: opGetRestApis,
  3760. HTTPMethod: "GET",
  3761. HTTPPath: "/restapis",
  3762. Paginator: &request.Paginator{
  3763. InputTokens: []string{"position"},
  3764. OutputTokens: []string{"position"},
  3765. LimitToken: "limit",
  3766. TruncationToken: "",
  3767. },
  3768. }
  3769. if input == nil {
  3770. input = &GetRestApisInput{}
  3771. }
  3772. req = c.newRequest(op, input, output)
  3773. output = &GetRestApisOutput{}
  3774. req.Data = output
  3775. return
  3776. }
  3777. // GetRestApis API operation for Amazon API Gateway.
  3778. //
  3779. // Lists the RestApis resources for your collection.
  3780. //
  3781. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3782. // with awserr.Error's Code and Message methods to get detailed information about
  3783. // the error.
  3784. //
  3785. // See the AWS API reference guide for Amazon API Gateway's
  3786. // API operation GetRestApis for usage and error information.
  3787. //
  3788. // Returned Error Codes:
  3789. // * BadRequestException
  3790. //
  3791. // * UnauthorizedException
  3792. //
  3793. // * TooManyRequestsException
  3794. //
  3795. func (c *APIGateway) GetRestApis(input *GetRestApisInput) (*GetRestApisOutput, error) {
  3796. req, out := c.GetRestApisRequest(input)
  3797. err := req.Send()
  3798. return out, err
  3799. }
  3800. // GetRestApisPages iterates over the pages of a GetRestApis operation,
  3801. // calling the "fn" function with the response data for each page. To stop
  3802. // iterating, return false from the fn function.
  3803. //
  3804. // See GetRestApis method for more information on how to use this operation.
  3805. //
  3806. // Note: This operation can generate multiple requests to a service.
  3807. //
  3808. // // Example iterating over at most 3 pages of a GetRestApis operation.
  3809. // pageNum := 0
  3810. // err := client.GetRestApisPages(params,
  3811. // func(page *GetRestApisOutput, lastPage bool) bool {
  3812. // pageNum++
  3813. // fmt.Println(page)
  3814. // return pageNum <= 3
  3815. // })
  3816. //
  3817. func (c *APIGateway) GetRestApisPages(input *GetRestApisInput, fn func(p *GetRestApisOutput, lastPage bool) (shouldContinue bool)) error {
  3818. page, _ := c.GetRestApisRequest(input)
  3819. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  3820. return page.EachPage(func(p interface{}, lastPage bool) bool {
  3821. return fn(p.(*GetRestApisOutput), lastPage)
  3822. })
  3823. }
  3824. const opGetSdk = "GetSdk"
  3825. // GetSdkRequest generates a "aws/request.Request" representing the
  3826. // client's request for the GetSdk operation. The "output" return
  3827. // value can be used to capture response data after the request's "Send" method
  3828. // is called.
  3829. //
  3830. // See GetSdk for usage and error information.
  3831. //
  3832. // Creating a request object using this method should be used when you want to inject
  3833. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3834. // access properties on the request object before or after sending the request. If
  3835. // you just want the service response, call the GetSdk method directly
  3836. // instead.
  3837. //
  3838. // Note: You must call the "Send" method on the returned request object in order
  3839. // to execute the request.
  3840. //
  3841. // // Example sending a request using the GetSdkRequest method.
  3842. // req, resp := client.GetSdkRequest(params)
  3843. //
  3844. // err := req.Send()
  3845. // if err == nil { // resp is now filled
  3846. // fmt.Println(resp)
  3847. // }
  3848. //
  3849. func (c *APIGateway) GetSdkRequest(input *GetSdkInput) (req *request.Request, output *GetSdkOutput) {
  3850. op := &request.Operation{
  3851. Name: opGetSdk,
  3852. HTTPMethod: "GET",
  3853. HTTPPath: "/restapis/{restapi_id}/stages/{stage_name}/sdks/{sdk_type}",
  3854. }
  3855. if input == nil {
  3856. input = &GetSdkInput{}
  3857. }
  3858. req = c.newRequest(op, input, output)
  3859. output = &GetSdkOutput{}
  3860. req.Data = output
  3861. return
  3862. }
  3863. // GetSdk API operation for Amazon API Gateway.
  3864. //
  3865. // Generates a client SDK for a RestApi and Stage.
  3866. //
  3867. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3868. // with awserr.Error's Code and Message methods to get detailed information about
  3869. // the error.
  3870. //
  3871. // See the AWS API reference guide for Amazon API Gateway's
  3872. // API operation GetSdk for usage and error information.
  3873. //
  3874. // Returned Error Codes:
  3875. // * UnauthorizedException
  3876. //
  3877. // * NotFoundException
  3878. //
  3879. // * BadRequestException
  3880. //
  3881. // * TooManyRequestsException
  3882. //
  3883. func (c *APIGateway) GetSdk(input *GetSdkInput) (*GetSdkOutput, error) {
  3884. req, out := c.GetSdkRequest(input)
  3885. err := req.Send()
  3886. return out, err
  3887. }
  3888. const opGetStage = "GetStage"
  3889. // GetStageRequest generates a "aws/request.Request" representing the
  3890. // client's request for the GetStage operation. The "output" return
  3891. // value can be used to capture response data after the request's "Send" method
  3892. // is called.
  3893. //
  3894. // See GetStage for usage and error information.
  3895. //
  3896. // Creating a request object using this method should be used when you want to inject
  3897. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3898. // access properties on the request object before or after sending the request. If
  3899. // you just want the service response, call the GetStage method directly
  3900. // instead.
  3901. //
  3902. // Note: You must call the "Send" method on the returned request object in order
  3903. // to execute the request.
  3904. //
  3905. // // Example sending a request using the GetStageRequest method.
  3906. // req, resp := client.GetStageRequest(params)
  3907. //
  3908. // err := req.Send()
  3909. // if err == nil { // resp is now filled
  3910. // fmt.Println(resp)
  3911. // }
  3912. //
  3913. func (c *APIGateway) GetStageRequest(input *GetStageInput) (req *request.Request, output *Stage) {
  3914. op := &request.Operation{
  3915. Name: opGetStage,
  3916. HTTPMethod: "GET",
  3917. HTTPPath: "/restapis/{restapi_id}/stages/{stage_name}",
  3918. }
  3919. if input == nil {
  3920. input = &GetStageInput{}
  3921. }
  3922. req = c.newRequest(op, input, output)
  3923. output = &Stage{}
  3924. req.Data = output
  3925. return
  3926. }
  3927. // GetStage API operation for Amazon API Gateway.
  3928. //
  3929. // Gets information about a Stage resource.
  3930. //
  3931. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3932. // with awserr.Error's Code and Message methods to get detailed information about
  3933. // the error.
  3934. //
  3935. // See the AWS API reference guide for Amazon API Gateway's
  3936. // API operation GetStage for usage and error information.
  3937. //
  3938. // Returned Error Codes:
  3939. // * UnauthorizedException
  3940. //
  3941. // * NotFoundException
  3942. //
  3943. // * TooManyRequestsException
  3944. //
  3945. func (c *APIGateway) GetStage(input *GetStageInput) (*Stage, error) {
  3946. req, out := c.GetStageRequest(input)
  3947. err := req.Send()
  3948. return out, err
  3949. }
  3950. const opGetStages = "GetStages"
  3951. // GetStagesRequest generates a "aws/request.Request" representing the
  3952. // client's request for the GetStages operation. The "output" return
  3953. // value can be used to capture response data after the request's "Send" method
  3954. // is called.
  3955. //
  3956. // See GetStages for usage and error information.
  3957. //
  3958. // Creating a request object using this method should be used when you want to inject
  3959. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3960. // access properties on the request object before or after sending the request. If
  3961. // you just want the service response, call the GetStages method directly
  3962. // instead.
  3963. //
  3964. // Note: You must call the "Send" method on the returned request object in order
  3965. // to execute the request.
  3966. //
  3967. // // Example sending a request using the GetStagesRequest method.
  3968. // req, resp := client.GetStagesRequest(params)
  3969. //
  3970. // err := req.Send()
  3971. // if err == nil { // resp is now filled
  3972. // fmt.Println(resp)
  3973. // }
  3974. //
  3975. func (c *APIGateway) GetStagesRequest(input *GetStagesInput) (req *request.Request, output *GetStagesOutput) {
  3976. op := &request.Operation{
  3977. Name: opGetStages,
  3978. HTTPMethod: "GET",
  3979. HTTPPath: "/restapis/{restapi_id}/stages",
  3980. }
  3981. if input == nil {
  3982. input = &GetStagesInput{}
  3983. }
  3984. req = c.newRequest(op, input, output)
  3985. output = &GetStagesOutput{}
  3986. req.Data = output
  3987. return
  3988. }
  3989. // GetStages API operation for Amazon API Gateway.
  3990. //
  3991. // Gets information about one or more Stage resources.
  3992. //
  3993. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3994. // with awserr.Error's Code and Message methods to get detailed information about
  3995. // the error.
  3996. //
  3997. // See the AWS API reference guide for Amazon API Gateway's
  3998. // API operation GetStages for usage and error information.
  3999. //
  4000. // Returned Error Codes:
  4001. // * UnauthorizedException
  4002. //
  4003. // * NotFoundException
  4004. //
  4005. // * TooManyRequestsException
  4006. //
  4007. func (c *APIGateway) GetStages(input *GetStagesInput) (*GetStagesOutput, error) {
  4008. req, out := c.GetStagesRequest(input)
  4009. err := req.Send()
  4010. return out, err
  4011. }
  4012. const opGetUsage = "GetUsage"
  4013. // GetUsageRequest generates a "aws/request.Request" representing the
  4014. // client's request for the GetUsage operation. The "output" return
  4015. // value can be used to capture response data after the request's "Send" method
  4016. // is called.
  4017. //
  4018. // See GetUsage for usage and error information.
  4019. //
  4020. // Creating a request object using this method should be used when you want to inject
  4021. // custom logic into the request's lifecycle using a custom handler, or if you want to
  4022. // access properties on the request object before or after sending the request. If
  4023. // you just want the service response, call the GetUsage method directly
  4024. // instead.
  4025. //
  4026. // Note: You must call the "Send" method on the returned request object in order
  4027. // to execute the request.
  4028. //
  4029. // // Example sending a request using the GetUsageRequest method.
  4030. // req, resp := client.GetUsageRequest(params)
  4031. //
  4032. // err := req.Send()
  4033. // if err == nil { // resp is now filled
  4034. // fmt.Println(resp)
  4035. // }
  4036. //
  4037. func (c *APIGateway) GetUsageRequest(input *GetUsageInput) (req *request.Request, output *Usage) {
  4038. op := &request.Operation{
  4039. Name: opGetUsage,
  4040. HTTPMethod: "GET",
  4041. HTTPPath: "/usageplans/{usageplanId}/usage",
  4042. Paginator: &request.Paginator{
  4043. InputTokens: []string{"position"},
  4044. OutputTokens: []string{"position"},
  4045. LimitToken: "limit",
  4046. TruncationToken: "",
  4047. },
  4048. }
  4049. if input == nil {
  4050. input = &GetUsageInput{}
  4051. }
  4052. req = c.newRequest(op, input, output)
  4053. output = &Usage{}
  4054. req.Data = output
  4055. return
  4056. }
  4057. // GetUsage API operation for Amazon API Gateway.
  4058. //
  4059. // Gets the usage data of a usage plan in a specified time interval.
  4060. //
  4061. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4062. // with awserr.Error's Code and Message methods to get detailed information about
  4063. // the error.
  4064. //
  4065. // See the AWS API reference guide for Amazon API Gateway's
  4066. // API operation GetUsage for usage and error information.
  4067. //
  4068. // Returned Error Codes:
  4069. // * BadRequestException
  4070. //
  4071. // * UnauthorizedException
  4072. //
  4073. // * NotFoundException
  4074. //
  4075. // * TooManyRequestsException
  4076. //
  4077. func (c *APIGateway) GetUsage(input *GetUsageInput) (*Usage, error) {
  4078. req, out := c.GetUsageRequest(input)
  4079. err := req.Send()
  4080. return out, err
  4081. }
  4082. // GetUsagePages iterates over the pages of a GetUsage operation,
  4083. // calling the "fn" function with the response data for each page. To stop
  4084. // iterating, return false from the fn function.
  4085. //
  4086. // See GetUsage method for more information on how to use this operation.
  4087. //
  4088. // Note: This operation can generate multiple requests to a service.
  4089. //
  4090. // // Example iterating over at most 3 pages of a GetUsage operation.
  4091. // pageNum := 0
  4092. // err := client.GetUsagePages(params,
  4093. // func(page *Usage, lastPage bool) bool {
  4094. // pageNum++
  4095. // fmt.Println(page)
  4096. // return pageNum <= 3
  4097. // })
  4098. //
  4099. func (c *APIGateway) GetUsagePages(input *GetUsageInput, fn func(p *Usage, lastPage bool) (shouldContinue bool)) error {
  4100. page, _ := c.GetUsageRequest(input)
  4101. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  4102. return page.EachPage(func(p interface{}, lastPage bool) bool {
  4103. return fn(p.(*Usage), lastPage)
  4104. })
  4105. }
  4106. const opGetUsagePlan = "GetUsagePlan"
  4107. // GetUsagePlanRequest generates a "aws/request.Request" representing the
  4108. // client's request for the GetUsagePlan operation. The "output" return
  4109. // value can be used to capture response data after the request's "Send" method
  4110. // is called.
  4111. //
  4112. // See GetUsagePlan for usage and error information.
  4113. //
  4114. // Creating a request object using this method should be used when you want to inject
  4115. // custom logic into the request's lifecycle using a custom handler, or if you want to
  4116. // access properties on the request object before or after sending the request. If
  4117. // you just want the service response, call the GetUsagePlan method directly
  4118. // instead.
  4119. //
  4120. // Note: You must call the "Send" method on the returned request object in order
  4121. // to execute the request.
  4122. //
  4123. // // Example sending a request using the GetUsagePlanRequest method.
  4124. // req, resp := client.GetUsagePlanRequest(params)
  4125. //
  4126. // err := req.Send()
  4127. // if err == nil { // resp is now filled
  4128. // fmt.Println(resp)
  4129. // }
  4130. //
  4131. func (c *APIGateway) GetUsagePlanRequest(input *GetUsagePlanInput) (req *request.Request, output *UsagePlan) {
  4132. op := &request.Operation{
  4133. Name: opGetUsagePlan,
  4134. HTTPMethod: "GET",
  4135. HTTPPath: "/usageplans/{usageplanId}",
  4136. }
  4137. if input == nil {
  4138. input = &GetUsagePlanInput{}
  4139. }
  4140. req = c.newRequest(op, input, output)
  4141. output = &UsagePlan{}
  4142. req.Data = output
  4143. return
  4144. }
  4145. // GetUsagePlan API operation for Amazon API Gateway.
  4146. //
  4147. // Gets a usage plan of a given plan identifier.
  4148. //
  4149. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4150. // with awserr.Error's Code and Message methods to get detailed information about
  4151. // the error.
  4152. //
  4153. // See the AWS API reference guide for Amazon API Gateway's
  4154. // API operation GetUsagePlan for usage and error information.
  4155. //
  4156. // Returned Error Codes:
  4157. // * BadRequestException
  4158. //
  4159. // * UnauthorizedException
  4160. //
  4161. // * NotFoundException
  4162. //
  4163. // * TooManyRequestsException
  4164. //
  4165. func (c *APIGateway) GetUsagePlan(input *GetUsagePlanInput) (*UsagePlan, error) {
  4166. req, out := c.GetUsagePlanRequest(input)
  4167. err := req.Send()
  4168. return out, err
  4169. }
  4170. const opGetUsagePlanKey = "GetUsagePlanKey"
  4171. // GetUsagePlanKeyRequest generates a "aws/request.Request" representing the
  4172. // client's request for the GetUsagePlanKey operation. The "output" return
  4173. // value can be used to capture response data after the request's "Send" method
  4174. // is called.
  4175. //
  4176. // See GetUsagePlanKey for usage and error information.
  4177. //
  4178. // Creating a request object using this method should be used when you want to inject
  4179. // custom logic into the request's lifecycle using a custom handler, or if you want to
  4180. // access properties on the request object before or after sending the request. If
  4181. // you just want the service response, call the GetUsagePlanKey method directly
  4182. // instead.
  4183. //
  4184. // Note: You must call the "Send" method on the returned request object in order
  4185. // to execute the request.
  4186. //
  4187. // // Example sending a request using the GetUsagePlanKeyRequest method.
  4188. // req, resp := client.GetUsagePlanKeyRequest(params)
  4189. //
  4190. // err := req.Send()
  4191. // if err == nil { // resp is now filled
  4192. // fmt.Println(resp)
  4193. // }
  4194. //
  4195. func (c *APIGateway) GetUsagePlanKeyRequest(input *GetUsagePlanKeyInput) (req *request.Request, output *UsagePlanKey) {
  4196. op := &request.Operation{
  4197. Name: opGetUsagePlanKey,
  4198. HTTPMethod: "GET",
  4199. HTTPPath: "/usageplans/{usageplanId}/keys/{keyId}",
  4200. }
  4201. if input == nil {
  4202. input = &GetUsagePlanKeyInput{}
  4203. }
  4204. req = c.newRequest(op, input, output)
  4205. output = &UsagePlanKey{}
  4206. req.Data = output
  4207. return
  4208. }
  4209. // GetUsagePlanKey API operation for Amazon API Gateway.
  4210. //
  4211. // Gets a usage plan key of a given key identifier.
  4212. //
  4213. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4214. // with awserr.Error's Code and Message methods to get detailed information about
  4215. // the error.
  4216. //
  4217. // See the AWS API reference guide for Amazon API Gateway's
  4218. // API operation GetUsagePlanKey for usage and error information.
  4219. //
  4220. // Returned Error Codes:
  4221. // * BadRequestException
  4222. //
  4223. // * UnauthorizedException
  4224. //
  4225. // * NotFoundException
  4226. //
  4227. // * TooManyRequestsException
  4228. //
  4229. func (c *APIGateway) GetUsagePlanKey(input *GetUsagePlanKeyInput) (*UsagePlanKey, error) {
  4230. req, out := c.GetUsagePlanKeyRequest(input)
  4231. err := req.Send()
  4232. return out, err
  4233. }
  4234. const opGetUsagePlanKeys = "GetUsagePlanKeys"
  4235. // GetUsagePlanKeysRequest generates a "aws/request.Request" representing the
  4236. // client's request for the GetUsagePlanKeys operation. The "output" return
  4237. // value can be used to capture response data after the request's "Send" method
  4238. // is called.
  4239. //
  4240. // See GetUsagePlanKeys for usage and error information.
  4241. //
  4242. // Creating a request object using this method should be used when you want to inject
  4243. // custom logic into the request's lifecycle using a custom handler, or if you want to
  4244. // access properties on the request object before or after sending the request. If
  4245. // you just want the service response, call the GetUsagePlanKeys method directly
  4246. // instead.
  4247. //
  4248. // Note: You must call the "Send" method on the returned request object in order
  4249. // to execute the request.
  4250. //
  4251. // // Example sending a request using the GetUsagePlanKeysRequest method.
  4252. // req, resp := client.GetUsagePlanKeysRequest(params)
  4253. //
  4254. // err := req.Send()
  4255. // if err == nil { // resp is now filled
  4256. // fmt.Println(resp)
  4257. // }
  4258. //
  4259. func (c *APIGateway) GetUsagePlanKeysRequest(input *GetUsagePlanKeysInput) (req *request.Request, output *GetUsagePlanKeysOutput) {
  4260. op := &request.Operation{
  4261. Name: opGetUsagePlanKeys,
  4262. HTTPMethod: "GET",
  4263. HTTPPath: "/usageplans/{usageplanId}/keys",
  4264. Paginator: &request.Paginator{
  4265. InputTokens: []string{"position"},
  4266. OutputTokens: []string{"position"},
  4267. LimitToken: "limit",
  4268. TruncationToken: "",
  4269. },
  4270. }
  4271. if input == nil {
  4272. input = &GetUsagePlanKeysInput{}
  4273. }
  4274. req = c.newRequest(op, input, output)
  4275. output = &GetUsagePlanKeysOutput{}
  4276. req.Data = output
  4277. return
  4278. }
  4279. // GetUsagePlanKeys API operation for Amazon API Gateway.
  4280. //
  4281. // Gets all the usage plan keys representing the API keys added to a specified
  4282. // usage plan.
  4283. //
  4284. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4285. // with awserr.Error's Code and Message methods to get detailed information about
  4286. // the error.
  4287. //
  4288. // See the AWS API reference guide for Amazon API Gateway's
  4289. // API operation GetUsagePlanKeys for usage and error information.
  4290. //
  4291. // Returned Error Codes:
  4292. // * BadRequestException
  4293. //
  4294. // * UnauthorizedException
  4295. //
  4296. // * NotFoundException
  4297. //
  4298. // * TooManyRequestsException
  4299. //
  4300. func (c *APIGateway) GetUsagePlanKeys(input *GetUsagePlanKeysInput) (*GetUsagePlanKeysOutput, error) {
  4301. req, out := c.GetUsagePlanKeysRequest(input)
  4302. err := req.Send()
  4303. return out, err
  4304. }
  4305. // GetUsagePlanKeysPages iterates over the pages of a GetUsagePlanKeys operation,
  4306. // calling the "fn" function with the response data for each page. To stop
  4307. // iterating, return false from the fn function.
  4308. //
  4309. // See GetUsagePlanKeys method for more information on how to use this operation.
  4310. //
  4311. // Note: This operation can generate multiple requests to a service.
  4312. //
  4313. // // Example iterating over at most 3 pages of a GetUsagePlanKeys operation.
  4314. // pageNum := 0
  4315. // err := client.GetUsagePlanKeysPages(params,
  4316. // func(page *GetUsagePlanKeysOutput, lastPage bool) bool {
  4317. // pageNum++
  4318. // fmt.Println(page)
  4319. // return pageNum <= 3
  4320. // })
  4321. //
  4322. func (c *APIGateway) GetUsagePlanKeysPages(input *GetUsagePlanKeysInput, fn func(p *GetUsagePlanKeysOutput, lastPage bool) (shouldContinue bool)) error {
  4323. page, _ := c.GetUsagePlanKeysRequest(input)
  4324. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  4325. return page.EachPage(func(p interface{}, lastPage bool) bool {
  4326. return fn(p.(*GetUsagePlanKeysOutput), lastPage)
  4327. })
  4328. }
  4329. const opGetUsagePlans = "GetUsagePlans"
  4330. // GetUsagePlansRequest generates a "aws/request.Request" representing the
  4331. // client's request for the GetUsagePlans operation. The "output" return
  4332. // value can be used to capture response data after the request's "Send" method
  4333. // is called.
  4334. //
  4335. // See GetUsagePlans for usage and error information.
  4336. //
  4337. // Creating a request object using this method should be used when you want to inject
  4338. // custom logic into the request's lifecycle using a custom handler, or if you want to
  4339. // access properties on the request object before or after sending the request. If
  4340. // you just want the service response, call the GetUsagePlans method directly
  4341. // instead.
  4342. //
  4343. // Note: You must call the "Send" method on the returned request object in order
  4344. // to execute the request.
  4345. //
  4346. // // Example sending a request using the GetUsagePlansRequest method.
  4347. // req, resp := client.GetUsagePlansRequest(params)
  4348. //
  4349. // err := req.Send()
  4350. // if err == nil { // resp is now filled
  4351. // fmt.Println(resp)
  4352. // }
  4353. //
  4354. func (c *APIGateway) GetUsagePlansRequest(input *GetUsagePlansInput) (req *request.Request, output *GetUsagePlansOutput) {
  4355. op := &request.Operation{
  4356. Name: opGetUsagePlans,
  4357. HTTPMethod: "GET",
  4358. HTTPPath: "/usageplans",
  4359. Paginator: &request.Paginator{
  4360. InputTokens: []string{"position"},
  4361. OutputTokens: []string{"position"},
  4362. LimitToken: "limit",
  4363. TruncationToken: "",
  4364. },
  4365. }
  4366. if input == nil {
  4367. input = &GetUsagePlansInput{}
  4368. }
  4369. req = c.newRequest(op, input, output)
  4370. output = &GetUsagePlansOutput{}
  4371. req.Data = output
  4372. return
  4373. }
  4374. // GetUsagePlans API operation for Amazon API Gateway.
  4375. //
  4376. // Gets all the usage plans of the caller's account.
  4377. //
  4378. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4379. // with awserr.Error's Code and Message methods to get detailed information about
  4380. // the error.
  4381. //
  4382. // See the AWS API reference guide for Amazon API Gateway's
  4383. // API operation GetUsagePlans for usage and error information.
  4384. //
  4385. // Returned Error Codes:
  4386. // * BadRequestException
  4387. //
  4388. // * UnauthorizedException
  4389. //
  4390. // * TooManyRequestsException
  4391. //
  4392. // * ConflictException
  4393. //
  4394. func (c *APIGateway) GetUsagePlans(input *GetUsagePlansInput) (*GetUsagePlansOutput, error) {
  4395. req, out := c.GetUsagePlansRequest(input)
  4396. err := req.Send()
  4397. return out, err
  4398. }
  4399. // GetUsagePlansPages iterates over the pages of a GetUsagePlans operation,
  4400. // calling the "fn" function with the response data for each page. To stop
  4401. // iterating, return false from the fn function.
  4402. //
  4403. // See GetUsagePlans method for more information on how to use this operation.
  4404. //
  4405. // Note: This operation can generate multiple requests to a service.
  4406. //
  4407. // // Example iterating over at most 3 pages of a GetUsagePlans operation.
  4408. // pageNum := 0
  4409. // err := client.GetUsagePlansPages(params,
  4410. // func(page *GetUsagePlansOutput, lastPage bool) bool {
  4411. // pageNum++
  4412. // fmt.Println(page)
  4413. // return pageNum <= 3
  4414. // })
  4415. //
  4416. func (c *APIGateway) GetUsagePlansPages(input *GetUsagePlansInput, fn func(p *GetUsagePlansOutput, lastPage bool) (shouldContinue bool)) error {
  4417. page, _ := c.GetUsagePlansRequest(input)
  4418. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  4419. return page.EachPage(func(p interface{}, lastPage bool) bool {
  4420. return fn(p.(*GetUsagePlansOutput), lastPage)
  4421. })
  4422. }
  4423. const opImportApiKeys = "ImportApiKeys"
  4424. // ImportApiKeysRequest generates a "aws/request.Request" representing the
  4425. // client's request for the ImportApiKeys operation. The "output" return
  4426. // value can be used to capture response data after the request's "Send" method
  4427. // is called.
  4428. //
  4429. // See ImportApiKeys for usage and error information.
  4430. //
  4431. // Creating a request object using this method should be used when you want to inject
  4432. // custom logic into the request's lifecycle using a custom handler, or if you want to
  4433. // access properties on the request object before or after sending the request. If
  4434. // you just want the service response, call the ImportApiKeys method directly
  4435. // instead.
  4436. //
  4437. // Note: You must call the "Send" method on the returned request object in order
  4438. // to execute the request.
  4439. //
  4440. // // Example sending a request using the ImportApiKeysRequest method.
  4441. // req, resp := client.ImportApiKeysRequest(params)
  4442. //
  4443. // err := req.Send()
  4444. // if err == nil { // resp is now filled
  4445. // fmt.Println(resp)
  4446. // }
  4447. //
  4448. func (c *APIGateway) ImportApiKeysRequest(input *ImportApiKeysInput) (req *request.Request, output *ImportApiKeysOutput) {
  4449. op := &request.Operation{
  4450. Name: opImportApiKeys,
  4451. HTTPMethod: "POST",
  4452. HTTPPath: "/apikeys?mode=import",
  4453. }
  4454. if input == nil {
  4455. input = &ImportApiKeysInput{}
  4456. }
  4457. req = c.newRequest(op, input, output)
  4458. output = &ImportApiKeysOutput{}
  4459. req.Data = output
  4460. return
  4461. }
  4462. // ImportApiKeys API operation for Amazon API Gateway.
  4463. //
  4464. // Import API keys from an external source, such as a CSV-formatted file.
  4465. //
  4466. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4467. // with awserr.Error's Code and Message methods to get detailed information about
  4468. // the error.
  4469. //
  4470. // See the AWS API reference guide for Amazon API Gateway's
  4471. // API operation ImportApiKeys for usage and error information.
  4472. //
  4473. // Returned Error Codes:
  4474. // * UnauthorizedException
  4475. //
  4476. // * NotFoundException
  4477. //
  4478. // * TooManyRequestsException
  4479. //
  4480. // * LimitExceededException
  4481. //
  4482. // * BadRequestException
  4483. //
  4484. // * ConflictException
  4485. //
  4486. func (c *APIGateway) ImportApiKeys(input *ImportApiKeysInput) (*ImportApiKeysOutput, error) {
  4487. req, out := c.ImportApiKeysRequest(input)
  4488. err := req.Send()
  4489. return out, err
  4490. }
  4491. const opImportRestApi = "ImportRestApi"
  4492. // ImportRestApiRequest generates a "aws/request.Request" representing the
  4493. // client's request for the ImportRestApi operation. The "output" return
  4494. // value can be used to capture response data after the request's "Send" method
  4495. // is called.
  4496. //
  4497. // See ImportRestApi for usage and error information.
  4498. //
  4499. // Creating a request object using this method should be used when you want to inject
  4500. // custom logic into the request's lifecycle using a custom handler, or if you want to
  4501. // access properties on the request object before or after sending the request. If
  4502. // you just want the service response, call the ImportRestApi method directly
  4503. // instead.
  4504. //
  4505. // Note: You must call the "Send" method on the returned request object in order
  4506. // to execute the request.
  4507. //
  4508. // // Example sending a request using the ImportRestApiRequest method.
  4509. // req, resp := client.ImportRestApiRequest(params)
  4510. //
  4511. // err := req.Send()
  4512. // if err == nil { // resp is now filled
  4513. // fmt.Println(resp)
  4514. // }
  4515. //
  4516. func (c *APIGateway) ImportRestApiRequest(input *ImportRestApiInput) (req *request.Request, output *RestApi) {
  4517. op := &request.Operation{
  4518. Name: opImportRestApi,
  4519. HTTPMethod: "POST",
  4520. HTTPPath: "/restapis?mode=import",
  4521. }
  4522. if input == nil {
  4523. input = &ImportRestApiInput{}
  4524. }
  4525. req = c.newRequest(op, input, output)
  4526. output = &RestApi{}
  4527. req.Data = output
  4528. return
  4529. }
  4530. // ImportRestApi API operation for Amazon API Gateway.
  4531. //
  4532. // A feature of the Amazon API Gateway control service for creating a new API
  4533. // from an external API definition file.
  4534. //
  4535. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4536. // with awserr.Error's Code and Message methods to get detailed information about
  4537. // the error.
  4538. //
  4539. // See the AWS API reference guide for Amazon API Gateway's
  4540. // API operation ImportRestApi for usage and error information.
  4541. //
  4542. // Returned Error Codes:
  4543. // * UnauthorizedException
  4544. //
  4545. // * LimitExceededException
  4546. //
  4547. // * BadRequestException
  4548. //
  4549. // * TooManyRequestsException
  4550. //
  4551. // * ConflictException
  4552. //
  4553. func (c *APIGateway) ImportRestApi(input *ImportRestApiInput) (*RestApi, error) {
  4554. req, out := c.ImportRestApiRequest(input)
  4555. err := req.Send()
  4556. return out, err
  4557. }
  4558. const opPutIntegration = "PutIntegration"
  4559. // PutIntegrationRequest generates a "aws/request.Request" representing the
  4560. // client's request for the PutIntegration operation. The "output" return
  4561. // value can be used to capture response data after the request's "Send" method
  4562. // is called.
  4563. //
  4564. // See PutIntegration for usage and error information.
  4565. //
  4566. // Creating a request object using this method should be used when you want to inject
  4567. // custom logic into the request's lifecycle using a custom handler, or if you want to
  4568. // access properties on the request object before or after sending the request. If
  4569. // you just want the service response, call the PutIntegration method directly
  4570. // instead.
  4571. //
  4572. // Note: You must call the "Send" method on the returned request object in order
  4573. // to execute the request.
  4574. //
  4575. // // Example sending a request using the PutIntegrationRequest method.
  4576. // req, resp := client.PutIntegrationRequest(params)
  4577. //
  4578. // err := req.Send()
  4579. // if err == nil { // resp is now filled
  4580. // fmt.Println(resp)
  4581. // }
  4582. //
  4583. func (c *APIGateway) PutIntegrationRequest(input *PutIntegrationInput) (req *request.Request, output *Integration) {
  4584. op := &request.Operation{
  4585. Name: opPutIntegration,
  4586. HTTPMethod: "PUT",
  4587. HTTPPath: "/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}/integration",
  4588. }
  4589. if input == nil {
  4590. input = &PutIntegrationInput{}
  4591. }
  4592. req = c.newRequest(op, input, output)
  4593. output = &Integration{}
  4594. req.Data = output
  4595. return
  4596. }
  4597. // PutIntegration API operation for Amazon API Gateway.
  4598. //
  4599. // Represents a put integration.
  4600. //
  4601. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4602. // with awserr.Error's Code and Message methods to get detailed information about
  4603. // the error.
  4604. //
  4605. // See the AWS API reference guide for Amazon API Gateway's
  4606. // API operation PutIntegration for usage and error information.
  4607. //
  4608. // Returned Error Codes:
  4609. // * UnauthorizedException
  4610. //
  4611. // * BadRequestException
  4612. //
  4613. // * ConflictException
  4614. //
  4615. // * NotFoundException
  4616. //
  4617. // * TooManyRequestsException
  4618. //
  4619. func (c *APIGateway) PutIntegration(input *PutIntegrationInput) (*Integration, error) {
  4620. req, out := c.PutIntegrationRequest(input)
  4621. err := req.Send()
  4622. return out, err
  4623. }
  4624. const opPutIntegrationResponse = "PutIntegrationResponse"
  4625. // PutIntegrationResponseRequest generates a "aws/request.Request" representing the
  4626. // client's request for the PutIntegrationResponse operation. The "output" return
  4627. // value can be used to capture response data after the request's "Send" method
  4628. // is called.
  4629. //
  4630. // See PutIntegrationResponse for usage and error information.
  4631. //
  4632. // Creating a request object using this method should be used when you want to inject
  4633. // custom logic into the request's lifecycle using a custom handler, or if you want to
  4634. // access properties on the request object before or after sending the request. If
  4635. // you just want the service response, call the PutIntegrationResponse method directly
  4636. // instead.
  4637. //
  4638. // Note: You must call the "Send" method on the returned request object in order
  4639. // to execute the request.
  4640. //
  4641. // // Example sending a request using the PutIntegrationResponseRequest method.
  4642. // req, resp := client.PutIntegrationResponseRequest(params)
  4643. //
  4644. // err := req.Send()
  4645. // if err == nil { // resp is now filled
  4646. // fmt.Println(resp)
  4647. // }
  4648. //
  4649. func (c *APIGateway) PutIntegrationResponseRequest(input *PutIntegrationResponseInput) (req *request.Request, output *IntegrationResponse) {
  4650. op := &request.Operation{
  4651. Name: opPutIntegrationResponse,
  4652. HTTPMethod: "PUT",
  4653. HTTPPath: "/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}/integration/responses/{status_code}",
  4654. }
  4655. if input == nil {
  4656. input = &PutIntegrationResponseInput{}
  4657. }
  4658. req = c.newRequest(op, input, output)
  4659. output = &IntegrationResponse{}
  4660. req.Data = output
  4661. return
  4662. }
  4663. // PutIntegrationResponse API operation for Amazon API Gateway.
  4664. //
  4665. // Represents a put integration.
  4666. //
  4667. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4668. // with awserr.Error's Code and Message methods to get detailed information about
  4669. // the error.
  4670. //
  4671. // See the AWS API reference guide for Amazon API Gateway's
  4672. // API operation PutIntegrationResponse for usage and error information.
  4673. //
  4674. // Returned Error Codes:
  4675. // * UnauthorizedException
  4676. //
  4677. // * NotFoundException
  4678. //
  4679. // * LimitExceededException
  4680. //
  4681. // * BadRequestException
  4682. //
  4683. // * TooManyRequestsException
  4684. //
  4685. // * ConflictException
  4686. //
  4687. func (c *APIGateway) PutIntegrationResponse(input *PutIntegrationResponseInput) (*IntegrationResponse, error) {
  4688. req, out := c.PutIntegrationResponseRequest(input)
  4689. err := req.Send()
  4690. return out, err
  4691. }
  4692. const opPutMethod = "PutMethod"
  4693. // PutMethodRequest generates a "aws/request.Request" representing the
  4694. // client's request for the PutMethod operation. The "output" return
  4695. // value can be used to capture response data after the request's "Send" method
  4696. // is called.
  4697. //
  4698. // See PutMethod for usage and error information.
  4699. //
  4700. // Creating a request object using this method should be used when you want to inject
  4701. // custom logic into the request's lifecycle using a custom handler, or if you want to
  4702. // access properties on the request object before or after sending the request. If
  4703. // you just want the service response, call the PutMethod method directly
  4704. // instead.
  4705. //
  4706. // Note: You must call the "Send" method on the returned request object in order
  4707. // to execute the request.
  4708. //
  4709. // // Example sending a request using the PutMethodRequest method.
  4710. // req, resp := client.PutMethodRequest(params)
  4711. //
  4712. // err := req.Send()
  4713. // if err == nil { // resp is now filled
  4714. // fmt.Println(resp)
  4715. // }
  4716. //
  4717. func (c *APIGateway) PutMethodRequest(input *PutMethodInput) (req *request.Request, output *Method) {
  4718. op := &request.Operation{
  4719. Name: opPutMethod,
  4720. HTTPMethod: "PUT",
  4721. HTTPPath: "/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}",
  4722. }
  4723. if input == nil {
  4724. input = &PutMethodInput{}
  4725. }
  4726. req = c.newRequest(op, input, output)
  4727. output = &Method{}
  4728. req.Data = output
  4729. return
  4730. }
  4731. // PutMethod API operation for Amazon API Gateway.
  4732. //
  4733. // Add a method to an existing Resource resource.
  4734. //
  4735. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4736. // with awserr.Error's Code and Message methods to get detailed information about
  4737. // the error.
  4738. //
  4739. // See the AWS API reference guide for Amazon API Gateway's
  4740. // API operation PutMethod for usage and error information.
  4741. //
  4742. // Returned Error Codes:
  4743. // * BadRequestException
  4744. //
  4745. // * UnauthorizedException
  4746. //
  4747. // * NotFoundException
  4748. //
  4749. // * ConflictException
  4750. //
  4751. // * LimitExceededException
  4752. //
  4753. // * TooManyRequestsException
  4754. //
  4755. func (c *APIGateway) PutMethod(input *PutMethodInput) (*Method, error) {
  4756. req, out := c.PutMethodRequest(input)
  4757. err := req.Send()
  4758. return out, err
  4759. }
  4760. const opPutMethodResponse = "PutMethodResponse"
  4761. // PutMethodResponseRequest generates a "aws/request.Request" representing the
  4762. // client's request for the PutMethodResponse operation. The "output" return
  4763. // value can be used to capture response data after the request's "Send" method
  4764. // is called.
  4765. //
  4766. // See PutMethodResponse for usage and error information.
  4767. //
  4768. // Creating a request object using this method should be used when you want to inject
  4769. // custom logic into the request's lifecycle using a custom handler, or if you want to
  4770. // access properties on the request object before or after sending the request. If
  4771. // you just want the service response, call the PutMethodResponse method directly
  4772. // instead.
  4773. //
  4774. // Note: You must call the "Send" method on the returned request object in order
  4775. // to execute the request.
  4776. //
  4777. // // Example sending a request using the PutMethodResponseRequest method.
  4778. // req, resp := client.PutMethodResponseRequest(params)
  4779. //
  4780. // err := req.Send()
  4781. // if err == nil { // resp is now filled
  4782. // fmt.Println(resp)
  4783. // }
  4784. //
  4785. func (c *APIGateway) PutMethodResponseRequest(input *PutMethodResponseInput) (req *request.Request, output *MethodResponse) {
  4786. op := &request.Operation{
  4787. Name: opPutMethodResponse,
  4788. HTTPMethod: "PUT",
  4789. HTTPPath: "/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}/responses/{status_code}",
  4790. }
  4791. if input == nil {
  4792. input = &PutMethodResponseInput{}
  4793. }
  4794. req = c.newRequest(op, input, output)
  4795. output = &MethodResponse{}
  4796. req.Data = output
  4797. return
  4798. }
  4799. // PutMethodResponse API operation for Amazon API Gateway.
  4800. //
  4801. // Adds a MethodResponse to an existing Method resource.
  4802. //
  4803. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4804. // with awserr.Error's Code and Message methods to get detailed information about
  4805. // the error.
  4806. //
  4807. // See the AWS API reference guide for Amazon API Gateway's
  4808. // API operation PutMethodResponse for usage and error information.
  4809. //
  4810. // Returned Error Codes:
  4811. // * UnauthorizedException
  4812. //
  4813. // * NotFoundException
  4814. //
  4815. // * ConflictException
  4816. //
  4817. // * LimitExceededException
  4818. //
  4819. // * BadRequestException
  4820. //
  4821. // * TooManyRequestsException
  4822. //
  4823. func (c *APIGateway) PutMethodResponse(input *PutMethodResponseInput) (*MethodResponse, error) {
  4824. req, out := c.PutMethodResponseRequest(input)
  4825. err := req.Send()
  4826. return out, err
  4827. }
  4828. const opPutRestApi = "PutRestApi"
  4829. // PutRestApiRequest generates a "aws/request.Request" representing the
  4830. // client's request for the PutRestApi operation. The "output" return
  4831. // value can be used to capture response data after the request's "Send" method
  4832. // is called.
  4833. //
  4834. // See PutRestApi for usage and error information.
  4835. //
  4836. // Creating a request object using this method should be used when you want to inject
  4837. // custom logic into the request's lifecycle using a custom handler, or if you want to
  4838. // access properties on the request object before or after sending the request. If
  4839. // you just want the service response, call the PutRestApi method directly
  4840. // instead.
  4841. //
  4842. // Note: You must call the "Send" method on the returned request object in order
  4843. // to execute the request.
  4844. //
  4845. // // Example sending a request using the PutRestApiRequest method.
  4846. // req, resp := client.PutRestApiRequest(params)
  4847. //
  4848. // err := req.Send()
  4849. // if err == nil { // resp is now filled
  4850. // fmt.Println(resp)
  4851. // }
  4852. //
  4853. func (c *APIGateway) PutRestApiRequest(input *PutRestApiInput) (req *request.Request, output *RestApi) {
  4854. op := &request.Operation{
  4855. Name: opPutRestApi,
  4856. HTTPMethod: "PUT",
  4857. HTTPPath: "/restapis/{restapi_id}",
  4858. }
  4859. if input == nil {
  4860. input = &PutRestApiInput{}
  4861. }
  4862. req = c.newRequest(op, input, output)
  4863. output = &RestApi{}
  4864. req.Data = output
  4865. return
  4866. }
  4867. // PutRestApi API operation for Amazon API Gateway.
  4868. //
  4869. // A feature of the Amazon API Gateway control service for updating an existing
  4870. // API with an input of external API definitions. The update can take the form
  4871. // of merging the supplied definition into the existing API or overwriting the
  4872. // existing API.
  4873. //
  4874. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4875. // with awserr.Error's Code and Message methods to get detailed information about
  4876. // the error.
  4877. //
  4878. // See the AWS API reference guide for Amazon API Gateway's
  4879. // API operation PutRestApi for usage and error information.
  4880. //
  4881. // Returned Error Codes:
  4882. // * UnauthorizedException
  4883. //
  4884. // * LimitExceededException
  4885. //
  4886. // * NotFoundException
  4887. //
  4888. // * BadRequestException
  4889. //
  4890. // * TooManyRequestsException
  4891. //
  4892. // * ConflictException
  4893. //
  4894. func (c *APIGateway) PutRestApi(input *PutRestApiInput) (*RestApi, error) {
  4895. req, out := c.PutRestApiRequest(input)
  4896. err := req.Send()
  4897. return out, err
  4898. }
  4899. const opTestInvokeAuthorizer = "TestInvokeAuthorizer"
  4900. // TestInvokeAuthorizerRequest generates a "aws/request.Request" representing the
  4901. // client's request for the TestInvokeAuthorizer operation. The "output" return
  4902. // value can be used to capture response data after the request's "Send" method
  4903. // is called.
  4904. //
  4905. // See TestInvokeAuthorizer for usage and error information.
  4906. //
  4907. // Creating a request object using this method should be used when you want to inject
  4908. // custom logic into the request's lifecycle using a custom handler, or if you want to
  4909. // access properties on the request object before or after sending the request. If
  4910. // you just want the service response, call the TestInvokeAuthorizer method directly
  4911. // instead.
  4912. //
  4913. // Note: You must call the "Send" method on the returned request object in order
  4914. // to execute the request.
  4915. //
  4916. // // Example sending a request using the TestInvokeAuthorizerRequest method.
  4917. // req, resp := client.TestInvokeAuthorizerRequest(params)
  4918. //
  4919. // err := req.Send()
  4920. // if err == nil { // resp is now filled
  4921. // fmt.Println(resp)
  4922. // }
  4923. //
  4924. func (c *APIGateway) TestInvokeAuthorizerRequest(input *TestInvokeAuthorizerInput) (req *request.Request, output *TestInvokeAuthorizerOutput) {
  4925. op := &request.Operation{
  4926. Name: opTestInvokeAuthorizer,
  4927. HTTPMethod: "POST",
  4928. HTTPPath: "/restapis/{restapi_id}/authorizers/{authorizer_id}",
  4929. }
  4930. if input == nil {
  4931. input = &TestInvokeAuthorizerInput{}
  4932. }
  4933. req = c.newRequest(op, input, output)
  4934. output = &TestInvokeAuthorizerOutput{}
  4935. req.Data = output
  4936. return
  4937. }
  4938. // TestInvokeAuthorizer API operation for Amazon API Gateway.
  4939. //
  4940. // Simulate the execution of an Authorizer in your RestApi with headers, parameters,
  4941. // and an incoming request body.
  4942. //
  4943. // Enable custom authorizers (http://docs.aws.amazon.com/apigateway/latest/developerguide/use-custom-authorizer.html)
  4944. //
  4945. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4946. // with awserr.Error's Code and Message methods to get detailed information about
  4947. // the error.
  4948. //
  4949. // See the AWS API reference guide for Amazon API Gateway's
  4950. // API operation TestInvokeAuthorizer for usage and error information.
  4951. //
  4952. // Returned Error Codes:
  4953. // * BadRequestException
  4954. //
  4955. // * UnauthorizedException
  4956. //
  4957. // * NotFoundException
  4958. //
  4959. // * TooManyRequestsException
  4960. //
  4961. func (c *APIGateway) TestInvokeAuthorizer(input *TestInvokeAuthorizerInput) (*TestInvokeAuthorizerOutput, error) {
  4962. req, out := c.TestInvokeAuthorizerRequest(input)
  4963. err := req.Send()
  4964. return out, err
  4965. }
  4966. const opTestInvokeMethod = "TestInvokeMethod"
  4967. // TestInvokeMethodRequest generates a "aws/request.Request" representing the
  4968. // client's request for the TestInvokeMethod operation. The "output" return
  4969. // value can be used to capture response data after the request's "Send" method
  4970. // is called.
  4971. //
  4972. // See TestInvokeMethod for usage and error information.
  4973. //
  4974. // Creating a request object using this method should be used when you want to inject
  4975. // custom logic into the request's lifecycle using a custom handler, or if you want to
  4976. // access properties on the request object before or after sending the request. If
  4977. // you just want the service response, call the TestInvokeMethod method directly
  4978. // instead.
  4979. //
  4980. // Note: You must call the "Send" method on the returned request object in order
  4981. // to execute the request.
  4982. //
  4983. // // Example sending a request using the TestInvokeMethodRequest method.
  4984. // req, resp := client.TestInvokeMethodRequest(params)
  4985. //
  4986. // err := req.Send()
  4987. // if err == nil { // resp is now filled
  4988. // fmt.Println(resp)
  4989. // }
  4990. //
  4991. func (c *APIGateway) TestInvokeMethodRequest(input *TestInvokeMethodInput) (req *request.Request, output *TestInvokeMethodOutput) {
  4992. op := &request.Operation{
  4993. Name: opTestInvokeMethod,
  4994. HTTPMethod: "POST",
  4995. HTTPPath: "/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}",
  4996. }
  4997. if input == nil {
  4998. input = &TestInvokeMethodInput{}
  4999. }
  5000. req = c.newRequest(op, input, output)
  5001. output = &TestInvokeMethodOutput{}
  5002. req.Data = output
  5003. return
  5004. }
  5005. // TestInvokeMethod API operation for Amazon API Gateway.
  5006. //
  5007. // Simulate the execution of a Method in your RestApi with headers, parameters,
  5008. // and an incoming request body.
  5009. //
  5010. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5011. // with awserr.Error's Code and Message methods to get detailed information about
  5012. // the error.
  5013. //
  5014. // See the AWS API reference guide for Amazon API Gateway's
  5015. // API operation TestInvokeMethod for usage and error information.
  5016. //
  5017. // Returned Error Codes:
  5018. // * BadRequestException
  5019. //
  5020. // * UnauthorizedException
  5021. //
  5022. // * NotFoundException
  5023. //
  5024. // * TooManyRequestsException
  5025. //
  5026. func (c *APIGateway) TestInvokeMethod(input *TestInvokeMethodInput) (*TestInvokeMethodOutput, error) {
  5027. req, out := c.TestInvokeMethodRequest(input)
  5028. err := req.Send()
  5029. return out, err
  5030. }
  5031. const opUpdateAccount = "UpdateAccount"
  5032. // UpdateAccountRequest generates a "aws/request.Request" representing the
  5033. // client's request for the UpdateAccount operation. The "output" return
  5034. // value can be used to capture response data after the request's "Send" method
  5035. // is called.
  5036. //
  5037. // See UpdateAccount for usage and error information.
  5038. //
  5039. // Creating a request object using this method should be used when you want to inject
  5040. // custom logic into the request's lifecycle using a custom handler, or if you want to
  5041. // access properties on the request object before or after sending the request. If
  5042. // you just want the service response, call the UpdateAccount method directly
  5043. // instead.
  5044. //
  5045. // Note: You must call the "Send" method on the returned request object in order
  5046. // to execute the request.
  5047. //
  5048. // // Example sending a request using the UpdateAccountRequest method.
  5049. // req, resp := client.UpdateAccountRequest(params)
  5050. //
  5051. // err := req.Send()
  5052. // if err == nil { // resp is now filled
  5053. // fmt.Println(resp)
  5054. // }
  5055. //
  5056. func (c *APIGateway) UpdateAccountRequest(input *UpdateAccountInput) (req *request.Request, output *Account) {
  5057. op := &request.Operation{
  5058. Name: opUpdateAccount,
  5059. HTTPMethod: "PATCH",
  5060. HTTPPath: "/account",
  5061. }
  5062. if input == nil {
  5063. input = &UpdateAccountInput{}
  5064. }
  5065. req = c.newRequest(op, input, output)
  5066. output = &Account{}
  5067. req.Data = output
  5068. return
  5069. }
  5070. // UpdateAccount API operation for Amazon API Gateway.
  5071. //
  5072. // Changes information about the current Account resource.
  5073. //
  5074. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5075. // with awserr.Error's Code and Message methods to get detailed information about
  5076. // the error.
  5077. //
  5078. // See the AWS API reference guide for Amazon API Gateway's
  5079. // API operation UpdateAccount for usage and error information.
  5080. //
  5081. // Returned Error Codes:
  5082. // * UnauthorizedException
  5083. //
  5084. // * BadRequestException
  5085. //
  5086. // * NotFoundException
  5087. //
  5088. // * TooManyRequestsException
  5089. //
  5090. func (c *APIGateway) UpdateAccount(input *UpdateAccountInput) (*Account, error) {
  5091. req, out := c.UpdateAccountRequest(input)
  5092. err := req.Send()
  5093. return out, err
  5094. }
  5095. const opUpdateApiKey = "UpdateApiKey"
  5096. // UpdateApiKeyRequest generates a "aws/request.Request" representing the
  5097. // client's request for the UpdateApiKey operation. The "output" return
  5098. // value can be used to capture response data after the request's "Send" method
  5099. // is called.
  5100. //
  5101. // See UpdateApiKey for usage and error information.
  5102. //
  5103. // Creating a request object using this method should be used when you want to inject
  5104. // custom logic into the request's lifecycle using a custom handler, or if you want to
  5105. // access properties on the request object before or after sending the request. If
  5106. // you just want the service response, call the UpdateApiKey method directly
  5107. // instead.
  5108. //
  5109. // Note: You must call the "Send" method on the returned request object in order
  5110. // to execute the request.
  5111. //
  5112. // // Example sending a request using the UpdateApiKeyRequest method.
  5113. // req, resp := client.UpdateApiKeyRequest(params)
  5114. //
  5115. // err := req.Send()
  5116. // if err == nil { // resp is now filled
  5117. // fmt.Println(resp)
  5118. // }
  5119. //
  5120. func (c *APIGateway) UpdateApiKeyRequest(input *UpdateApiKeyInput) (req *request.Request, output *ApiKey) {
  5121. op := &request.Operation{
  5122. Name: opUpdateApiKey,
  5123. HTTPMethod: "PATCH",
  5124. HTTPPath: "/apikeys/{api_Key}",
  5125. }
  5126. if input == nil {
  5127. input = &UpdateApiKeyInput{}
  5128. }
  5129. req = c.newRequest(op, input, output)
  5130. output = &ApiKey{}
  5131. req.Data = output
  5132. return
  5133. }
  5134. // UpdateApiKey API operation for Amazon API Gateway.
  5135. //
  5136. // Changes information about an ApiKey resource.
  5137. //
  5138. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5139. // with awserr.Error's Code and Message methods to get detailed information about
  5140. // the error.
  5141. //
  5142. // See the AWS API reference guide for Amazon API Gateway's
  5143. // API operation UpdateApiKey for usage and error information.
  5144. //
  5145. // Returned Error Codes:
  5146. // * UnauthorizedException
  5147. //
  5148. // * NotFoundException
  5149. //
  5150. // * BadRequestException
  5151. //
  5152. // * TooManyRequestsException
  5153. //
  5154. // * ConflictException
  5155. //
  5156. func (c *APIGateway) UpdateApiKey(input *UpdateApiKeyInput) (*ApiKey, error) {
  5157. req, out := c.UpdateApiKeyRequest(input)
  5158. err := req.Send()
  5159. return out, err
  5160. }
  5161. const opUpdateAuthorizer = "UpdateAuthorizer"
  5162. // UpdateAuthorizerRequest generates a "aws/request.Request" representing the
  5163. // client's request for the UpdateAuthorizer operation. The "output" return
  5164. // value can be used to capture response data after the request's "Send" method
  5165. // is called.
  5166. //
  5167. // See UpdateAuthorizer for usage and error information.
  5168. //
  5169. // Creating a request object using this method should be used when you want to inject
  5170. // custom logic into the request's lifecycle using a custom handler, or if you want to
  5171. // access properties on the request object before or after sending the request. If
  5172. // you just want the service response, call the UpdateAuthorizer method directly
  5173. // instead.
  5174. //
  5175. // Note: You must call the "Send" method on the returned request object in order
  5176. // to execute the request.
  5177. //
  5178. // // Example sending a request using the UpdateAuthorizerRequest method.
  5179. // req, resp := client.UpdateAuthorizerRequest(params)
  5180. //
  5181. // err := req.Send()
  5182. // if err == nil { // resp is now filled
  5183. // fmt.Println(resp)
  5184. // }
  5185. //
  5186. func (c *APIGateway) UpdateAuthorizerRequest(input *UpdateAuthorizerInput) (req *request.Request, output *Authorizer) {
  5187. op := &request.Operation{
  5188. Name: opUpdateAuthorizer,
  5189. HTTPMethod: "PATCH",
  5190. HTTPPath: "/restapis/{restapi_id}/authorizers/{authorizer_id}",
  5191. }
  5192. if input == nil {
  5193. input = &UpdateAuthorizerInput{}
  5194. }
  5195. req = c.newRequest(op, input, output)
  5196. output = &Authorizer{}
  5197. req.Data = output
  5198. return
  5199. }
  5200. // UpdateAuthorizer API operation for Amazon API Gateway.
  5201. //
  5202. // Updates an existing Authorizer resource.
  5203. //
  5204. // AWS CLI (http://docs.aws.amazon.com/cli/latest/reference/apigateway/update-authorizer.html)
  5205. //
  5206. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5207. // with awserr.Error's Code and Message methods to get detailed information about
  5208. // the error.
  5209. //
  5210. // See the AWS API reference guide for Amazon API Gateway's
  5211. // API operation UpdateAuthorizer for usage and error information.
  5212. //
  5213. // Returned Error Codes:
  5214. // * UnauthorizedException
  5215. //
  5216. // * NotFoundException
  5217. //
  5218. // * BadRequestException
  5219. //
  5220. // * TooManyRequestsException
  5221. //
  5222. func (c *APIGateway) UpdateAuthorizer(input *UpdateAuthorizerInput) (*Authorizer, error) {
  5223. req, out := c.UpdateAuthorizerRequest(input)
  5224. err := req.Send()
  5225. return out, err
  5226. }
  5227. const opUpdateBasePathMapping = "UpdateBasePathMapping"
  5228. // UpdateBasePathMappingRequest generates a "aws/request.Request" representing the
  5229. // client's request for the UpdateBasePathMapping operation. The "output" return
  5230. // value can be used to capture response data after the request's "Send" method
  5231. // is called.
  5232. //
  5233. // See UpdateBasePathMapping for usage and error information.
  5234. //
  5235. // Creating a request object using this method should be used when you want to inject
  5236. // custom logic into the request's lifecycle using a custom handler, or if you want to
  5237. // access properties on the request object before or after sending the request. If
  5238. // you just want the service response, call the UpdateBasePathMapping method directly
  5239. // instead.
  5240. //
  5241. // Note: You must call the "Send" method on the returned request object in order
  5242. // to execute the request.
  5243. //
  5244. // // Example sending a request using the UpdateBasePathMappingRequest method.
  5245. // req, resp := client.UpdateBasePathMappingRequest(params)
  5246. //
  5247. // err := req.Send()
  5248. // if err == nil { // resp is now filled
  5249. // fmt.Println(resp)
  5250. // }
  5251. //
  5252. func (c *APIGateway) UpdateBasePathMappingRequest(input *UpdateBasePathMappingInput) (req *request.Request, output *BasePathMapping) {
  5253. op := &request.Operation{
  5254. Name: opUpdateBasePathMapping,
  5255. HTTPMethod: "PATCH",
  5256. HTTPPath: "/domainnames/{domain_name}/basepathmappings/{base_path}",
  5257. }
  5258. if input == nil {
  5259. input = &UpdateBasePathMappingInput{}
  5260. }
  5261. req = c.newRequest(op, input, output)
  5262. output = &BasePathMapping{}
  5263. req.Data = output
  5264. return
  5265. }
  5266. // UpdateBasePathMapping API operation for Amazon API Gateway.
  5267. //
  5268. // Changes information about the BasePathMapping resource.
  5269. //
  5270. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5271. // with awserr.Error's Code and Message methods to get detailed information about
  5272. // the error.
  5273. //
  5274. // See the AWS API reference guide for Amazon API Gateway's
  5275. // API operation UpdateBasePathMapping for usage and error information.
  5276. //
  5277. // Returned Error Codes:
  5278. // * UnauthorizedException
  5279. //
  5280. // * NotFoundException
  5281. //
  5282. // * ConflictException
  5283. //
  5284. // * BadRequestException
  5285. //
  5286. // * TooManyRequestsException
  5287. //
  5288. func (c *APIGateway) UpdateBasePathMapping(input *UpdateBasePathMappingInput) (*BasePathMapping, error) {
  5289. req, out := c.UpdateBasePathMappingRequest(input)
  5290. err := req.Send()
  5291. return out, err
  5292. }
  5293. const opUpdateClientCertificate = "UpdateClientCertificate"
  5294. // UpdateClientCertificateRequest generates a "aws/request.Request" representing the
  5295. // client's request for the UpdateClientCertificate operation. The "output" return
  5296. // value can be used to capture response data after the request's "Send" method
  5297. // is called.
  5298. //
  5299. // See UpdateClientCertificate for usage and error information.
  5300. //
  5301. // Creating a request object using this method should be used when you want to inject
  5302. // custom logic into the request's lifecycle using a custom handler, or if you want to
  5303. // access properties on the request object before or after sending the request. If
  5304. // you just want the service response, call the UpdateClientCertificate method directly
  5305. // instead.
  5306. //
  5307. // Note: You must call the "Send" method on the returned request object in order
  5308. // to execute the request.
  5309. //
  5310. // // Example sending a request using the UpdateClientCertificateRequest method.
  5311. // req, resp := client.UpdateClientCertificateRequest(params)
  5312. //
  5313. // err := req.Send()
  5314. // if err == nil { // resp is now filled
  5315. // fmt.Println(resp)
  5316. // }
  5317. //
  5318. func (c *APIGateway) UpdateClientCertificateRequest(input *UpdateClientCertificateInput) (req *request.Request, output *ClientCertificate) {
  5319. op := &request.Operation{
  5320. Name: opUpdateClientCertificate,
  5321. HTTPMethod: "PATCH",
  5322. HTTPPath: "/clientcertificates/{clientcertificate_id}",
  5323. }
  5324. if input == nil {
  5325. input = &UpdateClientCertificateInput{}
  5326. }
  5327. req = c.newRequest(op, input, output)
  5328. output = &ClientCertificate{}
  5329. req.Data = output
  5330. return
  5331. }
  5332. // UpdateClientCertificate API operation for Amazon API Gateway.
  5333. //
  5334. // Changes information about an ClientCertificate resource.
  5335. //
  5336. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5337. // with awserr.Error's Code and Message methods to get detailed information about
  5338. // the error.
  5339. //
  5340. // See the AWS API reference guide for Amazon API Gateway's
  5341. // API operation UpdateClientCertificate for usage and error information.
  5342. //
  5343. // Returned Error Codes:
  5344. // * UnauthorizedException
  5345. //
  5346. // * TooManyRequestsException
  5347. //
  5348. // * BadRequestException
  5349. //
  5350. // * NotFoundException
  5351. //
  5352. func (c *APIGateway) UpdateClientCertificate(input *UpdateClientCertificateInput) (*ClientCertificate, error) {
  5353. req, out := c.UpdateClientCertificateRequest(input)
  5354. err := req.Send()
  5355. return out, err
  5356. }
  5357. const opUpdateDeployment = "UpdateDeployment"
  5358. // UpdateDeploymentRequest generates a "aws/request.Request" representing the
  5359. // client's request for the UpdateDeployment operation. The "output" return
  5360. // value can be used to capture response data after the request's "Send" method
  5361. // is called.
  5362. //
  5363. // See UpdateDeployment for usage and error information.
  5364. //
  5365. // Creating a request object using this method should be used when you want to inject
  5366. // custom logic into the request's lifecycle using a custom handler, or if you want to
  5367. // access properties on the request object before or after sending the request. If
  5368. // you just want the service response, call the UpdateDeployment method directly
  5369. // instead.
  5370. //
  5371. // Note: You must call the "Send" method on the returned request object in order
  5372. // to execute the request.
  5373. //
  5374. // // Example sending a request using the UpdateDeploymentRequest method.
  5375. // req, resp := client.UpdateDeploymentRequest(params)
  5376. //
  5377. // err := req.Send()
  5378. // if err == nil { // resp is now filled
  5379. // fmt.Println(resp)
  5380. // }
  5381. //
  5382. func (c *APIGateway) UpdateDeploymentRequest(input *UpdateDeploymentInput) (req *request.Request, output *Deployment) {
  5383. op := &request.Operation{
  5384. Name: opUpdateDeployment,
  5385. HTTPMethod: "PATCH",
  5386. HTTPPath: "/restapis/{restapi_id}/deployments/{deployment_id}",
  5387. }
  5388. if input == nil {
  5389. input = &UpdateDeploymentInput{}
  5390. }
  5391. req = c.newRequest(op, input, output)
  5392. output = &Deployment{}
  5393. req.Data = output
  5394. return
  5395. }
  5396. // UpdateDeployment API operation for Amazon API Gateway.
  5397. //
  5398. // Changes information about a Deployment resource.
  5399. //
  5400. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5401. // with awserr.Error's Code and Message methods to get detailed information about
  5402. // the error.
  5403. //
  5404. // See the AWS API reference guide for Amazon API Gateway's
  5405. // API operation UpdateDeployment for usage and error information.
  5406. //
  5407. // Returned Error Codes:
  5408. // * UnauthorizedException
  5409. //
  5410. // * NotFoundException
  5411. //
  5412. // * BadRequestException
  5413. //
  5414. // * TooManyRequestsException
  5415. //
  5416. // * ServiceUnavailableException
  5417. //
  5418. func (c *APIGateway) UpdateDeployment(input *UpdateDeploymentInput) (*Deployment, error) {
  5419. req, out := c.UpdateDeploymentRequest(input)
  5420. err := req.Send()
  5421. return out, err
  5422. }
  5423. const opUpdateDomainName = "UpdateDomainName"
  5424. // UpdateDomainNameRequest generates a "aws/request.Request" representing the
  5425. // client's request for the UpdateDomainName operation. The "output" return
  5426. // value can be used to capture response data after the request's "Send" method
  5427. // is called.
  5428. //
  5429. // See UpdateDomainName for usage and error information.
  5430. //
  5431. // Creating a request object using this method should be used when you want to inject
  5432. // custom logic into the request's lifecycle using a custom handler, or if you want to
  5433. // access properties on the request object before or after sending the request. If
  5434. // you just want the service response, call the UpdateDomainName method directly
  5435. // instead.
  5436. //
  5437. // Note: You must call the "Send" method on the returned request object in order
  5438. // to execute the request.
  5439. //
  5440. // // Example sending a request using the UpdateDomainNameRequest method.
  5441. // req, resp := client.UpdateDomainNameRequest(params)
  5442. //
  5443. // err := req.Send()
  5444. // if err == nil { // resp is now filled
  5445. // fmt.Println(resp)
  5446. // }
  5447. //
  5448. func (c *APIGateway) UpdateDomainNameRequest(input *UpdateDomainNameInput) (req *request.Request, output *DomainName) {
  5449. op := &request.Operation{
  5450. Name: opUpdateDomainName,
  5451. HTTPMethod: "PATCH",
  5452. HTTPPath: "/domainnames/{domain_name}",
  5453. }
  5454. if input == nil {
  5455. input = &UpdateDomainNameInput{}
  5456. }
  5457. req = c.newRequest(op, input, output)
  5458. output = &DomainName{}
  5459. req.Data = output
  5460. return
  5461. }
  5462. // UpdateDomainName API operation for Amazon API Gateway.
  5463. //
  5464. // Changes information about the DomainName resource.
  5465. //
  5466. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5467. // with awserr.Error's Code and Message methods to get detailed information about
  5468. // the error.
  5469. //
  5470. // See the AWS API reference guide for Amazon API Gateway's
  5471. // API operation UpdateDomainName for usage and error information.
  5472. //
  5473. // Returned Error Codes:
  5474. // * UnauthorizedException
  5475. //
  5476. // * NotFoundException
  5477. //
  5478. // * BadRequestException
  5479. //
  5480. // * ConflictException
  5481. //
  5482. // * TooManyRequestsException
  5483. //
  5484. func (c *APIGateway) UpdateDomainName(input *UpdateDomainNameInput) (*DomainName, error) {
  5485. req, out := c.UpdateDomainNameRequest(input)
  5486. err := req.Send()
  5487. return out, err
  5488. }
  5489. const opUpdateIntegration = "UpdateIntegration"
  5490. // UpdateIntegrationRequest generates a "aws/request.Request" representing the
  5491. // client's request for the UpdateIntegration operation. The "output" return
  5492. // value can be used to capture response data after the request's "Send" method
  5493. // is called.
  5494. //
  5495. // See UpdateIntegration for usage and error information.
  5496. //
  5497. // Creating a request object using this method should be used when you want to inject
  5498. // custom logic into the request's lifecycle using a custom handler, or if you want to
  5499. // access properties on the request object before or after sending the request. If
  5500. // you just want the service response, call the UpdateIntegration method directly
  5501. // instead.
  5502. //
  5503. // Note: You must call the "Send" method on the returned request object in order
  5504. // to execute the request.
  5505. //
  5506. // // Example sending a request using the UpdateIntegrationRequest method.
  5507. // req, resp := client.UpdateIntegrationRequest(params)
  5508. //
  5509. // err := req.Send()
  5510. // if err == nil { // resp is now filled
  5511. // fmt.Println(resp)
  5512. // }
  5513. //
  5514. func (c *APIGateway) UpdateIntegrationRequest(input *UpdateIntegrationInput) (req *request.Request, output *Integration) {
  5515. op := &request.Operation{
  5516. Name: opUpdateIntegration,
  5517. HTTPMethod: "PATCH",
  5518. HTTPPath: "/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}/integration",
  5519. }
  5520. if input == nil {
  5521. input = &UpdateIntegrationInput{}
  5522. }
  5523. req = c.newRequest(op, input, output)
  5524. output = &Integration{}
  5525. req.Data = output
  5526. return
  5527. }
  5528. // UpdateIntegration API operation for Amazon API Gateway.
  5529. //
  5530. // Represents an update integration.
  5531. //
  5532. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5533. // with awserr.Error's Code and Message methods to get detailed information about
  5534. // the error.
  5535. //
  5536. // See the AWS API reference guide for Amazon API Gateway's
  5537. // API operation UpdateIntegration for usage and error information.
  5538. //
  5539. // Returned Error Codes:
  5540. // * UnauthorizedException
  5541. //
  5542. // * NotFoundException
  5543. //
  5544. // * BadRequestException
  5545. //
  5546. // * TooManyRequestsException
  5547. //
  5548. // * ConflictException
  5549. //
  5550. func (c *APIGateway) UpdateIntegration(input *UpdateIntegrationInput) (*Integration, error) {
  5551. req, out := c.UpdateIntegrationRequest(input)
  5552. err := req.Send()
  5553. return out, err
  5554. }
  5555. const opUpdateIntegrationResponse = "UpdateIntegrationResponse"
  5556. // UpdateIntegrationResponseRequest generates a "aws/request.Request" representing the
  5557. // client's request for the UpdateIntegrationResponse operation. The "output" return
  5558. // value can be used to capture response data after the request's "Send" method
  5559. // is called.
  5560. //
  5561. // See UpdateIntegrationResponse for usage and error information.
  5562. //
  5563. // Creating a request object using this method should be used when you want to inject
  5564. // custom logic into the request's lifecycle using a custom handler, or if you want to
  5565. // access properties on the request object before or after sending the request. If
  5566. // you just want the service response, call the UpdateIntegrationResponse method directly
  5567. // instead.
  5568. //
  5569. // Note: You must call the "Send" method on the returned request object in order
  5570. // to execute the request.
  5571. //
  5572. // // Example sending a request using the UpdateIntegrationResponseRequest method.
  5573. // req, resp := client.UpdateIntegrationResponseRequest(params)
  5574. //
  5575. // err := req.Send()
  5576. // if err == nil { // resp is now filled
  5577. // fmt.Println(resp)
  5578. // }
  5579. //
  5580. func (c *APIGateway) UpdateIntegrationResponseRequest(input *UpdateIntegrationResponseInput) (req *request.Request, output *IntegrationResponse) {
  5581. op := &request.Operation{
  5582. Name: opUpdateIntegrationResponse,
  5583. HTTPMethod: "PATCH",
  5584. HTTPPath: "/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}/integration/responses/{status_code}",
  5585. }
  5586. if input == nil {
  5587. input = &UpdateIntegrationResponseInput{}
  5588. }
  5589. req = c.newRequest(op, input, output)
  5590. output = &IntegrationResponse{}
  5591. req.Data = output
  5592. return
  5593. }
  5594. // UpdateIntegrationResponse API operation for Amazon API Gateway.
  5595. //
  5596. // Represents an update integration response.
  5597. //
  5598. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5599. // with awserr.Error's Code and Message methods to get detailed information about
  5600. // the error.
  5601. //
  5602. // See the AWS API reference guide for Amazon API Gateway's
  5603. // API operation UpdateIntegrationResponse for usage and error information.
  5604. //
  5605. // Returned Error Codes:
  5606. // * UnauthorizedException
  5607. //
  5608. // * NotFoundException
  5609. //
  5610. // * ConflictException
  5611. //
  5612. // * BadRequestException
  5613. //
  5614. // * TooManyRequestsException
  5615. //
  5616. func (c *APIGateway) UpdateIntegrationResponse(input *UpdateIntegrationResponseInput) (*IntegrationResponse, error) {
  5617. req, out := c.UpdateIntegrationResponseRequest(input)
  5618. err := req.Send()
  5619. return out, err
  5620. }
  5621. const opUpdateMethod = "UpdateMethod"
  5622. // UpdateMethodRequest generates a "aws/request.Request" representing the
  5623. // client's request for the UpdateMethod operation. The "output" return
  5624. // value can be used to capture response data after the request's "Send" method
  5625. // is called.
  5626. //
  5627. // See UpdateMethod for usage and error information.
  5628. //
  5629. // Creating a request object using this method should be used when you want to inject
  5630. // custom logic into the request's lifecycle using a custom handler, or if you want to
  5631. // access properties on the request object before or after sending the request. If
  5632. // you just want the service response, call the UpdateMethod method directly
  5633. // instead.
  5634. //
  5635. // Note: You must call the "Send" method on the returned request object in order
  5636. // to execute the request.
  5637. //
  5638. // // Example sending a request using the UpdateMethodRequest method.
  5639. // req, resp := client.UpdateMethodRequest(params)
  5640. //
  5641. // err := req.Send()
  5642. // if err == nil { // resp is now filled
  5643. // fmt.Println(resp)
  5644. // }
  5645. //
  5646. func (c *APIGateway) UpdateMethodRequest(input *UpdateMethodInput) (req *request.Request, output *Method) {
  5647. op := &request.Operation{
  5648. Name: opUpdateMethod,
  5649. HTTPMethod: "PATCH",
  5650. HTTPPath: "/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}",
  5651. }
  5652. if input == nil {
  5653. input = &UpdateMethodInput{}
  5654. }
  5655. req = c.newRequest(op, input, output)
  5656. output = &Method{}
  5657. req.Data = output
  5658. return
  5659. }
  5660. // UpdateMethod API operation for Amazon API Gateway.
  5661. //
  5662. // Updates an existing Method resource.
  5663. //
  5664. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5665. // with awserr.Error's Code and Message methods to get detailed information about
  5666. // the error.
  5667. //
  5668. // See the AWS API reference guide for Amazon API Gateway's
  5669. // API operation UpdateMethod for usage and error information.
  5670. //
  5671. // Returned Error Codes:
  5672. // * UnauthorizedException
  5673. //
  5674. // * NotFoundException
  5675. //
  5676. // * BadRequestException
  5677. //
  5678. // * ConflictException
  5679. //
  5680. // * TooManyRequestsException
  5681. //
  5682. func (c *APIGateway) UpdateMethod(input *UpdateMethodInput) (*Method, error) {
  5683. req, out := c.UpdateMethodRequest(input)
  5684. err := req.Send()
  5685. return out, err
  5686. }
  5687. const opUpdateMethodResponse = "UpdateMethodResponse"
  5688. // UpdateMethodResponseRequest generates a "aws/request.Request" representing the
  5689. // client's request for the UpdateMethodResponse operation. The "output" return
  5690. // value can be used to capture response data after the request's "Send" method
  5691. // is called.
  5692. //
  5693. // See UpdateMethodResponse for usage and error information.
  5694. //
  5695. // Creating a request object using this method should be used when you want to inject
  5696. // custom logic into the request's lifecycle using a custom handler, or if you want to
  5697. // access properties on the request object before or after sending the request. If
  5698. // you just want the service response, call the UpdateMethodResponse method directly
  5699. // instead.
  5700. //
  5701. // Note: You must call the "Send" method on the returned request object in order
  5702. // to execute the request.
  5703. //
  5704. // // Example sending a request using the UpdateMethodResponseRequest method.
  5705. // req, resp := client.UpdateMethodResponseRequest(params)
  5706. //
  5707. // err := req.Send()
  5708. // if err == nil { // resp is now filled
  5709. // fmt.Println(resp)
  5710. // }
  5711. //
  5712. func (c *APIGateway) UpdateMethodResponseRequest(input *UpdateMethodResponseInput) (req *request.Request, output *MethodResponse) {
  5713. op := &request.Operation{
  5714. Name: opUpdateMethodResponse,
  5715. HTTPMethod: "PATCH",
  5716. HTTPPath: "/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}/responses/{status_code}",
  5717. }
  5718. if input == nil {
  5719. input = &UpdateMethodResponseInput{}
  5720. }
  5721. req = c.newRequest(op, input, output)
  5722. output = &MethodResponse{}
  5723. req.Data = output
  5724. return
  5725. }
  5726. // UpdateMethodResponse API operation for Amazon API Gateway.
  5727. //
  5728. // Updates an existing MethodResponse resource.
  5729. //
  5730. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5731. // with awserr.Error's Code and Message methods to get detailed information about
  5732. // the error.
  5733. //
  5734. // See the AWS API reference guide for Amazon API Gateway's
  5735. // API operation UpdateMethodResponse for usage and error information.
  5736. //
  5737. // Returned Error Codes:
  5738. // * UnauthorizedException
  5739. //
  5740. // * NotFoundException
  5741. //
  5742. // * ConflictException
  5743. //
  5744. // * LimitExceededException
  5745. //
  5746. // * BadRequestException
  5747. //
  5748. // * TooManyRequestsException
  5749. //
  5750. func (c *APIGateway) UpdateMethodResponse(input *UpdateMethodResponseInput) (*MethodResponse, error) {
  5751. req, out := c.UpdateMethodResponseRequest(input)
  5752. err := req.Send()
  5753. return out, err
  5754. }
  5755. const opUpdateModel = "UpdateModel"
  5756. // UpdateModelRequest generates a "aws/request.Request" representing the
  5757. // client's request for the UpdateModel operation. The "output" return
  5758. // value can be used to capture response data after the request's "Send" method
  5759. // is called.
  5760. //
  5761. // See UpdateModel for usage and error information.
  5762. //
  5763. // Creating a request object using this method should be used when you want to inject
  5764. // custom logic into the request's lifecycle using a custom handler, or if you want to
  5765. // access properties on the request object before or after sending the request. If
  5766. // you just want the service response, call the UpdateModel method directly
  5767. // instead.
  5768. //
  5769. // Note: You must call the "Send" method on the returned request object in order
  5770. // to execute the request.
  5771. //
  5772. // // Example sending a request using the UpdateModelRequest method.
  5773. // req, resp := client.UpdateModelRequest(params)
  5774. //
  5775. // err := req.Send()
  5776. // if err == nil { // resp is now filled
  5777. // fmt.Println(resp)
  5778. // }
  5779. //
  5780. func (c *APIGateway) UpdateModelRequest(input *UpdateModelInput) (req *request.Request, output *Model) {
  5781. op := &request.Operation{
  5782. Name: opUpdateModel,
  5783. HTTPMethod: "PATCH",
  5784. HTTPPath: "/restapis/{restapi_id}/models/{model_name}",
  5785. }
  5786. if input == nil {
  5787. input = &UpdateModelInput{}
  5788. }
  5789. req = c.newRequest(op, input, output)
  5790. output = &Model{}
  5791. req.Data = output
  5792. return
  5793. }
  5794. // UpdateModel API operation for Amazon API Gateway.
  5795. //
  5796. // Changes information about a model.
  5797. //
  5798. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5799. // with awserr.Error's Code and Message methods to get detailed information about
  5800. // the error.
  5801. //
  5802. // See the AWS API reference guide for Amazon API Gateway's
  5803. // API operation UpdateModel for usage and error information.
  5804. //
  5805. // Returned Error Codes:
  5806. // * UnauthorizedException
  5807. //
  5808. // * NotFoundException
  5809. //
  5810. // * BadRequestException
  5811. //
  5812. // * ConflictException
  5813. //
  5814. // * TooManyRequestsException
  5815. //
  5816. func (c *APIGateway) UpdateModel(input *UpdateModelInput) (*Model, error) {
  5817. req, out := c.UpdateModelRequest(input)
  5818. err := req.Send()
  5819. return out, err
  5820. }
  5821. const opUpdateResource = "UpdateResource"
  5822. // UpdateResourceRequest generates a "aws/request.Request" representing the
  5823. // client's request for the UpdateResource operation. The "output" return
  5824. // value can be used to capture response data after the request's "Send" method
  5825. // is called.
  5826. //
  5827. // See UpdateResource for usage and error information.
  5828. //
  5829. // Creating a request object using this method should be used when you want to inject
  5830. // custom logic into the request's lifecycle using a custom handler, or if you want to
  5831. // access properties on the request object before or after sending the request. If
  5832. // you just want the service response, call the UpdateResource method directly
  5833. // instead.
  5834. //
  5835. // Note: You must call the "Send" method on the returned request object in order
  5836. // to execute the request.
  5837. //
  5838. // // Example sending a request using the UpdateResourceRequest method.
  5839. // req, resp := client.UpdateResourceRequest(params)
  5840. //
  5841. // err := req.Send()
  5842. // if err == nil { // resp is now filled
  5843. // fmt.Println(resp)
  5844. // }
  5845. //
  5846. func (c *APIGateway) UpdateResourceRequest(input *UpdateResourceInput) (req *request.Request, output *Resource) {
  5847. op := &request.Operation{
  5848. Name: opUpdateResource,
  5849. HTTPMethod: "PATCH",
  5850. HTTPPath: "/restapis/{restapi_id}/resources/{resource_id}",
  5851. }
  5852. if input == nil {
  5853. input = &UpdateResourceInput{}
  5854. }
  5855. req = c.newRequest(op, input, output)
  5856. output = &Resource{}
  5857. req.Data = output
  5858. return
  5859. }
  5860. // UpdateResource API operation for Amazon API Gateway.
  5861. //
  5862. // Changes information about a Resource resource.
  5863. //
  5864. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5865. // with awserr.Error's Code and Message methods to get detailed information about
  5866. // the error.
  5867. //
  5868. // See the AWS API reference guide for Amazon API Gateway's
  5869. // API operation UpdateResource for usage and error information.
  5870. //
  5871. // Returned Error Codes:
  5872. // * UnauthorizedException
  5873. //
  5874. // * NotFoundException
  5875. //
  5876. // * ConflictException
  5877. //
  5878. // * BadRequestException
  5879. //
  5880. // * TooManyRequestsException
  5881. //
  5882. func (c *APIGateway) UpdateResource(input *UpdateResourceInput) (*Resource, error) {
  5883. req, out := c.UpdateResourceRequest(input)
  5884. err := req.Send()
  5885. return out, err
  5886. }
  5887. const opUpdateRestApi = "UpdateRestApi"
  5888. // UpdateRestApiRequest generates a "aws/request.Request" representing the
  5889. // client's request for the UpdateRestApi operation. The "output" return
  5890. // value can be used to capture response data after the request's "Send" method
  5891. // is called.
  5892. //
  5893. // See UpdateRestApi for usage and error information.
  5894. //
  5895. // Creating a request object using this method should be used when you want to inject
  5896. // custom logic into the request's lifecycle using a custom handler, or if you want to
  5897. // access properties on the request object before or after sending the request. If
  5898. // you just want the service response, call the UpdateRestApi method directly
  5899. // instead.
  5900. //
  5901. // Note: You must call the "Send" method on the returned request object in order
  5902. // to execute the request.
  5903. //
  5904. // // Example sending a request using the UpdateRestApiRequest method.
  5905. // req, resp := client.UpdateRestApiRequest(params)
  5906. //
  5907. // err := req.Send()
  5908. // if err == nil { // resp is now filled
  5909. // fmt.Println(resp)
  5910. // }
  5911. //
  5912. func (c *APIGateway) UpdateRestApiRequest(input *UpdateRestApiInput) (req *request.Request, output *RestApi) {
  5913. op := &request.Operation{
  5914. Name: opUpdateRestApi,
  5915. HTTPMethod: "PATCH",
  5916. HTTPPath: "/restapis/{restapi_id}",
  5917. }
  5918. if input == nil {
  5919. input = &UpdateRestApiInput{}
  5920. }
  5921. req = c.newRequest(op, input, output)
  5922. output = &RestApi{}
  5923. req.Data = output
  5924. return
  5925. }
  5926. // UpdateRestApi API operation for Amazon API Gateway.
  5927. //
  5928. // Changes information about the specified API.
  5929. //
  5930. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5931. // with awserr.Error's Code and Message methods to get detailed information about
  5932. // the error.
  5933. //
  5934. // See the AWS API reference guide for Amazon API Gateway's
  5935. // API operation UpdateRestApi for usage and error information.
  5936. //
  5937. // Returned Error Codes:
  5938. // * UnauthorizedException
  5939. //
  5940. // * NotFoundException
  5941. //
  5942. // * ConflictException
  5943. //
  5944. // * BadRequestException
  5945. //
  5946. // * TooManyRequestsException
  5947. //
  5948. func (c *APIGateway) UpdateRestApi(input *UpdateRestApiInput) (*RestApi, error) {
  5949. req, out := c.UpdateRestApiRequest(input)
  5950. err := req.Send()
  5951. return out, err
  5952. }
  5953. const opUpdateStage = "UpdateStage"
  5954. // UpdateStageRequest generates a "aws/request.Request" representing the
  5955. // client's request for the UpdateStage operation. The "output" return
  5956. // value can be used to capture response data after the request's "Send" method
  5957. // is called.
  5958. //
  5959. // See UpdateStage for usage and error information.
  5960. //
  5961. // Creating a request object using this method should be used when you want to inject
  5962. // custom logic into the request's lifecycle using a custom handler, or if you want to
  5963. // access properties on the request object before or after sending the request. If
  5964. // you just want the service response, call the UpdateStage method directly
  5965. // instead.
  5966. //
  5967. // Note: You must call the "Send" method on the returned request object in order
  5968. // to execute the request.
  5969. //
  5970. // // Example sending a request using the UpdateStageRequest method.
  5971. // req, resp := client.UpdateStageRequest(params)
  5972. //
  5973. // err := req.Send()
  5974. // if err == nil { // resp is now filled
  5975. // fmt.Println(resp)
  5976. // }
  5977. //
  5978. func (c *APIGateway) UpdateStageRequest(input *UpdateStageInput) (req *request.Request, output *Stage) {
  5979. op := &request.Operation{
  5980. Name: opUpdateStage,
  5981. HTTPMethod: "PATCH",
  5982. HTTPPath: "/restapis/{restapi_id}/stages/{stage_name}",
  5983. }
  5984. if input == nil {
  5985. input = &UpdateStageInput{}
  5986. }
  5987. req = c.newRequest(op, input, output)
  5988. output = &Stage{}
  5989. req.Data = output
  5990. return
  5991. }
  5992. // UpdateStage API operation for Amazon API Gateway.
  5993. //
  5994. // Changes information about a Stage resource.
  5995. //
  5996. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5997. // with awserr.Error's Code and Message methods to get detailed information about
  5998. // the error.
  5999. //
  6000. // See the AWS API reference guide for Amazon API Gateway's
  6001. // API operation UpdateStage for usage and error information.
  6002. //
  6003. // Returned Error Codes:
  6004. // * UnauthorizedException
  6005. //
  6006. // * NotFoundException
  6007. //
  6008. // * ConflictException
  6009. //
  6010. // * BadRequestException
  6011. //
  6012. // * TooManyRequestsException
  6013. //
  6014. func (c *APIGateway) UpdateStage(input *UpdateStageInput) (*Stage, error) {
  6015. req, out := c.UpdateStageRequest(input)
  6016. err := req.Send()
  6017. return out, err
  6018. }
  6019. const opUpdateUsage = "UpdateUsage"
  6020. // UpdateUsageRequest generates a "aws/request.Request" representing the
  6021. // client's request for the UpdateUsage operation. The "output" return
  6022. // value can be used to capture response data after the request's "Send" method
  6023. // is called.
  6024. //
  6025. // See UpdateUsage for usage and error information.
  6026. //
  6027. // Creating a request object using this method should be used when you want to inject
  6028. // custom logic into the request's lifecycle using a custom handler, or if you want to
  6029. // access properties on the request object before or after sending the request. If
  6030. // you just want the service response, call the UpdateUsage method directly
  6031. // instead.
  6032. //
  6033. // Note: You must call the "Send" method on the returned request object in order
  6034. // to execute the request.
  6035. //
  6036. // // Example sending a request using the UpdateUsageRequest method.
  6037. // req, resp := client.UpdateUsageRequest(params)
  6038. //
  6039. // err := req.Send()
  6040. // if err == nil { // resp is now filled
  6041. // fmt.Println(resp)
  6042. // }
  6043. //
  6044. func (c *APIGateway) UpdateUsageRequest(input *UpdateUsageInput) (req *request.Request, output *Usage) {
  6045. op := &request.Operation{
  6046. Name: opUpdateUsage,
  6047. HTTPMethod: "PATCH",
  6048. HTTPPath: "/usageplans/{usageplanId}/keys/{keyId}/usage",
  6049. }
  6050. if input == nil {
  6051. input = &UpdateUsageInput{}
  6052. }
  6053. req = c.newRequest(op, input, output)
  6054. output = &Usage{}
  6055. req.Data = output
  6056. return
  6057. }
  6058. // UpdateUsage API operation for Amazon API Gateway.
  6059. //
  6060. // Grants a temporary extension to the reamining quota of a usage plan associated
  6061. // with a specified API key.
  6062. //
  6063. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  6064. // with awserr.Error's Code and Message methods to get detailed information about
  6065. // the error.
  6066. //
  6067. // See the AWS API reference guide for Amazon API Gateway's
  6068. // API operation UpdateUsage for usage and error information.
  6069. //
  6070. // Returned Error Codes:
  6071. // * UnauthorizedException
  6072. //
  6073. // * TooManyRequestsException
  6074. //
  6075. // * BadRequestException
  6076. //
  6077. // * NotFoundException
  6078. //
  6079. func (c *APIGateway) UpdateUsage(input *UpdateUsageInput) (*Usage, error) {
  6080. req, out := c.UpdateUsageRequest(input)
  6081. err := req.Send()
  6082. return out, err
  6083. }
  6084. const opUpdateUsagePlan = "UpdateUsagePlan"
  6085. // UpdateUsagePlanRequest generates a "aws/request.Request" representing the
  6086. // client's request for the UpdateUsagePlan operation. The "output" return
  6087. // value can be used to capture response data after the request's "Send" method
  6088. // is called.
  6089. //
  6090. // See UpdateUsagePlan for usage and error information.
  6091. //
  6092. // Creating a request object using this method should be used when you want to inject
  6093. // custom logic into the request's lifecycle using a custom handler, or if you want to
  6094. // access properties on the request object before or after sending the request. If
  6095. // you just want the service response, call the UpdateUsagePlan method directly
  6096. // instead.
  6097. //
  6098. // Note: You must call the "Send" method on the returned request object in order
  6099. // to execute the request.
  6100. //
  6101. // // Example sending a request using the UpdateUsagePlanRequest method.
  6102. // req, resp := client.UpdateUsagePlanRequest(params)
  6103. //
  6104. // err := req.Send()
  6105. // if err == nil { // resp is now filled
  6106. // fmt.Println(resp)
  6107. // }
  6108. //
  6109. func (c *APIGateway) UpdateUsagePlanRequest(input *UpdateUsagePlanInput) (req *request.Request, output *UsagePlan) {
  6110. op := &request.Operation{
  6111. Name: opUpdateUsagePlan,
  6112. HTTPMethod: "PATCH",
  6113. HTTPPath: "/usageplans/{usageplanId}",
  6114. }
  6115. if input == nil {
  6116. input = &UpdateUsagePlanInput{}
  6117. }
  6118. req = c.newRequest(op, input, output)
  6119. output = &UsagePlan{}
  6120. req.Data = output
  6121. return
  6122. }
  6123. // UpdateUsagePlan API operation for Amazon API Gateway.
  6124. //
  6125. // Updates a usage plan of a given plan Id.
  6126. //
  6127. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  6128. // with awserr.Error's Code and Message methods to get detailed information about
  6129. // the error.
  6130. //
  6131. // See the AWS API reference guide for Amazon API Gateway's
  6132. // API operation UpdateUsagePlan for usage and error information.
  6133. //
  6134. // Returned Error Codes:
  6135. // * UnauthorizedException
  6136. //
  6137. // * TooManyRequestsException
  6138. //
  6139. // * BadRequestException
  6140. //
  6141. // * NotFoundException
  6142. //
  6143. // * ConflictException
  6144. //
  6145. func (c *APIGateway) UpdateUsagePlan(input *UpdateUsagePlanInput) (*UsagePlan, error) {
  6146. req, out := c.UpdateUsagePlanRequest(input)
  6147. err := req.Send()
  6148. return out, err
  6149. }
  6150. // Represents an AWS account that is associated with Amazon API Gateway.
  6151. //
  6152. // To view the account info, call GET on this resource.
  6153. //
  6154. // Error Codes
  6155. //
  6156. // The following exception may be thrown when the request fails.
  6157. //
  6158. // UnauthorizedException
  6159. // NotFoundException
  6160. // TooManyRequestsException
  6161. // For detailed error code information, including the corresponding HTTP Status
  6162. // Codes, see API Gateway Error Codes (http://docs.aws.amazon.com/apigateway/api-reference/handling-errors/#api-error-codes)
  6163. //
  6164. // Example: Get the information about an account.
  6165. //
  6166. // Request
  6167. //
  6168. // GET /account HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com
  6169. // X-Amz-Date: 20160531T184618Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/us-east-1/apigateway/aws4_request,
  6170. // SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash}
  6171. // Response
  6172. //
  6173. // The successful response returns a 200 OK status code and a payload similar
  6174. // to the following:
  6175. //
  6176. // { "_links": { "curies": { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/account-apigateway-{rel}.html",
  6177. // "name": "account", "templated": true }, "self": { "href": "/account" }, "account:update":
  6178. // { "href": "/account" } }, "cloudwatchRoleArn": "arn:aws:iam::123456789012:role/apigAwsProxyRole",
  6179. // "throttleSettings": { "rateLimit": 500, "burstLimit": 1000 } }
  6180. // In addition to making the REST API call directly, you can use the AWS CLI
  6181. // and an AWS SDK to access this resource.
  6182. //
  6183. // API Gateway Limits (http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-limits.html)Developer
  6184. // Guide (http://docs.aws.amazon.com/apigateway/latest/developerguide/welcome.html),
  6185. // AWS CLI (http://docs.aws.amazon.com/cli/latest/reference/apigateway/get-account.html)
  6186. type Account struct {
  6187. _ struct{} `type:"structure"`
  6188. // The version of the API keys used for the account.
  6189. ApiKeyVersion *string `locationName:"apiKeyVersion" type:"string"`
  6190. // The ARN of an Amazon CloudWatch role for the current Account.
  6191. CloudwatchRoleArn *string `locationName:"cloudwatchRoleArn" type:"string"`
  6192. // A list of features supported for the account. When usage plans are enabled,
  6193. // the features list will include an entry of "UsagePlans".
  6194. Features []*string `locationName:"features" type:"list"`
  6195. // Specifies the API request limits configured for the current Account.
  6196. ThrottleSettings *ThrottleSettings `locationName:"throttleSettings" type:"structure"`
  6197. }
  6198. // String returns the string representation
  6199. func (s Account) String() string {
  6200. return awsutil.Prettify(s)
  6201. }
  6202. // GoString returns the string representation
  6203. func (s Account) GoString() string {
  6204. return s.String()
  6205. }
  6206. // A resource that can be distributed to callers for executing Method resources
  6207. // that require an API key. API keys can be mapped to any Stage on any RestApi,
  6208. // which indicates that the callers with the API key can make requests to that
  6209. // stage.
  6210. //
  6211. // Use API Keys (http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-api-keys.html)
  6212. type ApiKey struct {
  6213. _ struct{} `type:"structure"`
  6214. // The date when the API Key was created, in ISO 8601 format (http://www.iso.org/iso/home/standards/iso8601.htm).
  6215. CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"`
  6216. // The description of the API Key.
  6217. Description *string `locationName:"description" type:"string"`
  6218. // Specifies whether the API Key can be used by callers.
  6219. Enabled *bool `locationName:"enabled" type:"boolean"`
  6220. // The identifier of the API Key.
  6221. Id *string `locationName:"id" type:"string"`
  6222. // When the API Key was last updated, in ISO 8601 format.
  6223. LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"unix"`
  6224. // The name of the API Key.
  6225. Name *string `locationName:"name" type:"string"`
  6226. // A list of Stage resources that are associated with the ApiKey resource.
  6227. StageKeys []*string `locationName:"stageKeys" type:"list"`
  6228. // The value of the API Key.
  6229. Value *string `locationName:"value" type:"string"`
  6230. }
  6231. // String returns the string representation
  6232. func (s ApiKey) String() string {
  6233. return awsutil.Prettify(s)
  6234. }
  6235. // GoString returns the string representation
  6236. func (s ApiKey) GoString() string {
  6237. return s.String()
  6238. }
  6239. // API stage name of the associated API stage in a usage plan.
  6240. type ApiStage struct {
  6241. _ struct{} `type:"structure"`
  6242. // API Id of the associated API stage in a usage plan.
  6243. ApiId *string `locationName:"apiId" type:"string"`
  6244. // API stage name of the associated API stage in a usage plan.
  6245. Stage *string `locationName:"stage" type:"string"`
  6246. }
  6247. // String returns the string representation
  6248. func (s ApiStage) String() string {
  6249. return awsutil.Prettify(s)
  6250. }
  6251. // GoString returns the string representation
  6252. func (s ApiStage) GoString() string {
  6253. return s.String()
  6254. }
  6255. // Represents an authorization layer for methods. If enabled on a method, API
  6256. // Gateway will activate the authorizer when a client calls the method.
  6257. //
  6258. // Enable custom authorization (http://docs.aws.amazon.com/apigateway/latest/developerguide/use-custom-authorizer.html)
  6259. type Authorizer struct {
  6260. _ struct{} `type:"structure"`
  6261. // Optional customer-defined field, used in Swagger imports/exports. Has no
  6262. // functional impact.
  6263. AuthType *string `locationName:"authType" type:"string"`
  6264. // Specifies the credentials required for the authorizer, if any. Two options
  6265. // are available. To specify an IAM role for Amazon API Gateway to assume, use
  6266. // the role's Amazon Resource Name (ARN). To use resource-based permissions
  6267. // on the Lambda function, specify null.
  6268. AuthorizerCredentials *string `locationName:"authorizerCredentials" type:"string"`
  6269. // The TTL in seconds of cached authorizer results. If greater than 0, API Gateway
  6270. // will cache authorizer responses. If this field is not set, the default value
  6271. // is 300. The maximum value is 3600, or 1 hour.
  6272. AuthorizerResultTtlInSeconds *int64 `locationName:"authorizerResultTtlInSeconds" type:"integer"`
  6273. // [Required] Specifies the authorizer's Uniform Resource Identifier (URI).
  6274. // For TOKEN authorizers, this must be a well-formed Lambda function URI. The
  6275. // URI should be of the form arn:aws:apigateway:{region}:lambda:path/{service_api}.
  6276. // Region is used to determine the right endpoint. In this case, path is used
  6277. // to indicate that the remaining substring in the URI should be treated as
  6278. // the path to the resource, including the initial /. For Lambda functions,
  6279. // this is usually of the form /2015-03-31/functions/[FunctionARN]/invocations
  6280. AuthorizerUri *string `locationName:"authorizerUri" type:"string"`
  6281. // The identifier for the authorizer resource.
  6282. Id *string `locationName:"id" type:"string"`
  6283. // [Required] The source of the identity in an incoming request. For TOKEN authorizers,
  6284. // this value is a mapping expression with the same syntax as integration parameter
  6285. // mappings. The only valid source for tokens is 'header', so the expression
  6286. // should match 'method.request.header.[headerName]'. The value of the header
  6287. // '[headerName]' will be interpreted as the incoming token.
  6288. IdentitySource *string `locationName:"identitySource" type:"string"`
  6289. // A validation expression for the incoming identity. For TOKEN authorizers,
  6290. // this value should be a regular expression. The incoming token from the client
  6291. // is matched against this expression, and will proceed if the token matches.
  6292. // If the token doesn't match, the client receives a 401 Unauthorized response.
  6293. IdentityValidationExpression *string `locationName:"identityValidationExpression" type:"string"`
  6294. // [Required] The name of the authorizer.
  6295. Name *string `locationName:"name" type:"string"`
  6296. // A list of the provider ARNs of the authorizer.
  6297. ProviderARNs []*string `locationName:"providerARNs" type:"list"`
  6298. // [Required] The type of the authorizer. Currently, the only valid type is
  6299. // TOKEN.
  6300. Type *string `locationName:"type" type:"string" enum:"AuthorizerType"`
  6301. }
  6302. // String returns the string representation
  6303. func (s Authorizer) String() string {
  6304. return awsutil.Prettify(s)
  6305. }
  6306. // GoString returns the string representation
  6307. func (s Authorizer) GoString() string {
  6308. return s.String()
  6309. }
  6310. // Represents the base path that callers of the API must provide as part of
  6311. // the URL after the domain name.
  6312. //
  6313. // A custom domain name plus a BasePathMapping specification identifies a deployed
  6314. // RestApi in a given stage of the owner Account.
  6315. // Use Custom Domain Names (http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html)
  6316. type BasePathMapping struct {
  6317. _ struct{} `type:"structure"`
  6318. // The base path name that callers of the API must provide as part of the URL
  6319. // after the domain name.
  6320. BasePath *string `locationName:"basePath" type:"string"`
  6321. // The name of the API.
  6322. RestApiId *string `locationName:"restApiId" type:"string"`
  6323. // The name of the API's stage.
  6324. Stage *string `locationName:"stage" type:"string"`
  6325. }
  6326. // String returns the string representation
  6327. func (s BasePathMapping) String() string {
  6328. return awsutil.Prettify(s)
  6329. }
  6330. // GoString returns the string representation
  6331. func (s BasePathMapping) GoString() string {
  6332. return s.String()
  6333. }
  6334. // Represents a client certificate used to configure client-side SSL authentication
  6335. // while sending requests to the integration endpoint.
  6336. //
  6337. // Client certificates are used authenticate an API by the back-end server.
  6338. // To authenticate an API client (or user), use a custom Authorizer.
  6339. // Use Client-Side Certificate (http://docs.aws.amazon.com/apigateway/latest/developerguide/getting-started-client-side-ssl-authentication.html)
  6340. type ClientCertificate struct {
  6341. _ struct{} `type:"structure"`
  6342. // The identifier of the client certificate.
  6343. ClientCertificateId *string `locationName:"clientCertificateId" type:"string"`
  6344. // The date when the client certificate was created, in ISO 8601 format (http://www.iso.org/iso/home/standards/iso8601.htm).
  6345. CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"`
  6346. // The description of the client certificate.
  6347. Description *string `locationName:"description" type:"string"`
  6348. // The date when the client certificate will expire, in ISO 8601 format (http://www.iso.org/iso/home/standards/iso8601.htm).
  6349. ExpirationDate *time.Time `locationName:"expirationDate" type:"timestamp" timestampFormat:"unix"`
  6350. // The PEM-encoded public key of the client certificate, which can be used to
  6351. // configure certificate authentication in the integration endpoint .
  6352. PemEncodedCertificate *string `locationName:"pemEncodedCertificate" type:"string"`
  6353. }
  6354. // String returns the string representation
  6355. func (s ClientCertificate) String() string {
  6356. return awsutil.Prettify(s)
  6357. }
  6358. // GoString returns the string representation
  6359. func (s ClientCertificate) GoString() string {
  6360. return s.String()
  6361. }
  6362. // Request to create an ApiKey resource.
  6363. type CreateApiKeyInput struct {
  6364. _ struct{} `type:"structure"`
  6365. // The description of the ApiKey.
  6366. Description *string `locationName:"description" type:"string"`
  6367. // Specifies whether the ApiKey can be used by callers.
  6368. Enabled *bool `locationName:"enabled" type:"boolean"`
  6369. // Specifies whether (true) or not (false) the key identifier is distinct from
  6370. // the created API key value.
  6371. GenerateDistinctId *bool `locationName:"generateDistinctId" type:"boolean"`
  6372. // The name of the ApiKey.
  6373. Name *string `locationName:"name" type:"string"`
  6374. // DEPRECATED FOR USAGE PLANS - Specifies stages associated with the API key.
  6375. StageKeys []*StageKey `locationName:"stageKeys" type:"list"`
  6376. // Specifies a value of the API key.
  6377. Value *string `locationName:"value" type:"string"`
  6378. }
  6379. // String returns the string representation
  6380. func (s CreateApiKeyInput) String() string {
  6381. return awsutil.Prettify(s)
  6382. }
  6383. // GoString returns the string representation
  6384. func (s CreateApiKeyInput) GoString() string {
  6385. return s.String()
  6386. }
  6387. // Request to add a new Authorizer to an existing RestApi resource.
  6388. type CreateAuthorizerInput struct {
  6389. _ struct{} `type:"structure"`
  6390. // Optional customer-defined field, used in Swagger imports/exports. Has no
  6391. // functional impact.
  6392. AuthType *string `locationName:"authType" type:"string"`
  6393. // Specifies the credentials required for the authorizer, if any.
  6394. AuthorizerCredentials *string `locationName:"authorizerCredentials" type:"string"`
  6395. // The TTL of cached authorizer results.
  6396. AuthorizerResultTtlInSeconds *int64 `locationName:"authorizerResultTtlInSeconds" type:"integer"`
  6397. // [Required] Specifies the authorizer's Uniform Resource Identifier (URI).
  6398. AuthorizerUri *string `locationName:"authorizerUri" type:"string"`
  6399. // [Required] The source of the identity in an incoming request.
  6400. //
  6401. // IdentitySource is a required field
  6402. IdentitySource *string `locationName:"identitySource" type:"string" required:"true"`
  6403. // A validation expression for the incoming identity.
  6404. IdentityValidationExpression *string `locationName:"identityValidationExpression" type:"string"`
  6405. // [Required] The name of the authorizer.
  6406. //
  6407. // Name is a required field
  6408. Name *string `locationName:"name" type:"string" required:"true"`
  6409. // A list of the Cognito Your User Pool authorizer's provider ARNs.
  6410. ProviderARNs []*string `locationName:"providerARNs" type:"list"`
  6411. // The RestApi identifier under which the Authorizer will be created.
  6412. //
  6413. // RestApiId is a required field
  6414. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  6415. // [Required] The type of the authorizer.
  6416. //
  6417. // Type is a required field
  6418. Type *string `locationName:"type" type:"string" required:"true" enum:"AuthorizerType"`
  6419. }
  6420. // String returns the string representation
  6421. func (s CreateAuthorizerInput) String() string {
  6422. return awsutil.Prettify(s)
  6423. }
  6424. // GoString returns the string representation
  6425. func (s CreateAuthorizerInput) GoString() string {
  6426. return s.String()
  6427. }
  6428. // Validate inspects the fields of the type to determine if they are valid.
  6429. func (s *CreateAuthorizerInput) Validate() error {
  6430. invalidParams := request.ErrInvalidParams{Context: "CreateAuthorizerInput"}
  6431. if s.IdentitySource == nil {
  6432. invalidParams.Add(request.NewErrParamRequired("IdentitySource"))
  6433. }
  6434. if s.Name == nil {
  6435. invalidParams.Add(request.NewErrParamRequired("Name"))
  6436. }
  6437. if s.RestApiId == nil {
  6438. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  6439. }
  6440. if s.Type == nil {
  6441. invalidParams.Add(request.NewErrParamRequired("Type"))
  6442. }
  6443. if invalidParams.Len() > 0 {
  6444. return invalidParams
  6445. }
  6446. return nil
  6447. }
  6448. // Requests Amazon API Gateway to create a new BasePathMapping resource.
  6449. type CreateBasePathMappingInput struct {
  6450. _ struct{} `type:"structure"`
  6451. // The base path name that callers of the API must provide as part of the URL
  6452. // after the domain name. This value must be unique for all of the mappings
  6453. // across a single API. Leave this blank if you do not want callers to specify
  6454. // a base path name after the domain name.
  6455. BasePath *string `locationName:"basePath" type:"string"`
  6456. // The domain name of the BasePathMapping resource to create.
  6457. //
  6458. // DomainName is a required field
  6459. DomainName *string `location:"uri" locationName:"domain_name" type:"string" required:"true"`
  6460. // The name of the API that you want to apply this mapping to.
  6461. //
  6462. // RestApiId is a required field
  6463. RestApiId *string `locationName:"restApiId" type:"string" required:"true"`
  6464. // The name of the API's stage that you want to use for this mapping. Leave
  6465. // this blank if you do not want callers to explicitly specify the stage name
  6466. // after any base path name.
  6467. Stage *string `locationName:"stage" type:"string"`
  6468. }
  6469. // String returns the string representation
  6470. func (s CreateBasePathMappingInput) String() string {
  6471. return awsutil.Prettify(s)
  6472. }
  6473. // GoString returns the string representation
  6474. func (s CreateBasePathMappingInput) GoString() string {
  6475. return s.String()
  6476. }
  6477. // Validate inspects the fields of the type to determine if they are valid.
  6478. func (s *CreateBasePathMappingInput) Validate() error {
  6479. invalidParams := request.ErrInvalidParams{Context: "CreateBasePathMappingInput"}
  6480. if s.DomainName == nil {
  6481. invalidParams.Add(request.NewErrParamRequired("DomainName"))
  6482. }
  6483. if s.RestApiId == nil {
  6484. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  6485. }
  6486. if invalidParams.Len() > 0 {
  6487. return invalidParams
  6488. }
  6489. return nil
  6490. }
  6491. // Requests Amazon API Gateway to create a Deployment resource.
  6492. type CreateDeploymentInput struct {
  6493. _ struct{} `type:"structure"`
  6494. // Enables a cache cluster for the Stage resource specified in the input.
  6495. CacheClusterEnabled *bool `locationName:"cacheClusterEnabled" type:"boolean"`
  6496. // Specifies the cache cluster size for the Stage resource specified in the
  6497. // input, if a cache cluster is enabled.
  6498. CacheClusterSize *string `locationName:"cacheClusterSize" type:"string" enum:"CacheClusterSize"`
  6499. // The description for the Deployment resource to create.
  6500. Description *string `locationName:"description" type:"string"`
  6501. // The RestApi resource identifier for the Deployment resource to create.
  6502. //
  6503. // RestApiId is a required field
  6504. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  6505. // The description of the Stage resource for the Deployment resource to create.
  6506. StageDescription *string `locationName:"stageDescription" type:"string"`
  6507. // The name of the Stage resource for the Deployment resource to create.
  6508. //
  6509. // StageName is a required field
  6510. StageName *string `locationName:"stageName" type:"string" required:"true"`
  6511. // A map that defines the stage variables for the Stage resource that is associated
  6512. // with the new deployment. Variable names can have alphanumeric and underscore
  6513. // characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+.
  6514. Variables map[string]*string `locationName:"variables" type:"map"`
  6515. }
  6516. // String returns the string representation
  6517. func (s CreateDeploymentInput) String() string {
  6518. return awsutil.Prettify(s)
  6519. }
  6520. // GoString returns the string representation
  6521. func (s CreateDeploymentInput) GoString() string {
  6522. return s.String()
  6523. }
  6524. // Validate inspects the fields of the type to determine if they are valid.
  6525. func (s *CreateDeploymentInput) Validate() error {
  6526. invalidParams := request.ErrInvalidParams{Context: "CreateDeploymentInput"}
  6527. if s.RestApiId == nil {
  6528. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  6529. }
  6530. if s.StageName == nil {
  6531. invalidParams.Add(request.NewErrParamRequired("StageName"))
  6532. }
  6533. if invalidParams.Len() > 0 {
  6534. return invalidParams
  6535. }
  6536. return nil
  6537. }
  6538. // A request to create a new domain name.
  6539. type CreateDomainNameInput struct {
  6540. _ struct{} `type:"structure"`
  6541. // The body of the server certificate provided by your certificate authority.
  6542. //
  6543. // CertificateBody is a required field
  6544. CertificateBody *string `locationName:"certificateBody" type:"string" required:"true"`
  6545. // The intermediate certificates and optionally the root certificate, one after
  6546. // the other without any blank lines. If you include the root certificate, your
  6547. // certificate chain must start with intermediate certificates and end with
  6548. // the root certificate. Use the intermediate certificates that were provided
  6549. // by your certificate authority. Do not include any intermediaries that are
  6550. // not in the chain of trust path.
  6551. //
  6552. // CertificateChain is a required field
  6553. CertificateChain *string `locationName:"certificateChain" type:"string" required:"true"`
  6554. // The name of the certificate.
  6555. //
  6556. // CertificateName is a required field
  6557. CertificateName *string `locationName:"certificateName" type:"string" required:"true"`
  6558. // Your certificate's private key.
  6559. //
  6560. // CertificatePrivateKey is a required field
  6561. CertificatePrivateKey *string `locationName:"certificatePrivateKey" type:"string" required:"true"`
  6562. // The name of the DomainName resource.
  6563. //
  6564. // DomainName is a required field
  6565. DomainName *string `locationName:"domainName" type:"string" required:"true"`
  6566. }
  6567. // String returns the string representation
  6568. func (s CreateDomainNameInput) String() string {
  6569. return awsutil.Prettify(s)
  6570. }
  6571. // GoString returns the string representation
  6572. func (s CreateDomainNameInput) GoString() string {
  6573. return s.String()
  6574. }
  6575. // Validate inspects the fields of the type to determine if they are valid.
  6576. func (s *CreateDomainNameInput) Validate() error {
  6577. invalidParams := request.ErrInvalidParams{Context: "CreateDomainNameInput"}
  6578. if s.CertificateBody == nil {
  6579. invalidParams.Add(request.NewErrParamRequired("CertificateBody"))
  6580. }
  6581. if s.CertificateChain == nil {
  6582. invalidParams.Add(request.NewErrParamRequired("CertificateChain"))
  6583. }
  6584. if s.CertificateName == nil {
  6585. invalidParams.Add(request.NewErrParamRequired("CertificateName"))
  6586. }
  6587. if s.CertificatePrivateKey == nil {
  6588. invalidParams.Add(request.NewErrParamRequired("CertificatePrivateKey"))
  6589. }
  6590. if s.DomainName == nil {
  6591. invalidParams.Add(request.NewErrParamRequired("DomainName"))
  6592. }
  6593. if invalidParams.Len() > 0 {
  6594. return invalidParams
  6595. }
  6596. return nil
  6597. }
  6598. // Request to add a new Model to an existing RestApi resource.
  6599. type CreateModelInput struct {
  6600. _ struct{} `type:"structure"`
  6601. // The content-type for the model.
  6602. //
  6603. // ContentType is a required field
  6604. ContentType *string `locationName:"contentType" type:"string" required:"true"`
  6605. // The description of the model.
  6606. Description *string `locationName:"description" type:"string"`
  6607. // The name of the model.
  6608. //
  6609. // Name is a required field
  6610. Name *string `locationName:"name" type:"string" required:"true"`
  6611. // The RestApi identifier under which the Model will be created.
  6612. //
  6613. // RestApiId is a required field
  6614. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  6615. // The schema for the model. For application/json models, this should be JSON-schema
  6616. // draft v4 (http://json-schema.org/documentation.html) model.
  6617. Schema *string `locationName:"schema" type:"string"`
  6618. }
  6619. // String returns the string representation
  6620. func (s CreateModelInput) String() string {
  6621. return awsutil.Prettify(s)
  6622. }
  6623. // GoString returns the string representation
  6624. func (s CreateModelInput) GoString() string {
  6625. return s.String()
  6626. }
  6627. // Validate inspects the fields of the type to determine if they are valid.
  6628. func (s *CreateModelInput) Validate() error {
  6629. invalidParams := request.ErrInvalidParams{Context: "CreateModelInput"}
  6630. if s.ContentType == nil {
  6631. invalidParams.Add(request.NewErrParamRequired("ContentType"))
  6632. }
  6633. if s.Name == nil {
  6634. invalidParams.Add(request.NewErrParamRequired("Name"))
  6635. }
  6636. if s.RestApiId == nil {
  6637. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  6638. }
  6639. if invalidParams.Len() > 0 {
  6640. return invalidParams
  6641. }
  6642. return nil
  6643. }
  6644. // Requests Amazon API Gateway to create a Resource resource.
  6645. type CreateResourceInput struct {
  6646. _ struct{} `type:"structure"`
  6647. // The parent resource's identifier.
  6648. //
  6649. // ParentId is a required field
  6650. ParentId *string `location:"uri" locationName:"parent_id" type:"string" required:"true"`
  6651. // The last path segment for this resource.
  6652. //
  6653. // PathPart is a required field
  6654. PathPart *string `locationName:"pathPart" type:"string" required:"true"`
  6655. // The identifier of the RestApi for the resource.
  6656. //
  6657. // RestApiId is a required field
  6658. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  6659. }
  6660. // String returns the string representation
  6661. func (s CreateResourceInput) String() string {
  6662. return awsutil.Prettify(s)
  6663. }
  6664. // GoString returns the string representation
  6665. func (s CreateResourceInput) GoString() string {
  6666. return s.String()
  6667. }
  6668. // Validate inspects the fields of the type to determine if they are valid.
  6669. func (s *CreateResourceInput) Validate() error {
  6670. invalidParams := request.ErrInvalidParams{Context: "CreateResourceInput"}
  6671. if s.ParentId == nil {
  6672. invalidParams.Add(request.NewErrParamRequired("ParentId"))
  6673. }
  6674. if s.PathPart == nil {
  6675. invalidParams.Add(request.NewErrParamRequired("PathPart"))
  6676. }
  6677. if s.RestApiId == nil {
  6678. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  6679. }
  6680. if invalidParams.Len() > 0 {
  6681. return invalidParams
  6682. }
  6683. return nil
  6684. }
  6685. // The POST Request to add a new RestApi resource to your collection.
  6686. type CreateRestApiInput struct {
  6687. _ struct{} `type:"structure"`
  6688. // The ID of the RestApi that you want to clone from.
  6689. CloneFrom *string `locationName:"cloneFrom" type:"string"`
  6690. // The description of the RestApi.
  6691. Description *string `locationName:"description" type:"string"`
  6692. // The name of the RestApi.
  6693. //
  6694. // Name is a required field
  6695. Name *string `locationName:"name" type:"string" required:"true"`
  6696. }
  6697. // String returns the string representation
  6698. func (s CreateRestApiInput) String() string {
  6699. return awsutil.Prettify(s)
  6700. }
  6701. // GoString returns the string representation
  6702. func (s CreateRestApiInput) GoString() string {
  6703. return s.String()
  6704. }
  6705. // Validate inspects the fields of the type to determine if they are valid.
  6706. func (s *CreateRestApiInput) Validate() error {
  6707. invalidParams := request.ErrInvalidParams{Context: "CreateRestApiInput"}
  6708. if s.Name == nil {
  6709. invalidParams.Add(request.NewErrParamRequired("Name"))
  6710. }
  6711. if invalidParams.Len() > 0 {
  6712. return invalidParams
  6713. }
  6714. return nil
  6715. }
  6716. // Requests Amazon API Gateway to create a Stage resource.
  6717. type CreateStageInput struct {
  6718. _ struct{} `type:"structure"`
  6719. // Whether cache clustering is enabled for the stage.
  6720. CacheClusterEnabled *bool `locationName:"cacheClusterEnabled" type:"boolean"`
  6721. // The stage's cache cluster size.
  6722. CacheClusterSize *string `locationName:"cacheClusterSize" type:"string" enum:"CacheClusterSize"`
  6723. // The identifier of the Deployment resource for the Stage resource.
  6724. //
  6725. // DeploymentId is a required field
  6726. DeploymentId *string `locationName:"deploymentId" type:"string" required:"true"`
  6727. // The description of the Stage resource.
  6728. Description *string `locationName:"description" type:"string"`
  6729. // The identifier of the RestApi resource for the Stage resource to create.
  6730. //
  6731. // RestApiId is a required field
  6732. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  6733. // The name for the Stage resource.
  6734. //
  6735. // StageName is a required field
  6736. StageName *string `locationName:"stageName" type:"string" required:"true"`
  6737. // A map that defines the stage variables for the new Stage resource. Variable
  6738. // names can have alphanumeric and underscore characters, and the values must
  6739. // match [A-Za-z0-9-._~:/?#&=,]+.
  6740. Variables map[string]*string `locationName:"variables" type:"map"`
  6741. }
  6742. // String returns the string representation
  6743. func (s CreateStageInput) String() string {
  6744. return awsutil.Prettify(s)
  6745. }
  6746. // GoString returns the string representation
  6747. func (s CreateStageInput) GoString() string {
  6748. return s.String()
  6749. }
  6750. // Validate inspects the fields of the type to determine if they are valid.
  6751. func (s *CreateStageInput) Validate() error {
  6752. invalidParams := request.ErrInvalidParams{Context: "CreateStageInput"}
  6753. if s.DeploymentId == nil {
  6754. invalidParams.Add(request.NewErrParamRequired("DeploymentId"))
  6755. }
  6756. if s.RestApiId == nil {
  6757. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  6758. }
  6759. if s.StageName == nil {
  6760. invalidParams.Add(request.NewErrParamRequired("StageName"))
  6761. }
  6762. if invalidParams.Len() > 0 {
  6763. return invalidParams
  6764. }
  6765. return nil
  6766. }
  6767. // The POST request to create a usage plan with the name, description, throttle
  6768. // limits and quota limits, as well as the associated API stages, specified
  6769. // in the payload.
  6770. type CreateUsagePlanInput struct {
  6771. _ struct{} `type:"structure"`
  6772. // The associated API stages of the usage plan.
  6773. ApiStages []*ApiStage `locationName:"apiStages" type:"list"`
  6774. // The description of the usage plan.
  6775. Description *string `locationName:"description" type:"string"`
  6776. // The name of the usage plan.
  6777. //
  6778. // Name is a required field
  6779. Name *string `locationName:"name" type:"string" required:"true"`
  6780. // The quota of the usage plan.
  6781. Quota *QuotaSettings `locationName:"quota" type:"structure"`
  6782. // The throttling limits of the usage plan.
  6783. Throttle *ThrottleSettings `locationName:"throttle" type:"structure"`
  6784. }
  6785. // String returns the string representation
  6786. func (s CreateUsagePlanInput) String() string {
  6787. return awsutil.Prettify(s)
  6788. }
  6789. // GoString returns the string representation
  6790. func (s CreateUsagePlanInput) GoString() string {
  6791. return s.String()
  6792. }
  6793. // Validate inspects the fields of the type to determine if they are valid.
  6794. func (s *CreateUsagePlanInput) Validate() error {
  6795. invalidParams := request.ErrInvalidParams{Context: "CreateUsagePlanInput"}
  6796. if s.Name == nil {
  6797. invalidParams.Add(request.NewErrParamRequired("Name"))
  6798. }
  6799. if invalidParams.Len() > 0 {
  6800. return invalidParams
  6801. }
  6802. return nil
  6803. }
  6804. // The POST request to create a usage plan key for adding an existing API key
  6805. // to a usage plan.
  6806. type CreateUsagePlanKeyInput struct {
  6807. _ struct{} `type:"structure"`
  6808. // The identifier of a UsagePlanKey resource for a plan customer.
  6809. //
  6810. // KeyId is a required field
  6811. KeyId *string `locationName:"keyId" type:"string" required:"true"`
  6812. // The type of a UsagePlanKey resource for a plan customer.
  6813. //
  6814. // KeyType is a required field
  6815. KeyType *string `locationName:"keyType" type:"string" required:"true"`
  6816. // The Id of the UsagePlan resource representing the usage plan containing the
  6817. // to-be-created UsagePlanKey resource representing a plan customer.
  6818. //
  6819. // UsagePlanId is a required field
  6820. UsagePlanId *string `location:"uri" locationName:"usageplanId" type:"string" required:"true"`
  6821. }
  6822. // String returns the string representation
  6823. func (s CreateUsagePlanKeyInput) String() string {
  6824. return awsutil.Prettify(s)
  6825. }
  6826. // GoString returns the string representation
  6827. func (s CreateUsagePlanKeyInput) GoString() string {
  6828. return s.String()
  6829. }
  6830. // Validate inspects the fields of the type to determine if they are valid.
  6831. func (s *CreateUsagePlanKeyInput) Validate() error {
  6832. invalidParams := request.ErrInvalidParams{Context: "CreateUsagePlanKeyInput"}
  6833. if s.KeyId == nil {
  6834. invalidParams.Add(request.NewErrParamRequired("KeyId"))
  6835. }
  6836. if s.KeyType == nil {
  6837. invalidParams.Add(request.NewErrParamRequired("KeyType"))
  6838. }
  6839. if s.UsagePlanId == nil {
  6840. invalidParams.Add(request.NewErrParamRequired("UsagePlanId"))
  6841. }
  6842. if invalidParams.Len() > 0 {
  6843. return invalidParams
  6844. }
  6845. return nil
  6846. }
  6847. // A request to delete the ApiKey resource.
  6848. type DeleteApiKeyInput struct {
  6849. _ struct{} `type:"structure"`
  6850. // The identifier of the ApiKey resource to be deleted.
  6851. //
  6852. // ApiKey is a required field
  6853. ApiKey *string `location:"uri" locationName:"api_Key" type:"string" required:"true"`
  6854. }
  6855. // String returns the string representation
  6856. func (s DeleteApiKeyInput) String() string {
  6857. return awsutil.Prettify(s)
  6858. }
  6859. // GoString returns the string representation
  6860. func (s DeleteApiKeyInput) GoString() string {
  6861. return s.String()
  6862. }
  6863. // Validate inspects the fields of the type to determine if they are valid.
  6864. func (s *DeleteApiKeyInput) Validate() error {
  6865. invalidParams := request.ErrInvalidParams{Context: "DeleteApiKeyInput"}
  6866. if s.ApiKey == nil {
  6867. invalidParams.Add(request.NewErrParamRequired("ApiKey"))
  6868. }
  6869. if invalidParams.Len() > 0 {
  6870. return invalidParams
  6871. }
  6872. return nil
  6873. }
  6874. type DeleteApiKeyOutput struct {
  6875. _ struct{} `type:"structure"`
  6876. }
  6877. // String returns the string representation
  6878. func (s DeleteApiKeyOutput) String() string {
  6879. return awsutil.Prettify(s)
  6880. }
  6881. // GoString returns the string representation
  6882. func (s DeleteApiKeyOutput) GoString() string {
  6883. return s.String()
  6884. }
  6885. // Request to delete an existing Authorizer resource.
  6886. type DeleteAuthorizerInput struct {
  6887. _ struct{} `type:"structure"`
  6888. // The identifier of the Authorizer resource.
  6889. //
  6890. // AuthorizerId is a required field
  6891. AuthorizerId *string `location:"uri" locationName:"authorizer_id" type:"string" required:"true"`
  6892. // The RestApi identifier for the Authorizer resource.
  6893. //
  6894. // RestApiId is a required field
  6895. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  6896. }
  6897. // String returns the string representation
  6898. func (s DeleteAuthorizerInput) String() string {
  6899. return awsutil.Prettify(s)
  6900. }
  6901. // GoString returns the string representation
  6902. func (s DeleteAuthorizerInput) GoString() string {
  6903. return s.String()
  6904. }
  6905. // Validate inspects the fields of the type to determine if they are valid.
  6906. func (s *DeleteAuthorizerInput) Validate() error {
  6907. invalidParams := request.ErrInvalidParams{Context: "DeleteAuthorizerInput"}
  6908. if s.AuthorizerId == nil {
  6909. invalidParams.Add(request.NewErrParamRequired("AuthorizerId"))
  6910. }
  6911. if s.RestApiId == nil {
  6912. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  6913. }
  6914. if invalidParams.Len() > 0 {
  6915. return invalidParams
  6916. }
  6917. return nil
  6918. }
  6919. type DeleteAuthorizerOutput struct {
  6920. _ struct{} `type:"structure"`
  6921. }
  6922. // String returns the string representation
  6923. func (s DeleteAuthorizerOutput) String() string {
  6924. return awsutil.Prettify(s)
  6925. }
  6926. // GoString returns the string representation
  6927. func (s DeleteAuthorizerOutput) GoString() string {
  6928. return s.String()
  6929. }
  6930. // A request to delete the BasePathMapping resource.
  6931. type DeleteBasePathMappingInput struct {
  6932. _ struct{} `type:"structure"`
  6933. // The base path name of the BasePathMapping resource to delete.
  6934. //
  6935. // BasePath is a required field
  6936. BasePath *string `location:"uri" locationName:"base_path" type:"string" required:"true"`
  6937. // The domain name of the BasePathMapping resource to delete.
  6938. //
  6939. // DomainName is a required field
  6940. DomainName *string `location:"uri" locationName:"domain_name" type:"string" required:"true"`
  6941. }
  6942. // String returns the string representation
  6943. func (s DeleteBasePathMappingInput) String() string {
  6944. return awsutil.Prettify(s)
  6945. }
  6946. // GoString returns the string representation
  6947. func (s DeleteBasePathMappingInput) GoString() string {
  6948. return s.String()
  6949. }
  6950. // Validate inspects the fields of the type to determine if they are valid.
  6951. func (s *DeleteBasePathMappingInput) Validate() error {
  6952. invalidParams := request.ErrInvalidParams{Context: "DeleteBasePathMappingInput"}
  6953. if s.BasePath == nil {
  6954. invalidParams.Add(request.NewErrParamRequired("BasePath"))
  6955. }
  6956. if s.DomainName == nil {
  6957. invalidParams.Add(request.NewErrParamRequired("DomainName"))
  6958. }
  6959. if invalidParams.Len() > 0 {
  6960. return invalidParams
  6961. }
  6962. return nil
  6963. }
  6964. type DeleteBasePathMappingOutput struct {
  6965. _ struct{} `type:"structure"`
  6966. }
  6967. // String returns the string representation
  6968. func (s DeleteBasePathMappingOutput) String() string {
  6969. return awsutil.Prettify(s)
  6970. }
  6971. // GoString returns the string representation
  6972. func (s DeleteBasePathMappingOutput) GoString() string {
  6973. return s.String()
  6974. }
  6975. // A request to delete the ClientCertificate resource.
  6976. type DeleteClientCertificateInput struct {
  6977. _ struct{} `type:"structure"`
  6978. // The identifier of the ClientCertificate resource to be deleted.
  6979. //
  6980. // ClientCertificateId is a required field
  6981. ClientCertificateId *string `location:"uri" locationName:"clientcertificate_id" type:"string" required:"true"`
  6982. }
  6983. // String returns the string representation
  6984. func (s DeleteClientCertificateInput) String() string {
  6985. return awsutil.Prettify(s)
  6986. }
  6987. // GoString returns the string representation
  6988. func (s DeleteClientCertificateInput) GoString() string {
  6989. return s.String()
  6990. }
  6991. // Validate inspects the fields of the type to determine if they are valid.
  6992. func (s *DeleteClientCertificateInput) Validate() error {
  6993. invalidParams := request.ErrInvalidParams{Context: "DeleteClientCertificateInput"}
  6994. if s.ClientCertificateId == nil {
  6995. invalidParams.Add(request.NewErrParamRequired("ClientCertificateId"))
  6996. }
  6997. if invalidParams.Len() > 0 {
  6998. return invalidParams
  6999. }
  7000. return nil
  7001. }
  7002. type DeleteClientCertificateOutput struct {
  7003. _ struct{} `type:"structure"`
  7004. }
  7005. // String returns the string representation
  7006. func (s DeleteClientCertificateOutput) String() string {
  7007. return awsutil.Prettify(s)
  7008. }
  7009. // GoString returns the string representation
  7010. func (s DeleteClientCertificateOutput) GoString() string {
  7011. return s.String()
  7012. }
  7013. // Requests Amazon API Gateway to delete a Deployment resource.
  7014. type DeleteDeploymentInput struct {
  7015. _ struct{} `type:"structure"`
  7016. // The identifier of the Deployment resource to delete.
  7017. //
  7018. // DeploymentId is a required field
  7019. DeploymentId *string `location:"uri" locationName:"deployment_id" type:"string" required:"true"`
  7020. // The identifier of the RestApi resource for the Deployment resource to delete.
  7021. //
  7022. // RestApiId is a required field
  7023. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  7024. }
  7025. // String returns the string representation
  7026. func (s DeleteDeploymentInput) String() string {
  7027. return awsutil.Prettify(s)
  7028. }
  7029. // GoString returns the string representation
  7030. func (s DeleteDeploymentInput) GoString() string {
  7031. return s.String()
  7032. }
  7033. // Validate inspects the fields of the type to determine if they are valid.
  7034. func (s *DeleteDeploymentInput) Validate() error {
  7035. invalidParams := request.ErrInvalidParams{Context: "DeleteDeploymentInput"}
  7036. if s.DeploymentId == nil {
  7037. invalidParams.Add(request.NewErrParamRequired("DeploymentId"))
  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. type DeleteDeploymentOutput struct {
  7048. _ struct{} `type:"structure"`
  7049. }
  7050. // String returns the string representation
  7051. func (s DeleteDeploymentOutput) String() string {
  7052. return awsutil.Prettify(s)
  7053. }
  7054. // GoString returns the string representation
  7055. func (s DeleteDeploymentOutput) GoString() string {
  7056. return s.String()
  7057. }
  7058. // A request to delete the DomainName resource.
  7059. type DeleteDomainNameInput struct {
  7060. _ struct{} `type:"structure"`
  7061. // The name of the DomainName resource to be deleted.
  7062. //
  7063. // DomainName is a required field
  7064. DomainName *string `location:"uri" locationName:"domain_name" type:"string" required:"true"`
  7065. }
  7066. // String returns the string representation
  7067. func (s DeleteDomainNameInput) String() string {
  7068. return awsutil.Prettify(s)
  7069. }
  7070. // GoString returns the string representation
  7071. func (s DeleteDomainNameInput) GoString() string {
  7072. return s.String()
  7073. }
  7074. // Validate inspects the fields of the type to determine if they are valid.
  7075. func (s *DeleteDomainNameInput) Validate() error {
  7076. invalidParams := request.ErrInvalidParams{Context: "DeleteDomainNameInput"}
  7077. if s.DomainName == nil {
  7078. invalidParams.Add(request.NewErrParamRequired("DomainName"))
  7079. }
  7080. if invalidParams.Len() > 0 {
  7081. return invalidParams
  7082. }
  7083. return nil
  7084. }
  7085. type DeleteDomainNameOutput struct {
  7086. _ struct{} `type:"structure"`
  7087. }
  7088. // String returns the string representation
  7089. func (s DeleteDomainNameOutput) String() string {
  7090. return awsutil.Prettify(s)
  7091. }
  7092. // GoString returns the string representation
  7093. func (s DeleteDomainNameOutput) GoString() string {
  7094. return s.String()
  7095. }
  7096. // Represents a delete integration request.
  7097. type DeleteIntegrationInput struct {
  7098. _ struct{} `type:"structure"`
  7099. // Specifies a delete integration request's HTTP method.
  7100. //
  7101. // HttpMethod is a required field
  7102. HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"`
  7103. // Specifies a delete integration request's resource identifier.
  7104. //
  7105. // ResourceId is a required field
  7106. ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"`
  7107. // Specifies a delete integration request's API identifier.
  7108. //
  7109. // RestApiId is a required field
  7110. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  7111. }
  7112. // String returns the string representation
  7113. func (s DeleteIntegrationInput) String() string {
  7114. return awsutil.Prettify(s)
  7115. }
  7116. // GoString returns the string representation
  7117. func (s DeleteIntegrationInput) GoString() string {
  7118. return s.String()
  7119. }
  7120. // Validate inspects the fields of the type to determine if they are valid.
  7121. func (s *DeleteIntegrationInput) Validate() error {
  7122. invalidParams := request.ErrInvalidParams{Context: "DeleteIntegrationInput"}
  7123. if s.HttpMethod == nil {
  7124. invalidParams.Add(request.NewErrParamRequired("HttpMethod"))
  7125. }
  7126. if s.ResourceId == nil {
  7127. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  7128. }
  7129. if s.RestApiId == nil {
  7130. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  7131. }
  7132. if invalidParams.Len() > 0 {
  7133. return invalidParams
  7134. }
  7135. return nil
  7136. }
  7137. type DeleteIntegrationOutput struct {
  7138. _ struct{} `type:"structure"`
  7139. }
  7140. // String returns the string representation
  7141. func (s DeleteIntegrationOutput) String() string {
  7142. return awsutil.Prettify(s)
  7143. }
  7144. // GoString returns the string representation
  7145. func (s DeleteIntegrationOutput) GoString() string {
  7146. return s.String()
  7147. }
  7148. // Represents a delete integration response request.
  7149. type DeleteIntegrationResponseInput struct {
  7150. _ struct{} `type:"structure"`
  7151. // Specifies a delete integration response request's HTTP method.
  7152. //
  7153. // HttpMethod is a required field
  7154. HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"`
  7155. // Specifies a delete integration response request's resource identifier.
  7156. //
  7157. // ResourceId is a required field
  7158. ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"`
  7159. // Specifies a delete integration response request's API identifier.
  7160. //
  7161. // RestApiId is a required field
  7162. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  7163. // Specifies a delete integration response request's status code.
  7164. //
  7165. // StatusCode is a required field
  7166. StatusCode *string `location:"uri" locationName:"status_code" type:"string" required:"true"`
  7167. }
  7168. // String returns the string representation
  7169. func (s DeleteIntegrationResponseInput) String() string {
  7170. return awsutil.Prettify(s)
  7171. }
  7172. // GoString returns the string representation
  7173. func (s DeleteIntegrationResponseInput) GoString() string {
  7174. return s.String()
  7175. }
  7176. // Validate inspects the fields of the type to determine if they are valid.
  7177. func (s *DeleteIntegrationResponseInput) Validate() error {
  7178. invalidParams := request.ErrInvalidParams{Context: "DeleteIntegrationResponseInput"}
  7179. if s.HttpMethod == nil {
  7180. invalidParams.Add(request.NewErrParamRequired("HttpMethod"))
  7181. }
  7182. if s.ResourceId == nil {
  7183. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  7184. }
  7185. if s.RestApiId == nil {
  7186. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  7187. }
  7188. if s.StatusCode == nil {
  7189. invalidParams.Add(request.NewErrParamRequired("StatusCode"))
  7190. }
  7191. if invalidParams.Len() > 0 {
  7192. return invalidParams
  7193. }
  7194. return nil
  7195. }
  7196. type DeleteIntegrationResponseOutput struct {
  7197. _ struct{} `type:"structure"`
  7198. }
  7199. // String returns the string representation
  7200. func (s DeleteIntegrationResponseOutput) String() string {
  7201. return awsutil.Prettify(s)
  7202. }
  7203. // GoString returns the string representation
  7204. func (s DeleteIntegrationResponseOutput) GoString() string {
  7205. return s.String()
  7206. }
  7207. // Request to delete an existing Method resource.
  7208. type DeleteMethodInput struct {
  7209. _ struct{} `type:"structure"`
  7210. // The HTTP verb of the Method resource.
  7211. //
  7212. // HttpMethod is a required field
  7213. HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"`
  7214. // The Resource identifier for the Method resource.
  7215. //
  7216. // ResourceId is a required field
  7217. ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"`
  7218. // The RestApi identifier for the Method resource.
  7219. //
  7220. // RestApiId is a required field
  7221. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  7222. }
  7223. // String returns the string representation
  7224. func (s DeleteMethodInput) String() string {
  7225. return awsutil.Prettify(s)
  7226. }
  7227. // GoString returns the string representation
  7228. func (s DeleteMethodInput) GoString() string {
  7229. return s.String()
  7230. }
  7231. // Validate inspects the fields of the type to determine if they are valid.
  7232. func (s *DeleteMethodInput) Validate() error {
  7233. invalidParams := request.ErrInvalidParams{Context: "DeleteMethodInput"}
  7234. if s.HttpMethod == nil {
  7235. invalidParams.Add(request.NewErrParamRequired("HttpMethod"))
  7236. }
  7237. if s.ResourceId == nil {
  7238. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  7239. }
  7240. if s.RestApiId == nil {
  7241. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  7242. }
  7243. if invalidParams.Len() > 0 {
  7244. return invalidParams
  7245. }
  7246. return nil
  7247. }
  7248. type DeleteMethodOutput struct {
  7249. _ struct{} `type:"structure"`
  7250. }
  7251. // String returns the string representation
  7252. func (s DeleteMethodOutput) String() string {
  7253. return awsutil.Prettify(s)
  7254. }
  7255. // GoString returns the string representation
  7256. func (s DeleteMethodOutput) GoString() string {
  7257. return s.String()
  7258. }
  7259. // A request to delete an existing MethodResponse resource.
  7260. type DeleteMethodResponseInput struct {
  7261. _ struct{} `type:"structure"`
  7262. // The HTTP verb of the Method resource.
  7263. //
  7264. // HttpMethod is a required field
  7265. HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"`
  7266. // The Resource identifier for the MethodResponse resource.
  7267. //
  7268. // ResourceId is a required field
  7269. ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"`
  7270. // The RestApi identifier for the MethodResponse resource.
  7271. //
  7272. // RestApiId is a required field
  7273. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  7274. // The status code identifier for the MethodResponse resource.
  7275. //
  7276. // StatusCode is a required field
  7277. StatusCode *string `location:"uri" locationName:"status_code" type:"string" required:"true"`
  7278. }
  7279. // String returns the string representation
  7280. func (s DeleteMethodResponseInput) String() string {
  7281. return awsutil.Prettify(s)
  7282. }
  7283. // GoString returns the string representation
  7284. func (s DeleteMethodResponseInput) GoString() string {
  7285. return s.String()
  7286. }
  7287. // Validate inspects the fields of the type to determine if they are valid.
  7288. func (s *DeleteMethodResponseInput) Validate() error {
  7289. invalidParams := request.ErrInvalidParams{Context: "DeleteMethodResponseInput"}
  7290. if s.HttpMethod == nil {
  7291. invalidParams.Add(request.NewErrParamRequired("HttpMethod"))
  7292. }
  7293. if s.ResourceId == nil {
  7294. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  7295. }
  7296. if s.RestApiId == nil {
  7297. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  7298. }
  7299. if s.StatusCode == nil {
  7300. invalidParams.Add(request.NewErrParamRequired("StatusCode"))
  7301. }
  7302. if invalidParams.Len() > 0 {
  7303. return invalidParams
  7304. }
  7305. return nil
  7306. }
  7307. type DeleteMethodResponseOutput struct {
  7308. _ struct{} `type:"structure"`
  7309. }
  7310. // String returns the string representation
  7311. func (s DeleteMethodResponseOutput) String() string {
  7312. return awsutil.Prettify(s)
  7313. }
  7314. // GoString returns the string representation
  7315. func (s DeleteMethodResponseOutput) GoString() string {
  7316. return s.String()
  7317. }
  7318. // Request to delete an existing model in an existing RestApi resource.
  7319. type DeleteModelInput struct {
  7320. _ struct{} `type:"structure"`
  7321. // The name of the model to delete.
  7322. //
  7323. // ModelName is a required field
  7324. ModelName *string `location:"uri" locationName:"model_name" type:"string" required:"true"`
  7325. // The RestApi under which the model will be deleted.
  7326. //
  7327. // RestApiId is a required field
  7328. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  7329. }
  7330. // String returns the string representation
  7331. func (s DeleteModelInput) String() string {
  7332. return awsutil.Prettify(s)
  7333. }
  7334. // GoString returns the string representation
  7335. func (s DeleteModelInput) GoString() string {
  7336. return s.String()
  7337. }
  7338. // Validate inspects the fields of the type to determine if they are valid.
  7339. func (s *DeleteModelInput) Validate() error {
  7340. invalidParams := request.ErrInvalidParams{Context: "DeleteModelInput"}
  7341. if s.ModelName == nil {
  7342. invalidParams.Add(request.NewErrParamRequired("ModelName"))
  7343. }
  7344. if s.RestApiId == nil {
  7345. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  7346. }
  7347. if invalidParams.Len() > 0 {
  7348. return invalidParams
  7349. }
  7350. return nil
  7351. }
  7352. type DeleteModelOutput struct {
  7353. _ struct{} `type:"structure"`
  7354. }
  7355. // String returns the string representation
  7356. func (s DeleteModelOutput) String() string {
  7357. return awsutil.Prettify(s)
  7358. }
  7359. // GoString returns the string representation
  7360. func (s DeleteModelOutput) GoString() string {
  7361. return s.String()
  7362. }
  7363. // Request to delete a Resource.
  7364. type DeleteResourceInput struct {
  7365. _ struct{} `type:"structure"`
  7366. // The identifier of the Resource resource.
  7367. //
  7368. // ResourceId is a required field
  7369. ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"`
  7370. // The RestApi identifier for the Resource resource.
  7371. //
  7372. // RestApiId is a required field
  7373. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  7374. }
  7375. // String returns the string representation
  7376. func (s DeleteResourceInput) String() string {
  7377. return awsutil.Prettify(s)
  7378. }
  7379. // GoString returns the string representation
  7380. func (s DeleteResourceInput) GoString() string {
  7381. return s.String()
  7382. }
  7383. // Validate inspects the fields of the type to determine if they are valid.
  7384. func (s *DeleteResourceInput) Validate() error {
  7385. invalidParams := request.ErrInvalidParams{Context: "DeleteResourceInput"}
  7386. if s.ResourceId == nil {
  7387. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  7388. }
  7389. if s.RestApiId == nil {
  7390. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  7391. }
  7392. if invalidParams.Len() > 0 {
  7393. return invalidParams
  7394. }
  7395. return nil
  7396. }
  7397. type DeleteResourceOutput struct {
  7398. _ struct{} `type:"structure"`
  7399. }
  7400. // String returns the string representation
  7401. func (s DeleteResourceOutput) String() string {
  7402. return awsutil.Prettify(s)
  7403. }
  7404. // GoString returns the string representation
  7405. func (s DeleteResourceOutput) GoString() string {
  7406. return s.String()
  7407. }
  7408. // Request to delete the specified API from your collection.
  7409. type DeleteRestApiInput struct {
  7410. _ struct{} `type:"structure"`
  7411. // The ID of the RestApi you want to delete.
  7412. //
  7413. // RestApiId is a required field
  7414. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  7415. }
  7416. // String returns the string representation
  7417. func (s DeleteRestApiInput) String() string {
  7418. return awsutil.Prettify(s)
  7419. }
  7420. // GoString returns the string representation
  7421. func (s DeleteRestApiInput) GoString() string {
  7422. return s.String()
  7423. }
  7424. // Validate inspects the fields of the type to determine if they are valid.
  7425. func (s *DeleteRestApiInput) Validate() error {
  7426. invalidParams := request.ErrInvalidParams{Context: "DeleteRestApiInput"}
  7427. if s.RestApiId == nil {
  7428. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  7429. }
  7430. if invalidParams.Len() > 0 {
  7431. return invalidParams
  7432. }
  7433. return nil
  7434. }
  7435. type DeleteRestApiOutput struct {
  7436. _ struct{} `type:"structure"`
  7437. }
  7438. // String returns the string representation
  7439. func (s DeleteRestApiOutput) String() string {
  7440. return awsutil.Prettify(s)
  7441. }
  7442. // GoString returns the string representation
  7443. func (s DeleteRestApiOutput) GoString() string {
  7444. return s.String()
  7445. }
  7446. // Requests Amazon API Gateway to delete a Stage resource.
  7447. type DeleteStageInput struct {
  7448. _ struct{} `type:"structure"`
  7449. // The identifier of the RestApi resource for the Stage resource to delete.
  7450. //
  7451. // RestApiId is a required field
  7452. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  7453. // The name of the Stage resource to delete.
  7454. //
  7455. // StageName is a required field
  7456. StageName *string `location:"uri" locationName:"stage_name" type:"string" required:"true"`
  7457. }
  7458. // String returns the string representation
  7459. func (s DeleteStageInput) String() string {
  7460. return awsutil.Prettify(s)
  7461. }
  7462. // GoString returns the string representation
  7463. func (s DeleteStageInput) GoString() string {
  7464. return s.String()
  7465. }
  7466. // Validate inspects the fields of the type to determine if they are valid.
  7467. func (s *DeleteStageInput) Validate() error {
  7468. invalidParams := request.ErrInvalidParams{Context: "DeleteStageInput"}
  7469. if s.RestApiId == nil {
  7470. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  7471. }
  7472. if s.StageName == nil {
  7473. invalidParams.Add(request.NewErrParamRequired("StageName"))
  7474. }
  7475. if invalidParams.Len() > 0 {
  7476. return invalidParams
  7477. }
  7478. return nil
  7479. }
  7480. type DeleteStageOutput struct {
  7481. _ struct{} `type:"structure"`
  7482. }
  7483. // String returns the string representation
  7484. func (s DeleteStageOutput) String() string {
  7485. return awsutil.Prettify(s)
  7486. }
  7487. // GoString returns the string representation
  7488. func (s DeleteStageOutput) GoString() string {
  7489. return s.String()
  7490. }
  7491. // The DELETE request to delete a uasge plan of a given plan Id.
  7492. type DeleteUsagePlanInput struct {
  7493. _ struct{} `type:"structure"`
  7494. // The Id of the to-be-deleted usage plan.
  7495. //
  7496. // UsagePlanId is a required field
  7497. UsagePlanId *string `location:"uri" locationName:"usageplanId" type:"string" required:"true"`
  7498. }
  7499. // String returns the string representation
  7500. func (s DeleteUsagePlanInput) String() string {
  7501. return awsutil.Prettify(s)
  7502. }
  7503. // GoString returns the string representation
  7504. func (s DeleteUsagePlanInput) GoString() string {
  7505. return s.String()
  7506. }
  7507. // Validate inspects the fields of the type to determine if they are valid.
  7508. func (s *DeleteUsagePlanInput) Validate() error {
  7509. invalidParams := request.ErrInvalidParams{Context: "DeleteUsagePlanInput"}
  7510. if s.UsagePlanId == nil {
  7511. invalidParams.Add(request.NewErrParamRequired("UsagePlanId"))
  7512. }
  7513. if invalidParams.Len() > 0 {
  7514. return invalidParams
  7515. }
  7516. return nil
  7517. }
  7518. // The DELETE request to delete a usage plan key and remove the underlying API
  7519. // key from the associated usage plan.
  7520. type DeleteUsagePlanKeyInput struct {
  7521. _ struct{} `type:"structure"`
  7522. // The Id of the UsagePlanKey resource to be deleted.
  7523. //
  7524. // KeyId is a required field
  7525. KeyId *string `location:"uri" locationName:"keyId" type:"string" required:"true"`
  7526. // The Id of the UsagePlan resource representing the usage plan containing the
  7527. // to-be-deleted UsagePlanKey resource representing a plan customer.
  7528. //
  7529. // UsagePlanId is a required field
  7530. UsagePlanId *string `location:"uri" locationName:"usageplanId" type:"string" required:"true"`
  7531. }
  7532. // String returns the string representation
  7533. func (s DeleteUsagePlanKeyInput) String() string {
  7534. return awsutil.Prettify(s)
  7535. }
  7536. // GoString returns the string representation
  7537. func (s DeleteUsagePlanKeyInput) GoString() string {
  7538. return s.String()
  7539. }
  7540. // Validate inspects the fields of the type to determine if they are valid.
  7541. func (s *DeleteUsagePlanKeyInput) Validate() error {
  7542. invalidParams := request.ErrInvalidParams{Context: "DeleteUsagePlanKeyInput"}
  7543. if s.KeyId == nil {
  7544. invalidParams.Add(request.NewErrParamRequired("KeyId"))
  7545. }
  7546. if s.UsagePlanId == nil {
  7547. invalidParams.Add(request.NewErrParamRequired("UsagePlanId"))
  7548. }
  7549. if invalidParams.Len() > 0 {
  7550. return invalidParams
  7551. }
  7552. return nil
  7553. }
  7554. type DeleteUsagePlanKeyOutput struct {
  7555. _ struct{} `type:"structure"`
  7556. }
  7557. // String returns the string representation
  7558. func (s DeleteUsagePlanKeyOutput) String() string {
  7559. return awsutil.Prettify(s)
  7560. }
  7561. // GoString returns the string representation
  7562. func (s DeleteUsagePlanKeyOutput) GoString() string {
  7563. return s.String()
  7564. }
  7565. type DeleteUsagePlanOutput struct {
  7566. _ struct{} `type:"structure"`
  7567. }
  7568. // String returns the string representation
  7569. func (s DeleteUsagePlanOutput) String() string {
  7570. return awsutil.Prettify(s)
  7571. }
  7572. // GoString returns the string representation
  7573. func (s DeleteUsagePlanOutput) GoString() string {
  7574. return s.String()
  7575. }
  7576. // An immutable representation of a RestApi resource that can be called by users
  7577. // using Stages. A deployment must be associated with a Stage for it to be callable
  7578. // over the Internet.
  7579. //
  7580. // To create a deployment, call POST on the Deployments resource of a RestApi.
  7581. // To view, update, or delete a deployment, call GET, PATCH, or DELETE on the
  7582. // specified deployment resource (/restapis/{restapi_id}/deployments/{deployment_id}).
  7583. //
  7584. // RestApi, Deployments, Stage, AWS CLI (http://docs.aws.amazon.com/cli/latest/reference/apigateway/get-deployment.html),
  7585. // AWS SDKs (https://aws.amazon.com/tools/)
  7586. type Deployment struct {
  7587. _ struct{} `type:"structure"`
  7588. // A summary of the RestApi at the date and time that the deployment resource
  7589. // was created.
  7590. ApiSummary map[string]map[string]*MethodSnapshot `locationName:"apiSummary" type:"map"`
  7591. // The date and time that the deployment resource was created.
  7592. CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"`
  7593. // The description for the deployment resource.
  7594. Description *string `locationName:"description" type:"string"`
  7595. // The identifier for the deployment resource.
  7596. Id *string `locationName:"id" type:"string"`
  7597. }
  7598. // String returns the string representation
  7599. func (s Deployment) String() string {
  7600. return awsutil.Prettify(s)
  7601. }
  7602. // GoString returns the string representation
  7603. func (s Deployment) GoString() string {
  7604. return s.String()
  7605. }
  7606. // Represents a domain name that is contained in a simpler, more intuitive URL
  7607. // that can be called.
  7608. //
  7609. // Use Client-Side Certificate (http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html)
  7610. type DomainName struct {
  7611. _ struct{} `type:"structure"`
  7612. // The name of the certificate.
  7613. CertificateName *string `locationName:"certificateName" type:"string"`
  7614. // The date when the certificate was uploaded, in ISO 8601 format (http://www.iso.org/iso/home/standards/iso8601.htm).
  7615. CertificateUploadDate *time.Time `locationName:"certificateUploadDate" type:"timestamp" timestampFormat:"unix"`
  7616. // The domain name of the Amazon CloudFront distribution. For more information,
  7617. // see the Amazon CloudFront documentation (http://aws.amazon.com/documentation/cloudfront/).
  7618. DistributionDomainName *string `locationName:"distributionDomainName" type:"string"`
  7619. // The name of the DomainName resource.
  7620. DomainName *string `locationName:"domainName" type:"string"`
  7621. }
  7622. // String returns the string representation
  7623. func (s DomainName) String() string {
  7624. return awsutil.Prettify(s)
  7625. }
  7626. // GoString returns the string representation
  7627. func (s DomainName) GoString() string {
  7628. return s.String()
  7629. }
  7630. // Request to flush authorizer cache entries on a specified stage.
  7631. type FlushStageAuthorizersCacheInput struct {
  7632. _ struct{} `type:"structure"`
  7633. // The API identifier of the stage to flush.
  7634. //
  7635. // RestApiId is a required field
  7636. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  7637. // The name of the stage to flush.
  7638. //
  7639. // StageName is a required field
  7640. StageName *string `location:"uri" locationName:"stage_name" type:"string" required:"true"`
  7641. }
  7642. // String returns the string representation
  7643. func (s FlushStageAuthorizersCacheInput) String() string {
  7644. return awsutil.Prettify(s)
  7645. }
  7646. // GoString returns the string representation
  7647. func (s FlushStageAuthorizersCacheInput) GoString() string {
  7648. return s.String()
  7649. }
  7650. // Validate inspects the fields of the type to determine if they are valid.
  7651. func (s *FlushStageAuthorizersCacheInput) Validate() error {
  7652. invalidParams := request.ErrInvalidParams{Context: "FlushStageAuthorizersCacheInput"}
  7653. if s.RestApiId == nil {
  7654. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  7655. }
  7656. if s.StageName == nil {
  7657. invalidParams.Add(request.NewErrParamRequired("StageName"))
  7658. }
  7659. if invalidParams.Len() > 0 {
  7660. return invalidParams
  7661. }
  7662. return nil
  7663. }
  7664. type FlushStageAuthorizersCacheOutput struct {
  7665. _ struct{} `type:"structure"`
  7666. }
  7667. // String returns the string representation
  7668. func (s FlushStageAuthorizersCacheOutput) String() string {
  7669. return awsutil.Prettify(s)
  7670. }
  7671. // GoString returns the string representation
  7672. func (s FlushStageAuthorizersCacheOutput) GoString() string {
  7673. return s.String()
  7674. }
  7675. // Requests Amazon API Gateway to flush a stage's cache.
  7676. type FlushStageCacheInput struct {
  7677. _ struct{} `type:"structure"`
  7678. // The API identifier of the stage to flush its cache.
  7679. //
  7680. // RestApiId is a required field
  7681. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  7682. // The name of the stage to flush its cache.
  7683. //
  7684. // StageName is a required field
  7685. StageName *string `location:"uri" locationName:"stage_name" type:"string" required:"true"`
  7686. }
  7687. // String returns the string representation
  7688. func (s FlushStageCacheInput) String() string {
  7689. return awsutil.Prettify(s)
  7690. }
  7691. // GoString returns the string representation
  7692. func (s FlushStageCacheInput) GoString() string {
  7693. return s.String()
  7694. }
  7695. // Validate inspects the fields of the type to determine if they are valid.
  7696. func (s *FlushStageCacheInput) Validate() error {
  7697. invalidParams := request.ErrInvalidParams{Context: "FlushStageCacheInput"}
  7698. if s.RestApiId == nil {
  7699. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  7700. }
  7701. if s.StageName == nil {
  7702. invalidParams.Add(request.NewErrParamRequired("StageName"))
  7703. }
  7704. if invalidParams.Len() > 0 {
  7705. return invalidParams
  7706. }
  7707. return nil
  7708. }
  7709. type FlushStageCacheOutput struct {
  7710. _ struct{} `type:"structure"`
  7711. }
  7712. // String returns the string representation
  7713. func (s FlushStageCacheOutput) String() string {
  7714. return awsutil.Prettify(s)
  7715. }
  7716. // GoString returns the string representation
  7717. func (s FlushStageCacheOutput) GoString() string {
  7718. return s.String()
  7719. }
  7720. // A request to generate a ClientCertificate resource.
  7721. type GenerateClientCertificateInput struct {
  7722. _ struct{} `type:"structure"`
  7723. // The description of the ClientCertificate.
  7724. Description *string `locationName:"description" type:"string"`
  7725. }
  7726. // String returns the string representation
  7727. func (s GenerateClientCertificateInput) String() string {
  7728. return awsutil.Prettify(s)
  7729. }
  7730. // GoString returns the string representation
  7731. func (s GenerateClientCertificateInput) GoString() string {
  7732. return s.String()
  7733. }
  7734. // Requests Amazon API Gateway to get information about the current Account
  7735. // resource.
  7736. type GetAccountInput struct {
  7737. _ struct{} `type:"structure"`
  7738. }
  7739. // String returns the string representation
  7740. func (s GetAccountInput) String() string {
  7741. return awsutil.Prettify(s)
  7742. }
  7743. // GoString returns the string representation
  7744. func (s GetAccountInput) GoString() string {
  7745. return s.String()
  7746. }
  7747. // A request to get information about the current ApiKey resource.
  7748. type GetApiKeyInput struct {
  7749. _ struct{} `type:"structure"`
  7750. // The identifier of the ApiKey resource.
  7751. //
  7752. // ApiKey is a required field
  7753. ApiKey *string `location:"uri" locationName:"api_Key" type:"string" required:"true"`
  7754. // A boolean flag to specify whether (true) or not (false) the result contains
  7755. // the key value.
  7756. IncludeValue *bool `location:"querystring" locationName:"includeValue" type:"boolean"`
  7757. }
  7758. // String returns the string representation
  7759. func (s GetApiKeyInput) String() string {
  7760. return awsutil.Prettify(s)
  7761. }
  7762. // GoString returns the string representation
  7763. func (s GetApiKeyInput) GoString() string {
  7764. return s.String()
  7765. }
  7766. // Validate inspects the fields of the type to determine if they are valid.
  7767. func (s *GetApiKeyInput) Validate() error {
  7768. invalidParams := request.ErrInvalidParams{Context: "GetApiKeyInput"}
  7769. if s.ApiKey == nil {
  7770. invalidParams.Add(request.NewErrParamRequired("ApiKey"))
  7771. }
  7772. if invalidParams.Len() > 0 {
  7773. return invalidParams
  7774. }
  7775. return nil
  7776. }
  7777. // A request to get information about the current ApiKeys resource.
  7778. type GetApiKeysInput struct {
  7779. _ struct{} `type:"structure"`
  7780. // A boolean flag to specify whether (true) or not (false) the result contains
  7781. // key values.
  7782. IncludeValues *bool `location:"querystring" locationName:"includeValues" type:"boolean"`
  7783. // The maximum number of ApiKeys to get information about.
  7784. Limit *int64 `location:"querystring" locationName:"limit" type:"integer"`
  7785. // The name of queried API keys.
  7786. NameQuery *string `location:"querystring" locationName:"name" type:"string"`
  7787. // The position of the current ApiKeys resource to get information about.
  7788. Position *string `location:"querystring" locationName:"position" type:"string"`
  7789. }
  7790. // String returns the string representation
  7791. func (s GetApiKeysInput) String() string {
  7792. return awsutil.Prettify(s)
  7793. }
  7794. // GoString returns the string representation
  7795. func (s GetApiKeysInput) GoString() string {
  7796. return s.String()
  7797. }
  7798. // Represents a collection of API keys as represented by an ApiKeys resource.
  7799. //
  7800. // Use API Keys (http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-api-keys.html)
  7801. type GetApiKeysOutput struct {
  7802. _ struct{} `type:"structure"`
  7803. // The current page of any ApiKey resources in the collection of ApiKey resources.
  7804. Items []*ApiKey `locationName:"item" type:"list"`
  7805. Position *string `locationName:"position" type:"string"`
  7806. // A list of warning messages logged during the import of API keys when the
  7807. // failOnWarnings option is set to true.
  7808. Warnings []*string `locationName:"warnings" type:"list"`
  7809. }
  7810. // String returns the string representation
  7811. func (s GetApiKeysOutput) String() string {
  7812. return awsutil.Prettify(s)
  7813. }
  7814. // GoString returns the string representation
  7815. func (s GetApiKeysOutput) GoString() string {
  7816. return s.String()
  7817. }
  7818. // Request to describe an existing Authorizer resource.
  7819. type GetAuthorizerInput struct {
  7820. _ struct{} `type:"structure"`
  7821. // The identifier of the Authorizer resource.
  7822. //
  7823. // AuthorizerId is a required field
  7824. AuthorizerId *string `location:"uri" locationName:"authorizer_id" type:"string" required:"true"`
  7825. // The RestApi identifier for the Authorizer resource.
  7826. //
  7827. // RestApiId is a required field
  7828. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  7829. }
  7830. // String returns the string representation
  7831. func (s GetAuthorizerInput) String() string {
  7832. return awsutil.Prettify(s)
  7833. }
  7834. // GoString returns the string representation
  7835. func (s GetAuthorizerInput) GoString() string {
  7836. return s.String()
  7837. }
  7838. // Validate inspects the fields of the type to determine if they are valid.
  7839. func (s *GetAuthorizerInput) Validate() error {
  7840. invalidParams := request.ErrInvalidParams{Context: "GetAuthorizerInput"}
  7841. if s.AuthorizerId == nil {
  7842. invalidParams.Add(request.NewErrParamRequired("AuthorizerId"))
  7843. }
  7844. if s.RestApiId == nil {
  7845. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  7846. }
  7847. if invalidParams.Len() > 0 {
  7848. return invalidParams
  7849. }
  7850. return nil
  7851. }
  7852. // Request to describe an existing Authorizers resource.
  7853. type GetAuthorizersInput struct {
  7854. _ struct{} `type:"structure"`
  7855. // Limit the number of Authorizer resources in the response.
  7856. Limit *int64 `location:"querystring" locationName:"limit" type:"integer"`
  7857. // If not all Authorizer resources in the response were present, the position
  7858. // will specify where to start the next page of results.
  7859. Position *string `location:"querystring" locationName:"position" type:"string"`
  7860. // The RestApi identifier for the Authorizers resource.
  7861. //
  7862. // RestApiId is a required field
  7863. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  7864. }
  7865. // String returns the string representation
  7866. func (s GetAuthorizersInput) String() string {
  7867. return awsutil.Prettify(s)
  7868. }
  7869. // GoString returns the string representation
  7870. func (s GetAuthorizersInput) GoString() string {
  7871. return s.String()
  7872. }
  7873. // Validate inspects the fields of the type to determine if they are valid.
  7874. func (s *GetAuthorizersInput) Validate() error {
  7875. invalidParams := request.ErrInvalidParams{Context: "GetAuthorizersInput"}
  7876. if s.RestApiId == nil {
  7877. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  7878. }
  7879. if invalidParams.Len() > 0 {
  7880. return invalidParams
  7881. }
  7882. return nil
  7883. }
  7884. // Represents a collection of Authorizer resources.
  7885. //
  7886. // Enable custom authorization (http://docs.aws.amazon.com/apigateway/latest/developerguide/use-custom-authorizer.html)
  7887. type GetAuthorizersOutput struct {
  7888. _ struct{} `type:"structure"`
  7889. // Gets the current list of Authorizer resources in the collection.
  7890. Items []*Authorizer `locationName:"item" type:"list"`
  7891. Position *string `locationName:"position" type:"string"`
  7892. }
  7893. // String returns the string representation
  7894. func (s GetAuthorizersOutput) String() string {
  7895. return awsutil.Prettify(s)
  7896. }
  7897. // GoString returns the string representation
  7898. func (s GetAuthorizersOutput) GoString() string {
  7899. return s.String()
  7900. }
  7901. // Request to describe a BasePathMapping resource.
  7902. type GetBasePathMappingInput struct {
  7903. _ struct{} `type:"structure"`
  7904. // The base path name that callers of the API must provide as part of the URL
  7905. // after the domain name. This value must be unique for all of the mappings
  7906. // across a single API. Leave this blank if you do not want callers to specify
  7907. // any base path name after the domain name.
  7908. //
  7909. // BasePath is a required field
  7910. BasePath *string `location:"uri" locationName:"base_path" type:"string" required:"true"`
  7911. // The domain name of the BasePathMapping resource to be described.
  7912. //
  7913. // DomainName is a required field
  7914. DomainName *string `location:"uri" locationName:"domain_name" type:"string" required:"true"`
  7915. }
  7916. // String returns the string representation
  7917. func (s GetBasePathMappingInput) String() string {
  7918. return awsutil.Prettify(s)
  7919. }
  7920. // GoString returns the string representation
  7921. func (s GetBasePathMappingInput) GoString() string {
  7922. return s.String()
  7923. }
  7924. // Validate inspects the fields of the type to determine if they are valid.
  7925. func (s *GetBasePathMappingInput) Validate() error {
  7926. invalidParams := request.ErrInvalidParams{Context: "GetBasePathMappingInput"}
  7927. if s.BasePath == nil {
  7928. invalidParams.Add(request.NewErrParamRequired("BasePath"))
  7929. }
  7930. if s.DomainName == nil {
  7931. invalidParams.Add(request.NewErrParamRequired("DomainName"))
  7932. }
  7933. if invalidParams.Len() > 0 {
  7934. return invalidParams
  7935. }
  7936. return nil
  7937. }
  7938. // A request to get information about a collection of BasePathMapping resources.
  7939. type GetBasePathMappingsInput struct {
  7940. _ struct{} `type:"structure"`
  7941. // The domain name of a BasePathMapping resource.
  7942. //
  7943. // DomainName is a required field
  7944. DomainName *string `location:"uri" locationName:"domain_name" type:"string" required:"true"`
  7945. // The maximum number of BasePathMapping resources in the collection to get
  7946. // information about. The default limit is 25. It should be an integer between
  7947. // 1 - 500.
  7948. Limit *int64 `location:"querystring" locationName:"limit" type:"integer"`
  7949. // The position of the current BasePathMapping resource in the collection to
  7950. // get information about.
  7951. Position *string `location:"querystring" locationName:"position" type:"string"`
  7952. }
  7953. // String returns the string representation
  7954. func (s GetBasePathMappingsInput) String() string {
  7955. return awsutil.Prettify(s)
  7956. }
  7957. // GoString returns the string representation
  7958. func (s GetBasePathMappingsInput) GoString() string {
  7959. return s.String()
  7960. }
  7961. // Validate inspects the fields of the type to determine if they are valid.
  7962. func (s *GetBasePathMappingsInput) Validate() error {
  7963. invalidParams := request.ErrInvalidParams{Context: "GetBasePathMappingsInput"}
  7964. if s.DomainName == nil {
  7965. invalidParams.Add(request.NewErrParamRequired("DomainName"))
  7966. }
  7967. if invalidParams.Len() > 0 {
  7968. return invalidParams
  7969. }
  7970. return nil
  7971. }
  7972. // Represents a collection of BasePathMapping resources.
  7973. //
  7974. // Use Custom Domain Names (http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html)
  7975. type GetBasePathMappingsOutput struct {
  7976. _ struct{} `type:"structure"`
  7977. // The current page of any BasePathMapping resources in the collection of base
  7978. // path mapping resources.
  7979. Items []*BasePathMapping `locationName:"item" type:"list"`
  7980. Position *string `locationName:"position" type:"string"`
  7981. }
  7982. // String returns the string representation
  7983. func (s GetBasePathMappingsOutput) String() string {
  7984. return awsutil.Prettify(s)
  7985. }
  7986. // GoString returns the string representation
  7987. func (s GetBasePathMappingsOutput) GoString() string {
  7988. return s.String()
  7989. }
  7990. // A request to get information about the current ClientCertificate resource.
  7991. type GetClientCertificateInput struct {
  7992. _ struct{} `type:"structure"`
  7993. // The identifier of the ClientCertificate resource to be described.
  7994. //
  7995. // ClientCertificateId is a required field
  7996. ClientCertificateId *string `location:"uri" locationName:"clientcertificate_id" type:"string" required:"true"`
  7997. }
  7998. // String returns the string representation
  7999. func (s GetClientCertificateInput) String() string {
  8000. return awsutil.Prettify(s)
  8001. }
  8002. // GoString returns the string representation
  8003. func (s GetClientCertificateInput) GoString() string {
  8004. return s.String()
  8005. }
  8006. // Validate inspects the fields of the type to determine if they are valid.
  8007. func (s *GetClientCertificateInput) Validate() error {
  8008. invalidParams := request.ErrInvalidParams{Context: "GetClientCertificateInput"}
  8009. if s.ClientCertificateId == nil {
  8010. invalidParams.Add(request.NewErrParamRequired("ClientCertificateId"))
  8011. }
  8012. if invalidParams.Len() > 0 {
  8013. return invalidParams
  8014. }
  8015. return nil
  8016. }
  8017. // A request to get information about a collection of ClientCertificate resources.
  8018. type GetClientCertificatesInput struct {
  8019. _ struct{} `type:"structure"`
  8020. // The maximum number of ClientCertificate resources in the collection to get
  8021. // information about. The default limit is 25. It should be an integer between
  8022. // 1 - 500.
  8023. Limit *int64 `location:"querystring" locationName:"limit" type:"integer"`
  8024. // The position of the current ClientCertificate resource in the collection
  8025. // to get information about.
  8026. Position *string `location:"querystring" locationName:"position" type:"string"`
  8027. }
  8028. // String returns the string representation
  8029. func (s GetClientCertificatesInput) String() string {
  8030. return awsutil.Prettify(s)
  8031. }
  8032. // GoString returns the string representation
  8033. func (s GetClientCertificatesInput) GoString() string {
  8034. return s.String()
  8035. }
  8036. // Represents a collection of ClientCertificate resources.
  8037. //
  8038. // Use Client-Side Certificate (http://docs.aws.amazon.com/apigateway/latest/developerguide/getting-started-client-side-ssl-authentication.html)
  8039. type GetClientCertificatesOutput struct {
  8040. _ struct{} `type:"structure"`
  8041. // The current page of any ClientCertificate resources in the collection of
  8042. // ClientCertificate resources.
  8043. Items []*ClientCertificate `locationName:"item" type:"list"`
  8044. Position *string `locationName:"position" type:"string"`
  8045. }
  8046. // String returns the string representation
  8047. func (s GetClientCertificatesOutput) String() string {
  8048. return awsutil.Prettify(s)
  8049. }
  8050. // GoString returns the string representation
  8051. func (s GetClientCertificatesOutput) GoString() string {
  8052. return s.String()
  8053. }
  8054. // Requests Amazon API Gateway to get information about a Deployment resource.
  8055. type GetDeploymentInput struct {
  8056. _ struct{} `type:"structure"`
  8057. // The identifier of the Deployment resource to get information about.
  8058. //
  8059. // DeploymentId is a required field
  8060. DeploymentId *string `location:"uri" locationName:"deployment_id" type:"string" required:"true"`
  8061. // The identifier of the RestApi resource for the Deployment resource to get
  8062. // information about.
  8063. //
  8064. // RestApiId is a required field
  8065. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  8066. }
  8067. // String returns the string representation
  8068. func (s GetDeploymentInput) String() string {
  8069. return awsutil.Prettify(s)
  8070. }
  8071. // GoString returns the string representation
  8072. func (s GetDeploymentInput) GoString() string {
  8073. return s.String()
  8074. }
  8075. // Validate inspects the fields of the type to determine if they are valid.
  8076. func (s *GetDeploymentInput) Validate() error {
  8077. invalidParams := request.ErrInvalidParams{Context: "GetDeploymentInput"}
  8078. if s.DeploymentId == nil {
  8079. invalidParams.Add(request.NewErrParamRequired("DeploymentId"))
  8080. }
  8081. if s.RestApiId == nil {
  8082. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  8083. }
  8084. if invalidParams.Len() > 0 {
  8085. return invalidParams
  8086. }
  8087. return nil
  8088. }
  8089. // Requests Amazon API Gateway to get information about a Deployments collection.
  8090. type GetDeploymentsInput struct {
  8091. _ struct{} `type:"structure"`
  8092. // The maximum number of Deployment resources in the collection to get information
  8093. // about. The default limit is 25. It should be an integer between 1 - 500.
  8094. Limit *int64 `location:"querystring" locationName:"limit" type:"integer"`
  8095. // The position of the current Deployment resource in the collection to get
  8096. // information about.
  8097. Position *string `location:"querystring" locationName:"position" type:"string"`
  8098. // The identifier of the RestApi resource for the collection of Deployment resources
  8099. // to get information about.
  8100. //
  8101. // RestApiId is a required field
  8102. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  8103. }
  8104. // String returns the string representation
  8105. func (s GetDeploymentsInput) String() string {
  8106. return awsutil.Prettify(s)
  8107. }
  8108. // GoString returns the string representation
  8109. func (s GetDeploymentsInput) GoString() string {
  8110. return s.String()
  8111. }
  8112. // Validate inspects the fields of the type to determine if they are valid.
  8113. func (s *GetDeploymentsInput) Validate() error {
  8114. invalidParams := request.ErrInvalidParams{Context: "GetDeploymentsInput"}
  8115. if s.RestApiId == nil {
  8116. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  8117. }
  8118. if invalidParams.Len() > 0 {
  8119. return invalidParams
  8120. }
  8121. return nil
  8122. }
  8123. // Represents a collection resource that contains zero or more references to
  8124. // your existing deployments, and links that guide you on how to interact with
  8125. // your collection. The collection offers a paginated view of the contained
  8126. // deployments.
  8127. //
  8128. // To create a new deployment of a RestApi, make a POST request against this
  8129. // resource. To view, update, or delete an existing deployment, make a GET,
  8130. // PATCH, or DELETE request, respectively, on a specified Deployment resource.
  8131. //
  8132. // Deploying an API (http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-deploy-api.html),
  8133. // AWS CLI (http://docs.aws.amazon.com/cli/latest/reference/apigateway/get-deployment.html),
  8134. // AWS SDKs (https://aws.amazon.com/tools/)
  8135. type GetDeploymentsOutput struct {
  8136. _ struct{} `type:"structure"`
  8137. // The current page of any Deployment resources in the collection of deployment
  8138. // resources.
  8139. Items []*Deployment `locationName:"item" type:"list"`
  8140. Position *string `locationName:"position" type:"string"`
  8141. }
  8142. // String returns the string representation
  8143. func (s GetDeploymentsOutput) String() string {
  8144. return awsutil.Prettify(s)
  8145. }
  8146. // GoString returns the string representation
  8147. func (s GetDeploymentsOutput) GoString() string {
  8148. return s.String()
  8149. }
  8150. // Request to get the name of a DomainName resource.
  8151. type GetDomainNameInput struct {
  8152. _ struct{} `type:"structure"`
  8153. // The name of the DomainName resource.
  8154. //
  8155. // DomainName is a required field
  8156. DomainName *string `location:"uri" locationName:"domain_name" type:"string" required:"true"`
  8157. }
  8158. // String returns the string representation
  8159. func (s GetDomainNameInput) String() string {
  8160. return awsutil.Prettify(s)
  8161. }
  8162. // GoString returns the string representation
  8163. func (s GetDomainNameInput) GoString() string {
  8164. return s.String()
  8165. }
  8166. // Validate inspects the fields of the type to determine if they are valid.
  8167. func (s *GetDomainNameInput) Validate() error {
  8168. invalidParams := request.ErrInvalidParams{Context: "GetDomainNameInput"}
  8169. if s.DomainName == nil {
  8170. invalidParams.Add(request.NewErrParamRequired("DomainName"))
  8171. }
  8172. if invalidParams.Len() > 0 {
  8173. return invalidParams
  8174. }
  8175. return nil
  8176. }
  8177. // Request to describe a collection of DomainName resources.
  8178. type GetDomainNamesInput struct {
  8179. _ struct{} `type:"structure"`
  8180. // The maximum number of DomainName resources in the collection to get information
  8181. // about. The default limit is 25. It should be an integer between 1 - 500.
  8182. Limit *int64 `location:"querystring" locationName:"limit" type:"integer"`
  8183. // The position of the current domain names to get information about.
  8184. Position *string `location:"querystring" locationName:"position" type:"string"`
  8185. }
  8186. // String returns the string representation
  8187. func (s GetDomainNamesInput) String() string {
  8188. return awsutil.Prettify(s)
  8189. }
  8190. // GoString returns the string representation
  8191. func (s GetDomainNamesInput) GoString() string {
  8192. return s.String()
  8193. }
  8194. // Represents a collection of DomainName resources.
  8195. //
  8196. // Use Client-Side Certificate (http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html)
  8197. type GetDomainNamesOutput struct {
  8198. _ struct{} `type:"structure"`
  8199. // The current page of any DomainName resources in the collection of DomainName
  8200. // resources.
  8201. Items []*DomainName `locationName:"item" type:"list"`
  8202. Position *string `locationName:"position" type:"string"`
  8203. }
  8204. // String returns the string representation
  8205. func (s GetDomainNamesOutput) String() string {
  8206. return awsutil.Prettify(s)
  8207. }
  8208. // GoString returns the string representation
  8209. func (s GetDomainNamesOutput) GoString() string {
  8210. return s.String()
  8211. }
  8212. // Request a new export of a RestApi for a particular Stage.
  8213. type GetExportInput struct {
  8214. _ struct{} `type:"structure"`
  8215. // The content-type of the export, for example application/json. Currently application/json
  8216. // and application/yaml are supported for exportType of swagger. This should
  8217. // be specified in the Accept header for direct API requests.
  8218. Accepts *string `location:"header" locationName:"Accept" type:"string"`
  8219. // The type of export. Currently only 'swagger' is supported.
  8220. //
  8221. // ExportType is a required field
  8222. ExportType *string `location:"uri" locationName:"export_type" type:"string" required:"true"`
  8223. // A key-value map of query string parameters that specify properties of the
  8224. // export, depending on the requested exportType. For exportTypeswagger, any
  8225. // combination of the following parameters are supported: integrations will
  8226. // export the API with x-amazon-apigateway-integration extensions. authorizers
  8227. // will export the API with x-amazon-apigateway-authorizer extensions. postman
  8228. // will export the API with Postman extensions, allowing for import to the Postman
  8229. // tool
  8230. Parameters map[string]*string `location:"querystring" locationName:"parameters" type:"map"`
  8231. // The identifier of the RestApi to be exported.
  8232. //
  8233. // RestApiId is a required field
  8234. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  8235. // The name of the Stage that will be exported.
  8236. //
  8237. // StageName is a required field
  8238. StageName *string `location:"uri" locationName:"stage_name" type:"string" required:"true"`
  8239. }
  8240. // String returns the string representation
  8241. func (s GetExportInput) String() string {
  8242. return awsutil.Prettify(s)
  8243. }
  8244. // GoString returns the string representation
  8245. func (s GetExportInput) GoString() string {
  8246. return s.String()
  8247. }
  8248. // Validate inspects the fields of the type to determine if they are valid.
  8249. func (s *GetExportInput) Validate() error {
  8250. invalidParams := request.ErrInvalidParams{Context: "GetExportInput"}
  8251. if s.ExportType == nil {
  8252. invalidParams.Add(request.NewErrParamRequired("ExportType"))
  8253. }
  8254. if s.RestApiId == nil {
  8255. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  8256. }
  8257. if s.StageName == nil {
  8258. invalidParams.Add(request.NewErrParamRequired("StageName"))
  8259. }
  8260. if invalidParams.Len() > 0 {
  8261. return invalidParams
  8262. }
  8263. return nil
  8264. }
  8265. // The binary blob response to GetExport, which contains the generated SDK.
  8266. type GetExportOutput struct {
  8267. _ struct{} `type:"structure" payload:"Body"`
  8268. // The binary blob response to GetExport, which contains the export.
  8269. Body []byte `locationName:"body" type:"blob"`
  8270. // The content-disposition header value in the HTTP response.
  8271. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  8272. // The content-type header value in the HTTP response. This will correspond
  8273. // to a valid 'accept' type in the request.
  8274. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  8275. }
  8276. // String returns the string representation
  8277. func (s GetExportOutput) String() string {
  8278. return awsutil.Prettify(s)
  8279. }
  8280. // GoString returns the string representation
  8281. func (s GetExportOutput) GoString() string {
  8282. return s.String()
  8283. }
  8284. // Represents a get integration request.
  8285. type GetIntegrationInput struct {
  8286. _ struct{} `type:"structure"`
  8287. // Specifies a get integration request's HTTP method.
  8288. //
  8289. // HttpMethod is a required field
  8290. HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"`
  8291. // Specifies a get integration request's resource identifier
  8292. //
  8293. // ResourceId is a required field
  8294. ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"`
  8295. // Specifies a get integration request's API identifier.
  8296. //
  8297. // RestApiId is a required field
  8298. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  8299. }
  8300. // String returns the string representation
  8301. func (s GetIntegrationInput) String() string {
  8302. return awsutil.Prettify(s)
  8303. }
  8304. // GoString returns the string representation
  8305. func (s GetIntegrationInput) GoString() string {
  8306. return s.String()
  8307. }
  8308. // Validate inspects the fields of the type to determine if they are valid.
  8309. func (s *GetIntegrationInput) Validate() error {
  8310. invalidParams := request.ErrInvalidParams{Context: "GetIntegrationInput"}
  8311. if s.HttpMethod == nil {
  8312. invalidParams.Add(request.NewErrParamRequired("HttpMethod"))
  8313. }
  8314. if s.ResourceId == nil {
  8315. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  8316. }
  8317. if s.RestApiId == nil {
  8318. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  8319. }
  8320. if invalidParams.Len() > 0 {
  8321. return invalidParams
  8322. }
  8323. return nil
  8324. }
  8325. // Represents a get integration response request.
  8326. type GetIntegrationResponseInput struct {
  8327. _ struct{} `type:"structure"`
  8328. // Specifies a get integration response request's HTTP method.
  8329. //
  8330. // HttpMethod is a required field
  8331. HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"`
  8332. // Specifies a get integration response request's resource identifier.
  8333. //
  8334. // ResourceId is a required field
  8335. ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"`
  8336. // Specifies a get integration response request's API identifier.
  8337. //
  8338. // RestApiId is a required field
  8339. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  8340. // Specifies a get integration response request's status code.
  8341. //
  8342. // StatusCode is a required field
  8343. StatusCode *string `location:"uri" locationName:"status_code" type:"string" required:"true"`
  8344. }
  8345. // String returns the string representation
  8346. func (s GetIntegrationResponseInput) String() string {
  8347. return awsutil.Prettify(s)
  8348. }
  8349. // GoString returns the string representation
  8350. func (s GetIntegrationResponseInput) GoString() string {
  8351. return s.String()
  8352. }
  8353. // Validate inspects the fields of the type to determine if they are valid.
  8354. func (s *GetIntegrationResponseInput) Validate() error {
  8355. invalidParams := request.ErrInvalidParams{Context: "GetIntegrationResponseInput"}
  8356. if s.HttpMethod == nil {
  8357. invalidParams.Add(request.NewErrParamRequired("HttpMethod"))
  8358. }
  8359. if s.ResourceId == nil {
  8360. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  8361. }
  8362. if s.RestApiId == nil {
  8363. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  8364. }
  8365. if s.StatusCode == nil {
  8366. invalidParams.Add(request.NewErrParamRequired("StatusCode"))
  8367. }
  8368. if invalidParams.Len() > 0 {
  8369. return invalidParams
  8370. }
  8371. return nil
  8372. }
  8373. // Request to describe an existing Method resource.
  8374. type GetMethodInput struct {
  8375. _ struct{} `type:"structure"`
  8376. // Specifies the method request's HTTP method type.
  8377. //
  8378. // HttpMethod is a required field
  8379. HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"`
  8380. // The Resource identifier for the Method resource.
  8381. //
  8382. // ResourceId is a required field
  8383. ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"`
  8384. // The RestApi identifier for the Method resource.
  8385. //
  8386. // RestApiId is a required field
  8387. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  8388. }
  8389. // String returns the string representation
  8390. func (s GetMethodInput) String() string {
  8391. return awsutil.Prettify(s)
  8392. }
  8393. // GoString returns the string representation
  8394. func (s GetMethodInput) GoString() string {
  8395. return s.String()
  8396. }
  8397. // Validate inspects the fields of the type to determine if they are valid.
  8398. func (s *GetMethodInput) Validate() error {
  8399. invalidParams := request.ErrInvalidParams{Context: "GetMethodInput"}
  8400. if s.HttpMethod == nil {
  8401. invalidParams.Add(request.NewErrParamRequired("HttpMethod"))
  8402. }
  8403. if s.ResourceId == nil {
  8404. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  8405. }
  8406. if s.RestApiId == nil {
  8407. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  8408. }
  8409. if invalidParams.Len() > 0 {
  8410. return invalidParams
  8411. }
  8412. return nil
  8413. }
  8414. // Request to describe a MethodResponse resource.
  8415. type GetMethodResponseInput struct {
  8416. _ struct{} `type:"structure"`
  8417. // The HTTP verb of the Method resource.
  8418. //
  8419. // HttpMethod is a required field
  8420. HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"`
  8421. // The Resource identifier for the MethodResponse resource.
  8422. //
  8423. // ResourceId is a required field
  8424. ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"`
  8425. // The RestApi identifier for the MethodResponse resource.
  8426. //
  8427. // RestApiId is a required field
  8428. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  8429. // The status code for the MethodResponse resource.
  8430. //
  8431. // StatusCode is a required field
  8432. StatusCode *string `location:"uri" locationName:"status_code" type:"string" required:"true"`
  8433. }
  8434. // String returns the string representation
  8435. func (s GetMethodResponseInput) String() string {
  8436. return awsutil.Prettify(s)
  8437. }
  8438. // GoString returns the string representation
  8439. func (s GetMethodResponseInput) GoString() string {
  8440. return s.String()
  8441. }
  8442. // Validate inspects the fields of the type to determine if they are valid.
  8443. func (s *GetMethodResponseInput) Validate() error {
  8444. invalidParams := request.ErrInvalidParams{Context: "GetMethodResponseInput"}
  8445. if s.HttpMethod == nil {
  8446. invalidParams.Add(request.NewErrParamRequired("HttpMethod"))
  8447. }
  8448. if s.ResourceId == nil {
  8449. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  8450. }
  8451. if s.RestApiId == nil {
  8452. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  8453. }
  8454. if s.StatusCode == nil {
  8455. invalidParams.Add(request.NewErrParamRequired("StatusCode"))
  8456. }
  8457. if invalidParams.Len() > 0 {
  8458. return invalidParams
  8459. }
  8460. return nil
  8461. }
  8462. // Request to list information about a model in an existing RestApi resource.
  8463. type GetModelInput struct {
  8464. _ struct{} `type:"structure"`
  8465. // A query parameter of a Boolean value to resolve (true) all external model
  8466. // references and returns a flattened model schema or not (false) The default
  8467. // is false.
  8468. Flatten *bool `location:"querystring" locationName:"flatten" type:"boolean"`
  8469. // The name of the model as an identifier.
  8470. //
  8471. // ModelName is a required field
  8472. ModelName *string `location:"uri" locationName:"model_name" type:"string" required:"true"`
  8473. // The RestApi identifier under which the Model exists.
  8474. //
  8475. // RestApiId is a required field
  8476. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  8477. }
  8478. // String returns the string representation
  8479. func (s GetModelInput) String() string {
  8480. return awsutil.Prettify(s)
  8481. }
  8482. // GoString returns the string representation
  8483. func (s GetModelInput) GoString() string {
  8484. return s.String()
  8485. }
  8486. // Validate inspects the fields of the type to determine if they are valid.
  8487. func (s *GetModelInput) Validate() error {
  8488. invalidParams := request.ErrInvalidParams{Context: "GetModelInput"}
  8489. if s.ModelName == nil {
  8490. invalidParams.Add(request.NewErrParamRequired("ModelName"))
  8491. }
  8492. if s.RestApiId == nil {
  8493. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  8494. }
  8495. if invalidParams.Len() > 0 {
  8496. return invalidParams
  8497. }
  8498. return nil
  8499. }
  8500. // Request to generate a sample mapping template used to transform the payload.
  8501. type GetModelTemplateInput struct {
  8502. _ struct{} `type:"structure"`
  8503. // The name of the model for which to generate a template.
  8504. //
  8505. // ModelName is a required field
  8506. ModelName *string `location:"uri" locationName:"model_name" type:"string" required:"true"`
  8507. // The ID of the RestApi under which the model exists.
  8508. //
  8509. // RestApiId is a required field
  8510. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  8511. }
  8512. // String returns the string representation
  8513. func (s GetModelTemplateInput) String() string {
  8514. return awsutil.Prettify(s)
  8515. }
  8516. // GoString returns the string representation
  8517. func (s GetModelTemplateInput) GoString() string {
  8518. return s.String()
  8519. }
  8520. // Validate inspects the fields of the type to determine if they are valid.
  8521. func (s *GetModelTemplateInput) Validate() error {
  8522. invalidParams := request.ErrInvalidParams{Context: "GetModelTemplateInput"}
  8523. if s.ModelName == nil {
  8524. invalidParams.Add(request.NewErrParamRequired("ModelName"))
  8525. }
  8526. if s.RestApiId == nil {
  8527. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  8528. }
  8529. if invalidParams.Len() > 0 {
  8530. return invalidParams
  8531. }
  8532. return nil
  8533. }
  8534. // Represents a mapping template used to transform a payload.
  8535. //
  8536. // Mapping Templates (http://docs.aws.amazon.com/apigateway/latest/developerguide/models-mappings.html#models-mappings-mappings)
  8537. type GetModelTemplateOutput struct {
  8538. _ struct{} `type:"structure"`
  8539. // The Apache Velocity Template Language (VTL) (http://velocity.apache.org/engine/devel/vtl-reference-guide.html)
  8540. // template content used for the template resource.
  8541. Value *string `locationName:"value" type:"string"`
  8542. }
  8543. // String returns the string representation
  8544. func (s GetModelTemplateOutput) String() string {
  8545. return awsutil.Prettify(s)
  8546. }
  8547. // GoString returns the string representation
  8548. func (s GetModelTemplateOutput) GoString() string {
  8549. return s.String()
  8550. }
  8551. // Request to list existing Models defined for a RestApi resource.
  8552. type GetModelsInput struct {
  8553. _ struct{} `type:"structure"`
  8554. // The maximum number of models in the collection to get information about.
  8555. // The default limit is 25. It should be an integer between 1 - 500.
  8556. Limit *int64 `location:"querystring" locationName:"limit" type:"integer"`
  8557. // The position of the next set of results in the Models resource to get information
  8558. // about.
  8559. Position *string `location:"querystring" locationName:"position" type:"string"`
  8560. // The RestApi identifier.
  8561. //
  8562. // RestApiId is a required field
  8563. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  8564. }
  8565. // String returns the string representation
  8566. func (s GetModelsInput) String() string {
  8567. return awsutil.Prettify(s)
  8568. }
  8569. // GoString returns the string representation
  8570. func (s GetModelsInput) GoString() string {
  8571. return s.String()
  8572. }
  8573. // Validate inspects the fields of the type to determine if they are valid.
  8574. func (s *GetModelsInput) Validate() error {
  8575. invalidParams := request.ErrInvalidParams{Context: "GetModelsInput"}
  8576. if s.RestApiId == nil {
  8577. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  8578. }
  8579. if invalidParams.Len() > 0 {
  8580. return invalidParams
  8581. }
  8582. return nil
  8583. }
  8584. // Represents a collection of Model resources.
  8585. //
  8586. // Method, MethodResponse, Models and Mappings (http://docs.aws.amazon.com/apigateway/latest/developerguide/models-mappings.html)
  8587. type GetModelsOutput struct {
  8588. _ struct{} `type:"structure"`
  8589. // Gets the current Model resource in the collection.
  8590. Items []*Model `locationName:"item" type:"list"`
  8591. Position *string `locationName:"position" type:"string"`
  8592. }
  8593. // String returns the string representation
  8594. func (s GetModelsOutput) String() string {
  8595. return awsutil.Prettify(s)
  8596. }
  8597. // GoString returns the string representation
  8598. func (s GetModelsOutput) GoString() string {
  8599. return s.String()
  8600. }
  8601. // Request to list information about a resource.
  8602. type GetResourceInput struct {
  8603. _ struct{} `type:"structure"`
  8604. // The identifier for the Resource resource.
  8605. //
  8606. // ResourceId is a required field
  8607. ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"`
  8608. // The RestApi identifier for the resource.
  8609. //
  8610. // RestApiId is a required field
  8611. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  8612. }
  8613. // String returns the string representation
  8614. func (s GetResourceInput) String() string {
  8615. return awsutil.Prettify(s)
  8616. }
  8617. // GoString returns the string representation
  8618. func (s GetResourceInput) GoString() string {
  8619. return s.String()
  8620. }
  8621. // Validate inspects the fields of the type to determine if they are valid.
  8622. func (s *GetResourceInput) Validate() error {
  8623. invalidParams := request.ErrInvalidParams{Context: "GetResourceInput"}
  8624. if s.ResourceId == nil {
  8625. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  8626. }
  8627. if s.RestApiId == nil {
  8628. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  8629. }
  8630. if invalidParams.Len() > 0 {
  8631. return invalidParams
  8632. }
  8633. return nil
  8634. }
  8635. // Request to list information about a collection of resources.
  8636. type GetResourcesInput struct {
  8637. _ struct{} `type:"structure"`
  8638. // The maximum number of Resource resources in the collection to get information
  8639. // about. The default limit is 25. It should be an integer between 1 - 500.
  8640. Limit *int64 `location:"querystring" locationName:"limit" type:"integer"`
  8641. // The position of the next set of results in the current Resources resource
  8642. // to get information about.
  8643. Position *string `location:"querystring" locationName:"position" type:"string"`
  8644. // The RestApi identifier for the Resource.
  8645. //
  8646. // RestApiId is a required field
  8647. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  8648. }
  8649. // String returns the string representation
  8650. func (s GetResourcesInput) String() string {
  8651. return awsutil.Prettify(s)
  8652. }
  8653. // GoString returns the string representation
  8654. func (s GetResourcesInput) GoString() string {
  8655. return s.String()
  8656. }
  8657. // Validate inspects the fields of the type to determine if they are valid.
  8658. func (s *GetResourcesInput) Validate() error {
  8659. invalidParams := request.ErrInvalidParams{Context: "GetResourcesInput"}
  8660. if s.RestApiId == nil {
  8661. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  8662. }
  8663. if invalidParams.Len() > 0 {
  8664. return invalidParams
  8665. }
  8666. return nil
  8667. }
  8668. // Represents a collection of Resource resources.
  8669. //
  8670. // Create an API (http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-create-api.html)
  8671. type GetResourcesOutput struct {
  8672. _ struct{} `type:"structure"`
  8673. // Gets the current Resource resource in the collection.
  8674. Items []*Resource `locationName:"item" type:"list"`
  8675. Position *string `locationName:"position" type:"string"`
  8676. }
  8677. // String returns the string representation
  8678. func (s GetResourcesOutput) String() string {
  8679. return awsutil.Prettify(s)
  8680. }
  8681. // GoString returns the string representation
  8682. func (s GetResourcesOutput) GoString() string {
  8683. return s.String()
  8684. }
  8685. // The GET request to list an existing RestApi defined for your collection.
  8686. type GetRestApiInput struct {
  8687. _ struct{} `type:"structure"`
  8688. // The identifier of the RestApi resource.
  8689. //
  8690. // RestApiId is a required field
  8691. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  8692. }
  8693. // String returns the string representation
  8694. func (s GetRestApiInput) String() string {
  8695. return awsutil.Prettify(s)
  8696. }
  8697. // GoString returns the string representation
  8698. func (s GetRestApiInput) GoString() string {
  8699. return s.String()
  8700. }
  8701. // Validate inspects the fields of the type to determine if they are valid.
  8702. func (s *GetRestApiInput) Validate() error {
  8703. invalidParams := request.ErrInvalidParams{Context: "GetRestApiInput"}
  8704. if s.RestApiId == nil {
  8705. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  8706. }
  8707. if invalidParams.Len() > 0 {
  8708. return invalidParams
  8709. }
  8710. return nil
  8711. }
  8712. // The GET request to list existing RestApis defined for your collection.
  8713. type GetRestApisInput struct {
  8714. _ struct{} `type:"structure"`
  8715. // The maximum number of RestApi resources in the collection to get information
  8716. // about. The default limit is 25. It should be an integer between 1 - 500.
  8717. Limit *int64 `location:"querystring" locationName:"limit" type:"integer"`
  8718. // The position of the current RestApis resource in the collection to get information
  8719. // about.
  8720. Position *string `location:"querystring" locationName:"position" type:"string"`
  8721. }
  8722. // String returns the string representation
  8723. func (s GetRestApisInput) String() string {
  8724. return awsutil.Prettify(s)
  8725. }
  8726. // GoString returns the string representation
  8727. func (s GetRestApisInput) GoString() string {
  8728. return s.String()
  8729. }
  8730. // Contains references to your APIs and links that guide you in how to interact
  8731. // with your collection. A collection offers a paginated view of your APIs.
  8732. //
  8733. // Create an API (http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-create-api.html)
  8734. type GetRestApisOutput struct {
  8735. _ struct{} `type:"structure"`
  8736. // An array of links to the current page of RestApi resources.
  8737. Items []*RestApi `locationName:"item" type:"list"`
  8738. Position *string `locationName:"position" type:"string"`
  8739. }
  8740. // String returns the string representation
  8741. func (s GetRestApisOutput) String() string {
  8742. return awsutil.Prettify(s)
  8743. }
  8744. // GoString returns the string representation
  8745. func (s GetRestApisOutput) GoString() string {
  8746. return s.String()
  8747. }
  8748. // Request a new generated client SDK for a RestApi and Stage.
  8749. type GetSdkInput struct {
  8750. _ struct{} `type:"structure"`
  8751. // A key-value map of query string parameters that specify properties of the
  8752. // SDK, depending on the requested sdkType. For sdkType of objectivec, a parameter
  8753. // named classPrefix is required. For sdkType of android, parameters named groupId,
  8754. // artifactId, artifactVersion, and invokerPackage are required.
  8755. Parameters map[string]*string `location:"querystring" locationName:"parameters" type:"map"`
  8756. // The identifier of the RestApi that the SDK will use.
  8757. //
  8758. // RestApiId is a required field
  8759. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  8760. // The language for the generated SDK. Currently javascript, android, and objectivec
  8761. // (for iOS) are supported.
  8762. //
  8763. // SdkType is a required field
  8764. SdkType *string `location:"uri" locationName:"sdk_type" type:"string" required:"true"`
  8765. // The name of the Stage that the SDK will use.
  8766. //
  8767. // StageName is a required field
  8768. StageName *string `location:"uri" locationName:"stage_name" type:"string" required:"true"`
  8769. }
  8770. // String returns the string representation
  8771. func (s GetSdkInput) String() string {
  8772. return awsutil.Prettify(s)
  8773. }
  8774. // GoString returns the string representation
  8775. func (s GetSdkInput) GoString() string {
  8776. return s.String()
  8777. }
  8778. // Validate inspects the fields of the type to determine if they are valid.
  8779. func (s *GetSdkInput) Validate() error {
  8780. invalidParams := request.ErrInvalidParams{Context: "GetSdkInput"}
  8781. if s.RestApiId == nil {
  8782. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  8783. }
  8784. if s.SdkType == nil {
  8785. invalidParams.Add(request.NewErrParamRequired("SdkType"))
  8786. }
  8787. if s.StageName == nil {
  8788. invalidParams.Add(request.NewErrParamRequired("StageName"))
  8789. }
  8790. if invalidParams.Len() > 0 {
  8791. return invalidParams
  8792. }
  8793. return nil
  8794. }
  8795. // The binary blob response to GetSdk, which contains the generated SDK.
  8796. type GetSdkOutput struct {
  8797. _ struct{} `type:"structure" payload:"Body"`
  8798. // The binary blob response to GetSdk, which contains the generated SDK.
  8799. Body []byte `locationName:"body" type:"blob"`
  8800. // The content-disposition header value in the HTTP response.
  8801. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  8802. // The content-type header value in the HTTP response.
  8803. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  8804. }
  8805. // String returns the string representation
  8806. func (s GetSdkOutput) String() string {
  8807. return awsutil.Prettify(s)
  8808. }
  8809. // GoString returns the string representation
  8810. func (s GetSdkOutput) GoString() string {
  8811. return s.String()
  8812. }
  8813. // Requests Amazon API Gateway to get information about a Stage resource.
  8814. type GetStageInput struct {
  8815. _ struct{} `type:"structure"`
  8816. // The identifier of the RestApi resource for the Stage resource to get information
  8817. // about.
  8818. //
  8819. // RestApiId is a required field
  8820. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  8821. // The name of the Stage resource to get information about.
  8822. //
  8823. // StageName is a required field
  8824. StageName *string `location:"uri" locationName:"stage_name" type:"string" required:"true"`
  8825. }
  8826. // String returns the string representation
  8827. func (s GetStageInput) String() string {
  8828. return awsutil.Prettify(s)
  8829. }
  8830. // GoString returns the string representation
  8831. func (s GetStageInput) GoString() string {
  8832. return s.String()
  8833. }
  8834. // Validate inspects the fields of the type to determine if they are valid.
  8835. func (s *GetStageInput) Validate() error {
  8836. invalidParams := request.ErrInvalidParams{Context: "GetStageInput"}
  8837. if s.RestApiId == nil {
  8838. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  8839. }
  8840. if s.StageName == nil {
  8841. invalidParams.Add(request.NewErrParamRequired("StageName"))
  8842. }
  8843. if invalidParams.Len() > 0 {
  8844. return invalidParams
  8845. }
  8846. return nil
  8847. }
  8848. // Requests Amazon API Gateway to get information about one or more Stage resources.
  8849. type GetStagesInput struct {
  8850. _ struct{} `type:"structure"`
  8851. // The stages' deployment identifiers.
  8852. DeploymentId *string `location:"querystring" locationName:"deploymentId" type:"string"`
  8853. // The stages' API identifiers.
  8854. //
  8855. // RestApiId is a required field
  8856. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  8857. }
  8858. // String returns the string representation
  8859. func (s GetStagesInput) String() string {
  8860. return awsutil.Prettify(s)
  8861. }
  8862. // GoString returns the string representation
  8863. func (s GetStagesInput) GoString() string {
  8864. return s.String()
  8865. }
  8866. // Validate inspects the fields of the type to determine if they are valid.
  8867. func (s *GetStagesInput) Validate() error {
  8868. invalidParams := request.ErrInvalidParams{Context: "GetStagesInput"}
  8869. if s.RestApiId == nil {
  8870. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  8871. }
  8872. if invalidParams.Len() > 0 {
  8873. return invalidParams
  8874. }
  8875. return nil
  8876. }
  8877. // A list of Stage resources that are associated with the ApiKey resource.
  8878. //
  8879. // Deploying API in Stages (http://docs.aws.amazon.com/apigateway/latest/developerguide/stages.html)
  8880. type GetStagesOutput struct {
  8881. _ struct{} `type:"structure"`
  8882. // An individual Stage resource.
  8883. Item []*Stage `locationName:"item" type:"list"`
  8884. }
  8885. // String returns the string representation
  8886. func (s GetStagesOutput) String() string {
  8887. return awsutil.Prettify(s)
  8888. }
  8889. // GoString returns the string representation
  8890. func (s GetStagesOutput) GoString() string {
  8891. return s.String()
  8892. }
  8893. // The GET request to get the usage data of a usage plan in a specified time
  8894. // interval.
  8895. type GetUsageInput struct {
  8896. _ struct{} `type:"structure"`
  8897. // The ending date (e.g., 2016-12-31) of the usage data.
  8898. //
  8899. // EndDate is a required field
  8900. EndDate *string `location:"querystring" locationName:"endDate" type:"string" required:"true"`
  8901. // The Id of the API key associated with the resultant usage data.
  8902. KeyId *string `location:"querystring" locationName:"keyId" type:"string"`
  8903. // The maximum number of results to be returned.
  8904. Limit *int64 `location:"querystring" locationName:"limit" type:"integer"`
  8905. // Position
  8906. Position *string `location:"querystring" locationName:"position" type:"string"`
  8907. // The starting date (e.g., 2016-01-01) of the usage data.
  8908. //
  8909. // StartDate is a required field
  8910. StartDate *string `location:"querystring" locationName:"startDate" type:"string" required:"true"`
  8911. // The Id of the usage plan associated with the usage data.
  8912. //
  8913. // UsagePlanId is a required field
  8914. UsagePlanId *string `location:"uri" locationName:"usageplanId" type:"string" required:"true"`
  8915. }
  8916. // String returns the string representation
  8917. func (s GetUsageInput) String() string {
  8918. return awsutil.Prettify(s)
  8919. }
  8920. // GoString returns the string representation
  8921. func (s GetUsageInput) GoString() string {
  8922. return s.String()
  8923. }
  8924. // Validate inspects the fields of the type to determine if they are valid.
  8925. func (s *GetUsageInput) Validate() error {
  8926. invalidParams := request.ErrInvalidParams{Context: "GetUsageInput"}
  8927. if s.EndDate == nil {
  8928. invalidParams.Add(request.NewErrParamRequired("EndDate"))
  8929. }
  8930. if s.StartDate == nil {
  8931. invalidParams.Add(request.NewErrParamRequired("StartDate"))
  8932. }
  8933. if s.UsagePlanId == nil {
  8934. invalidParams.Add(request.NewErrParamRequired("UsagePlanId"))
  8935. }
  8936. if invalidParams.Len() > 0 {
  8937. return invalidParams
  8938. }
  8939. return nil
  8940. }
  8941. // The GET request to get a usage plan of a given plan identifier.
  8942. type GetUsagePlanInput struct {
  8943. _ struct{} `type:"structure"`
  8944. // The identifier of the UsagePlan resource to be retrieved.
  8945. //
  8946. // UsagePlanId is a required field
  8947. UsagePlanId *string `location:"uri" locationName:"usageplanId" type:"string" required:"true"`
  8948. }
  8949. // String returns the string representation
  8950. func (s GetUsagePlanInput) String() string {
  8951. return awsutil.Prettify(s)
  8952. }
  8953. // GoString returns the string representation
  8954. func (s GetUsagePlanInput) GoString() string {
  8955. return s.String()
  8956. }
  8957. // Validate inspects the fields of the type to determine if they are valid.
  8958. func (s *GetUsagePlanInput) Validate() error {
  8959. invalidParams := request.ErrInvalidParams{Context: "GetUsagePlanInput"}
  8960. if s.UsagePlanId == nil {
  8961. invalidParams.Add(request.NewErrParamRequired("UsagePlanId"))
  8962. }
  8963. if invalidParams.Len() > 0 {
  8964. return invalidParams
  8965. }
  8966. return nil
  8967. }
  8968. // The GET request to get a usage plan key of a given key identifier.
  8969. type GetUsagePlanKeyInput struct {
  8970. _ struct{} `type:"structure"`
  8971. // The key Id of the to-be-retrieved UsagePlanKey resource representing a plan
  8972. // customer.
  8973. //
  8974. // KeyId is a required field
  8975. KeyId *string `location:"uri" locationName:"keyId" type:"string" required:"true"`
  8976. // The Id of the UsagePlan resource representing the usage plan containing the
  8977. // to-be-retrieved UsagePlanKey resource representing a plan customer.
  8978. //
  8979. // UsagePlanId is a required field
  8980. UsagePlanId *string `location:"uri" locationName:"usageplanId" type:"string" required:"true"`
  8981. }
  8982. // String returns the string representation
  8983. func (s GetUsagePlanKeyInput) String() string {
  8984. return awsutil.Prettify(s)
  8985. }
  8986. // GoString returns the string representation
  8987. func (s GetUsagePlanKeyInput) GoString() string {
  8988. return s.String()
  8989. }
  8990. // Validate inspects the fields of the type to determine if they are valid.
  8991. func (s *GetUsagePlanKeyInput) Validate() error {
  8992. invalidParams := request.ErrInvalidParams{Context: "GetUsagePlanKeyInput"}
  8993. if s.KeyId == nil {
  8994. invalidParams.Add(request.NewErrParamRequired("KeyId"))
  8995. }
  8996. if s.UsagePlanId == nil {
  8997. invalidParams.Add(request.NewErrParamRequired("UsagePlanId"))
  8998. }
  8999. if invalidParams.Len() > 0 {
  9000. return invalidParams
  9001. }
  9002. return nil
  9003. }
  9004. // The GET request to get all the usage plan keys representing the API keys
  9005. // added to a specified usage plan.
  9006. type GetUsagePlanKeysInput struct {
  9007. _ struct{} `type:"structure"`
  9008. // A query parameter specifying the maximum number usage plan keys returned
  9009. // by the GET request.
  9010. Limit *int64 `location:"querystring" locationName:"limit" type:"integer"`
  9011. // A query parameter specifying the name of the to-be-returned usage plan keys.
  9012. NameQuery *string `location:"querystring" locationName:"name" type:"string"`
  9013. // A query parameter specifying the zero-based index specifying the position
  9014. // of a usage plan key.
  9015. Position *string `location:"querystring" locationName:"position" type:"string"`
  9016. // The Id of the UsagePlan resource representing the usage plan containing the
  9017. // to-be-retrieved UsagePlanKey resource representing a plan customer.
  9018. //
  9019. // UsagePlanId is a required field
  9020. UsagePlanId *string `location:"uri" locationName:"usageplanId" type:"string" required:"true"`
  9021. }
  9022. // String returns the string representation
  9023. func (s GetUsagePlanKeysInput) String() string {
  9024. return awsutil.Prettify(s)
  9025. }
  9026. // GoString returns the string representation
  9027. func (s GetUsagePlanKeysInput) GoString() string {
  9028. return s.String()
  9029. }
  9030. // Validate inspects the fields of the type to determine if they are valid.
  9031. func (s *GetUsagePlanKeysInput) Validate() error {
  9032. invalidParams := request.ErrInvalidParams{Context: "GetUsagePlanKeysInput"}
  9033. if s.UsagePlanId == nil {
  9034. invalidParams.Add(request.NewErrParamRequired("UsagePlanId"))
  9035. }
  9036. if invalidParams.Len() > 0 {
  9037. return invalidParams
  9038. }
  9039. return nil
  9040. }
  9041. // Represents the collection of usage plan keys added to usage plans for the
  9042. // associated API keys and, possibly, other types of keys.
  9043. //
  9044. // Create and Use Usage Plans (http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-api-usage-plans.html)
  9045. type GetUsagePlanKeysOutput struct {
  9046. _ struct{} `type:"structure"`
  9047. // Gets the current item of the usage plan keys collection.
  9048. Items []*UsagePlanKey `locationName:"item" type:"list"`
  9049. Position *string `locationName:"position" type:"string"`
  9050. }
  9051. // String returns the string representation
  9052. func (s GetUsagePlanKeysOutput) String() string {
  9053. return awsutil.Prettify(s)
  9054. }
  9055. // GoString returns the string representation
  9056. func (s GetUsagePlanKeysOutput) GoString() string {
  9057. return s.String()
  9058. }
  9059. // The GET request to get all the usage plans of the caller's account.
  9060. type GetUsagePlansInput struct {
  9061. _ struct{} `type:"structure"`
  9062. // The identifier of the API key associated with the usage plans.
  9063. KeyId *string `location:"querystring" locationName:"keyId" type:"string"`
  9064. // The number of UsagePlan resources to be returned as the result.
  9065. Limit *int64 `location:"querystring" locationName:"limit" type:"integer"`
  9066. // The zero-based array index specifying the position of the to-be-retrieved
  9067. // UsagePlan resource.
  9068. Position *string `location:"querystring" locationName:"position" type:"string"`
  9069. }
  9070. // String returns the string representation
  9071. func (s GetUsagePlansInput) String() string {
  9072. return awsutil.Prettify(s)
  9073. }
  9074. // GoString returns the string representation
  9075. func (s GetUsagePlansInput) GoString() string {
  9076. return s.String()
  9077. }
  9078. // Represents a collection of usage plans for an AWS account.
  9079. //
  9080. // Create and Use Usage Plans (http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-api-usage-plans.html)
  9081. type GetUsagePlansOutput struct {
  9082. _ struct{} `type:"structure"`
  9083. // Gets the current item when enumerating the collection of UsagePlan.
  9084. Items []*UsagePlan `locationName:"item" type:"list"`
  9085. Position *string `locationName:"position" type:"string"`
  9086. }
  9087. // String returns the string representation
  9088. func (s GetUsagePlansOutput) String() string {
  9089. return awsutil.Prettify(s)
  9090. }
  9091. // GoString returns the string representation
  9092. func (s GetUsagePlansOutput) GoString() string {
  9093. return s.String()
  9094. }
  9095. // The POST request to import API keys from an external source, such as a CSV-formatted
  9096. // file.
  9097. type ImportApiKeysInput struct {
  9098. _ struct{} `type:"structure" payload:"Body"`
  9099. // The payload of the POST request to import API keys. For the payload format,
  9100. // see API Key File Format (http://docs.aws.amazon.com/apigateway/latest/developerguide/api-key-file-format.html).
  9101. //
  9102. // Body is a required field
  9103. Body []byte `locationName:"body" type:"blob" required:"true"`
  9104. // A query parameter to indicate whether to rollback ApiKey importation (true)
  9105. // or not (false) when error is encountered.
  9106. FailOnWarnings *bool `location:"querystring" locationName:"failonwarnings" type:"boolean"`
  9107. // A query parameter to specify the input format to imported API keys. Currently,
  9108. // only the csv format is supported.
  9109. //
  9110. // Format is a required field
  9111. Format *string `location:"querystring" locationName:"format" type:"string" required:"true" enum:"ApiKeysFormat"`
  9112. }
  9113. // String returns the string representation
  9114. func (s ImportApiKeysInput) String() string {
  9115. return awsutil.Prettify(s)
  9116. }
  9117. // GoString returns the string representation
  9118. func (s ImportApiKeysInput) GoString() string {
  9119. return s.String()
  9120. }
  9121. // Validate inspects the fields of the type to determine if they are valid.
  9122. func (s *ImportApiKeysInput) Validate() error {
  9123. invalidParams := request.ErrInvalidParams{Context: "ImportApiKeysInput"}
  9124. if s.Body == nil {
  9125. invalidParams.Add(request.NewErrParamRequired("Body"))
  9126. }
  9127. if s.Format == nil {
  9128. invalidParams.Add(request.NewErrParamRequired("Format"))
  9129. }
  9130. if invalidParams.Len() > 0 {
  9131. return invalidParams
  9132. }
  9133. return nil
  9134. }
  9135. // The identifier of an API key used to reference an API key in a usage plan.
  9136. type ImportApiKeysOutput struct {
  9137. _ struct{} `type:"structure"`
  9138. // A list of all the ApiKey identifiers.
  9139. Ids []*string `locationName:"ids" type:"list"`
  9140. // A list of warning messages.
  9141. Warnings []*string `locationName:"warnings" type:"list"`
  9142. }
  9143. // String returns the string representation
  9144. func (s ImportApiKeysOutput) String() string {
  9145. return awsutil.Prettify(s)
  9146. }
  9147. // GoString returns the string representation
  9148. func (s ImportApiKeysOutput) GoString() string {
  9149. return s.String()
  9150. }
  9151. // A POST request to import an API to Amazon API Gateway using an input of an
  9152. // API definition file.
  9153. type ImportRestApiInput struct {
  9154. _ struct{} `type:"structure" payload:"Body"`
  9155. // The POST request body containing external API definitions. Currently, only
  9156. // Swagger definition JSON files are supported.
  9157. //
  9158. // Body is a required field
  9159. Body []byte `locationName:"body" type:"blob" required:"true"`
  9160. // A query parameter to indicate whether to rollback the API creation (true)
  9161. // or not (false) when a warning is encountered. The default value is false.
  9162. FailOnWarnings *bool `location:"querystring" locationName:"failonwarnings" type:"boolean"`
  9163. // Custom header parameters as part of the request.
  9164. Parameters map[string]*string `location:"querystring" locationName:"parameters" type:"map"`
  9165. }
  9166. // String returns the string representation
  9167. func (s ImportRestApiInput) String() string {
  9168. return awsutil.Prettify(s)
  9169. }
  9170. // GoString returns the string representation
  9171. func (s ImportRestApiInput) GoString() string {
  9172. return s.String()
  9173. }
  9174. // Validate inspects the fields of the type to determine if they are valid.
  9175. func (s *ImportRestApiInput) Validate() error {
  9176. invalidParams := request.ErrInvalidParams{Context: "ImportRestApiInput"}
  9177. if s.Body == nil {
  9178. invalidParams.Add(request.NewErrParamRequired("Body"))
  9179. }
  9180. if invalidParams.Len() > 0 {
  9181. return invalidParams
  9182. }
  9183. return nil
  9184. }
  9185. // Represents an HTTP, AWS, or Mock integration.
  9186. //
  9187. // In the API Gateway console, the built-in Lambda integration is an AWS integration.
  9188. //
  9189. // Creating an API (http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-create-api.html)
  9190. type Integration struct {
  9191. _ struct{} `type:"structure"`
  9192. // Specifies the integration's cache key parameters.
  9193. CacheKeyParameters []*string `locationName:"cacheKeyParameters" type:"list"`
  9194. // Specifies the integration's cache namespace.
  9195. CacheNamespace *string `locationName:"cacheNamespace" type:"string"`
  9196. // Specifies the credentials required for the integration, if any. For AWS integrations,
  9197. // three options are available. To specify an IAM Role for Amazon API Gateway
  9198. // to assume, use the role's Amazon Resource Name (ARN). To require that the
  9199. // caller's identity be passed through from the request, specify the string
  9200. // arn:aws:iam::\*:user/\*. To use resource-based permissions on supported AWS
  9201. // services, specify null.
  9202. Credentials *string `locationName:"credentials" type:"string"`
  9203. // Specifies the integration's HTTP method type.
  9204. HttpMethod *string `locationName:"httpMethod" type:"string"`
  9205. // Specifies the integration's responses.
  9206. //
  9207. // Example: Get integration responses of a method
  9208. //
  9209. // Request
  9210. //
  9211. // GET /restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200
  9212. // HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com
  9213. // X-Amz-Date: 20160607T191449Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160607/us-east-1/apigateway/aws4_request,
  9214. // SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash}
  9215. // Response
  9216. //
  9217. // The successful response returns 200 OKstatus and a payload as follows:
  9218. //
  9219. // { "_links": { "curies": { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html",
  9220. // "name": "integrationresponse", "templated": true }, "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200",
  9221. // "title": "200" }, "integrationresponse:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200"
  9222. // }, "integrationresponse:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200"
  9223. // } }, "responseParameters": { "method.response.header.Content-Type": "'application/xml'"
  9224. // }, "responseTemplates": { "application/json": "$util.urlDecode(\"%3CkinesisStreams%3E#foreach($stream
  9225. // in $input.path('$.StreamNames'))%3Cstream%3E%3Cname%3E$stream%3C/name%3E%3C/stream%3E#end%3C/kinesisStreams%3E\")\n"
  9226. // }, "statusCode": "200" }
  9227. IntegrationResponses map[string]*IntegrationResponse `locationName:"integrationResponses" type:"map"`
  9228. // Specifies how the method request body of an unmapped content type will be
  9229. // passed through the integration request to the back end without transformation.
  9230. // A content type is unmapped if no mapping template is defined in the integration
  9231. // or the content type does not match any of the mapped content types, as specified
  9232. // in requestTemplates. There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES,
  9233. // and NEVER.
  9234. //
  9235. // WHEN_NO_MATCH passes the method request body through the integration request
  9236. // to the back end without transformation when the method request content type
  9237. // does not match any content type associated with the mapping templates defined
  9238. // in the integration request.
  9239. // WHEN_NO_TEMPLATES passes the method request body through the integration
  9240. // request to the back end without transformation when no mapping template is
  9241. // defined in the integration request. If a template is defined when this option
  9242. // is selected, the method request of an unmapped content-type will be rejected
  9243. // with an HTTP 415 Unsupported Media Type response.
  9244. // NEVER rejects the method request with an HTTP 415 Unsupported Media Type
  9245. // response when either the method request content type does not match any content
  9246. // type associated with the mapping templates defined in the integration request
  9247. // or no mapping template is defined in the integration request.
  9248. PassthroughBehavior *string `locationName:"passthroughBehavior" type:"string"`
  9249. // A key-value map specifying request parameters that are passed from the method
  9250. // request to the back end. The key is an integration request parameter name
  9251. // and the associated value is a method request parameter value or static value
  9252. // that must be enclosed within single quotes and pre-encoded as required by
  9253. // the back end. The method request parameter value must match the pattern of
  9254. // method.request.{location}.{name}, where location is querystring, path, or
  9255. // header and name must be a valid and unique method request parameter name.
  9256. RequestParameters map[string]*string `locationName:"requestParameters" type:"map"`
  9257. // Represents a map of Velocity templates that are applied on the request payload
  9258. // based on the value of the Content-Type header sent by the client. The content
  9259. // type value is the key in this map, and the template (as a String) is the
  9260. // value.
  9261. RequestTemplates map[string]*string `locationName:"requestTemplates" type:"map"`
  9262. // Specifies the integration's type. The valid value is HTTP for integrating
  9263. // with an HTTP back end, AWS for any AWS service endpoints, MOCK for testing
  9264. // without actually invoking the back end, HTTP_PROXY for integrating with the
  9265. // HTTP proxy integration, or AWS_PROXY for integrating with the Lambda proxy
  9266. // integration type.
  9267. Type *string `locationName:"type" type:"string" enum:"IntegrationType"`
  9268. // Specifies the integration's Uniform Resource Identifier (URI). For HTTP integrations,
  9269. // the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986
  9270. // specification (https://www.ietf.org/rfc/rfc3986.txt). For AWS integrations,
  9271. // the URI should be of the form arn:aws:apigateway:{region}:{subdomain.service|service}:{path|action}/{service_api}.
  9272. // Region, subdomain and service are used to determine the right endpoint. For
  9273. // AWS services that use the Action= query string parameter, service_api should
  9274. // be a valid action for the desired service. For RESTful AWS service APIs,
  9275. // path is used to indicate that the remaining substring in the URI should be
  9276. // treated as the path to the resource, including the initial /.
  9277. Uri *string `locationName:"uri" type:"string"`
  9278. }
  9279. // String returns the string representation
  9280. func (s Integration) String() string {
  9281. return awsutil.Prettify(s)
  9282. }
  9283. // GoString returns the string representation
  9284. func (s Integration) GoString() string {
  9285. return s.String()
  9286. }
  9287. // Represents an integration response. The status code must map to an existing
  9288. // MethodResponse, and parameters and templates can be used to transform the
  9289. // back-end response.
  9290. //
  9291. // Creating an API (http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-create-api.html)
  9292. type IntegrationResponse struct {
  9293. _ struct{} `type:"structure"`
  9294. // A key-value map specifying response parameters that are passed to the method
  9295. // response from the back end. The key is a method response header parameter
  9296. // name and the mapped value is an integration response header value, a static
  9297. // value enclosed within a pair of single quotes, or a JSON expression from
  9298. // the integration response body. The mapping key must match the pattern of
  9299. // method.response.header.{name}, where name is a valid and unique header name.
  9300. // The mapped non-static value must match the pattern of integration.response.header.{name}
  9301. // or integration.response.body.{JSON-expression}, where name is a valid and
  9302. // unique response header name and JSON-expression is a valid JSON expression
  9303. // without the $ prefix.
  9304. ResponseParameters map[string]*string `locationName:"responseParameters" type:"map"`
  9305. // Specifies the templates used to transform the integration response body.
  9306. // Response templates are represented as a key/value map, with a content-type
  9307. // as the key and a template as the value.
  9308. ResponseTemplates map[string]*string `locationName:"responseTemplates" type:"map"`
  9309. // Specifies the regular expression (regex) pattern used to choose an integration
  9310. // response based on the response from the back end. For example, if the success
  9311. // response returns nothing and the error response returns some string, you
  9312. // could use the .+ regex to match error response. However, make sure that the
  9313. // error response does not contain any newline (\n) character in such cases.
  9314. // If the back end is an AWS Lambda function, the AWS Lambda function error
  9315. // header is matched. For all other HTTP and AWS back ends, the HTTP status
  9316. // code is matched.
  9317. SelectionPattern *string `locationName:"selectionPattern" type:"string"`
  9318. // Specifies the status code that is used to map the integration response to
  9319. // an existing MethodResponse.
  9320. StatusCode *string `locationName:"statusCode" type:"string"`
  9321. }
  9322. // String returns the string representation
  9323. func (s IntegrationResponse) String() string {
  9324. return awsutil.Prettify(s)
  9325. }
  9326. // GoString returns the string representation
  9327. func (s IntegrationResponse) GoString() string {
  9328. return s.String()
  9329. }
  9330. // Represents a client-facing interface by which the client calls the API to
  9331. // access back-end resources. A Method resource is integrated with an Integration
  9332. // resource. Both consist of a request and one or more responses. The method
  9333. // request takes the client input that is passed to the back end through the
  9334. // integration request. A method response returns the output from the back end
  9335. // to the client through an integration response. A method request is embodied
  9336. // in a Method resource, whereas an integration request is embodied in an Integration
  9337. // resource. On the other hand, a method response is represented by a MethodResponse
  9338. // resource, whereas an integration response is represented by an IntegrationResponse
  9339. // resource.
  9340. //
  9341. // Example: Retrive the GET method on a specified resource
  9342. //
  9343. // Request
  9344. //
  9345. // The following example request retrieves the information about the GET method
  9346. // on an API resource (3kzxbg5sa2) of an API (fugvjdxtri).
  9347. //
  9348. // GET /restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET HTTP/1.1 Content-Type:
  9349. // application/json Host: apigateway.us-east-1.amazonaws.com X-Amz-Date:
  9350. // 20160603T210259Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160603/us-east-1/apigateway/aws4_request,
  9351. // SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash}
  9352. // Response
  9353. //
  9354. // The successful response returns a 200 OK status code and a payload similar
  9355. // to the following:
  9356. //
  9357. // { "_links": { "curies": [ { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-{rel}.html",
  9358. // "name": "integration", "templated": true }, { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html",
  9359. // "name": "integrationresponse", "templated": true }, { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-{rel}.html",
  9360. // "name": "method", "templated": true }, { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-response-{rel}.html",
  9361. // "name": "methodresponse", "templated": true } ], "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET",
  9362. // "name": "GET", "title": "GET" }, "integration:put": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration"
  9363. // }, "method:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET"
  9364. // }, "method:integration": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration"
  9365. // }, "method:responses": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200",
  9366. // "name": "200", "title": "200" }, "method:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET"
  9367. // }, "methodresponse:put": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/{status_code}",
  9368. // "templated": true } }, "apiKeyRequired": true, "authorizationType": "NONE",
  9369. // "httpMethod": "GET", "_embedded": { "method:integration": { "_links":
  9370. // { "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration"
  9371. // }, "integration:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration"
  9372. // }, "integration:responses": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200",
  9373. // "name": "200", "title": "200" }, "integration:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration"
  9374. // }, "integrationresponse:put": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/{status_code}",
  9375. // "templated": true } }, "cacheKeyParameters": [], "cacheNamespace": "3kzxbg5sa2",
  9376. // "credentials": "arn:aws:iam::123456789012:role/apigAwsProxyRole", "httpMethod":
  9377. // "POST", "passthroughBehavior": "WHEN_NO_MATCH", "requestParameters": {
  9378. // "integration.request.header.Content-Type": "'application/x-amz-json-1.1'"
  9379. // }, "requestTemplates": { "application/json": "{\n}" }, "type": "AWS",
  9380. // "uri": "arn:aws:apigateway:us-east-1:kinesis:action/ListStreams", "_embedded":
  9381. // { "integration:responses": { "_links": { "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200",
  9382. // "name": "200", "title": "200" }, "integrationresponse:delete": { "href":
  9383. // "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200"
  9384. // }, "integrationresponse:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200"
  9385. // } }, "responseParameters": { "method.response.header.Content-Type": "'application/xml'"
  9386. // }, "responseTemplates": { "application/json": "$util.urlDecode(\"%3CkinesisStreams%3E%23foreach(%24stream%20in%20%24input.path(%27%24.StreamNames%27))%3Cstream%3E%3Cname%3E%24stream%3C%2Fname%3E%3C%2Fstream%3E%23end%3C%2FkinesisStreams%3E\")"
  9387. // }, "statusCode": "200" } } }, "method:responses": { "_links": { "self":
  9388. // { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200",
  9389. // "name": "200", "title": "200" }, "methodresponse:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200"
  9390. // }, "methodresponse:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200"
  9391. // } }, "responseModels": { "application/json": "Empty" }, "responseParameters":
  9392. // { "method.response.header.Content-Type": false }, "statusCode": "200"
  9393. // } } }
  9394. // In the example above, the response template for the 200 OK response maps
  9395. // the JSON output from the ListStreams action in the back end to an XML output.
  9396. // The mapping template is URL-encoded as %3CkinesisStreams%3E%23foreach(%24stream%20in%20%24input.path(%27%24.StreamNames%27))%3Cstream%3E%3Cname%3E%24stream%3C%2Fname%3E%3C%2Fstream%3E%23end%3C%2FkinesisStreams%3E
  9397. // and the output is decoded using the $util.urlDecode() (http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html#util-templat-reference)
  9398. // helper function.
  9399. //
  9400. // MethodResponse, Integration, IntegrationResponse, Resource, Set up an API's method (http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-method-settings.html)
  9401. type Method struct {
  9402. _ struct{} `type:"structure"`
  9403. // A boolean flag specifying whether a valid ApiKey is required to invoke this
  9404. // method.
  9405. ApiKeyRequired *bool `locationName:"apiKeyRequired" type:"boolean"`
  9406. // The method's authorization type.
  9407. AuthorizationType *string `locationName:"authorizationType" type:"string"`
  9408. // The identifier of an Authorizer to use on this method. The authorizationType
  9409. // must be CUSTOM.
  9410. AuthorizerId *string `locationName:"authorizerId" type:"string"`
  9411. // The method's HTTP verb.
  9412. HttpMethod *string `locationName:"httpMethod" type:"string"`
  9413. // Gets the method's integration responsible for passing the client-submitted
  9414. // request to the back end and performing necessary transformations to make
  9415. // the request compliant with the back end.
  9416. //
  9417. // Example:
  9418. //
  9419. // Request
  9420. //
  9421. // GET /restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration HTTP/1.1
  9422. // Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com Content-Length:
  9423. // 117 X-Amz-Date: 20160613T213210Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160613/us-east-1/apigateway/aws4_request,
  9424. // SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash}
  9425. // Response
  9426. //
  9427. // The successful response returns a 200 OKstatus code and a payload similar to the following:
  9428. //
  9429. // { "_links": { "curies": [ { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-{rel}.html",
  9430. // "name": "integration", "templated": true }, { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html",
  9431. // "name": "integrationresponse", "templated": true } ], "self": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration"
  9432. // }, "integration:delete": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration"
  9433. // }, "integration:responses": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200",
  9434. // "name": "200", "title": "200" }, "integration:update": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration"
  9435. // }, "integrationresponse:put": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/{status_code}",
  9436. // "templated": true } }, "cacheKeyParameters": [], "cacheNamespace": "0cjtch",
  9437. // "credentials": "arn:aws:iam::123456789012:role/apigAwsProxyRole", "httpMethod":
  9438. // "POST", "passthroughBehavior": "WHEN_NO_MATCH", "requestTemplates": { "application/json":
  9439. // "{\n \"a\": \"$input.params('operand1')\",\n \"b\": \"$input.params('operand2')\",
  9440. // \n \"op\": \"$input.params('operator')\" \n}" }, "type": "AWS", "uri": "arn:aws:apigateway:us-west-2:lambda:path//2015-03-31/functions/arn:aws:lambda:us-west-2:123456789012:function:Calc/invocations",
  9441. // "_embedded": { "integration:responses": { "_links": { "self": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200",
  9442. // "name": "200", "title": "200" }, "integrationresponse:delete": { "href":
  9443. // "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200"
  9444. // }, "integrationresponse:update": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200"
  9445. // } }, "responseParameters": { "method.response.header.operator": "integration.response.body.op",
  9446. // "method.response.header.operand_2": "integration.response.body.b", "method.response.header.operand_1":
  9447. // "integration.response.body.a" }, "responseTemplates": { "application/json":
  9448. // "#set($res = $input.path('$'))\n{\n \"result\": \"$res.a, $res.b, $res.op
  9449. // => $res.c\",\n \"a\" : \"$res.a\",\n \"b\" : \"$res.b\",\n \"op\" : \"$res.op\",\n
  9450. // \"c\" : \"$res.c\"\n}" }, "selectionPattern": "", "statusCode": "200" } }
  9451. // }
  9452. MethodIntegration *Integration `locationName:"methodIntegration" type:"structure"`
  9453. // Gets a method response associated with a given HTTP status code.
  9454. //
  9455. // The collection of method responses are encapsulated in a key-value map, where
  9456. // the key is a response's HTTP status code and the value is a MethodResponse
  9457. // resource that specifies the response returned to the caller from the back
  9458. // end through the integration response.
  9459. //
  9460. // Example: Get a 200 OK response of a GET method
  9461. //
  9462. // Request
  9463. //
  9464. // GET /restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200 HTTP/1.1
  9465. // Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com
  9466. // Content-Length: 117 X-Amz-Date: 20160613T215008Z Authorization: AWS4-HMAC-SHA256
  9467. // Credential={access_key_ID}/20160613/us-east-1/apigateway/aws4_request,
  9468. // SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash}
  9469. // Response
  9470. //
  9471. // The successful response returns a 200 OK status code and a payload similar
  9472. // to the following:
  9473. //
  9474. // { "_links": { "curies": { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-response-{rel}.html",
  9475. // "name": "methodresponse", "templated": true }, "self": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200",
  9476. // "title": "200" }, "methodresponse:delete": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200"
  9477. // }, "methodresponse:update": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200"
  9478. // } }, "responseModels": { "application/json": "Empty" }, "responseParameters":
  9479. // { "method.response.header.operator": false, "method.response.header.operand_2":
  9480. // false, "method.response.header.operand_1": false }, "statusCode": "200"
  9481. // }
  9482. MethodResponses map[string]*MethodResponse `locationName:"methodResponses" type:"map"`
  9483. // A key-value map specifying data schemas, represented by Model resources,
  9484. // (as the mapped value) of the request payloads of given content types (as
  9485. // the mapping key).
  9486. RequestModels map[string]*string `locationName:"requestModels" type:"map"`
  9487. // A key-value map defining required or optional method request parameters that
  9488. // can be accepted by Amazon API Gateway. A key is a method request parameter
  9489. // name matching the pattern of method.request.{location}.{name}, where location
  9490. // is querystring, path, or header and name is a valid and unique parameter
  9491. // name. The value associated with the key is a Boolean flag indicating whether
  9492. // the parameter is required (true) or optional (false). The method request
  9493. // parameter names defined here are available in Integration to be mapped to
  9494. // integration request parameters or templates.
  9495. RequestParameters map[string]*bool `locationName:"requestParameters" type:"map"`
  9496. }
  9497. // String returns the string representation
  9498. func (s Method) String() string {
  9499. return awsutil.Prettify(s)
  9500. }
  9501. // GoString returns the string representation
  9502. func (s Method) GoString() string {
  9503. return s.String()
  9504. }
  9505. // Represents a method response of a given HTTP status code returned to the
  9506. // client. The method response is passed from the back end through the associated
  9507. // integration response that can be transformed using a mapping template.
  9508. //
  9509. // Example: A MethodResponse instance of an API
  9510. //
  9511. // Request
  9512. //
  9513. // The example request retrieves a MethodResponse of the 200 status code.
  9514. //
  9515. // GET /restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200
  9516. // HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com
  9517. // X-Amz-Date: 20160603T222952Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160603/us-east-1/apigateway/aws4_request,
  9518. // SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash}
  9519. // Response
  9520. //
  9521. // The successful response returns 200 OK status and a payload as follows:
  9522. //
  9523. // { "_links": { "curies": { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-response-{rel}.html",
  9524. // "name": "methodresponse", "templated": true }, "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200",
  9525. // "title": "200" }, "methodresponse:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200"
  9526. // }, "methodresponse:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200"
  9527. // } }, "responseModels": { "application/json": "Empty" }, "responseParameters":
  9528. // { "method.response.header.Content-Type": false }, "statusCode": "200"
  9529. // }
  9530. type MethodResponse struct {
  9531. _ struct{} `type:"structure"`
  9532. // Specifies the Model resources used for the response's content-type. Response
  9533. // models are represented as a key/value map, with a content-type as the key
  9534. // and a Model name as the value.
  9535. ResponseModels map[string]*string `locationName:"responseModels" type:"map"`
  9536. // A key-value map specifying required or optional response parameters that
  9537. // Amazon API Gateway can send back to the caller. A key defines a method response
  9538. // header and the value specifies whether the associated method response header
  9539. // is required or not. The expression of the key must match the pattern method.response.header.{name},
  9540. // where name is a valid and unique header name. Amazon API Gateway passes certain
  9541. // integration response data to the method response headers specified here according
  9542. // to the mapping you prescribe in the API's IntegrationResponse. The integration
  9543. // response data that can be mapped include an integration response header expressed
  9544. // in integration.response.header.{name}, a static value enclosed within a pair
  9545. // of single quotes (e.g., 'application/json'), or a JSON expression from the
  9546. // back-end response payload in the form of integration.response.body.{JSON-expression},
  9547. // where JSON-expression is a valid JSON expression without the $ prefix.)
  9548. ResponseParameters map[string]*bool `locationName:"responseParameters" type:"map"`
  9549. // The method response's status code.
  9550. StatusCode *string `locationName:"statusCode" type:"string"`
  9551. }
  9552. // String returns the string representation
  9553. func (s MethodResponse) String() string {
  9554. return awsutil.Prettify(s)
  9555. }
  9556. // GoString returns the string representation
  9557. func (s MethodResponse) GoString() string {
  9558. return s.String()
  9559. }
  9560. // Specifies the method setting properties.
  9561. type MethodSetting struct {
  9562. _ struct{} `type:"structure"`
  9563. // Specifies whether the cached responses are encrypted. The PATCH path for
  9564. // this setting is /{method_setting_key}/caching/dataEncrypted, and the value
  9565. // is a Boolean.
  9566. CacheDataEncrypted *bool `locationName:"cacheDataEncrypted" type:"boolean"`
  9567. // Specifies the time to live (TTL), in seconds, for cached responses. The higher
  9568. // the TTL, the longer the response will be cached. The PATCH path for this
  9569. // setting is /{method_setting_key}/caching/ttlInSeconds, and the value is an
  9570. // integer.
  9571. CacheTtlInSeconds *int64 `locationName:"cacheTtlInSeconds" type:"integer"`
  9572. // Specifies whether responses should be cached and returned for requests. A
  9573. // cache cluster must be enabled on the stage for responses to be cached. The
  9574. // PATCH path for this setting is /{method_setting_key}/caching/enabled, and
  9575. // the value is a Boolean.
  9576. CachingEnabled *bool `locationName:"cachingEnabled" type:"boolean"`
  9577. // Specifies whether data trace logging is enabled for this method, which effects
  9578. // the log entries pushed to Amazon CloudWatch Logs. The PATCH path for this
  9579. // setting is /{method_setting_key}/logging/dataTrace, and the value is a Boolean.
  9580. DataTraceEnabled *bool `locationName:"dataTraceEnabled" type:"boolean"`
  9581. // Specifies the logging level for this method, which effects the log entries
  9582. // pushed to Amazon CloudWatch Logs. The PATCH path for this setting is /{method_setting_key}/logging/loglevel,
  9583. // and the available levels are OFF, ERROR, and INFO.
  9584. LoggingLevel *string `locationName:"loggingLevel" type:"string"`
  9585. // Specifies whether Amazon CloudWatch metrics are enabled for this method.
  9586. // The PATCH path for this setting is /{method_setting_key}/metrics/enabled,
  9587. // and the value is a Boolean.
  9588. MetricsEnabled *bool `locationName:"metricsEnabled" type:"boolean"`
  9589. // Specifies whether authorization is required for a cache invalidation request.
  9590. // The PATCH path for this setting is /{method_setting_key}/caching/requireAuthorizationForCacheControl,
  9591. // and the value is a Boolean.
  9592. RequireAuthorizationForCacheControl *bool `locationName:"requireAuthorizationForCacheControl" type:"boolean"`
  9593. // Specifies the throttling burst limit. The PATCH path for this setting is
  9594. // /{method_setting_key}/throttling/burstLimit, and the value is an integer.
  9595. ThrottlingBurstLimit *int64 `locationName:"throttlingBurstLimit" type:"integer"`
  9596. // Specifies the throttling rate limit. The PATCH path for this setting is /{method_setting_key}/throttling/rateLimit,
  9597. // and the value is a double.
  9598. ThrottlingRateLimit *float64 `locationName:"throttlingRateLimit" type:"double"`
  9599. // Specifies how to handle unauthorized requests for cache invalidation. The
  9600. // PATCH path for this setting is /{method_setting_key}/caching/unauthorizedCacheControlHeaderStrategy,
  9601. // and the available values are FAIL_WITH_403, SUCCEED_WITH_RESPONSE_HEADER,
  9602. // SUCCEED_WITHOUT_RESPONSE_HEADER.
  9603. UnauthorizedCacheControlHeaderStrategy *string `locationName:"unauthorizedCacheControlHeaderStrategy" type:"string" enum:"UnauthorizedCacheControlHeaderStrategy"`
  9604. }
  9605. // String returns the string representation
  9606. func (s MethodSetting) String() string {
  9607. return awsutil.Prettify(s)
  9608. }
  9609. // GoString returns the string representation
  9610. func (s MethodSetting) GoString() string {
  9611. return s.String()
  9612. }
  9613. // Represents a summary of a Method resource, given a particular date and time.
  9614. type MethodSnapshot struct {
  9615. _ struct{} `type:"structure"`
  9616. // Specifies whether the method requires a valid ApiKey.
  9617. ApiKeyRequired *bool `locationName:"apiKeyRequired" type:"boolean"`
  9618. // Specifies the type of authorization used for the method.
  9619. AuthorizationType *string `locationName:"authorizationType" type:"string"`
  9620. }
  9621. // String returns the string representation
  9622. func (s MethodSnapshot) String() string {
  9623. return awsutil.Prettify(s)
  9624. }
  9625. // GoString returns the string representation
  9626. func (s MethodSnapshot) GoString() string {
  9627. return s.String()
  9628. }
  9629. // Represents the data structure of a method's request or response payload.
  9630. //
  9631. // A request model defines the data structure of the client-supplied request
  9632. // payload. A response model defines the data structure of the response payload
  9633. // returned by the back end. Although not required, models are useful for mapping
  9634. // payloads between the front end and back end.
  9635. //
  9636. // A model is used for generating an API's SDK, validating the input request
  9637. // body, and creating a skeletal mapping template.
  9638. //
  9639. // Method, MethodResponse, Models and Mappings (http://docs.aws.amazon.com/apigateway/latest/developerguide/models-mappings.html)
  9640. type Model struct {
  9641. _ struct{} `type:"structure"`
  9642. // The content-type for the model.
  9643. ContentType *string `locationName:"contentType" type:"string"`
  9644. // The description of the model.
  9645. Description *string `locationName:"description" type:"string"`
  9646. // The identifier for the model resource.
  9647. Id *string `locationName:"id" type:"string"`
  9648. // The name of the model.
  9649. Name *string `locationName:"name" type:"string"`
  9650. // The schema for the model. For application/json models, this should be JSON-schema
  9651. // draft v4 (http://json-schema.org/documentation.html) model. Do not include
  9652. // "\*/" characters in the description of any properties because such "\*/"
  9653. // characters may be interpreted as the closing marker for comments in some
  9654. // languages, such as Java or JavaScript, causing the installation of your API's
  9655. // SDK generated by API Gateway to fail.
  9656. Schema *string `locationName:"schema" type:"string"`
  9657. }
  9658. // String returns the string representation
  9659. func (s Model) String() string {
  9660. return awsutil.Prettify(s)
  9661. }
  9662. // GoString returns the string representation
  9663. func (s Model) GoString() string {
  9664. return s.String()
  9665. }
  9666. // A single patch operation to apply to the specified resource. Please refer
  9667. // to http://tools.ietf.org/html/rfc6902#section-4 for an explanation of how
  9668. // each operation is used.
  9669. type PatchOperation struct {
  9670. _ struct{} `type:"structure"`
  9671. // Not supported.
  9672. From *string `locationName:"from" type:"string"`
  9673. // An update operation to be performed with this PATCH request. The valid value
  9674. // can be "add", "remove", or "replace". Not all valid operations are supported
  9675. // for a given resource. Support of the operations depends on specific operational
  9676. // contexts. Attempts to apply an unsupported operation on a resource will return
  9677. // an error message.
  9678. Op *string `locationName:"op" type:"string" enum:"Op"`
  9679. // The op operation's target, as identified by a JSON Pointer (https://tools.ietf.org/html/draft-ietf-appsawg-json-pointer-08)
  9680. // value that references a location within the targeted resource. For example,
  9681. // if the target resource has an updateable property of {"name":"value"}, the
  9682. // path for this property is /name. If the name property value is a JSON object
  9683. // (e.g., {"name": {"child/name": "child-value"}}), the path for the child/name
  9684. // property will be /name/child~1name. Any slash ("/") character appearing in
  9685. // path names must be escaped with "~1", as shown in the example above. Each
  9686. // op operation can have only one path associated with it.
  9687. Path *string `locationName:"path" type:"string"`
  9688. // The new target value of the update operation.
  9689. Value *string `locationName:"value" type:"string"`
  9690. }
  9691. // String returns the string representation
  9692. func (s PatchOperation) String() string {
  9693. return awsutil.Prettify(s)
  9694. }
  9695. // GoString returns the string representation
  9696. func (s PatchOperation) GoString() string {
  9697. return s.String()
  9698. }
  9699. // Represents a put integration request.
  9700. type PutIntegrationInput struct {
  9701. _ struct{} `type:"structure"`
  9702. // Specifies a put integration input's cache key parameters.
  9703. CacheKeyParameters []*string `locationName:"cacheKeyParameters" type:"list"`
  9704. // Specifies a put integration input's cache namespace.
  9705. CacheNamespace *string `locationName:"cacheNamespace" type:"string"`
  9706. // Specifies whether credentials are required for a put integration.
  9707. Credentials *string `locationName:"credentials" type:"string"`
  9708. // Specifies a put integration request's HTTP method.
  9709. //
  9710. // HttpMethod is a required field
  9711. HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"`
  9712. // Specifies a put integration HTTP method. When the integration type is HTTP
  9713. // or AWS, this field is required.
  9714. IntegrationHttpMethod *string `locationName:"httpMethod" type:"string"`
  9715. // Specifies the pass-through behavior for incoming requests based on the Content-Type
  9716. // header in the request, and the available mapping templates specified as the
  9717. // requestTemplates property on the Integration resource. There are three valid
  9718. // values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and NEVER.
  9719. //
  9720. // * WHEN_NO_MATCH passes the request body for unmapped content types through
  9721. // to the integration back end without transformation.
  9722. //
  9723. // * NEVER rejects unmapped content types with an HTTP 415 'Unsupported Media
  9724. // Type' response.
  9725. //
  9726. // * WHEN_NO_TEMPLATES allows pass-through when the integration has NO content
  9727. // types mapped to templates. However if there is at least one content type
  9728. // defined, unmapped content types will be rejected with the same 415 response.
  9729. PassthroughBehavior *string `locationName:"passthroughBehavior" type:"string"`
  9730. // A key-value map specifying request parameters that are passed from the method
  9731. // request to the back end. The key is an integration request parameter name
  9732. // and the associated value is a method request parameter value or static value
  9733. // that must be enclosed within single quotes and pre-encoded as required by
  9734. // the back end. The method request parameter value must match the pattern of
  9735. // method.request.{location}.{name}, where location is querystring, path, or
  9736. // header and name must be a valid and unique method request parameter name.
  9737. RequestParameters map[string]*string `locationName:"requestParameters" type:"map"`
  9738. // Represents a map of Velocity templates that are applied on the request payload
  9739. // based on the value of the Content-Type header sent by the client. The content
  9740. // type value is the key in this map, and the template (as a String) is the
  9741. // value.
  9742. RequestTemplates map[string]*string `locationName:"requestTemplates" type:"map"`
  9743. // Specifies a put integration request's resource ID.
  9744. //
  9745. // ResourceId is a required field
  9746. ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"`
  9747. // Specifies a put integration request's API identifier.
  9748. //
  9749. // RestApiId is a required field
  9750. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  9751. // Specifies a put integration input's type.
  9752. //
  9753. // Type is a required field
  9754. Type *string `locationName:"type" type:"string" required:"true" enum:"IntegrationType"`
  9755. // Specifies a put integration input's Uniform Resource Identifier (URI). When
  9756. // the integration type is HTTP or AWS, this field is required. For integration
  9757. // with Lambda as an AWS service proxy, this value is of the 'arn:aws:apigateway:<region>:lambda:path/2015-03-31/functions/<functionArn>/invocations'
  9758. // format.
  9759. Uri *string `locationName:"uri" type:"string"`
  9760. }
  9761. // String returns the string representation
  9762. func (s PutIntegrationInput) String() string {
  9763. return awsutil.Prettify(s)
  9764. }
  9765. // GoString returns the string representation
  9766. func (s PutIntegrationInput) GoString() string {
  9767. return s.String()
  9768. }
  9769. // Validate inspects the fields of the type to determine if they are valid.
  9770. func (s *PutIntegrationInput) Validate() error {
  9771. invalidParams := request.ErrInvalidParams{Context: "PutIntegrationInput"}
  9772. if s.HttpMethod == nil {
  9773. invalidParams.Add(request.NewErrParamRequired("HttpMethod"))
  9774. }
  9775. if s.ResourceId == nil {
  9776. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  9777. }
  9778. if s.RestApiId == nil {
  9779. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  9780. }
  9781. if s.Type == nil {
  9782. invalidParams.Add(request.NewErrParamRequired("Type"))
  9783. }
  9784. if invalidParams.Len() > 0 {
  9785. return invalidParams
  9786. }
  9787. return nil
  9788. }
  9789. // Represents a put integration response request.
  9790. type PutIntegrationResponseInput struct {
  9791. _ struct{} `type:"structure"`
  9792. // Specifies a put integration response request's HTTP method.
  9793. //
  9794. // HttpMethod is a required field
  9795. HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"`
  9796. // Specifies a put integration response request's resource identifier.
  9797. //
  9798. // ResourceId is a required field
  9799. ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"`
  9800. // A key-value map specifying response parameters that are passed to the method
  9801. // response from the back end. The key is a method response header parameter
  9802. // name and the mapped value is an integration response header value, a static
  9803. // value enclosed within a pair of single quotes, or a JSON expression from
  9804. // the integration response body. The mapping key must match the pattern of
  9805. // method.response.header.{name}, where name is a valid and unique header name.
  9806. // The mapped non-static value must match the pattern of integration.response.header.{name}
  9807. // or integration.response.body.{JSON-expression}, where name must be a valid
  9808. // and unique response header name and JSON-expression a valid JSON expression
  9809. // without the $ prefix.
  9810. ResponseParameters map[string]*string `locationName:"responseParameters" type:"map"`
  9811. // Specifies a put integration response's templates.
  9812. ResponseTemplates map[string]*string `locationName:"responseTemplates" type:"map"`
  9813. // Specifies a put integration response request's API identifier.
  9814. //
  9815. // RestApiId is a required field
  9816. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  9817. // Specifies the selection pattern of a put integration response.
  9818. SelectionPattern *string `locationName:"selectionPattern" type:"string"`
  9819. // Specifies the status code that is used to map the integration response to
  9820. // an existing MethodResponse.
  9821. //
  9822. // StatusCode is a required field
  9823. StatusCode *string `location:"uri" locationName:"status_code" type:"string" required:"true"`
  9824. }
  9825. // String returns the string representation
  9826. func (s PutIntegrationResponseInput) String() string {
  9827. return awsutil.Prettify(s)
  9828. }
  9829. // GoString returns the string representation
  9830. func (s PutIntegrationResponseInput) GoString() string {
  9831. return s.String()
  9832. }
  9833. // Validate inspects the fields of the type to determine if they are valid.
  9834. func (s *PutIntegrationResponseInput) Validate() error {
  9835. invalidParams := request.ErrInvalidParams{Context: "PutIntegrationResponseInput"}
  9836. if s.HttpMethod == nil {
  9837. invalidParams.Add(request.NewErrParamRequired("HttpMethod"))
  9838. }
  9839. if s.ResourceId == nil {
  9840. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  9841. }
  9842. if s.RestApiId == nil {
  9843. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  9844. }
  9845. if s.StatusCode == nil {
  9846. invalidParams.Add(request.NewErrParamRequired("StatusCode"))
  9847. }
  9848. if invalidParams.Len() > 0 {
  9849. return invalidParams
  9850. }
  9851. return nil
  9852. }
  9853. // Request to add a method to an existing Resource resource.
  9854. type PutMethodInput struct {
  9855. _ struct{} `type:"structure"`
  9856. // Specifies whether the method required a valid ApiKey.
  9857. ApiKeyRequired *bool `locationName:"apiKeyRequired" type:"boolean"`
  9858. // Specifies the type of authorization used for the method.
  9859. //
  9860. // AuthorizationType is a required field
  9861. AuthorizationType *string `locationName:"authorizationType" type:"string" required:"true"`
  9862. // Specifies the identifier of an Authorizer to use on this Method, if the type
  9863. // is CUSTOM.
  9864. AuthorizerId *string `locationName:"authorizerId" type:"string"`
  9865. // Specifies the method request's HTTP method type.
  9866. //
  9867. // HttpMethod is a required field
  9868. HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"`
  9869. // Specifies the Model resources used for the request's content type. Request
  9870. // models are represented as a key/value map, with a content type as the key
  9871. // and a Model name as the value.
  9872. RequestModels map[string]*string `locationName:"requestModels" type:"map"`
  9873. // A key-value map defining required or optional method request parameters that
  9874. // can be accepted by Amazon API Gateway. A key defines a method request parameter
  9875. // name matching the pattern of method.request.{location}.{name}, where location
  9876. // is querystring, path, or header and name is a valid and unique parameter
  9877. // name. The value associated with the key is a Boolean flag indicating whether
  9878. // the parameter is required (true) or optional (false). The method request
  9879. // parameter names defined here are available in Integration to be mapped to
  9880. // integration request parameters or body-mapping templates.
  9881. RequestParameters map[string]*bool `locationName:"requestParameters" type:"map"`
  9882. // The Resource identifier for the new Method resource.
  9883. //
  9884. // ResourceId is a required field
  9885. ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"`
  9886. // The RestApi identifier for the new Method resource.
  9887. //
  9888. // RestApiId is a required field
  9889. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  9890. }
  9891. // String returns the string representation
  9892. func (s PutMethodInput) String() string {
  9893. return awsutil.Prettify(s)
  9894. }
  9895. // GoString returns the string representation
  9896. func (s PutMethodInput) GoString() string {
  9897. return s.String()
  9898. }
  9899. // Validate inspects the fields of the type to determine if they are valid.
  9900. func (s *PutMethodInput) Validate() error {
  9901. invalidParams := request.ErrInvalidParams{Context: "PutMethodInput"}
  9902. if s.AuthorizationType == nil {
  9903. invalidParams.Add(request.NewErrParamRequired("AuthorizationType"))
  9904. }
  9905. if s.HttpMethod == nil {
  9906. invalidParams.Add(request.NewErrParamRequired("HttpMethod"))
  9907. }
  9908. if s.ResourceId == nil {
  9909. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  9910. }
  9911. if s.RestApiId == nil {
  9912. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  9913. }
  9914. if invalidParams.Len() > 0 {
  9915. return invalidParams
  9916. }
  9917. return nil
  9918. }
  9919. // Request to add a MethodResponse to an existing Method resource.
  9920. type PutMethodResponseInput struct {
  9921. _ struct{} `type:"structure"`
  9922. // The HTTP verb of the Method resource.
  9923. //
  9924. // HttpMethod is a required field
  9925. HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"`
  9926. // The Resource identifier for the Method resource.
  9927. //
  9928. // ResourceId is a required field
  9929. ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"`
  9930. // Specifies the Model resources used for the response's content type. Response
  9931. // models are represented as a key/value map, with a content type as the key
  9932. // and a Model name as the value.
  9933. ResponseModels map[string]*string `locationName:"responseModels" type:"map"`
  9934. // A key-value map specifying required or optional response parameters that
  9935. // Amazon API Gateway can send back to the caller. A key defines a method response
  9936. // header name and the associated value is a Boolean flag indicating whether
  9937. // the method response parameter is required or not. The method response header
  9938. // names must match the pattern of method.response.header.{name}, where name
  9939. // is a valid and unique header name. The response parameter names defined here
  9940. // are available in the integration response to be mapped from an integration
  9941. // response header expressed in integration.response.header.{name}, a static
  9942. // value enclosed within a pair of single quotes (e.g., 'application/json'),
  9943. // or a JSON expression from the back-end response payload in the form of integration.response.body.{JSON-expression},
  9944. // where JSON-expression is a valid JSON expression without the $ prefix.)
  9945. ResponseParameters map[string]*bool `locationName:"responseParameters" type:"map"`
  9946. // The RestApi identifier for the Method resource.
  9947. //
  9948. // RestApiId is a required field
  9949. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  9950. // The method response's status code.
  9951. //
  9952. // StatusCode is a required field
  9953. StatusCode *string `location:"uri" locationName:"status_code" type:"string" required:"true"`
  9954. }
  9955. // String returns the string representation
  9956. func (s PutMethodResponseInput) String() string {
  9957. return awsutil.Prettify(s)
  9958. }
  9959. // GoString returns the string representation
  9960. func (s PutMethodResponseInput) GoString() string {
  9961. return s.String()
  9962. }
  9963. // Validate inspects the fields of the type to determine if they are valid.
  9964. func (s *PutMethodResponseInput) Validate() error {
  9965. invalidParams := request.ErrInvalidParams{Context: "PutMethodResponseInput"}
  9966. if s.HttpMethod == nil {
  9967. invalidParams.Add(request.NewErrParamRequired("HttpMethod"))
  9968. }
  9969. if s.ResourceId == nil {
  9970. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  9971. }
  9972. if s.RestApiId == nil {
  9973. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  9974. }
  9975. if s.StatusCode == nil {
  9976. invalidParams.Add(request.NewErrParamRequired("StatusCode"))
  9977. }
  9978. if invalidParams.Len() > 0 {
  9979. return invalidParams
  9980. }
  9981. return nil
  9982. }
  9983. // A PUT request to update an existing API, with external API definitions specified
  9984. // as the request body.
  9985. type PutRestApiInput struct {
  9986. _ struct{} `type:"structure" payload:"Body"`
  9987. // The PUT request body containing external API definitions. Currently, only
  9988. // Swagger definition JSON files are supported.
  9989. //
  9990. // Body is a required field
  9991. Body []byte `locationName:"body" type:"blob" required:"true"`
  9992. // A query parameter to indicate whether to rollback the API update (true) or
  9993. // not (false) when a warning is encountered. The default value is false.
  9994. FailOnWarnings *bool `location:"querystring" locationName:"failonwarnings" type:"boolean"`
  9995. // The mode query parameter to specify the update mode. Valid values are "merge"
  9996. // and "overwrite". By default, the update mode is "merge".
  9997. Mode *string `location:"querystring" locationName:"mode" type:"string" enum:"PutMode"`
  9998. // Custom headers supplied as part of the request.
  9999. Parameters map[string]*string `location:"querystring" locationName:"parameters" type:"map"`
  10000. // The identifier of the RestApi to be updated.
  10001. //
  10002. // RestApiId is a required field
  10003. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  10004. }
  10005. // String returns the string representation
  10006. func (s PutRestApiInput) String() string {
  10007. return awsutil.Prettify(s)
  10008. }
  10009. // GoString returns the string representation
  10010. func (s PutRestApiInput) GoString() string {
  10011. return s.String()
  10012. }
  10013. // Validate inspects the fields of the type to determine if they are valid.
  10014. func (s *PutRestApiInput) Validate() error {
  10015. invalidParams := request.ErrInvalidParams{Context: "PutRestApiInput"}
  10016. if s.Body == nil {
  10017. invalidParams.Add(request.NewErrParamRequired("Body"))
  10018. }
  10019. if s.RestApiId == nil {
  10020. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  10021. }
  10022. if invalidParams.Len() > 0 {
  10023. return invalidParams
  10024. }
  10025. return nil
  10026. }
  10027. // Quotas configured for a usage plan.
  10028. type QuotaSettings struct {
  10029. _ struct{} `type:"structure"`
  10030. // The maximum number of requests that can be made in a given time period.
  10031. Limit *int64 `locationName:"limit" type:"integer"`
  10032. // The number of requests subtracted from the given limit in the initial time
  10033. // period.
  10034. Offset *int64 `locationName:"offset" type:"integer"`
  10035. // The time period in which the limit applies. Valid values are "DAY", "WEEK"
  10036. // or "MONTH".
  10037. Period *string `locationName:"period" type:"string" enum:"QuotaPeriodType"`
  10038. }
  10039. // String returns the string representation
  10040. func (s QuotaSettings) String() string {
  10041. return awsutil.Prettify(s)
  10042. }
  10043. // GoString returns the string representation
  10044. func (s QuotaSettings) GoString() string {
  10045. return s.String()
  10046. }
  10047. // Represents an API resource.
  10048. //
  10049. // Create an API (http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-create-api.html)
  10050. type Resource struct {
  10051. _ struct{} `type:"structure"`
  10052. // The resource's identifier.
  10053. Id *string `locationName:"id" type:"string"`
  10054. // The parent resource's identifier.
  10055. ParentId *string `locationName:"parentId" type:"string"`
  10056. // The full path for this resource.
  10057. Path *string `locationName:"path" type:"string"`
  10058. // The last path segment for this resource.
  10059. PathPart *string `locationName:"pathPart" type:"string"`
  10060. // Gets an API resource's method of a given HTTP verb.
  10061. //
  10062. // The resource methods are a map of methods indexed by methods' HTTP verbs
  10063. // enabled on the resource. This method map is included in the 200 OK response
  10064. // of the GET /restapis/{restapi_id}/resources/{resource_id} or GET /restapis/{restapi_id}/resources/{resource_id}?embed=methods
  10065. // request.
  10066. //
  10067. // Example: Get the GET method of an API resource
  10068. //
  10069. // Request
  10070. //
  10071. // GET /restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET HTTP/1.1 Content-Type:
  10072. // application/json Host: apigateway.us-east-1.amazonaws.com X-Amz-Date: 20160608T031827Z
  10073. // Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160608/us-east-1/apigateway/aws4_request,
  10074. // SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash}
  10075. // Response
  10076. //
  10077. // { "_links": { "curies": [ { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-{rel}.html",
  10078. // "name": "integration", "templated": true }, { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html",
  10079. // "name": "integrationresponse", "templated": true }, { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-{rel}.html",
  10080. // "name": "method", "templated": true }, { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-response-{rel}.html",
  10081. // "name": "methodresponse", "templated": true } ], "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET",
  10082. // "name": "GET", "title": "GET" }, "integration:put": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration"
  10083. // }, "method:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET"
  10084. // }, "method:integration": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration"
  10085. // }, "method:responses": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200",
  10086. // "name": "200", "title": "200" }, "method:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET"
  10087. // }, "methodresponse:put": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/{status_code}",
  10088. // "templated": true } }, "apiKeyRequired": false, "authorizationType": "NONE",
  10089. // "httpMethod": "GET", "_embedded": { "method:integration": { "_links": { "self":
  10090. // { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration"
  10091. // }, "integration:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration"
  10092. // }, "integration:responses": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200",
  10093. // "name": "200", "title": "200" }, "integration:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration"
  10094. // }, "integrationresponse:put": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/{status_code}",
  10095. // "templated": true } }, "cacheKeyParameters": [], "cacheNamespace": "3kzxbg5sa2",
  10096. // "credentials": "arn:aws:iam::123456789012:role/apigAwsProxyRole", "httpMethod":
  10097. // "POST", "passthroughBehavior": "WHEN_NO_MATCH", "requestParameters": { "integration.request.header.Content-Type":
  10098. // "'application/x-amz-json-1.1'" }, "requestTemplates": { "application/json":
  10099. // "{\n}" }, "type": "AWS", "uri": "arn:aws:apigateway:us-east-1:kinesis:action/ListStreams",
  10100. // "_embedded": { "integration:responses": { "_links": { "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200",
  10101. // "name": "200", "title": "200" }, "integrationresponse:delete": { "href":
  10102. // "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200"
  10103. // }, "integrationresponse:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200"
  10104. // } }, "responseParameters": { "method.response.header.Content-Type": "'application/xml'"
  10105. // }, "responseTemplates": { "application/json": "$util.urlDecode(\"%3CkinesisStreams%3E#foreach($stream
  10106. // in $input.path('$.StreamNames'))%3Cstream%3E%3Cname%3E$stream%3C/name%3E%3C/stream%3E#end%3C/kinesisStreams%3E\")\n"
  10107. // }, "statusCode": "200" } } }, "method:responses": { "_links": { "self": {
  10108. // "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200",
  10109. // "name": "200", "title": "200" }, "methodresponse:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200"
  10110. // }, "methodresponse:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200"
  10111. // } }, "responseModels": { "application/json": "Empty" }, "responseParameters":
  10112. // { "method.response.header.Content-Type": false }, "statusCode": "200" } }
  10113. // }
  10114. // If the OPTIONS is enabled on the resource, you can follow the example here
  10115. // to get that method. Just replace the GET of the last path segment in the
  10116. // request URL with OPTIONS.
  10117. ResourceMethods map[string]*Method `locationName:"resourceMethods" type:"map"`
  10118. }
  10119. // String returns the string representation
  10120. func (s Resource) String() string {
  10121. return awsutil.Prettify(s)
  10122. }
  10123. // GoString returns the string representation
  10124. func (s Resource) GoString() string {
  10125. return s.String()
  10126. }
  10127. // Represents a REST API.
  10128. //
  10129. // Create an API (http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-create-api.html)
  10130. type RestApi struct {
  10131. _ struct{} `type:"structure"`
  10132. // The date when the API was created, in ISO 8601 format (http://www.iso.org/iso/home/standards/iso8601.htm).
  10133. CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"`
  10134. // The API's description.
  10135. Description *string `locationName:"description" type:"string"`
  10136. // The API's identifier. This identifier is unique across all of your APIs in
  10137. // Amazon API Gateway.
  10138. Id *string `locationName:"id" type:"string"`
  10139. // The API's name.
  10140. Name *string `locationName:"name" type:"string"`
  10141. // The warning messages reported when failonwarnings is turned on during API
  10142. // import.
  10143. Warnings []*string `locationName:"warnings" type:"list"`
  10144. }
  10145. // String returns the string representation
  10146. func (s RestApi) String() string {
  10147. return awsutil.Prettify(s)
  10148. }
  10149. // GoString returns the string representation
  10150. func (s RestApi) GoString() string {
  10151. return s.String()
  10152. }
  10153. // Represents a unique identifier for a version of a deployed RestApi that is
  10154. // callable by users.
  10155. //
  10156. // Deploy an API (http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-deploy-api.html)
  10157. type Stage struct {
  10158. _ struct{} `type:"structure"`
  10159. // Specifies whether a cache cluster is enabled for the stage.
  10160. CacheClusterEnabled *bool `locationName:"cacheClusterEnabled" type:"boolean"`
  10161. // The size of the cache cluster for the stage, if enabled.
  10162. CacheClusterSize *string `locationName:"cacheClusterSize" type:"string" enum:"CacheClusterSize"`
  10163. // The status of the cache cluster for the stage, if enabled.
  10164. CacheClusterStatus *string `locationName:"cacheClusterStatus" type:"string" enum:"CacheClusterStatus"`
  10165. // The identifier of a client certificate for an API stage.
  10166. ClientCertificateId *string `locationName:"clientCertificateId" type:"string"`
  10167. // The date and time that the stage was created, in ISO 8601 format (http://www.iso.org/iso/home/standards/iso8601.htm).
  10168. CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"`
  10169. // The identifier of the Deployment that the stage points to.
  10170. DeploymentId *string `locationName:"deploymentId" type:"string"`
  10171. // The stage's description.
  10172. Description *string `locationName:"description" type:"string"`
  10173. // The date and time that information about the stage was last updated, in ISO
  10174. // 8601 format (http://www.iso.org/iso/home/standards/iso8601.htm).
  10175. LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"unix"`
  10176. // A map that defines the method settings for a Stage resource. Keys (designated
  10177. // as /{method_setting_key below) are method paths defined as {resource_path}/{http_method}
  10178. // for an individual method override, or /\*/\* for overriding all methods in
  10179. // the stage.
  10180. MethodSettings map[string]*MethodSetting `locationName:"methodSettings" type:"map"`
  10181. // The name of the stage is the first path segment in the Uniform Resource Identifier
  10182. // (URI) of a call to Amazon API Gateway.
  10183. StageName *string `locationName:"stageName" type:"string"`
  10184. // A map that defines the stage variables for a Stage resource. Variable names
  10185. // can have alphanumeric and underscore characters, and the values must match
  10186. // [A-Za-z0-9-._~:/?#&=,]+.
  10187. Variables map[string]*string `locationName:"variables" type:"map"`
  10188. }
  10189. // String returns the string representation
  10190. func (s Stage) String() string {
  10191. return awsutil.Prettify(s)
  10192. }
  10193. // GoString returns the string representation
  10194. func (s Stage) GoString() string {
  10195. return s.String()
  10196. }
  10197. // A reference to a unique stage identified in the format {restApiId}/{stage}.
  10198. type StageKey struct {
  10199. _ struct{} `type:"structure"`
  10200. // A list of Stage resources that are associated with the ApiKey resource.
  10201. RestApiId *string `locationName:"restApiId" type:"string"`
  10202. // The stage name in the RestApi that the stage key references.
  10203. StageName *string `locationName:"stageName" type:"string"`
  10204. }
  10205. // String returns the string representation
  10206. func (s StageKey) String() string {
  10207. return awsutil.Prettify(s)
  10208. }
  10209. // GoString returns the string representation
  10210. func (s StageKey) GoString() string {
  10211. return s.String()
  10212. }
  10213. // Make a request to simulate the execution of an Authorizer.
  10214. type TestInvokeAuthorizerInput struct {
  10215. _ struct{} `type:"structure"`
  10216. // [Optional] A key-value map of additional context variables.
  10217. AdditionalContext map[string]*string `locationName:"additionalContext" type:"map"`
  10218. // Specifies a test invoke authorizer request's Authorizer ID.
  10219. //
  10220. // AuthorizerId is a required field
  10221. AuthorizerId *string `location:"uri" locationName:"authorizer_id" type:"string" required:"true"`
  10222. // [Optional] The simulated request body of an incoming invocation request.
  10223. Body *string `locationName:"body" type:"string"`
  10224. // [Required] A key-value map of headers to simulate an incoming invocation
  10225. // request. This is where the incoming authorization token, or identity source,
  10226. // should be specified.
  10227. Headers map[string]*string `locationName:"headers" type:"map"`
  10228. // [Optional] The URI path, including query string, of the simulated invocation
  10229. // request. Use this to specify path parameters and query string parameters.
  10230. PathWithQueryString *string `locationName:"pathWithQueryString" type:"string"`
  10231. // Specifies a test invoke authorizer request's RestApi identifier.
  10232. //
  10233. // RestApiId is a required field
  10234. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  10235. // A key-value map of stage variables to simulate an invocation on a deployed
  10236. // Stage.
  10237. StageVariables map[string]*string `locationName:"stageVariables" type:"map"`
  10238. }
  10239. // String returns the string representation
  10240. func (s TestInvokeAuthorizerInput) String() string {
  10241. return awsutil.Prettify(s)
  10242. }
  10243. // GoString returns the string representation
  10244. func (s TestInvokeAuthorizerInput) GoString() string {
  10245. return s.String()
  10246. }
  10247. // Validate inspects the fields of the type to determine if they are valid.
  10248. func (s *TestInvokeAuthorizerInput) Validate() error {
  10249. invalidParams := request.ErrInvalidParams{Context: "TestInvokeAuthorizerInput"}
  10250. if s.AuthorizerId == nil {
  10251. invalidParams.Add(request.NewErrParamRequired("AuthorizerId"))
  10252. }
  10253. if s.RestApiId == nil {
  10254. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  10255. }
  10256. if invalidParams.Len() > 0 {
  10257. return invalidParams
  10258. }
  10259. return nil
  10260. }
  10261. // Represents the response of the test invoke request for a custom Authorizer
  10262. type TestInvokeAuthorizerOutput struct {
  10263. _ struct{} `type:"structure"`
  10264. Authorization map[string][]*string `locationName:"authorization" type:"map"`
  10265. // The open identity claims (http://openid.net/specs/openid-connect-core-1_0.html#StandardClaims),
  10266. // with any supported custom attributes, returned from the Cognito Your User
  10267. // Pool configured for the API.
  10268. Claims map[string]*string `locationName:"claims" type:"map"`
  10269. // The HTTP status code that the client would have received. Value is 0 if the
  10270. // authorizer succeeded.
  10271. ClientStatus *int64 `locationName:"clientStatus" type:"integer"`
  10272. // The execution latency of the test authorizer request.
  10273. Latency *int64 `locationName:"latency" type:"long"`
  10274. // The Amazon API Gateway execution log for the test authorizer request.
  10275. Log *string `locationName:"log" type:"string"`
  10276. // The JSON policy document returned by the Authorizer
  10277. Policy *string `locationName:"policy" type:"string"`
  10278. // The principal identity returned by the Authorizer
  10279. PrincipalId *string `locationName:"principalId" type:"string"`
  10280. }
  10281. // String returns the string representation
  10282. func (s TestInvokeAuthorizerOutput) String() string {
  10283. return awsutil.Prettify(s)
  10284. }
  10285. // GoString returns the string representation
  10286. func (s TestInvokeAuthorizerOutput) GoString() string {
  10287. return s.String()
  10288. }
  10289. // Make a request to simulate the execution of a Method.
  10290. type TestInvokeMethodInput struct {
  10291. _ struct{} `type:"structure"`
  10292. // The simulated request body of an incoming invocation request.
  10293. Body *string `locationName:"body" type:"string"`
  10294. // A ClientCertificate identifier to use in the test invocation. API Gateway
  10295. // will use the certificate when making the HTTPS request to the defined back-end
  10296. // endpoint.
  10297. ClientCertificateId *string `locationName:"clientCertificateId" type:"string"`
  10298. // A key-value map of headers to simulate an incoming invocation request.
  10299. Headers map[string]*string `locationName:"headers" type:"map"`
  10300. // Specifies a test invoke method request's HTTP method.
  10301. //
  10302. // HttpMethod is a required field
  10303. HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"`
  10304. // The URI path, including query string, of the simulated invocation request.
  10305. // Use this to specify path parameters and query string parameters.
  10306. PathWithQueryString *string `locationName:"pathWithQueryString" type:"string"`
  10307. // Specifies a test invoke method request's resource ID.
  10308. //
  10309. // ResourceId is a required field
  10310. ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"`
  10311. // Specifies a test invoke method request's API identifier.
  10312. //
  10313. // RestApiId is a required field
  10314. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  10315. // A key-value map of stage variables to simulate an invocation on a deployed
  10316. // Stage.
  10317. StageVariables map[string]*string `locationName:"stageVariables" type:"map"`
  10318. }
  10319. // String returns the string representation
  10320. func (s TestInvokeMethodInput) String() string {
  10321. return awsutil.Prettify(s)
  10322. }
  10323. // GoString returns the string representation
  10324. func (s TestInvokeMethodInput) GoString() string {
  10325. return s.String()
  10326. }
  10327. // Validate inspects the fields of the type to determine if they are valid.
  10328. func (s *TestInvokeMethodInput) Validate() error {
  10329. invalidParams := request.ErrInvalidParams{Context: "TestInvokeMethodInput"}
  10330. if s.HttpMethod == nil {
  10331. invalidParams.Add(request.NewErrParamRequired("HttpMethod"))
  10332. }
  10333. if s.ResourceId == nil {
  10334. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  10335. }
  10336. if s.RestApiId == nil {
  10337. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  10338. }
  10339. if invalidParams.Len() > 0 {
  10340. return invalidParams
  10341. }
  10342. return nil
  10343. }
  10344. // Represents the response of the test invoke request in the HTTP method.
  10345. //
  10346. // Test API using the API Gateway console (http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-test-method.html#how-to-test-method-console)
  10347. type TestInvokeMethodOutput struct {
  10348. _ struct{} `type:"structure"`
  10349. // The body of the HTTP response.
  10350. Body *string `locationName:"body" type:"string"`
  10351. // The headers of the HTTP response.
  10352. Headers map[string]*string `locationName:"headers" type:"map"`
  10353. // The execution latency of the test invoke request.
  10354. Latency *int64 `locationName:"latency" type:"long"`
  10355. // The Amazon API Gateway execution log for the test invoke request.
  10356. Log *string `locationName:"log" type:"string"`
  10357. // The HTTP status code.
  10358. Status *int64 `locationName:"status" type:"integer"`
  10359. }
  10360. // String returns the string representation
  10361. func (s TestInvokeMethodOutput) String() string {
  10362. return awsutil.Prettify(s)
  10363. }
  10364. // GoString returns the string representation
  10365. func (s TestInvokeMethodOutput) GoString() string {
  10366. return s.String()
  10367. }
  10368. // The API request rate limits.
  10369. type ThrottleSettings struct {
  10370. _ struct{} `type:"structure"`
  10371. // The API request burst limit, the maximum rate limit over a time ranging from
  10372. // one to a few seconds, depending upon whether the underlying token bucket
  10373. // is at its full capacity.
  10374. BurstLimit *int64 `locationName:"burstLimit" type:"integer"`
  10375. // The API request steady-state rate limit.
  10376. RateLimit *float64 `locationName:"rateLimit" type:"double"`
  10377. }
  10378. // String returns the string representation
  10379. func (s ThrottleSettings) String() string {
  10380. return awsutil.Prettify(s)
  10381. }
  10382. // GoString returns the string representation
  10383. func (s ThrottleSettings) GoString() string {
  10384. return s.String()
  10385. }
  10386. // Requests Amazon API Gateway to change information about the current Account
  10387. // resource.
  10388. type UpdateAccountInput struct {
  10389. _ struct{} `type:"structure"`
  10390. // A list of update operations to be applied to the specified resource and in
  10391. // the order specified in this list.
  10392. PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"`
  10393. }
  10394. // String returns the string representation
  10395. func (s UpdateAccountInput) String() string {
  10396. return awsutil.Prettify(s)
  10397. }
  10398. // GoString returns the string representation
  10399. func (s UpdateAccountInput) GoString() string {
  10400. return s.String()
  10401. }
  10402. // A request to change information about an ApiKey resource.
  10403. type UpdateApiKeyInput struct {
  10404. _ struct{} `type:"structure"`
  10405. // The identifier of the ApiKey resource to be updated.
  10406. //
  10407. // ApiKey is a required field
  10408. ApiKey *string `location:"uri" locationName:"api_Key" type:"string" required:"true"`
  10409. // A list of update operations to be applied to the specified resource and in
  10410. // the order specified in this list.
  10411. PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"`
  10412. }
  10413. // String returns the string representation
  10414. func (s UpdateApiKeyInput) String() string {
  10415. return awsutil.Prettify(s)
  10416. }
  10417. // GoString returns the string representation
  10418. func (s UpdateApiKeyInput) GoString() string {
  10419. return s.String()
  10420. }
  10421. // Validate inspects the fields of the type to determine if they are valid.
  10422. func (s *UpdateApiKeyInput) Validate() error {
  10423. invalidParams := request.ErrInvalidParams{Context: "UpdateApiKeyInput"}
  10424. if s.ApiKey == nil {
  10425. invalidParams.Add(request.NewErrParamRequired("ApiKey"))
  10426. }
  10427. if invalidParams.Len() > 0 {
  10428. return invalidParams
  10429. }
  10430. return nil
  10431. }
  10432. // Request to update an existing Authorizer resource.
  10433. type UpdateAuthorizerInput struct {
  10434. _ struct{} `type:"structure"`
  10435. // The identifier of the Authorizer resource.
  10436. //
  10437. // AuthorizerId is a required field
  10438. AuthorizerId *string `location:"uri" locationName:"authorizer_id" type:"string" required:"true"`
  10439. // A list of update operations to be applied to the specified resource and in
  10440. // the order specified in this list.
  10441. PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"`
  10442. // The RestApi identifier for the Authorizer resource.
  10443. //
  10444. // RestApiId is a required field
  10445. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  10446. }
  10447. // String returns the string representation
  10448. func (s UpdateAuthorizerInput) String() string {
  10449. return awsutil.Prettify(s)
  10450. }
  10451. // GoString returns the string representation
  10452. func (s UpdateAuthorizerInput) GoString() string {
  10453. return s.String()
  10454. }
  10455. // Validate inspects the fields of the type to determine if they are valid.
  10456. func (s *UpdateAuthorizerInput) Validate() error {
  10457. invalidParams := request.ErrInvalidParams{Context: "UpdateAuthorizerInput"}
  10458. if s.AuthorizerId == nil {
  10459. invalidParams.Add(request.NewErrParamRequired("AuthorizerId"))
  10460. }
  10461. if s.RestApiId == nil {
  10462. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  10463. }
  10464. if invalidParams.Len() > 0 {
  10465. return invalidParams
  10466. }
  10467. return nil
  10468. }
  10469. // A request to change information about the BasePathMapping resource.
  10470. type UpdateBasePathMappingInput struct {
  10471. _ struct{} `type:"structure"`
  10472. // The base path of the BasePathMapping resource to change.
  10473. //
  10474. // BasePath is a required field
  10475. BasePath *string `location:"uri" locationName:"base_path" type:"string" required:"true"`
  10476. // The domain name of the BasePathMapping resource to change.
  10477. //
  10478. // DomainName is a required field
  10479. DomainName *string `location:"uri" locationName:"domain_name" type:"string" required:"true"`
  10480. // A list of update operations to be applied to the specified resource and in
  10481. // the order specified in this list.
  10482. PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"`
  10483. }
  10484. // String returns the string representation
  10485. func (s UpdateBasePathMappingInput) String() string {
  10486. return awsutil.Prettify(s)
  10487. }
  10488. // GoString returns the string representation
  10489. func (s UpdateBasePathMappingInput) GoString() string {
  10490. return s.String()
  10491. }
  10492. // Validate inspects the fields of the type to determine if they are valid.
  10493. func (s *UpdateBasePathMappingInput) Validate() error {
  10494. invalidParams := request.ErrInvalidParams{Context: "UpdateBasePathMappingInput"}
  10495. if s.BasePath == nil {
  10496. invalidParams.Add(request.NewErrParamRequired("BasePath"))
  10497. }
  10498. if s.DomainName == nil {
  10499. invalidParams.Add(request.NewErrParamRequired("DomainName"))
  10500. }
  10501. if invalidParams.Len() > 0 {
  10502. return invalidParams
  10503. }
  10504. return nil
  10505. }
  10506. // A request to change information about an ClientCertificate resource.
  10507. type UpdateClientCertificateInput struct {
  10508. _ struct{} `type:"structure"`
  10509. // The identifier of the ClientCertificate resource to be updated.
  10510. //
  10511. // ClientCertificateId is a required field
  10512. ClientCertificateId *string `location:"uri" locationName:"clientcertificate_id" type:"string" required:"true"`
  10513. // A list of update operations to be applied to the specified resource and in
  10514. // the order specified in this list.
  10515. PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"`
  10516. }
  10517. // String returns the string representation
  10518. func (s UpdateClientCertificateInput) String() string {
  10519. return awsutil.Prettify(s)
  10520. }
  10521. // GoString returns the string representation
  10522. func (s UpdateClientCertificateInput) GoString() string {
  10523. return s.String()
  10524. }
  10525. // Validate inspects the fields of the type to determine if they are valid.
  10526. func (s *UpdateClientCertificateInput) Validate() error {
  10527. invalidParams := request.ErrInvalidParams{Context: "UpdateClientCertificateInput"}
  10528. if s.ClientCertificateId == nil {
  10529. invalidParams.Add(request.NewErrParamRequired("ClientCertificateId"))
  10530. }
  10531. if invalidParams.Len() > 0 {
  10532. return invalidParams
  10533. }
  10534. return nil
  10535. }
  10536. // Requests Amazon API Gateway to change information about a Deployment resource.
  10537. type UpdateDeploymentInput struct {
  10538. _ struct{} `type:"structure"`
  10539. // The replacement identifier for the Deployment resource to change information
  10540. // about.
  10541. //
  10542. // DeploymentId is a required field
  10543. DeploymentId *string `location:"uri" locationName:"deployment_id" type:"string" required:"true"`
  10544. // A list of update operations to be applied to the specified resource and in
  10545. // the order specified in this list.
  10546. PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"`
  10547. // The replacement identifier of the RestApi resource for the Deployment resource
  10548. // to change information about.
  10549. //
  10550. // RestApiId is a required field
  10551. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  10552. }
  10553. // String returns the string representation
  10554. func (s UpdateDeploymentInput) String() string {
  10555. return awsutil.Prettify(s)
  10556. }
  10557. // GoString returns the string representation
  10558. func (s UpdateDeploymentInput) GoString() string {
  10559. return s.String()
  10560. }
  10561. // Validate inspects the fields of the type to determine if they are valid.
  10562. func (s *UpdateDeploymentInput) Validate() error {
  10563. invalidParams := request.ErrInvalidParams{Context: "UpdateDeploymentInput"}
  10564. if s.DeploymentId == nil {
  10565. invalidParams.Add(request.NewErrParamRequired("DeploymentId"))
  10566. }
  10567. if s.RestApiId == nil {
  10568. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  10569. }
  10570. if invalidParams.Len() > 0 {
  10571. return invalidParams
  10572. }
  10573. return nil
  10574. }
  10575. // A request to change information about the DomainName resource.
  10576. type UpdateDomainNameInput struct {
  10577. _ struct{} `type:"structure"`
  10578. // The name of the DomainName resource to be changed.
  10579. //
  10580. // DomainName is a required field
  10581. DomainName *string `location:"uri" locationName:"domain_name" type:"string" required:"true"`
  10582. // A list of update operations to be applied to the specified resource and in
  10583. // the order specified in this list.
  10584. PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"`
  10585. }
  10586. // String returns the string representation
  10587. func (s UpdateDomainNameInput) String() string {
  10588. return awsutil.Prettify(s)
  10589. }
  10590. // GoString returns the string representation
  10591. func (s UpdateDomainNameInput) GoString() string {
  10592. return s.String()
  10593. }
  10594. // Validate inspects the fields of the type to determine if they are valid.
  10595. func (s *UpdateDomainNameInput) Validate() error {
  10596. invalidParams := request.ErrInvalidParams{Context: "UpdateDomainNameInput"}
  10597. if s.DomainName == nil {
  10598. invalidParams.Add(request.NewErrParamRequired("DomainName"))
  10599. }
  10600. if invalidParams.Len() > 0 {
  10601. return invalidParams
  10602. }
  10603. return nil
  10604. }
  10605. // Represents an update integration request.
  10606. type UpdateIntegrationInput struct {
  10607. _ struct{} `type:"structure"`
  10608. // Represents an update integration request's HTTP method.
  10609. //
  10610. // HttpMethod is a required field
  10611. HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"`
  10612. // A list of update operations to be applied to the specified resource and in
  10613. // the order specified in this list.
  10614. PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"`
  10615. // Represents an update integration request's resource identifier.
  10616. //
  10617. // ResourceId is a required field
  10618. ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"`
  10619. // Represents an update integration request's API identifier.
  10620. //
  10621. // RestApiId is a required field
  10622. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  10623. }
  10624. // String returns the string representation
  10625. func (s UpdateIntegrationInput) String() string {
  10626. return awsutil.Prettify(s)
  10627. }
  10628. // GoString returns the string representation
  10629. func (s UpdateIntegrationInput) GoString() string {
  10630. return s.String()
  10631. }
  10632. // Validate inspects the fields of the type to determine if they are valid.
  10633. func (s *UpdateIntegrationInput) Validate() error {
  10634. invalidParams := request.ErrInvalidParams{Context: "UpdateIntegrationInput"}
  10635. if s.HttpMethod == nil {
  10636. invalidParams.Add(request.NewErrParamRequired("HttpMethod"))
  10637. }
  10638. if s.ResourceId == nil {
  10639. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  10640. }
  10641. if s.RestApiId == nil {
  10642. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  10643. }
  10644. if invalidParams.Len() > 0 {
  10645. return invalidParams
  10646. }
  10647. return nil
  10648. }
  10649. // Represents an update integration response request.
  10650. type UpdateIntegrationResponseInput struct {
  10651. _ struct{} `type:"structure"`
  10652. // Specifies an update integration response request's HTTP method.
  10653. //
  10654. // HttpMethod is a required field
  10655. HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"`
  10656. // A list of update operations to be applied to the specified resource and in
  10657. // the order specified in this list.
  10658. PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"`
  10659. // Specifies an update integration response request's resource identifier.
  10660. //
  10661. // ResourceId is a required field
  10662. ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"`
  10663. // Specifies an update integration response request's API identifier.
  10664. //
  10665. // RestApiId is a required field
  10666. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  10667. // Specifies an update integration response request's status code.
  10668. //
  10669. // StatusCode is a required field
  10670. StatusCode *string `location:"uri" locationName:"status_code" type:"string" required:"true"`
  10671. }
  10672. // String returns the string representation
  10673. func (s UpdateIntegrationResponseInput) String() string {
  10674. return awsutil.Prettify(s)
  10675. }
  10676. // GoString returns the string representation
  10677. func (s UpdateIntegrationResponseInput) GoString() string {
  10678. return s.String()
  10679. }
  10680. // Validate inspects the fields of the type to determine if they are valid.
  10681. func (s *UpdateIntegrationResponseInput) Validate() error {
  10682. invalidParams := request.ErrInvalidParams{Context: "UpdateIntegrationResponseInput"}
  10683. if s.HttpMethod == nil {
  10684. invalidParams.Add(request.NewErrParamRequired("HttpMethod"))
  10685. }
  10686. if s.ResourceId == nil {
  10687. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  10688. }
  10689. if s.RestApiId == nil {
  10690. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  10691. }
  10692. if s.StatusCode == nil {
  10693. invalidParams.Add(request.NewErrParamRequired("StatusCode"))
  10694. }
  10695. if invalidParams.Len() > 0 {
  10696. return invalidParams
  10697. }
  10698. return nil
  10699. }
  10700. // Request to update an existing Method resource.
  10701. type UpdateMethodInput struct {
  10702. _ struct{} `type:"structure"`
  10703. // The HTTP verb of the Method resource.
  10704. //
  10705. // HttpMethod is a required field
  10706. HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"`
  10707. // A list of update operations to be applied to the specified resource and in
  10708. // the order specified in this list.
  10709. PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"`
  10710. // The Resource identifier for the Method resource.
  10711. //
  10712. // ResourceId is a required field
  10713. ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"`
  10714. // The RestApi identifier for the Method resource.
  10715. //
  10716. // RestApiId is a required field
  10717. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  10718. }
  10719. // String returns the string representation
  10720. func (s UpdateMethodInput) String() string {
  10721. return awsutil.Prettify(s)
  10722. }
  10723. // GoString returns the string representation
  10724. func (s UpdateMethodInput) GoString() string {
  10725. return s.String()
  10726. }
  10727. // Validate inspects the fields of the type to determine if they are valid.
  10728. func (s *UpdateMethodInput) Validate() error {
  10729. invalidParams := request.ErrInvalidParams{Context: "UpdateMethodInput"}
  10730. if s.HttpMethod == nil {
  10731. invalidParams.Add(request.NewErrParamRequired("HttpMethod"))
  10732. }
  10733. if s.ResourceId == nil {
  10734. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  10735. }
  10736. if s.RestApiId == nil {
  10737. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  10738. }
  10739. if invalidParams.Len() > 0 {
  10740. return invalidParams
  10741. }
  10742. return nil
  10743. }
  10744. // A request to update an existing MethodResponse resource.
  10745. type UpdateMethodResponseInput struct {
  10746. _ struct{} `type:"structure"`
  10747. // The HTTP verb of the Method resource.
  10748. //
  10749. // HttpMethod is a required field
  10750. HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"`
  10751. // A list of update operations to be applied to the specified resource and in
  10752. // the order specified in this list.
  10753. PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"`
  10754. // The Resource identifier for the MethodResponse resource.
  10755. //
  10756. // ResourceId is a required field
  10757. ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"`
  10758. // The RestApi identifier for the MethodResponse resource.
  10759. //
  10760. // RestApiId is a required field
  10761. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  10762. // The status code for the MethodResponse resource.
  10763. //
  10764. // StatusCode is a required field
  10765. StatusCode *string `location:"uri" locationName:"status_code" type:"string" required:"true"`
  10766. }
  10767. // String returns the string representation
  10768. func (s UpdateMethodResponseInput) String() string {
  10769. return awsutil.Prettify(s)
  10770. }
  10771. // GoString returns the string representation
  10772. func (s UpdateMethodResponseInput) GoString() string {
  10773. return s.String()
  10774. }
  10775. // Validate inspects the fields of the type to determine if they are valid.
  10776. func (s *UpdateMethodResponseInput) Validate() error {
  10777. invalidParams := request.ErrInvalidParams{Context: "UpdateMethodResponseInput"}
  10778. if s.HttpMethod == nil {
  10779. invalidParams.Add(request.NewErrParamRequired("HttpMethod"))
  10780. }
  10781. if s.ResourceId == nil {
  10782. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  10783. }
  10784. if s.RestApiId == nil {
  10785. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  10786. }
  10787. if s.StatusCode == nil {
  10788. invalidParams.Add(request.NewErrParamRequired("StatusCode"))
  10789. }
  10790. if invalidParams.Len() > 0 {
  10791. return invalidParams
  10792. }
  10793. return nil
  10794. }
  10795. // Request to update an existing model in an existing RestApi resource.
  10796. type UpdateModelInput struct {
  10797. _ struct{} `type:"structure"`
  10798. // The name of the model to update.
  10799. //
  10800. // ModelName is a required field
  10801. ModelName *string `location:"uri" locationName:"model_name" type:"string" required:"true"`
  10802. // A list of update operations to be applied to the specified resource and in
  10803. // the order specified in this list.
  10804. PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"`
  10805. // The RestApi identifier under which the model exists.
  10806. //
  10807. // RestApiId is a required field
  10808. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  10809. }
  10810. // String returns the string representation
  10811. func (s UpdateModelInput) String() string {
  10812. return awsutil.Prettify(s)
  10813. }
  10814. // GoString returns the string representation
  10815. func (s UpdateModelInput) GoString() string {
  10816. return s.String()
  10817. }
  10818. // Validate inspects the fields of the type to determine if they are valid.
  10819. func (s *UpdateModelInput) Validate() error {
  10820. invalidParams := request.ErrInvalidParams{Context: "UpdateModelInput"}
  10821. if s.ModelName == nil {
  10822. invalidParams.Add(request.NewErrParamRequired("ModelName"))
  10823. }
  10824. if s.RestApiId == nil {
  10825. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  10826. }
  10827. if invalidParams.Len() > 0 {
  10828. return invalidParams
  10829. }
  10830. return nil
  10831. }
  10832. // Request to change information about a Resource resource.
  10833. type UpdateResourceInput struct {
  10834. _ struct{} `type:"structure"`
  10835. // A list of update operations to be applied to the specified resource and in
  10836. // the order specified in this list.
  10837. PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"`
  10838. // The identifier of the Resource resource.
  10839. //
  10840. // ResourceId is a required field
  10841. ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"`
  10842. // The RestApi identifier for the Resource resource.
  10843. //
  10844. // RestApiId is a required field
  10845. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  10846. }
  10847. // String returns the string representation
  10848. func (s UpdateResourceInput) String() string {
  10849. return awsutil.Prettify(s)
  10850. }
  10851. // GoString returns the string representation
  10852. func (s UpdateResourceInput) GoString() string {
  10853. return s.String()
  10854. }
  10855. // Validate inspects the fields of the type to determine if they are valid.
  10856. func (s *UpdateResourceInput) Validate() error {
  10857. invalidParams := request.ErrInvalidParams{Context: "UpdateResourceInput"}
  10858. if s.ResourceId == nil {
  10859. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  10860. }
  10861. if s.RestApiId == nil {
  10862. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  10863. }
  10864. if invalidParams.Len() > 0 {
  10865. return invalidParams
  10866. }
  10867. return nil
  10868. }
  10869. // Request to update an existing RestApi resource in your collection.
  10870. type UpdateRestApiInput struct {
  10871. _ struct{} `type:"structure"`
  10872. // A list of update operations to be applied to the specified resource and in
  10873. // the order specified in this list.
  10874. PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"`
  10875. // The ID of the RestApi you want to update.
  10876. //
  10877. // RestApiId is a required field
  10878. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  10879. }
  10880. // String returns the string representation
  10881. func (s UpdateRestApiInput) String() string {
  10882. return awsutil.Prettify(s)
  10883. }
  10884. // GoString returns the string representation
  10885. func (s UpdateRestApiInput) GoString() string {
  10886. return s.String()
  10887. }
  10888. // Validate inspects the fields of the type to determine if they are valid.
  10889. func (s *UpdateRestApiInput) Validate() error {
  10890. invalidParams := request.ErrInvalidParams{Context: "UpdateRestApiInput"}
  10891. if s.RestApiId == nil {
  10892. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  10893. }
  10894. if invalidParams.Len() > 0 {
  10895. return invalidParams
  10896. }
  10897. return nil
  10898. }
  10899. // Requests Amazon API Gateway to change information about a Stage resource.
  10900. type UpdateStageInput struct {
  10901. _ struct{} `type:"structure"`
  10902. // A list of update operations to be applied to the specified resource and in
  10903. // the order specified in this list.
  10904. PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"`
  10905. // The identifier of the RestApi resource for the Stage resource to change information
  10906. // about.
  10907. //
  10908. // RestApiId is a required field
  10909. RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"`
  10910. // The name of the Stage resource to change information about.
  10911. //
  10912. // StageName is a required field
  10913. StageName *string `location:"uri" locationName:"stage_name" type:"string" required:"true"`
  10914. }
  10915. // String returns the string representation
  10916. func (s UpdateStageInput) String() string {
  10917. return awsutil.Prettify(s)
  10918. }
  10919. // GoString returns the string representation
  10920. func (s UpdateStageInput) GoString() string {
  10921. return s.String()
  10922. }
  10923. // Validate inspects the fields of the type to determine if they are valid.
  10924. func (s *UpdateStageInput) Validate() error {
  10925. invalidParams := request.ErrInvalidParams{Context: "UpdateStageInput"}
  10926. if s.RestApiId == nil {
  10927. invalidParams.Add(request.NewErrParamRequired("RestApiId"))
  10928. }
  10929. if s.StageName == nil {
  10930. invalidParams.Add(request.NewErrParamRequired("StageName"))
  10931. }
  10932. if invalidParams.Len() > 0 {
  10933. return invalidParams
  10934. }
  10935. return nil
  10936. }
  10937. // The PATCH request to grant a temporary extension to the reamining quota of
  10938. // a usage plan associated with a specified API key.
  10939. type UpdateUsageInput struct {
  10940. _ struct{} `type:"structure"`
  10941. // The identifier of the API key associated with the usage plan in which a temporary
  10942. // extension is granted to the remaining quota.
  10943. //
  10944. // KeyId is a required field
  10945. KeyId *string `location:"uri" locationName:"keyId" type:"string" required:"true"`
  10946. // A list of update operations to be applied to the specified resource and in
  10947. // the order specified in this list.
  10948. PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"`
  10949. // The Id of the usage plan associated with the usage data.
  10950. //
  10951. // UsagePlanId is a required field
  10952. UsagePlanId *string `location:"uri" locationName:"usageplanId" type:"string" required:"true"`
  10953. }
  10954. // String returns the string representation
  10955. func (s UpdateUsageInput) String() string {
  10956. return awsutil.Prettify(s)
  10957. }
  10958. // GoString returns the string representation
  10959. func (s UpdateUsageInput) GoString() string {
  10960. return s.String()
  10961. }
  10962. // Validate inspects the fields of the type to determine if they are valid.
  10963. func (s *UpdateUsageInput) Validate() error {
  10964. invalidParams := request.ErrInvalidParams{Context: "UpdateUsageInput"}
  10965. if s.KeyId == nil {
  10966. invalidParams.Add(request.NewErrParamRequired("KeyId"))
  10967. }
  10968. if s.UsagePlanId == nil {
  10969. invalidParams.Add(request.NewErrParamRequired("UsagePlanId"))
  10970. }
  10971. if invalidParams.Len() > 0 {
  10972. return invalidParams
  10973. }
  10974. return nil
  10975. }
  10976. // The PATCH request to update a usage plan of a given plan Id.
  10977. type UpdateUsagePlanInput struct {
  10978. _ struct{} `type:"structure"`
  10979. // A list of update operations to be applied to the specified resource and in
  10980. // the order specified in this list.
  10981. PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"`
  10982. // The Id of the to-be-updated usage plan.
  10983. //
  10984. // UsagePlanId is a required field
  10985. UsagePlanId *string `location:"uri" locationName:"usageplanId" type:"string" required:"true"`
  10986. }
  10987. // String returns the string representation
  10988. func (s UpdateUsagePlanInput) String() string {
  10989. return awsutil.Prettify(s)
  10990. }
  10991. // GoString returns the string representation
  10992. func (s UpdateUsagePlanInput) GoString() string {
  10993. return s.String()
  10994. }
  10995. // Validate inspects the fields of the type to determine if they are valid.
  10996. func (s *UpdateUsagePlanInput) Validate() error {
  10997. invalidParams := request.ErrInvalidParams{Context: "UpdateUsagePlanInput"}
  10998. if s.UsagePlanId == nil {
  10999. invalidParams.Add(request.NewErrParamRequired("UsagePlanId"))
  11000. }
  11001. if invalidParams.Len() > 0 {
  11002. return invalidParams
  11003. }
  11004. return nil
  11005. }
  11006. // Represents the usage data of a usage plan.
  11007. //
  11008. // Create and Use Usage Plans (http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-api-usage-plans.html), Manage Usage in a Usage Plan (http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-create-usage-plans-with-console.html#api-gateway-usage-plan-manage-usage)
  11009. type Usage struct {
  11010. _ struct{} `type:"structure"`
  11011. // The ending date of the usage data.
  11012. EndDate *string `locationName:"endDate" type:"string"`
  11013. // The usage data, as daily logs of used and remaining quotas, over the specified
  11014. // time interval indexed over the API keys in a usage plan. For example, {...,
  11015. // "values" : { "{api_key}" : [ [0, 100], [10, 90], [100, 10]]}, where {api_key}
  11016. // stands for an API key value and the daily log entry is of the format [used
  11017. // quota, remaining quota].
  11018. Items map[string][][]*int64 `locationName:"values" type:"map"`
  11019. Position *string `locationName:"position" type:"string"`
  11020. // The starting date of the usage data.
  11021. StartDate *string `locationName:"startDate" type:"string"`
  11022. // The plan Id associated with this usage data.
  11023. UsagePlanId *string `locationName:"usagePlanId" type:"string"`
  11024. }
  11025. // String returns the string representation
  11026. func (s Usage) String() string {
  11027. return awsutil.Prettify(s)
  11028. }
  11029. // GoString returns the string representation
  11030. func (s Usage) GoString() string {
  11031. return s.String()
  11032. }
  11033. // Represents a usage plan than can specify who can assess associated API stages
  11034. // with specified request limits and quotas.
  11035. //
  11036. // In a usage plan, you associate an API by specifying the API's Id and a stage
  11037. // name of the specified API. You add plan customers by adding API keys to the
  11038. // plan.
  11039. //
  11040. // Create and Use Usage Plans (http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-api-usage-plans.html)
  11041. type UsagePlan struct {
  11042. _ struct{} `type:"structure"`
  11043. // The associated API stages of a usage plan.
  11044. ApiStages []*ApiStage `locationName:"apiStages" type:"list"`
  11045. // The description of a usage plan.
  11046. Description *string `locationName:"description" type:"string"`
  11047. // The identifier of a UsagePlan resource.
  11048. Id *string `locationName:"id" type:"string"`
  11049. // The name of a usage plan.
  11050. Name *string `locationName:"name" type:"string"`
  11051. // The maximum number of permitted requests per a given unit time interval.
  11052. Quota *QuotaSettings `locationName:"quota" type:"structure"`
  11053. // The request throttle limits of a usage plan.
  11054. Throttle *ThrottleSettings `locationName:"throttle" type:"structure"`
  11055. }
  11056. // String returns the string representation
  11057. func (s UsagePlan) String() string {
  11058. return awsutil.Prettify(s)
  11059. }
  11060. // GoString returns the string representation
  11061. func (s UsagePlan) GoString() string {
  11062. return s.String()
  11063. }
  11064. // Represents a usage plan key to identify a plan customer.
  11065. //
  11066. // To associate an API stage with a selected API key in a usage plan, you must
  11067. // create a UsagePlanKey resource to represent the selected ApiKey.
  11068. //
  11069. // " Create and Use Usage Plans (http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-api-usage-plans.html)
  11070. type UsagePlanKey struct {
  11071. _ struct{} `type:"structure"`
  11072. // The Id of a usage plan key.
  11073. Id *string `locationName:"id" type:"string"`
  11074. // The name of a usage plan key.
  11075. Name *string `locationName:"name" type:"string"`
  11076. // The type of a usage plan key. Currently, the valid key type is API_KEY.
  11077. Type *string `locationName:"type" type:"string"`
  11078. // The value of a usage plan key.
  11079. Value *string `locationName:"value" type:"string"`
  11080. }
  11081. // String returns the string representation
  11082. func (s UsagePlanKey) String() string {
  11083. return awsutil.Prettify(s)
  11084. }
  11085. // GoString returns the string representation
  11086. func (s UsagePlanKey) GoString() string {
  11087. return s.String()
  11088. }
  11089. const (
  11090. // ApiKeysFormatCsv is a ApiKeysFormat enum value
  11091. ApiKeysFormatCsv = "csv"
  11092. )
  11093. // The authorizer type. the only current value is TOKEN.
  11094. const (
  11095. // AuthorizerTypeToken is a AuthorizerType enum value
  11096. AuthorizerTypeToken = "TOKEN"
  11097. // AuthorizerTypeCognitoUserPools is a AuthorizerType enum value
  11098. AuthorizerTypeCognitoUserPools = "COGNITO_USER_POOLS"
  11099. )
  11100. // Returns the size of the CacheCluster.
  11101. const (
  11102. // CacheClusterSize05 is a CacheClusterSize enum value
  11103. CacheClusterSize05 = "0.5"
  11104. // CacheClusterSize16 is a CacheClusterSize enum value
  11105. CacheClusterSize16 = "1.6"
  11106. // CacheClusterSize61 is a CacheClusterSize enum value
  11107. CacheClusterSize61 = "6.1"
  11108. // CacheClusterSize135 is a CacheClusterSize enum value
  11109. CacheClusterSize135 = "13.5"
  11110. // CacheClusterSize284 is a CacheClusterSize enum value
  11111. CacheClusterSize284 = "28.4"
  11112. // CacheClusterSize582 is a CacheClusterSize enum value
  11113. CacheClusterSize582 = "58.2"
  11114. // CacheClusterSize118 is a CacheClusterSize enum value
  11115. CacheClusterSize118 = "118"
  11116. // CacheClusterSize237 is a CacheClusterSize enum value
  11117. CacheClusterSize237 = "237"
  11118. )
  11119. // Returns the status of the CacheCluster.
  11120. const (
  11121. // CacheClusterStatusCreateInProgress is a CacheClusterStatus enum value
  11122. CacheClusterStatusCreateInProgress = "CREATE_IN_PROGRESS"
  11123. // CacheClusterStatusAvailable is a CacheClusterStatus enum value
  11124. CacheClusterStatusAvailable = "AVAILABLE"
  11125. // CacheClusterStatusDeleteInProgress is a CacheClusterStatus enum value
  11126. CacheClusterStatusDeleteInProgress = "DELETE_IN_PROGRESS"
  11127. // CacheClusterStatusNotAvailable is a CacheClusterStatus enum value
  11128. CacheClusterStatusNotAvailable = "NOT_AVAILABLE"
  11129. // CacheClusterStatusFlushInProgress is a CacheClusterStatus enum value
  11130. CacheClusterStatusFlushInProgress = "FLUSH_IN_PROGRESS"
  11131. )
  11132. // The integration type. The valid value is HTTP for integrating with an HTTP
  11133. // back end, AWS for any AWS service endpoints, MOCK for testing without actually
  11134. // invoking the back end, HTTP_PROXY for integrating with the HTTP proxy integration,
  11135. // or AWS_PROXY for integrating with the Lambda proxy integration type.
  11136. const (
  11137. // IntegrationTypeHttp is a IntegrationType enum value
  11138. IntegrationTypeHttp = "HTTP"
  11139. // IntegrationTypeAws is a IntegrationType enum value
  11140. IntegrationTypeAws = "AWS"
  11141. // IntegrationTypeMock is a IntegrationType enum value
  11142. IntegrationTypeMock = "MOCK"
  11143. // IntegrationTypeHttpProxy is a IntegrationType enum value
  11144. IntegrationTypeHttpProxy = "HTTP_PROXY"
  11145. // IntegrationTypeAwsProxy is a IntegrationType enum value
  11146. IntegrationTypeAwsProxy = "AWS_PROXY"
  11147. )
  11148. const (
  11149. // OpAdd is a Op enum value
  11150. OpAdd = "add"
  11151. // OpRemove is a Op enum value
  11152. OpRemove = "remove"
  11153. // OpReplace is a Op enum value
  11154. OpReplace = "replace"
  11155. // OpMove is a Op enum value
  11156. OpMove = "move"
  11157. // OpCopy is a Op enum value
  11158. OpCopy = "copy"
  11159. // OpTest is a Op enum value
  11160. OpTest = "test"
  11161. )
  11162. const (
  11163. // PutModeMerge is a PutMode enum value
  11164. PutModeMerge = "merge"
  11165. // PutModeOverwrite is a PutMode enum value
  11166. PutModeOverwrite = "overwrite"
  11167. )
  11168. const (
  11169. // QuotaPeriodTypeDay is a QuotaPeriodType enum value
  11170. QuotaPeriodTypeDay = "DAY"
  11171. // QuotaPeriodTypeWeek is a QuotaPeriodType enum value
  11172. QuotaPeriodTypeWeek = "WEEK"
  11173. // QuotaPeriodTypeMonth is a QuotaPeriodType enum value
  11174. QuotaPeriodTypeMonth = "MONTH"
  11175. )
  11176. const (
  11177. // UnauthorizedCacheControlHeaderStrategyFailWith403 is a UnauthorizedCacheControlHeaderStrategy enum value
  11178. UnauthorizedCacheControlHeaderStrategyFailWith403 = "FAIL_WITH_403"
  11179. // UnauthorizedCacheControlHeaderStrategySucceedWithResponseHeader is a UnauthorizedCacheControlHeaderStrategy enum value
  11180. UnauthorizedCacheControlHeaderStrategySucceedWithResponseHeader = "SUCCEED_WITH_RESPONSE_HEADER"
  11181. // UnauthorizedCacheControlHeaderStrategySucceedWithoutResponseHeader is a UnauthorizedCacheControlHeaderStrategy enum value
  11182. UnauthorizedCacheControlHeaderStrategySucceedWithoutResponseHeader = "SUCCEED_WITHOUT_RESPONSE_HEADER"
  11183. )