api.go 247 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698
  1. // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
  2. package appsync
  3. import (
  4. "github.com/aws/aws-sdk-go/aws"
  5. "github.com/aws/aws-sdk-go/aws/awsutil"
  6. "github.com/aws/aws-sdk-go/aws/request"
  7. "github.com/aws/aws-sdk-go/private/protocol"
  8. "github.com/aws/aws-sdk-go/private/protocol/restjson"
  9. )
  10. const opCreateApiKey = "CreateApiKey"
  11. // CreateApiKeyRequest generates a "aws/request.Request" representing the
  12. // client's request for the CreateApiKey operation. The "output" return
  13. // value will be populated with the request's response once the request completes
  14. // successfully.
  15. //
  16. // Use "Send" method on the returned Request to send the API call to the service.
  17. // the "output" return value is not valid until after Send returns without error.
  18. //
  19. // See CreateApiKey for more information on using the CreateApiKey
  20. // API call, and error handling.
  21. //
  22. // This method is useful when you want to inject custom logic or configuration
  23. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  24. //
  25. //
  26. // // Example sending a request using the CreateApiKeyRequest method.
  27. // req, resp := client.CreateApiKeyRequest(params)
  28. //
  29. // err := req.Send()
  30. // if err == nil { // resp is now filled
  31. // fmt.Println(resp)
  32. // }
  33. //
  34. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/CreateApiKey
  35. func (c *AppSync) CreateApiKeyRequest(input *CreateApiKeyInput) (req *request.Request, output *CreateApiKeyOutput) {
  36. op := &request.Operation{
  37. Name: opCreateApiKey,
  38. HTTPMethod: "POST",
  39. HTTPPath: "/v1/apis/{apiId}/apikeys",
  40. }
  41. if input == nil {
  42. input = &CreateApiKeyInput{}
  43. }
  44. output = &CreateApiKeyOutput{}
  45. req = c.newRequest(op, input, output)
  46. return
  47. }
  48. // CreateApiKey API operation for AWS AppSync.
  49. //
  50. // Creates a unique key that you can distribute to clients who are executing
  51. // your API.
  52. //
  53. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  54. // with awserr.Error's Code and Message methods to get detailed information about
  55. // the error.
  56. //
  57. // See the AWS API reference guide for AWS AppSync's
  58. // API operation CreateApiKey for usage and error information.
  59. //
  60. // Returned Error Codes:
  61. // * ErrCodeBadRequestException "BadRequestException"
  62. // The request is not well formed. For example, a value is invalid or a required
  63. // field is missing. Check the field values, and then try again.
  64. //
  65. // * ErrCodeNotFoundException "NotFoundException"
  66. // The resource specified in the request was not found. Check the resource,
  67. // and then try again.
  68. //
  69. // * ErrCodeLimitExceededException "LimitExceededException"
  70. // The request exceeded a limit. Try your request again.
  71. //
  72. // * ErrCodeUnauthorizedException "UnauthorizedException"
  73. // You are not authorized to perform this operation.
  74. //
  75. // * ErrCodeLimitExceededException "LimitExceededException"
  76. // The request exceeded a limit. Try your request again.
  77. //
  78. // * ErrCodeInternalFailureException "InternalFailureException"
  79. // An internal AWS AppSync error occurred. Try your request again.
  80. //
  81. // * ErrCodeApiKeyLimitExceededException "ApiKeyLimitExceededException"
  82. // The API key exceeded a limit. Try your request again.
  83. //
  84. // * ErrCodeApiKeyValidityOutOfBoundsException "ApiKeyValidityOutOfBoundsException"
  85. // The API key expiration must be set to a value between 1 and 365 days from
  86. // creation (for CreateApiKey) or from update (for UpdateApiKey).
  87. //
  88. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/CreateApiKey
  89. func (c *AppSync) CreateApiKey(input *CreateApiKeyInput) (*CreateApiKeyOutput, error) {
  90. req, out := c.CreateApiKeyRequest(input)
  91. return out, req.Send()
  92. }
  93. // CreateApiKeyWithContext is the same as CreateApiKey with the addition of
  94. // the ability to pass a context and additional request options.
  95. //
  96. // See CreateApiKey for details on how to use this API operation.
  97. //
  98. // The context must be non-nil and will be used for request cancellation. If
  99. // the context is nil a panic will occur. In the future the SDK may create
  100. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  101. // for more information on using Contexts.
  102. func (c *AppSync) CreateApiKeyWithContext(ctx aws.Context, input *CreateApiKeyInput, opts ...request.Option) (*CreateApiKeyOutput, error) {
  103. req, out := c.CreateApiKeyRequest(input)
  104. req.SetContext(ctx)
  105. req.ApplyOptions(opts...)
  106. return out, req.Send()
  107. }
  108. const opCreateDataSource = "CreateDataSource"
  109. // CreateDataSourceRequest generates a "aws/request.Request" representing the
  110. // client's request for the CreateDataSource operation. The "output" return
  111. // value will be populated with the request's response once the request completes
  112. // successfully.
  113. //
  114. // Use "Send" method on the returned Request to send the API call to the service.
  115. // the "output" return value is not valid until after Send returns without error.
  116. //
  117. // See CreateDataSource for more information on using the CreateDataSource
  118. // API call, and error handling.
  119. //
  120. // This method is useful when you want to inject custom logic or configuration
  121. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  122. //
  123. //
  124. // // Example sending a request using the CreateDataSourceRequest method.
  125. // req, resp := client.CreateDataSourceRequest(params)
  126. //
  127. // err := req.Send()
  128. // if err == nil { // resp is now filled
  129. // fmt.Println(resp)
  130. // }
  131. //
  132. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/CreateDataSource
  133. func (c *AppSync) CreateDataSourceRequest(input *CreateDataSourceInput) (req *request.Request, output *CreateDataSourceOutput) {
  134. op := &request.Operation{
  135. Name: opCreateDataSource,
  136. HTTPMethod: "POST",
  137. HTTPPath: "/v1/apis/{apiId}/datasources",
  138. }
  139. if input == nil {
  140. input = &CreateDataSourceInput{}
  141. }
  142. output = &CreateDataSourceOutput{}
  143. req = c.newRequest(op, input, output)
  144. return
  145. }
  146. // CreateDataSource API operation for AWS AppSync.
  147. //
  148. // Creates a DataSource object.
  149. //
  150. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  151. // with awserr.Error's Code and Message methods to get detailed information about
  152. // the error.
  153. //
  154. // See the AWS API reference guide for AWS AppSync's
  155. // API operation CreateDataSource for usage and error information.
  156. //
  157. // Returned Error Codes:
  158. // * ErrCodeBadRequestException "BadRequestException"
  159. // The request is not well formed. For example, a value is invalid or a required
  160. // field is missing. Check the field values, and then try again.
  161. //
  162. // * ErrCodeConcurrentModificationException "ConcurrentModificationException"
  163. // Another modification is in progress at this time and it must complete before
  164. // you can make your change.
  165. //
  166. // * ErrCodeNotFoundException "NotFoundException"
  167. // The resource specified in the request was not found. Check the resource,
  168. // and then try again.
  169. //
  170. // * ErrCodeUnauthorizedException "UnauthorizedException"
  171. // You are not authorized to perform this operation.
  172. //
  173. // * ErrCodeInternalFailureException "InternalFailureException"
  174. // An internal AWS AppSync error occurred. Try your request again.
  175. //
  176. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/CreateDataSource
  177. func (c *AppSync) CreateDataSource(input *CreateDataSourceInput) (*CreateDataSourceOutput, error) {
  178. req, out := c.CreateDataSourceRequest(input)
  179. return out, req.Send()
  180. }
  181. // CreateDataSourceWithContext is the same as CreateDataSource with the addition of
  182. // the ability to pass a context and additional request options.
  183. //
  184. // See CreateDataSource for details on how to use this API operation.
  185. //
  186. // The context must be non-nil and will be used for request cancellation. If
  187. // the context is nil a panic will occur. In the future the SDK may create
  188. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  189. // for more information on using Contexts.
  190. func (c *AppSync) CreateDataSourceWithContext(ctx aws.Context, input *CreateDataSourceInput, opts ...request.Option) (*CreateDataSourceOutput, error) {
  191. req, out := c.CreateDataSourceRequest(input)
  192. req.SetContext(ctx)
  193. req.ApplyOptions(opts...)
  194. return out, req.Send()
  195. }
  196. const opCreateFunction = "CreateFunction"
  197. // CreateFunctionRequest generates a "aws/request.Request" representing the
  198. // client's request for the CreateFunction operation. The "output" return
  199. // value will be populated with the request's response once the request completes
  200. // successfully.
  201. //
  202. // Use "Send" method on the returned Request to send the API call to the service.
  203. // the "output" return value is not valid until after Send returns without error.
  204. //
  205. // See CreateFunction for more information on using the CreateFunction
  206. // API call, and error handling.
  207. //
  208. // This method is useful when you want to inject custom logic or configuration
  209. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  210. //
  211. //
  212. // // Example sending a request using the CreateFunctionRequest method.
  213. // req, resp := client.CreateFunctionRequest(params)
  214. //
  215. // err := req.Send()
  216. // if err == nil { // resp is now filled
  217. // fmt.Println(resp)
  218. // }
  219. //
  220. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/CreateFunction
  221. func (c *AppSync) CreateFunctionRequest(input *CreateFunctionInput) (req *request.Request, output *CreateFunctionOutput) {
  222. op := &request.Operation{
  223. Name: opCreateFunction,
  224. HTTPMethod: "POST",
  225. HTTPPath: "/v1/apis/{apiId}/functions",
  226. }
  227. if input == nil {
  228. input = &CreateFunctionInput{}
  229. }
  230. output = &CreateFunctionOutput{}
  231. req = c.newRequest(op, input, output)
  232. return
  233. }
  234. // CreateFunction API operation for AWS AppSync.
  235. //
  236. // Creates a Function object.
  237. //
  238. // A function is a reusable entity. Multiple functions can be used to compose
  239. // the resolver logic.
  240. //
  241. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  242. // with awserr.Error's Code and Message methods to get detailed information about
  243. // the error.
  244. //
  245. // See the AWS API reference guide for AWS AppSync's
  246. // API operation CreateFunction for usage and error information.
  247. //
  248. // Returned Error Codes:
  249. // * ErrCodeConcurrentModificationException "ConcurrentModificationException"
  250. // Another modification is in progress at this time and it must complete before
  251. // you can make your change.
  252. //
  253. // * ErrCodeNotFoundException "NotFoundException"
  254. // The resource specified in the request was not found. Check the resource,
  255. // and then try again.
  256. //
  257. // * ErrCodeUnauthorizedException "UnauthorizedException"
  258. // You are not authorized to perform this operation.
  259. //
  260. // * ErrCodeInternalFailureException "InternalFailureException"
  261. // An internal AWS AppSync error occurred. Try your request again.
  262. //
  263. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/CreateFunction
  264. func (c *AppSync) CreateFunction(input *CreateFunctionInput) (*CreateFunctionOutput, error) {
  265. req, out := c.CreateFunctionRequest(input)
  266. return out, req.Send()
  267. }
  268. // CreateFunctionWithContext is the same as CreateFunction with the addition of
  269. // the ability to pass a context and additional request options.
  270. //
  271. // See CreateFunction for details on how to use this API operation.
  272. //
  273. // The context must be non-nil and will be used for request cancellation. If
  274. // the context is nil a panic will occur. In the future the SDK may create
  275. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  276. // for more information on using Contexts.
  277. func (c *AppSync) CreateFunctionWithContext(ctx aws.Context, input *CreateFunctionInput, opts ...request.Option) (*CreateFunctionOutput, error) {
  278. req, out := c.CreateFunctionRequest(input)
  279. req.SetContext(ctx)
  280. req.ApplyOptions(opts...)
  281. return out, req.Send()
  282. }
  283. const opCreateGraphqlApi = "CreateGraphqlApi"
  284. // CreateGraphqlApiRequest generates a "aws/request.Request" representing the
  285. // client's request for the CreateGraphqlApi operation. The "output" return
  286. // value will be populated with the request's response once the request completes
  287. // successfully.
  288. //
  289. // Use "Send" method on the returned Request to send the API call to the service.
  290. // the "output" return value is not valid until after Send returns without error.
  291. //
  292. // See CreateGraphqlApi for more information on using the CreateGraphqlApi
  293. // API call, and error handling.
  294. //
  295. // This method is useful when you want to inject custom logic or configuration
  296. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  297. //
  298. //
  299. // // Example sending a request using the CreateGraphqlApiRequest method.
  300. // req, resp := client.CreateGraphqlApiRequest(params)
  301. //
  302. // err := req.Send()
  303. // if err == nil { // resp is now filled
  304. // fmt.Println(resp)
  305. // }
  306. //
  307. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/CreateGraphqlApi
  308. func (c *AppSync) CreateGraphqlApiRequest(input *CreateGraphqlApiInput) (req *request.Request, output *CreateGraphqlApiOutput) {
  309. op := &request.Operation{
  310. Name: opCreateGraphqlApi,
  311. HTTPMethod: "POST",
  312. HTTPPath: "/v1/apis",
  313. }
  314. if input == nil {
  315. input = &CreateGraphqlApiInput{}
  316. }
  317. output = &CreateGraphqlApiOutput{}
  318. req = c.newRequest(op, input, output)
  319. return
  320. }
  321. // CreateGraphqlApi API operation for AWS AppSync.
  322. //
  323. // Creates a GraphqlApi object.
  324. //
  325. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  326. // with awserr.Error's Code and Message methods to get detailed information about
  327. // the error.
  328. //
  329. // See the AWS API reference guide for AWS AppSync's
  330. // API operation CreateGraphqlApi for usage and error information.
  331. //
  332. // Returned Error Codes:
  333. // * ErrCodeBadRequestException "BadRequestException"
  334. // The request is not well formed. For example, a value is invalid or a required
  335. // field is missing. Check the field values, and then try again.
  336. //
  337. // * ErrCodeLimitExceededException "LimitExceededException"
  338. // The request exceeded a limit. Try your request again.
  339. //
  340. // * ErrCodeConcurrentModificationException "ConcurrentModificationException"
  341. // Another modification is in progress at this time and it must complete before
  342. // you can make your change.
  343. //
  344. // * ErrCodeUnauthorizedException "UnauthorizedException"
  345. // You are not authorized to perform this operation.
  346. //
  347. // * ErrCodeInternalFailureException "InternalFailureException"
  348. // An internal AWS AppSync error occurred. Try your request again.
  349. //
  350. // * ErrCodeApiLimitExceededException "ApiLimitExceededException"
  351. // The GraphQL API exceeded a limit. Try your request again.
  352. //
  353. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/CreateGraphqlApi
  354. func (c *AppSync) CreateGraphqlApi(input *CreateGraphqlApiInput) (*CreateGraphqlApiOutput, error) {
  355. req, out := c.CreateGraphqlApiRequest(input)
  356. return out, req.Send()
  357. }
  358. // CreateGraphqlApiWithContext is the same as CreateGraphqlApi with the addition of
  359. // the ability to pass a context and additional request options.
  360. //
  361. // See CreateGraphqlApi for details on how to use this API operation.
  362. //
  363. // The context must be non-nil and will be used for request cancellation. If
  364. // the context is nil a panic will occur. In the future the SDK may create
  365. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  366. // for more information on using Contexts.
  367. func (c *AppSync) CreateGraphqlApiWithContext(ctx aws.Context, input *CreateGraphqlApiInput, opts ...request.Option) (*CreateGraphqlApiOutput, error) {
  368. req, out := c.CreateGraphqlApiRequest(input)
  369. req.SetContext(ctx)
  370. req.ApplyOptions(opts...)
  371. return out, req.Send()
  372. }
  373. const opCreateResolver = "CreateResolver"
  374. // CreateResolverRequest generates a "aws/request.Request" representing the
  375. // client's request for the CreateResolver operation. The "output" return
  376. // value will be populated with the request's response once the request completes
  377. // successfully.
  378. //
  379. // Use "Send" method on the returned Request to send the API call to the service.
  380. // the "output" return value is not valid until after Send returns without error.
  381. //
  382. // See CreateResolver for more information on using the CreateResolver
  383. // API call, and error handling.
  384. //
  385. // This method is useful when you want to inject custom logic or configuration
  386. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  387. //
  388. //
  389. // // Example sending a request using the CreateResolverRequest method.
  390. // req, resp := client.CreateResolverRequest(params)
  391. //
  392. // err := req.Send()
  393. // if err == nil { // resp is now filled
  394. // fmt.Println(resp)
  395. // }
  396. //
  397. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/CreateResolver
  398. func (c *AppSync) CreateResolverRequest(input *CreateResolverInput) (req *request.Request, output *CreateResolverOutput) {
  399. op := &request.Operation{
  400. Name: opCreateResolver,
  401. HTTPMethod: "POST",
  402. HTTPPath: "/v1/apis/{apiId}/types/{typeName}/resolvers",
  403. }
  404. if input == nil {
  405. input = &CreateResolverInput{}
  406. }
  407. output = &CreateResolverOutput{}
  408. req = c.newRequest(op, input, output)
  409. return
  410. }
  411. // CreateResolver API operation for AWS AppSync.
  412. //
  413. // Creates a Resolver object.
  414. //
  415. // A resolver converts incoming requests into a format that a data source can
  416. // understand and converts the data source's responses into GraphQL.
  417. //
  418. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  419. // with awserr.Error's Code and Message methods to get detailed information about
  420. // the error.
  421. //
  422. // See the AWS API reference guide for AWS AppSync's
  423. // API operation CreateResolver for usage and error information.
  424. //
  425. // Returned Error Codes:
  426. // * ErrCodeConcurrentModificationException "ConcurrentModificationException"
  427. // Another modification is in progress at this time and it must complete before
  428. // you can make your change.
  429. //
  430. // * ErrCodeNotFoundException "NotFoundException"
  431. // The resource specified in the request was not found. Check the resource,
  432. // and then try again.
  433. //
  434. // * ErrCodeUnauthorizedException "UnauthorizedException"
  435. // You are not authorized to perform this operation.
  436. //
  437. // * ErrCodeInternalFailureException "InternalFailureException"
  438. // An internal AWS AppSync error occurred. Try your request again.
  439. //
  440. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/CreateResolver
  441. func (c *AppSync) CreateResolver(input *CreateResolverInput) (*CreateResolverOutput, error) {
  442. req, out := c.CreateResolverRequest(input)
  443. return out, req.Send()
  444. }
  445. // CreateResolverWithContext is the same as CreateResolver with the addition of
  446. // the ability to pass a context and additional request options.
  447. //
  448. // See CreateResolver for details on how to use this API operation.
  449. //
  450. // The context must be non-nil and will be used for request cancellation. If
  451. // the context is nil a panic will occur. In the future the SDK may create
  452. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  453. // for more information on using Contexts.
  454. func (c *AppSync) CreateResolverWithContext(ctx aws.Context, input *CreateResolverInput, opts ...request.Option) (*CreateResolverOutput, error) {
  455. req, out := c.CreateResolverRequest(input)
  456. req.SetContext(ctx)
  457. req.ApplyOptions(opts...)
  458. return out, req.Send()
  459. }
  460. const opCreateType = "CreateType"
  461. // CreateTypeRequest generates a "aws/request.Request" representing the
  462. // client's request for the CreateType operation. The "output" return
  463. // value will be populated with the request's response once the request completes
  464. // successfully.
  465. //
  466. // Use "Send" method on the returned Request to send the API call to the service.
  467. // the "output" return value is not valid until after Send returns without error.
  468. //
  469. // See CreateType for more information on using the CreateType
  470. // API call, and error handling.
  471. //
  472. // This method is useful when you want to inject custom logic or configuration
  473. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  474. //
  475. //
  476. // // Example sending a request using the CreateTypeRequest method.
  477. // req, resp := client.CreateTypeRequest(params)
  478. //
  479. // err := req.Send()
  480. // if err == nil { // resp is now filled
  481. // fmt.Println(resp)
  482. // }
  483. //
  484. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/CreateType
  485. func (c *AppSync) CreateTypeRequest(input *CreateTypeInput) (req *request.Request, output *CreateTypeOutput) {
  486. op := &request.Operation{
  487. Name: opCreateType,
  488. HTTPMethod: "POST",
  489. HTTPPath: "/v1/apis/{apiId}/types",
  490. }
  491. if input == nil {
  492. input = &CreateTypeInput{}
  493. }
  494. output = &CreateTypeOutput{}
  495. req = c.newRequest(op, input, output)
  496. return
  497. }
  498. // CreateType API operation for AWS AppSync.
  499. //
  500. // Creates a Type object.
  501. //
  502. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  503. // with awserr.Error's Code and Message methods to get detailed information about
  504. // the error.
  505. //
  506. // See the AWS API reference guide for AWS AppSync's
  507. // API operation CreateType for usage and error information.
  508. //
  509. // Returned Error Codes:
  510. // * ErrCodeBadRequestException "BadRequestException"
  511. // The request is not well formed. For example, a value is invalid or a required
  512. // field is missing. Check the field values, and then try again.
  513. //
  514. // * ErrCodeConcurrentModificationException "ConcurrentModificationException"
  515. // Another modification is in progress at this time and it must complete before
  516. // you can make your change.
  517. //
  518. // * ErrCodeNotFoundException "NotFoundException"
  519. // The resource specified in the request was not found. Check the resource,
  520. // and then try again.
  521. //
  522. // * ErrCodeUnauthorizedException "UnauthorizedException"
  523. // You are not authorized to perform this operation.
  524. //
  525. // * ErrCodeInternalFailureException "InternalFailureException"
  526. // An internal AWS AppSync error occurred. Try your request again.
  527. //
  528. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/CreateType
  529. func (c *AppSync) CreateType(input *CreateTypeInput) (*CreateTypeOutput, error) {
  530. req, out := c.CreateTypeRequest(input)
  531. return out, req.Send()
  532. }
  533. // CreateTypeWithContext is the same as CreateType with the addition of
  534. // the ability to pass a context and additional request options.
  535. //
  536. // See CreateType for details on how to use this API operation.
  537. //
  538. // The context must be non-nil and will be used for request cancellation. If
  539. // the context is nil a panic will occur. In the future the SDK may create
  540. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  541. // for more information on using Contexts.
  542. func (c *AppSync) CreateTypeWithContext(ctx aws.Context, input *CreateTypeInput, opts ...request.Option) (*CreateTypeOutput, error) {
  543. req, out := c.CreateTypeRequest(input)
  544. req.SetContext(ctx)
  545. req.ApplyOptions(opts...)
  546. return out, req.Send()
  547. }
  548. const opDeleteApiKey = "DeleteApiKey"
  549. // DeleteApiKeyRequest generates a "aws/request.Request" representing the
  550. // client's request for the DeleteApiKey operation. The "output" return
  551. // value will be populated with the request's response once the request completes
  552. // successfully.
  553. //
  554. // Use "Send" method on the returned Request to send the API call to the service.
  555. // the "output" return value is not valid until after Send returns without error.
  556. //
  557. // See DeleteApiKey for more information on using the DeleteApiKey
  558. // API call, and error handling.
  559. //
  560. // This method is useful when you want to inject custom logic or configuration
  561. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  562. //
  563. //
  564. // // Example sending a request using the DeleteApiKeyRequest method.
  565. // req, resp := client.DeleteApiKeyRequest(params)
  566. //
  567. // err := req.Send()
  568. // if err == nil { // resp is now filled
  569. // fmt.Println(resp)
  570. // }
  571. //
  572. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/DeleteApiKey
  573. func (c *AppSync) DeleteApiKeyRequest(input *DeleteApiKeyInput) (req *request.Request, output *DeleteApiKeyOutput) {
  574. op := &request.Operation{
  575. Name: opDeleteApiKey,
  576. HTTPMethod: "DELETE",
  577. HTTPPath: "/v1/apis/{apiId}/apikeys/{id}",
  578. }
  579. if input == nil {
  580. input = &DeleteApiKeyInput{}
  581. }
  582. output = &DeleteApiKeyOutput{}
  583. req = c.newRequest(op, input, output)
  584. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  585. return
  586. }
  587. // DeleteApiKey API operation for AWS AppSync.
  588. //
  589. // Deletes an API key.
  590. //
  591. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  592. // with awserr.Error's Code and Message methods to get detailed information about
  593. // the error.
  594. //
  595. // See the AWS API reference guide for AWS AppSync's
  596. // API operation DeleteApiKey for usage and error information.
  597. //
  598. // Returned Error Codes:
  599. // * ErrCodeBadRequestException "BadRequestException"
  600. // The request is not well formed. For example, a value is invalid or a required
  601. // field is missing. Check the field values, and then try again.
  602. //
  603. // * ErrCodeNotFoundException "NotFoundException"
  604. // The resource specified in the request was not found. Check the resource,
  605. // and then try again.
  606. //
  607. // * ErrCodeUnauthorizedException "UnauthorizedException"
  608. // You are not authorized to perform this operation.
  609. //
  610. // * ErrCodeInternalFailureException "InternalFailureException"
  611. // An internal AWS AppSync error occurred. Try your request again.
  612. //
  613. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/DeleteApiKey
  614. func (c *AppSync) DeleteApiKey(input *DeleteApiKeyInput) (*DeleteApiKeyOutput, error) {
  615. req, out := c.DeleteApiKeyRequest(input)
  616. return out, req.Send()
  617. }
  618. // DeleteApiKeyWithContext is the same as DeleteApiKey with the addition of
  619. // the ability to pass a context and additional request options.
  620. //
  621. // See DeleteApiKey for details on how to use this API operation.
  622. //
  623. // The context must be non-nil and will be used for request cancellation. If
  624. // the context is nil a panic will occur. In the future the SDK may create
  625. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  626. // for more information on using Contexts.
  627. func (c *AppSync) DeleteApiKeyWithContext(ctx aws.Context, input *DeleteApiKeyInput, opts ...request.Option) (*DeleteApiKeyOutput, error) {
  628. req, out := c.DeleteApiKeyRequest(input)
  629. req.SetContext(ctx)
  630. req.ApplyOptions(opts...)
  631. return out, req.Send()
  632. }
  633. const opDeleteDataSource = "DeleteDataSource"
  634. // DeleteDataSourceRequest generates a "aws/request.Request" representing the
  635. // client's request for the DeleteDataSource operation. The "output" return
  636. // value will be populated with the request's response once the request completes
  637. // successfully.
  638. //
  639. // Use "Send" method on the returned Request to send the API call to the service.
  640. // the "output" return value is not valid until after Send returns without error.
  641. //
  642. // See DeleteDataSource for more information on using the DeleteDataSource
  643. // API call, and error handling.
  644. //
  645. // This method is useful when you want to inject custom logic or configuration
  646. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  647. //
  648. //
  649. // // Example sending a request using the DeleteDataSourceRequest method.
  650. // req, resp := client.DeleteDataSourceRequest(params)
  651. //
  652. // err := req.Send()
  653. // if err == nil { // resp is now filled
  654. // fmt.Println(resp)
  655. // }
  656. //
  657. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/DeleteDataSource
  658. func (c *AppSync) DeleteDataSourceRequest(input *DeleteDataSourceInput) (req *request.Request, output *DeleteDataSourceOutput) {
  659. op := &request.Operation{
  660. Name: opDeleteDataSource,
  661. HTTPMethod: "DELETE",
  662. HTTPPath: "/v1/apis/{apiId}/datasources/{name}",
  663. }
  664. if input == nil {
  665. input = &DeleteDataSourceInput{}
  666. }
  667. output = &DeleteDataSourceOutput{}
  668. req = c.newRequest(op, input, output)
  669. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  670. return
  671. }
  672. // DeleteDataSource API operation for AWS AppSync.
  673. //
  674. // Deletes a DataSource object.
  675. //
  676. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  677. // with awserr.Error's Code and Message methods to get detailed information about
  678. // the error.
  679. //
  680. // See the AWS API reference guide for AWS AppSync's
  681. // API operation DeleteDataSource for usage and error information.
  682. //
  683. // Returned Error Codes:
  684. // * ErrCodeBadRequestException "BadRequestException"
  685. // The request is not well formed. For example, a value is invalid or a required
  686. // field is missing. Check the field values, and then try again.
  687. //
  688. // * ErrCodeConcurrentModificationException "ConcurrentModificationException"
  689. // Another modification is in progress at this time and it must complete before
  690. // you can make your change.
  691. //
  692. // * ErrCodeNotFoundException "NotFoundException"
  693. // The resource specified in the request was not found. Check the resource,
  694. // and then try again.
  695. //
  696. // * ErrCodeUnauthorizedException "UnauthorizedException"
  697. // You are not authorized to perform this operation.
  698. //
  699. // * ErrCodeInternalFailureException "InternalFailureException"
  700. // An internal AWS AppSync error occurred. Try your request again.
  701. //
  702. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/DeleteDataSource
  703. func (c *AppSync) DeleteDataSource(input *DeleteDataSourceInput) (*DeleteDataSourceOutput, error) {
  704. req, out := c.DeleteDataSourceRequest(input)
  705. return out, req.Send()
  706. }
  707. // DeleteDataSourceWithContext is the same as DeleteDataSource with the addition of
  708. // the ability to pass a context and additional request options.
  709. //
  710. // See DeleteDataSource for details on how to use this API operation.
  711. //
  712. // The context must be non-nil and will be used for request cancellation. If
  713. // the context is nil a panic will occur. In the future the SDK may create
  714. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  715. // for more information on using Contexts.
  716. func (c *AppSync) DeleteDataSourceWithContext(ctx aws.Context, input *DeleteDataSourceInput, opts ...request.Option) (*DeleteDataSourceOutput, error) {
  717. req, out := c.DeleteDataSourceRequest(input)
  718. req.SetContext(ctx)
  719. req.ApplyOptions(opts...)
  720. return out, req.Send()
  721. }
  722. const opDeleteFunction = "DeleteFunction"
  723. // DeleteFunctionRequest generates a "aws/request.Request" representing the
  724. // client's request for the DeleteFunction operation. The "output" return
  725. // value will be populated with the request's response once the request completes
  726. // successfully.
  727. //
  728. // Use "Send" method on the returned Request to send the API call to the service.
  729. // the "output" return value is not valid until after Send returns without error.
  730. //
  731. // See DeleteFunction for more information on using the DeleteFunction
  732. // API call, and error handling.
  733. //
  734. // This method is useful when you want to inject custom logic or configuration
  735. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  736. //
  737. //
  738. // // Example sending a request using the DeleteFunctionRequest method.
  739. // req, resp := client.DeleteFunctionRequest(params)
  740. //
  741. // err := req.Send()
  742. // if err == nil { // resp is now filled
  743. // fmt.Println(resp)
  744. // }
  745. //
  746. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/DeleteFunction
  747. func (c *AppSync) DeleteFunctionRequest(input *DeleteFunctionInput) (req *request.Request, output *DeleteFunctionOutput) {
  748. op := &request.Operation{
  749. Name: opDeleteFunction,
  750. HTTPMethod: "DELETE",
  751. HTTPPath: "/v1/apis/{apiId}/functions/{functionId}",
  752. }
  753. if input == nil {
  754. input = &DeleteFunctionInput{}
  755. }
  756. output = &DeleteFunctionOutput{}
  757. req = c.newRequest(op, input, output)
  758. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  759. return
  760. }
  761. // DeleteFunction API operation for AWS AppSync.
  762. //
  763. // Deletes a Function.
  764. //
  765. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  766. // with awserr.Error's Code and Message methods to get detailed information about
  767. // the error.
  768. //
  769. // See the AWS API reference guide for AWS AppSync's
  770. // API operation DeleteFunction for usage and error information.
  771. //
  772. // Returned Error Codes:
  773. // * ErrCodeConcurrentModificationException "ConcurrentModificationException"
  774. // Another modification is in progress at this time and it must complete before
  775. // you can make your change.
  776. //
  777. // * ErrCodeNotFoundException "NotFoundException"
  778. // The resource specified in the request was not found. Check the resource,
  779. // and then try again.
  780. //
  781. // * ErrCodeUnauthorizedException "UnauthorizedException"
  782. // You are not authorized to perform this operation.
  783. //
  784. // * ErrCodeInternalFailureException "InternalFailureException"
  785. // An internal AWS AppSync error occurred. Try your request again.
  786. //
  787. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/DeleteFunction
  788. func (c *AppSync) DeleteFunction(input *DeleteFunctionInput) (*DeleteFunctionOutput, error) {
  789. req, out := c.DeleteFunctionRequest(input)
  790. return out, req.Send()
  791. }
  792. // DeleteFunctionWithContext is the same as DeleteFunction with the addition of
  793. // the ability to pass a context and additional request options.
  794. //
  795. // See DeleteFunction for details on how to use this API operation.
  796. //
  797. // The context must be non-nil and will be used for request cancellation. If
  798. // the context is nil a panic will occur. In the future the SDK may create
  799. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  800. // for more information on using Contexts.
  801. func (c *AppSync) DeleteFunctionWithContext(ctx aws.Context, input *DeleteFunctionInput, opts ...request.Option) (*DeleteFunctionOutput, error) {
  802. req, out := c.DeleteFunctionRequest(input)
  803. req.SetContext(ctx)
  804. req.ApplyOptions(opts...)
  805. return out, req.Send()
  806. }
  807. const opDeleteGraphqlApi = "DeleteGraphqlApi"
  808. // DeleteGraphqlApiRequest generates a "aws/request.Request" representing the
  809. // client's request for the DeleteGraphqlApi operation. The "output" return
  810. // value will be populated with the request's response once the request completes
  811. // successfully.
  812. //
  813. // Use "Send" method on the returned Request to send the API call to the service.
  814. // the "output" return value is not valid until after Send returns without error.
  815. //
  816. // See DeleteGraphqlApi for more information on using the DeleteGraphqlApi
  817. // API call, and error handling.
  818. //
  819. // This method is useful when you want to inject custom logic or configuration
  820. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  821. //
  822. //
  823. // // Example sending a request using the DeleteGraphqlApiRequest method.
  824. // req, resp := client.DeleteGraphqlApiRequest(params)
  825. //
  826. // err := req.Send()
  827. // if err == nil { // resp is now filled
  828. // fmt.Println(resp)
  829. // }
  830. //
  831. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/DeleteGraphqlApi
  832. func (c *AppSync) DeleteGraphqlApiRequest(input *DeleteGraphqlApiInput) (req *request.Request, output *DeleteGraphqlApiOutput) {
  833. op := &request.Operation{
  834. Name: opDeleteGraphqlApi,
  835. HTTPMethod: "DELETE",
  836. HTTPPath: "/v1/apis/{apiId}",
  837. }
  838. if input == nil {
  839. input = &DeleteGraphqlApiInput{}
  840. }
  841. output = &DeleteGraphqlApiOutput{}
  842. req = c.newRequest(op, input, output)
  843. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  844. return
  845. }
  846. // DeleteGraphqlApi API operation for AWS AppSync.
  847. //
  848. // Deletes a GraphqlApi object.
  849. //
  850. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  851. // with awserr.Error's Code and Message methods to get detailed information about
  852. // the error.
  853. //
  854. // See the AWS API reference guide for AWS AppSync's
  855. // API operation DeleteGraphqlApi for usage and error information.
  856. //
  857. // Returned Error Codes:
  858. // * ErrCodeBadRequestException "BadRequestException"
  859. // The request is not well formed. For example, a value is invalid or a required
  860. // field is missing. Check the field values, and then try again.
  861. //
  862. // * ErrCodeConcurrentModificationException "ConcurrentModificationException"
  863. // Another modification is in progress at this time and it must complete before
  864. // you can make your change.
  865. //
  866. // * ErrCodeNotFoundException "NotFoundException"
  867. // The resource specified in the request was not found. Check the resource,
  868. // and then try again.
  869. //
  870. // * ErrCodeUnauthorizedException "UnauthorizedException"
  871. // You are not authorized to perform this operation.
  872. //
  873. // * ErrCodeInternalFailureException "InternalFailureException"
  874. // An internal AWS AppSync error occurred. Try your request again.
  875. //
  876. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/DeleteGraphqlApi
  877. func (c *AppSync) DeleteGraphqlApi(input *DeleteGraphqlApiInput) (*DeleteGraphqlApiOutput, error) {
  878. req, out := c.DeleteGraphqlApiRequest(input)
  879. return out, req.Send()
  880. }
  881. // DeleteGraphqlApiWithContext is the same as DeleteGraphqlApi with the addition of
  882. // the ability to pass a context and additional request options.
  883. //
  884. // See DeleteGraphqlApi for details on how to use this API operation.
  885. //
  886. // The context must be non-nil and will be used for request cancellation. If
  887. // the context is nil a panic will occur. In the future the SDK may create
  888. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  889. // for more information on using Contexts.
  890. func (c *AppSync) DeleteGraphqlApiWithContext(ctx aws.Context, input *DeleteGraphqlApiInput, opts ...request.Option) (*DeleteGraphqlApiOutput, error) {
  891. req, out := c.DeleteGraphqlApiRequest(input)
  892. req.SetContext(ctx)
  893. req.ApplyOptions(opts...)
  894. return out, req.Send()
  895. }
  896. const opDeleteResolver = "DeleteResolver"
  897. // DeleteResolverRequest generates a "aws/request.Request" representing the
  898. // client's request for the DeleteResolver operation. The "output" return
  899. // value will be populated with the request's response once the request completes
  900. // successfully.
  901. //
  902. // Use "Send" method on the returned Request to send the API call to the service.
  903. // the "output" return value is not valid until after Send returns without error.
  904. //
  905. // See DeleteResolver for more information on using the DeleteResolver
  906. // API call, and error handling.
  907. //
  908. // This method is useful when you want to inject custom logic or configuration
  909. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  910. //
  911. //
  912. // // Example sending a request using the DeleteResolverRequest method.
  913. // req, resp := client.DeleteResolverRequest(params)
  914. //
  915. // err := req.Send()
  916. // if err == nil { // resp is now filled
  917. // fmt.Println(resp)
  918. // }
  919. //
  920. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/DeleteResolver
  921. func (c *AppSync) DeleteResolverRequest(input *DeleteResolverInput) (req *request.Request, output *DeleteResolverOutput) {
  922. op := &request.Operation{
  923. Name: opDeleteResolver,
  924. HTTPMethod: "DELETE",
  925. HTTPPath: "/v1/apis/{apiId}/types/{typeName}/resolvers/{fieldName}",
  926. }
  927. if input == nil {
  928. input = &DeleteResolverInput{}
  929. }
  930. output = &DeleteResolverOutput{}
  931. req = c.newRequest(op, input, output)
  932. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  933. return
  934. }
  935. // DeleteResolver API operation for AWS AppSync.
  936. //
  937. // Deletes a Resolver object.
  938. //
  939. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  940. // with awserr.Error's Code and Message methods to get detailed information about
  941. // the error.
  942. //
  943. // See the AWS API reference guide for AWS AppSync's
  944. // API operation DeleteResolver for usage and error information.
  945. //
  946. // Returned Error Codes:
  947. // * ErrCodeConcurrentModificationException "ConcurrentModificationException"
  948. // Another modification is in progress at this time and it must complete before
  949. // you can make your change.
  950. //
  951. // * ErrCodeNotFoundException "NotFoundException"
  952. // The resource specified in the request was not found. Check the resource,
  953. // and then try again.
  954. //
  955. // * ErrCodeUnauthorizedException "UnauthorizedException"
  956. // You are not authorized to perform this operation.
  957. //
  958. // * ErrCodeInternalFailureException "InternalFailureException"
  959. // An internal AWS AppSync error occurred. Try your request again.
  960. //
  961. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/DeleteResolver
  962. func (c *AppSync) DeleteResolver(input *DeleteResolverInput) (*DeleteResolverOutput, error) {
  963. req, out := c.DeleteResolverRequest(input)
  964. return out, req.Send()
  965. }
  966. // DeleteResolverWithContext is the same as DeleteResolver with the addition of
  967. // the ability to pass a context and additional request options.
  968. //
  969. // See DeleteResolver for details on how to use this API operation.
  970. //
  971. // The context must be non-nil and will be used for request cancellation. If
  972. // the context is nil a panic will occur. In the future the SDK may create
  973. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  974. // for more information on using Contexts.
  975. func (c *AppSync) DeleteResolverWithContext(ctx aws.Context, input *DeleteResolverInput, opts ...request.Option) (*DeleteResolverOutput, error) {
  976. req, out := c.DeleteResolverRequest(input)
  977. req.SetContext(ctx)
  978. req.ApplyOptions(opts...)
  979. return out, req.Send()
  980. }
  981. const opDeleteType = "DeleteType"
  982. // DeleteTypeRequest generates a "aws/request.Request" representing the
  983. // client's request for the DeleteType operation. The "output" return
  984. // value will be populated with the request's response once the request completes
  985. // successfully.
  986. //
  987. // Use "Send" method on the returned Request to send the API call to the service.
  988. // the "output" return value is not valid until after Send returns without error.
  989. //
  990. // See DeleteType for more information on using the DeleteType
  991. // API call, and error handling.
  992. //
  993. // This method is useful when you want to inject custom logic or configuration
  994. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  995. //
  996. //
  997. // // Example sending a request using the DeleteTypeRequest method.
  998. // req, resp := client.DeleteTypeRequest(params)
  999. //
  1000. // err := req.Send()
  1001. // if err == nil { // resp is now filled
  1002. // fmt.Println(resp)
  1003. // }
  1004. //
  1005. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/DeleteType
  1006. func (c *AppSync) DeleteTypeRequest(input *DeleteTypeInput) (req *request.Request, output *DeleteTypeOutput) {
  1007. op := &request.Operation{
  1008. Name: opDeleteType,
  1009. HTTPMethod: "DELETE",
  1010. HTTPPath: "/v1/apis/{apiId}/types/{typeName}",
  1011. }
  1012. if input == nil {
  1013. input = &DeleteTypeInput{}
  1014. }
  1015. output = &DeleteTypeOutput{}
  1016. req = c.newRequest(op, input, output)
  1017. req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1018. return
  1019. }
  1020. // DeleteType API operation for AWS AppSync.
  1021. //
  1022. // Deletes a Type object.
  1023. //
  1024. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1025. // with awserr.Error's Code and Message methods to get detailed information about
  1026. // the error.
  1027. //
  1028. // See the AWS API reference guide for AWS AppSync's
  1029. // API operation DeleteType for usage and error information.
  1030. //
  1031. // Returned Error Codes:
  1032. // * ErrCodeBadRequestException "BadRequestException"
  1033. // The request is not well formed. For example, a value is invalid or a required
  1034. // field is missing. Check the field values, and then try again.
  1035. //
  1036. // * ErrCodeConcurrentModificationException "ConcurrentModificationException"
  1037. // Another modification is in progress at this time and it must complete before
  1038. // you can make your change.
  1039. //
  1040. // * ErrCodeNotFoundException "NotFoundException"
  1041. // The resource specified in the request was not found. Check the resource,
  1042. // and then try again.
  1043. //
  1044. // * ErrCodeUnauthorizedException "UnauthorizedException"
  1045. // You are not authorized to perform this operation.
  1046. //
  1047. // * ErrCodeInternalFailureException "InternalFailureException"
  1048. // An internal AWS AppSync error occurred. Try your request again.
  1049. //
  1050. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/DeleteType
  1051. func (c *AppSync) DeleteType(input *DeleteTypeInput) (*DeleteTypeOutput, error) {
  1052. req, out := c.DeleteTypeRequest(input)
  1053. return out, req.Send()
  1054. }
  1055. // DeleteTypeWithContext is the same as DeleteType with the addition of
  1056. // the ability to pass a context and additional request options.
  1057. //
  1058. // See DeleteType for details on how to use this API operation.
  1059. //
  1060. // The context must be non-nil and will be used for request cancellation. If
  1061. // the context is nil a panic will occur. In the future the SDK may create
  1062. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1063. // for more information on using Contexts.
  1064. func (c *AppSync) DeleteTypeWithContext(ctx aws.Context, input *DeleteTypeInput, opts ...request.Option) (*DeleteTypeOutput, error) {
  1065. req, out := c.DeleteTypeRequest(input)
  1066. req.SetContext(ctx)
  1067. req.ApplyOptions(opts...)
  1068. return out, req.Send()
  1069. }
  1070. const opGetDataSource = "GetDataSource"
  1071. // GetDataSourceRequest generates a "aws/request.Request" representing the
  1072. // client's request for the GetDataSource operation. The "output" return
  1073. // value will be populated with the request's response once the request completes
  1074. // successfully.
  1075. //
  1076. // Use "Send" method on the returned Request to send the API call to the service.
  1077. // the "output" return value is not valid until after Send returns without error.
  1078. //
  1079. // See GetDataSource for more information on using the GetDataSource
  1080. // API call, and error handling.
  1081. //
  1082. // This method is useful when you want to inject custom logic or configuration
  1083. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1084. //
  1085. //
  1086. // // Example sending a request using the GetDataSourceRequest method.
  1087. // req, resp := client.GetDataSourceRequest(params)
  1088. //
  1089. // err := req.Send()
  1090. // if err == nil { // resp is now filled
  1091. // fmt.Println(resp)
  1092. // }
  1093. //
  1094. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/GetDataSource
  1095. func (c *AppSync) GetDataSourceRequest(input *GetDataSourceInput) (req *request.Request, output *GetDataSourceOutput) {
  1096. op := &request.Operation{
  1097. Name: opGetDataSource,
  1098. HTTPMethod: "GET",
  1099. HTTPPath: "/v1/apis/{apiId}/datasources/{name}",
  1100. }
  1101. if input == nil {
  1102. input = &GetDataSourceInput{}
  1103. }
  1104. output = &GetDataSourceOutput{}
  1105. req = c.newRequest(op, input, output)
  1106. return
  1107. }
  1108. // GetDataSource API operation for AWS AppSync.
  1109. //
  1110. // Retrieves a DataSource object.
  1111. //
  1112. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1113. // with awserr.Error's Code and Message methods to get detailed information about
  1114. // the error.
  1115. //
  1116. // See the AWS API reference guide for AWS AppSync's
  1117. // API operation GetDataSource for usage and error information.
  1118. //
  1119. // Returned Error Codes:
  1120. // * ErrCodeBadRequestException "BadRequestException"
  1121. // The request is not well formed. For example, a value is invalid or a required
  1122. // field is missing. Check the field values, and then try again.
  1123. //
  1124. // * ErrCodeConcurrentModificationException "ConcurrentModificationException"
  1125. // Another modification is in progress at this time and it must complete before
  1126. // you can make your change.
  1127. //
  1128. // * ErrCodeNotFoundException "NotFoundException"
  1129. // The resource specified in the request was not found. Check the resource,
  1130. // and then try again.
  1131. //
  1132. // * ErrCodeUnauthorizedException "UnauthorizedException"
  1133. // You are not authorized to perform this operation.
  1134. //
  1135. // * ErrCodeInternalFailureException "InternalFailureException"
  1136. // An internal AWS AppSync error occurred. Try your request again.
  1137. //
  1138. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/GetDataSource
  1139. func (c *AppSync) GetDataSource(input *GetDataSourceInput) (*GetDataSourceOutput, error) {
  1140. req, out := c.GetDataSourceRequest(input)
  1141. return out, req.Send()
  1142. }
  1143. // GetDataSourceWithContext is the same as GetDataSource with the addition of
  1144. // the ability to pass a context and additional request options.
  1145. //
  1146. // See GetDataSource for details on how to use this API operation.
  1147. //
  1148. // The context must be non-nil and will be used for request cancellation. If
  1149. // the context is nil a panic will occur. In the future the SDK may create
  1150. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1151. // for more information on using Contexts.
  1152. func (c *AppSync) GetDataSourceWithContext(ctx aws.Context, input *GetDataSourceInput, opts ...request.Option) (*GetDataSourceOutput, error) {
  1153. req, out := c.GetDataSourceRequest(input)
  1154. req.SetContext(ctx)
  1155. req.ApplyOptions(opts...)
  1156. return out, req.Send()
  1157. }
  1158. const opGetFunction = "GetFunction"
  1159. // GetFunctionRequest generates a "aws/request.Request" representing the
  1160. // client's request for the GetFunction operation. The "output" return
  1161. // value will be populated with the request's response once the request completes
  1162. // successfully.
  1163. //
  1164. // Use "Send" method on the returned Request to send the API call to the service.
  1165. // the "output" return value is not valid until after Send returns without error.
  1166. //
  1167. // See GetFunction for more information on using the GetFunction
  1168. // API call, and error handling.
  1169. //
  1170. // This method is useful when you want to inject custom logic or configuration
  1171. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1172. //
  1173. //
  1174. // // Example sending a request using the GetFunctionRequest method.
  1175. // req, resp := client.GetFunctionRequest(params)
  1176. //
  1177. // err := req.Send()
  1178. // if err == nil { // resp is now filled
  1179. // fmt.Println(resp)
  1180. // }
  1181. //
  1182. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/GetFunction
  1183. func (c *AppSync) GetFunctionRequest(input *GetFunctionInput) (req *request.Request, output *GetFunctionOutput) {
  1184. op := &request.Operation{
  1185. Name: opGetFunction,
  1186. HTTPMethod: "GET",
  1187. HTTPPath: "/v1/apis/{apiId}/functions/{functionId}",
  1188. }
  1189. if input == nil {
  1190. input = &GetFunctionInput{}
  1191. }
  1192. output = &GetFunctionOutput{}
  1193. req = c.newRequest(op, input, output)
  1194. return
  1195. }
  1196. // GetFunction API operation for AWS AppSync.
  1197. //
  1198. // Get a Function.
  1199. //
  1200. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1201. // with awserr.Error's Code and Message methods to get detailed information about
  1202. // the error.
  1203. //
  1204. // See the AWS API reference guide for AWS AppSync's
  1205. // API operation GetFunction for usage and error information.
  1206. //
  1207. // Returned Error Codes:
  1208. // * ErrCodeConcurrentModificationException "ConcurrentModificationException"
  1209. // Another modification is in progress at this time and it must complete before
  1210. // you can make your change.
  1211. //
  1212. // * ErrCodeNotFoundException "NotFoundException"
  1213. // The resource specified in the request was not found. Check the resource,
  1214. // and then try again.
  1215. //
  1216. // * ErrCodeUnauthorizedException "UnauthorizedException"
  1217. // You are not authorized to perform this operation.
  1218. //
  1219. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/GetFunction
  1220. func (c *AppSync) GetFunction(input *GetFunctionInput) (*GetFunctionOutput, error) {
  1221. req, out := c.GetFunctionRequest(input)
  1222. return out, req.Send()
  1223. }
  1224. // GetFunctionWithContext is the same as GetFunction with the addition of
  1225. // the ability to pass a context and additional request options.
  1226. //
  1227. // See GetFunction for details on how to use this API operation.
  1228. //
  1229. // The context must be non-nil and will be used for request cancellation. If
  1230. // the context is nil a panic will occur. In the future the SDK may create
  1231. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1232. // for more information on using Contexts.
  1233. func (c *AppSync) GetFunctionWithContext(ctx aws.Context, input *GetFunctionInput, opts ...request.Option) (*GetFunctionOutput, error) {
  1234. req, out := c.GetFunctionRequest(input)
  1235. req.SetContext(ctx)
  1236. req.ApplyOptions(opts...)
  1237. return out, req.Send()
  1238. }
  1239. const opGetGraphqlApi = "GetGraphqlApi"
  1240. // GetGraphqlApiRequest generates a "aws/request.Request" representing the
  1241. // client's request for the GetGraphqlApi operation. The "output" return
  1242. // value will be populated with the request's response once the request completes
  1243. // successfully.
  1244. //
  1245. // Use "Send" method on the returned Request to send the API call to the service.
  1246. // the "output" return value is not valid until after Send returns without error.
  1247. //
  1248. // See GetGraphqlApi for more information on using the GetGraphqlApi
  1249. // API call, and error handling.
  1250. //
  1251. // This method is useful when you want to inject custom logic or configuration
  1252. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1253. //
  1254. //
  1255. // // Example sending a request using the GetGraphqlApiRequest method.
  1256. // req, resp := client.GetGraphqlApiRequest(params)
  1257. //
  1258. // err := req.Send()
  1259. // if err == nil { // resp is now filled
  1260. // fmt.Println(resp)
  1261. // }
  1262. //
  1263. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/GetGraphqlApi
  1264. func (c *AppSync) GetGraphqlApiRequest(input *GetGraphqlApiInput) (req *request.Request, output *GetGraphqlApiOutput) {
  1265. op := &request.Operation{
  1266. Name: opGetGraphqlApi,
  1267. HTTPMethod: "GET",
  1268. HTTPPath: "/v1/apis/{apiId}",
  1269. }
  1270. if input == nil {
  1271. input = &GetGraphqlApiInput{}
  1272. }
  1273. output = &GetGraphqlApiOutput{}
  1274. req = c.newRequest(op, input, output)
  1275. return
  1276. }
  1277. // GetGraphqlApi API operation for AWS AppSync.
  1278. //
  1279. // Retrieves a GraphqlApi object.
  1280. //
  1281. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1282. // with awserr.Error's Code and Message methods to get detailed information about
  1283. // the error.
  1284. //
  1285. // See the AWS API reference guide for AWS AppSync's
  1286. // API operation GetGraphqlApi for usage and error information.
  1287. //
  1288. // Returned Error Codes:
  1289. // * ErrCodeBadRequestException "BadRequestException"
  1290. // The request is not well formed. For example, a value is invalid or a required
  1291. // field is missing. Check the field values, and then try again.
  1292. //
  1293. // * ErrCodeNotFoundException "NotFoundException"
  1294. // The resource specified in the request was not found. Check the resource,
  1295. // and then try again.
  1296. //
  1297. // * ErrCodeUnauthorizedException "UnauthorizedException"
  1298. // You are not authorized to perform this operation.
  1299. //
  1300. // * ErrCodeInternalFailureException "InternalFailureException"
  1301. // An internal AWS AppSync error occurred. Try your request again.
  1302. //
  1303. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/GetGraphqlApi
  1304. func (c *AppSync) GetGraphqlApi(input *GetGraphqlApiInput) (*GetGraphqlApiOutput, error) {
  1305. req, out := c.GetGraphqlApiRequest(input)
  1306. return out, req.Send()
  1307. }
  1308. // GetGraphqlApiWithContext is the same as GetGraphqlApi with the addition of
  1309. // the ability to pass a context and additional request options.
  1310. //
  1311. // See GetGraphqlApi for details on how to use this API operation.
  1312. //
  1313. // The context must be non-nil and will be used for request cancellation. If
  1314. // the context is nil a panic will occur. In the future the SDK may create
  1315. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1316. // for more information on using Contexts.
  1317. func (c *AppSync) GetGraphqlApiWithContext(ctx aws.Context, input *GetGraphqlApiInput, opts ...request.Option) (*GetGraphqlApiOutput, error) {
  1318. req, out := c.GetGraphqlApiRequest(input)
  1319. req.SetContext(ctx)
  1320. req.ApplyOptions(opts...)
  1321. return out, req.Send()
  1322. }
  1323. const opGetIntrospectionSchema = "GetIntrospectionSchema"
  1324. // GetIntrospectionSchemaRequest generates a "aws/request.Request" representing the
  1325. // client's request for the GetIntrospectionSchema operation. The "output" return
  1326. // value will be populated with the request's response once the request completes
  1327. // successfully.
  1328. //
  1329. // Use "Send" method on the returned Request to send the API call to the service.
  1330. // the "output" return value is not valid until after Send returns without error.
  1331. //
  1332. // See GetIntrospectionSchema for more information on using the GetIntrospectionSchema
  1333. // API call, and error handling.
  1334. //
  1335. // This method is useful when you want to inject custom logic or configuration
  1336. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1337. //
  1338. //
  1339. // // Example sending a request using the GetIntrospectionSchemaRequest method.
  1340. // req, resp := client.GetIntrospectionSchemaRequest(params)
  1341. //
  1342. // err := req.Send()
  1343. // if err == nil { // resp is now filled
  1344. // fmt.Println(resp)
  1345. // }
  1346. //
  1347. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/GetIntrospectionSchema
  1348. func (c *AppSync) GetIntrospectionSchemaRequest(input *GetIntrospectionSchemaInput) (req *request.Request, output *GetIntrospectionSchemaOutput) {
  1349. op := &request.Operation{
  1350. Name: opGetIntrospectionSchema,
  1351. HTTPMethod: "GET",
  1352. HTTPPath: "/v1/apis/{apiId}/schema",
  1353. }
  1354. if input == nil {
  1355. input = &GetIntrospectionSchemaInput{}
  1356. }
  1357. output = &GetIntrospectionSchemaOutput{}
  1358. req = c.newRequest(op, input, output)
  1359. return
  1360. }
  1361. // GetIntrospectionSchema API operation for AWS AppSync.
  1362. //
  1363. // Retrieves the introspection schema for a GraphQL API.
  1364. //
  1365. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1366. // with awserr.Error's Code and Message methods to get detailed information about
  1367. // the error.
  1368. //
  1369. // See the AWS API reference guide for AWS AppSync's
  1370. // API operation GetIntrospectionSchema for usage and error information.
  1371. //
  1372. // Returned Error Codes:
  1373. // * ErrCodeGraphQLSchemaException "GraphQLSchemaException"
  1374. // The GraphQL schema is not valid.
  1375. //
  1376. // * ErrCodeNotFoundException "NotFoundException"
  1377. // The resource specified in the request was not found. Check the resource,
  1378. // and then try again.
  1379. //
  1380. // * ErrCodeUnauthorizedException "UnauthorizedException"
  1381. // You are not authorized to perform this operation.
  1382. //
  1383. // * ErrCodeInternalFailureException "InternalFailureException"
  1384. // An internal AWS AppSync error occurred. Try your request again.
  1385. //
  1386. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/GetIntrospectionSchema
  1387. func (c *AppSync) GetIntrospectionSchema(input *GetIntrospectionSchemaInput) (*GetIntrospectionSchemaOutput, error) {
  1388. req, out := c.GetIntrospectionSchemaRequest(input)
  1389. return out, req.Send()
  1390. }
  1391. // GetIntrospectionSchemaWithContext is the same as GetIntrospectionSchema with the addition of
  1392. // the ability to pass a context and additional request options.
  1393. //
  1394. // See GetIntrospectionSchema for details on how to use this API operation.
  1395. //
  1396. // The context must be non-nil and will be used for request cancellation. If
  1397. // the context is nil a panic will occur. In the future the SDK may create
  1398. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1399. // for more information on using Contexts.
  1400. func (c *AppSync) GetIntrospectionSchemaWithContext(ctx aws.Context, input *GetIntrospectionSchemaInput, opts ...request.Option) (*GetIntrospectionSchemaOutput, error) {
  1401. req, out := c.GetIntrospectionSchemaRequest(input)
  1402. req.SetContext(ctx)
  1403. req.ApplyOptions(opts...)
  1404. return out, req.Send()
  1405. }
  1406. const opGetResolver = "GetResolver"
  1407. // GetResolverRequest generates a "aws/request.Request" representing the
  1408. // client's request for the GetResolver operation. The "output" return
  1409. // value will be populated with the request's response once the request completes
  1410. // successfully.
  1411. //
  1412. // Use "Send" method on the returned Request to send the API call to the service.
  1413. // the "output" return value is not valid until after Send returns without error.
  1414. //
  1415. // See GetResolver for more information on using the GetResolver
  1416. // API call, and error handling.
  1417. //
  1418. // This method is useful when you want to inject custom logic or configuration
  1419. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1420. //
  1421. //
  1422. // // Example sending a request using the GetResolverRequest method.
  1423. // req, resp := client.GetResolverRequest(params)
  1424. //
  1425. // err := req.Send()
  1426. // if err == nil { // resp is now filled
  1427. // fmt.Println(resp)
  1428. // }
  1429. //
  1430. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/GetResolver
  1431. func (c *AppSync) GetResolverRequest(input *GetResolverInput) (req *request.Request, output *GetResolverOutput) {
  1432. op := &request.Operation{
  1433. Name: opGetResolver,
  1434. HTTPMethod: "GET",
  1435. HTTPPath: "/v1/apis/{apiId}/types/{typeName}/resolvers/{fieldName}",
  1436. }
  1437. if input == nil {
  1438. input = &GetResolverInput{}
  1439. }
  1440. output = &GetResolverOutput{}
  1441. req = c.newRequest(op, input, output)
  1442. return
  1443. }
  1444. // GetResolver API operation for AWS AppSync.
  1445. //
  1446. // Retrieves a Resolver object.
  1447. //
  1448. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1449. // with awserr.Error's Code and Message methods to get detailed information about
  1450. // the error.
  1451. //
  1452. // See the AWS API reference guide for AWS AppSync's
  1453. // API operation GetResolver for usage and error information.
  1454. //
  1455. // Returned Error Codes:
  1456. // * ErrCodeConcurrentModificationException "ConcurrentModificationException"
  1457. // Another modification is in progress at this time and it must complete before
  1458. // you can make your change.
  1459. //
  1460. // * ErrCodeNotFoundException "NotFoundException"
  1461. // The resource specified in the request was not found. Check the resource,
  1462. // and then try again.
  1463. //
  1464. // * ErrCodeUnauthorizedException "UnauthorizedException"
  1465. // You are not authorized to perform this operation.
  1466. //
  1467. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/GetResolver
  1468. func (c *AppSync) GetResolver(input *GetResolverInput) (*GetResolverOutput, error) {
  1469. req, out := c.GetResolverRequest(input)
  1470. return out, req.Send()
  1471. }
  1472. // GetResolverWithContext is the same as GetResolver with the addition of
  1473. // the ability to pass a context and additional request options.
  1474. //
  1475. // See GetResolver for details on how to use this API operation.
  1476. //
  1477. // The context must be non-nil and will be used for request cancellation. If
  1478. // the context is nil a panic will occur. In the future the SDK may create
  1479. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1480. // for more information on using Contexts.
  1481. func (c *AppSync) GetResolverWithContext(ctx aws.Context, input *GetResolverInput, opts ...request.Option) (*GetResolverOutput, error) {
  1482. req, out := c.GetResolverRequest(input)
  1483. req.SetContext(ctx)
  1484. req.ApplyOptions(opts...)
  1485. return out, req.Send()
  1486. }
  1487. const opGetSchemaCreationStatus = "GetSchemaCreationStatus"
  1488. // GetSchemaCreationStatusRequest generates a "aws/request.Request" representing the
  1489. // client's request for the GetSchemaCreationStatus operation. The "output" return
  1490. // value will be populated with the request's response once the request completes
  1491. // successfully.
  1492. //
  1493. // Use "Send" method on the returned Request to send the API call to the service.
  1494. // the "output" return value is not valid until after Send returns without error.
  1495. //
  1496. // See GetSchemaCreationStatus for more information on using the GetSchemaCreationStatus
  1497. // API call, and error handling.
  1498. //
  1499. // This method is useful when you want to inject custom logic or configuration
  1500. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1501. //
  1502. //
  1503. // // Example sending a request using the GetSchemaCreationStatusRequest method.
  1504. // req, resp := client.GetSchemaCreationStatusRequest(params)
  1505. //
  1506. // err := req.Send()
  1507. // if err == nil { // resp is now filled
  1508. // fmt.Println(resp)
  1509. // }
  1510. //
  1511. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/GetSchemaCreationStatus
  1512. func (c *AppSync) GetSchemaCreationStatusRequest(input *GetSchemaCreationStatusInput) (req *request.Request, output *GetSchemaCreationStatusOutput) {
  1513. op := &request.Operation{
  1514. Name: opGetSchemaCreationStatus,
  1515. HTTPMethod: "GET",
  1516. HTTPPath: "/v1/apis/{apiId}/schemacreation",
  1517. }
  1518. if input == nil {
  1519. input = &GetSchemaCreationStatusInput{}
  1520. }
  1521. output = &GetSchemaCreationStatusOutput{}
  1522. req = c.newRequest(op, input, output)
  1523. return
  1524. }
  1525. // GetSchemaCreationStatus API operation for AWS AppSync.
  1526. //
  1527. // Retrieves the current status of a schema creation operation.
  1528. //
  1529. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1530. // with awserr.Error's Code and Message methods to get detailed information about
  1531. // the error.
  1532. //
  1533. // See the AWS API reference guide for AWS AppSync's
  1534. // API operation GetSchemaCreationStatus for usage and error information.
  1535. //
  1536. // Returned Error Codes:
  1537. // * ErrCodeBadRequestException "BadRequestException"
  1538. // The request is not well formed. For example, a value is invalid or a required
  1539. // field is missing. Check the field values, and then try again.
  1540. //
  1541. // * ErrCodeNotFoundException "NotFoundException"
  1542. // The resource specified in the request was not found. Check the resource,
  1543. // and then try again.
  1544. //
  1545. // * ErrCodeUnauthorizedException "UnauthorizedException"
  1546. // You are not authorized to perform this operation.
  1547. //
  1548. // * ErrCodeInternalFailureException "InternalFailureException"
  1549. // An internal AWS AppSync error occurred. Try your request again.
  1550. //
  1551. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/GetSchemaCreationStatus
  1552. func (c *AppSync) GetSchemaCreationStatus(input *GetSchemaCreationStatusInput) (*GetSchemaCreationStatusOutput, error) {
  1553. req, out := c.GetSchemaCreationStatusRequest(input)
  1554. return out, req.Send()
  1555. }
  1556. // GetSchemaCreationStatusWithContext is the same as GetSchemaCreationStatus with the addition of
  1557. // the ability to pass a context and additional request options.
  1558. //
  1559. // See GetSchemaCreationStatus for details on how to use this API operation.
  1560. //
  1561. // The context must be non-nil and will be used for request cancellation. If
  1562. // the context is nil a panic will occur. In the future the SDK may create
  1563. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1564. // for more information on using Contexts.
  1565. func (c *AppSync) GetSchemaCreationStatusWithContext(ctx aws.Context, input *GetSchemaCreationStatusInput, opts ...request.Option) (*GetSchemaCreationStatusOutput, error) {
  1566. req, out := c.GetSchemaCreationStatusRequest(input)
  1567. req.SetContext(ctx)
  1568. req.ApplyOptions(opts...)
  1569. return out, req.Send()
  1570. }
  1571. const opGetType = "GetType"
  1572. // GetTypeRequest generates a "aws/request.Request" representing the
  1573. // client's request for the GetType operation. The "output" return
  1574. // value will be populated with the request's response once the request completes
  1575. // successfully.
  1576. //
  1577. // Use "Send" method on the returned Request to send the API call to the service.
  1578. // the "output" return value is not valid until after Send returns without error.
  1579. //
  1580. // See GetType for more information on using the GetType
  1581. // API call, and error handling.
  1582. //
  1583. // This method is useful when you want to inject custom logic or configuration
  1584. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1585. //
  1586. //
  1587. // // Example sending a request using the GetTypeRequest method.
  1588. // req, resp := client.GetTypeRequest(params)
  1589. //
  1590. // err := req.Send()
  1591. // if err == nil { // resp is now filled
  1592. // fmt.Println(resp)
  1593. // }
  1594. //
  1595. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/GetType
  1596. func (c *AppSync) GetTypeRequest(input *GetTypeInput) (req *request.Request, output *GetTypeOutput) {
  1597. op := &request.Operation{
  1598. Name: opGetType,
  1599. HTTPMethod: "GET",
  1600. HTTPPath: "/v1/apis/{apiId}/types/{typeName}",
  1601. }
  1602. if input == nil {
  1603. input = &GetTypeInput{}
  1604. }
  1605. output = &GetTypeOutput{}
  1606. req = c.newRequest(op, input, output)
  1607. return
  1608. }
  1609. // GetType API operation for AWS AppSync.
  1610. //
  1611. // Retrieves a Type object.
  1612. //
  1613. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1614. // with awserr.Error's Code and Message methods to get detailed information about
  1615. // the error.
  1616. //
  1617. // See the AWS API reference guide for AWS AppSync's
  1618. // API operation GetType for usage and error information.
  1619. //
  1620. // Returned Error Codes:
  1621. // * ErrCodeBadRequestException "BadRequestException"
  1622. // The request is not well formed. For example, a value is invalid or a required
  1623. // field is missing. Check the field values, and then try again.
  1624. //
  1625. // * ErrCodeConcurrentModificationException "ConcurrentModificationException"
  1626. // Another modification is in progress at this time and it must complete before
  1627. // you can make your change.
  1628. //
  1629. // * ErrCodeNotFoundException "NotFoundException"
  1630. // The resource specified in the request was not found. Check the resource,
  1631. // and then try again.
  1632. //
  1633. // * ErrCodeUnauthorizedException "UnauthorizedException"
  1634. // You are not authorized to perform this operation.
  1635. //
  1636. // * ErrCodeInternalFailureException "InternalFailureException"
  1637. // An internal AWS AppSync error occurred. Try your request again.
  1638. //
  1639. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/GetType
  1640. func (c *AppSync) GetType(input *GetTypeInput) (*GetTypeOutput, error) {
  1641. req, out := c.GetTypeRequest(input)
  1642. return out, req.Send()
  1643. }
  1644. // GetTypeWithContext is the same as GetType with the addition of
  1645. // the ability to pass a context and additional request options.
  1646. //
  1647. // See GetType for details on how to use this API operation.
  1648. //
  1649. // The context must be non-nil and will be used for request cancellation. If
  1650. // the context is nil a panic will occur. In the future the SDK may create
  1651. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1652. // for more information on using Contexts.
  1653. func (c *AppSync) GetTypeWithContext(ctx aws.Context, input *GetTypeInput, opts ...request.Option) (*GetTypeOutput, error) {
  1654. req, out := c.GetTypeRequest(input)
  1655. req.SetContext(ctx)
  1656. req.ApplyOptions(opts...)
  1657. return out, req.Send()
  1658. }
  1659. const opListApiKeys = "ListApiKeys"
  1660. // ListApiKeysRequest generates a "aws/request.Request" representing the
  1661. // client's request for the ListApiKeys operation. The "output" return
  1662. // value will be populated with the request's response once the request completes
  1663. // successfully.
  1664. //
  1665. // Use "Send" method on the returned Request to send the API call to the service.
  1666. // the "output" return value is not valid until after Send returns without error.
  1667. //
  1668. // See ListApiKeys for more information on using the ListApiKeys
  1669. // API call, and error handling.
  1670. //
  1671. // This method is useful when you want to inject custom logic or configuration
  1672. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1673. //
  1674. //
  1675. // // Example sending a request using the ListApiKeysRequest method.
  1676. // req, resp := client.ListApiKeysRequest(params)
  1677. //
  1678. // err := req.Send()
  1679. // if err == nil { // resp is now filled
  1680. // fmt.Println(resp)
  1681. // }
  1682. //
  1683. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/ListApiKeys
  1684. func (c *AppSync) ListApiKeysRequest(input *ListApiKeysInput) (req *request.Request, output *ListApiKeysOutput) {
  1685. op := &request.Operation{
  1686. Name: opListApiKeys,
  1687. HTTPMethod: "GET",
  1688. HTTPPath: "/v1/apis/{apiId}/apikeys",
  1689. }
  1690. if input == nil {
  1691. input = &ListApiKeysInput{}
  1692. }
  1693. output = &ListApiKeysOutput{}
  1694. req = c.newRequest(op, input, output)
  1695. return
  1696. }
  1697. // ListApiKeys API operation for AWS AppSync.
  1698. //
  1699. // Lists the API keys for a given API.
  1700. //
  1701. // API keys are deleted automatically sometime after they expire. However, they
  1702. // may still be included in the response until they have actually been deleted.
  1703. // You can safely call DeleteApiKey to manually delete a key before it's automatically
  1704. // deleted.
  1705. //
  1706. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1707. // with awserr.Error's Code and Message methods to get detailed information about
  1708. // the error.
  1709. //
  1710. // See the AWS API reference guide for AWS AppSync's
  1711. // API operation ListApiKeys for usage and error information.
  1712. //
  1713. // Returned Error Codes:
  1714. // * ErrCodeBadRequestException "BadRequestException"
  1715. // The request is not well formed. For example, a value is invalid or a required
  1716. // field is missing. Check the field values, and then try again.
  1717. //
  1718. // * ErrCodeNotFoundException "NotFoundException"
  1719. // The resource specified in the request was not found. Check the resource,
  1720. // and then try again.
  1721. //
  1722. // * ErrCodeUnauthorizedException "UnauthorizedException"
  1723. // You are not authorized to perform this operation.
  1724. //
  1725. // * ErrCodeInternalFailureException "InternalFailureException"
  1726. // An internal AWS AppSync error occurred. Try your request again.
  1727. //
  1728. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/ListApiKeys
  1729. func (c *AppSync) ListApiKeys(input *ListApiKeysInput) (*ListApiKeysOutput, error) {
  1730. req, out := c.ListApiKeysRequest(input)
  1731. return out, req.Send()
  1732. }
  1733. // ListApiKeysWithContext is the same as ListApiKeys with the addition of
  1734. // the ability to pass a context and additional request options.
  1735. //
  1736. // See ListApiKeys for details on how to use this API operation.
  1737. //
  1738. // The context must be non-nil and will be used for request cancellation. If
  1739. // the context is nil a panic will occur. In the future the SDK may create
  1740. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1741. // for more information on using Contexts.
  1742. func (c *AppSync) ListApiKeysWithContext(ctx aws.Context, input *ListApiKeysInput, opts ...request.Option) (*ListApiKeysOutput, error) {
  1743. req, out := c.ListApiKeysRequest(input)
  1744. req.SetContext(ctx)
  1745. req.ApplyOptions(opts...)
  1746. return out, req.Send()
  1747. }
  1748. const opListDataSources = "ListDataSources"
  1749. // ListDataSourcesRequest generates a "aws/request.Request" representing the
  1750. // client's request for the ListDataSources operation. The "output" return
  1751. // value will be populated with the request's response once the request completes
  1752. // successfully.
  1753. //
  1754. // Use "Send" method on the returned Request to send the API call to the service.
  1755. // the "output" return value is not valid until after Send returns without error.
  1756. //
  1757. // See ListDataSources for more information on using the ListDataSources
  1758. // API call, and error handling.
  1759. //
  1760. // This method is useful when you want to inject custom logic or configuration
  1761. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1762. //
  1763. //
  1764. // // Example sending a request using the ListDataSourcesRequest method.
  1765. // req, resp := client.ListDataSourcesRequest(params)
  1766. //
  1767. // err := req.Send()
  1768. // if err == nil { // resp is now filled
  1769. // fmt.Println(resp)
  1770. // }
  1771. //
  1772. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/ListDataSources
  1773. func (c *AppSync) ListDataSourcesRequest(input *ListDataSourcesInput) (req *request.Request, output *ListDataSourcesOutput) {
  1774. op := &request.Operation{
  1775. Name: opListDataSources,
  1776. HTTPMethod: "GET",
  1777. HTTPPath: "/v1/apis/{apiId}/datasources",
  1778. }
  1779. if input == nil {
  1780. input = &ListDataSourcesInput{}
  1781. }
  1782. output = &ListDataSourcesOutput{}
  1783. req = c.newRequest(op, input, output)
  1784. return
  1785. }
  1786. // ListDataSources API operation for AWS AppSync.
  1787. //
  1788. // Lists the data sources for a given API.
  1789. //
  1790. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1791. // with awserr.Error's Code and Message methods to get detailed information about
  1792. // the error.
  1793. //
  1794. // See the AWS API reference guide for AWS AppSync's
  1795. // API operation ListDataSources for usage and error information.
  1796. //
  1797. // Returned Error Codes:
  1798. // * ErrCodeBadRequestException "BadRequestException"
  1799. // The request is not well formed. For example, a value is invalid or a required
  1800. // field is missing. Check the field values, and then try again.
  1801. //
  1802. // * ErrCodeNotFoundException "NotFoundException"
  1803. // The resource specified in the request was not found. Check the resource,
  1804. // and then try again.
  1805. //
  1806. // * ErrCodeUnauthorizedException "UnauthorizedException"
  1807. // You are not authorized to perform this operation.
  1808. //
  1809. // * ErrCodeInternalFailureException "InternalFailureException"
  1810. // An internal AWS AppSync error occurred. Try your request again.
  1811. //
  1812. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/ListDataSources
  1813. func (c *AppSync) ListDataSources(input *ListDataSourcesInput) (*ListDataSourcesOutput, error) {
  1814. req, out := c.ListDataSourcesRequest(input)
  1815. return out, req.Send()
  1816. }
  1817. // ListDataSourcesWithContext is the same as ListDataSources with the addition of
  1818. // the ability to pass a context and additional request options.
  1819. //
  1820. // See ListDataSources for details on how to use this API operation.
  1821. //
  1822. // The context must be non-nil and will be used for request cancellation. If
  1823. // the context is nil a panic will occur. In the future the SDK may create
  1824. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1825. // for more information on using Contexts.
  1826. func (c *AppSync) ListDataSourcesWithContext(ctx aws.Context, input *ListDataSourcesInput, opts ...request.Option) (*ListDataSourcesOutput, error) {
  1827. req, out := c.ListDataSourcesRequest(input)
  1828. req.SetContext(ctx)
  1829. req.ApplyOptions(opts...)
  1830. return out, req.Send()
  1831. }
  1832. const opListFunctions = "ListFunctions"
  1833. // ListFunctionsRequest generates a "aws/request.Request" representing the
  1834. // client's request for the ListFunctions operation. The "output" return
  1835. // value will be populated with the request's response once the request completes
  1836. // successfully.
  1837. //
  1838. // Use "Send" method on the returned Request to send the API call to the service.
  1839. // the "output" return value is not valid until after Send returns without error.
  1840. //
  1841. // See ListFunctions for more information on using the ListFunctions
  1842. // API call, and error handling.
  1843. //
  1844. // This method is useful when you want to inject custom logic or configuration
  1845. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1846. //
  1847. //
  1848. // // Example sending a request using the ListFunctionsRequest method.
  1849. // req, resp := client.ListFunctionsRequest(params)
  1850. //
  1851. // err := req.Send()
  1852. // if err == nil { // resp is now filled
  1853. // fmt.Println(resp)
  1854. // }
  1855. //
  1856. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/ListFunctions
  1857. func (c *AppSync) ListFunctionsRequest(input *ListFunctionsInput) (req *request.Request, output *ListFunctionsOutput) {
  1858. op := &request.Operation{
  1859. Name: opListFunctions,
  1860. HTTPMethod: "GET",
  1861. HTTPPath: "/v1/apis/{apiId}/functions",
  1862. }
  1863. if input == nil {
  1864. input = &ListFunctionsInput{}
  1865. }
  1866. output = &ListFunctionsOutput{}
  1867. req = c.newRequest(op, input, output)
  1868. return
  1869. }
  1870. // ListFunctions API operation for AWS AppSync.
  1871. //
  1872. // List multiple functions.
  1873. //
  1874. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1875. // with awserr.Error's Code and Message methods to get detailed information about
  1876. // the error.
  1877. //
  1878. // See the AWS API reference guide for AWS AppSync's
  1879. // API operation ListFunctions for usage and error information.
  1880. //
  1881. // Returned Error Codes:
  1882. // * ErrCodeBadRequestException "BadRequestException"
  1883. // The request is not well formed. For example, a value is invalid or a required
  1884. // field is missing. Check the field values, and then try again.
  1885. //
  1886. // * ErrCodeNotFoundException "NotFoundException"
  1887. // The resource specified in the request was not found. Check the resource,
  1888. // and then try again.
  1889. //
  1890. // * ErrCodeUnauthorizedException "UnauthorizedException"
  1891. // You are not authorized to perform this operation.
  1892. //
  1893. // * ErrCodeInternalFailureException "InternalFailureException"
  1894. // An internal AWS AppSync error occurred. Try your request again.
  1895. //
  1896. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/ListFunctions
  1897. func (c *AppSync) ListFunctions(input *ListFunctionsInput) (*ListFunctionsOutput, error) {
  1898. req, out := c.ListFunctionsRequest(input)
  1899. return out, req.Send()
  1900. }
  1901. // ListFunctionsWithContext is the same as ListFunctions with the addition of
  1902. // the ability to pass a context and additional request options.
  1903. //
  1904. // See ListFunctions for details on how to use this API operation.
  1905. //
  1906. // The context must be non-nil and will be used for request cancellation. If
  1907. // the context is nil a panic will occur. In the future the SDK may create
  1908. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1909. // for more information on using Contexts.
  1910. func (c *AppSync) ListFunctionsWithContext(ctx aws.Context, input *ListFunctionsInput, opts ...request.Option) (*ListFunctionsOutput, error) {
  1911. req, out := c.ListFunctionsRequest(input)
  1912. req.SetContext(ctx)
  1913. req.ApplyOptions(opts...)
  1914. return out, req.Send()
  1915. }
  1916. const opListGraphqlApis = "ListGraphqlApis"
  1917. // ListGraphqlApisRequest generates a "aws/request.Request" representing the
  1918. // client's request for the ListGraphqlApis operation. The "output" return
  1919. // value will be populated with the request's response once the request completes
  1920. // successfully.
  1921. //
  1922. // Use "Send" method on the returned Request to send the API call to the service.
  1923. // the "output" return value is not valid until after Send returns without error.
  1924. //
  1925. // See ListGraphqlApis for more information on using the ListGraphqlApis
  1926. // API call, and error handling.
  1927. //
  1928. // This method is useful when you want to inject custom logic or configuration
  1929. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1930. //
  1931. //
  1932. // // Example sending a request using the ListGraphqlApisRequest method.
  1933. // req, resp := client.ListGraphqlApisRequest(params)
  1934. //
  1935. // err := req.Send()
  1936. // if err == nil { // resp is now filled
  1937. // fmt.Println(resp)
  1938. // }
  1939. //
  1940. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/ListGraphqlApis
  1941. func (c *AppSync) ListGraphqlApisRequest(input *ListGraphqlApisInput) (req *request.Request, output *ListGraphqlApisOutput) {
  1942. op := &request.Operation{
  1943. Name: opListGraphqlApis,
  1944. HTTPMethod: "GET",
  1945. HTTPPath: "/v1/apis",
  1946. }
  1947. if input == nil {
  1948. input = &ListGraphqlApisInput{}
  1949. }
  1950. output = &ListGraphqlApisOutput{}
  1951. req = c.newRequest(op, input, output)
  1952. return
  1953. }
  1954. // ListGraphqlApis API operation for AWS AppSync.
  1955. //
  1956. // Lists your GraphQL APIs.
  1957. //
  1958. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1959. // with awserr.Error's Code and Message methods to get detailed information about
  1960. // the error.
  1961. //
  1962. // See the AWS API reference guide for AWS AppSync's
  1963. // API operation ListGraphqlApis for usage and error information.
  1964. //
  1965. // Returned Error Codes:
  1966. // * ErrCodeBadRequestException "BadRequestException"
  1967. // The request is not well formed. For example, a value is invalid or a required
  1968. // field is missing. Check the field values, and then try again.
  1969. //
  1970. // * ErrCodeUnauthorizedException "UnauthorizedException"
  1971. // You are not authorized to perform this operation.
  1972. //
  1973. // * ErrCodeInternalFailureException "InternalFailureException"
  1974. // An internal AWS AppSync error occurred. Try your request again.
  1975. //
  1976. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/ListGraphqlApis
  1977. func (c *AppSync) ListGraphqlApis(input *ListGraphqlApisInput) (*ListGraphqlApisOutput, error) {
  1978. req, out := c.ListGraphqlApisRequest(input)
  1979. return out, req.Send()
  1980. }
  1981. // ListGraphqlApisWithContext is the same as ListGraphqlApis with the addition of
  1982. // the ability to pass a context and additional request options.
  1983. //
  1984. // See ListGraphqlApis for details on how to use this API operation.
  1985. //
  1986. // The context must be non-nil and will be used for request cancellation. If
  1987. // the context is nil a panic will occur. In the future the SDK may create
  1988. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1989. // for more information on using Contexts.
  1990. func (c *AppSync) ListGraphqlApisWithContext(ctx aws.Context, input *ListGraphqlApisInput, opts ...request.Option) (*ListGraphqlApisOutput, error) {
  1991. req, out := c.ListGraphqlApisRequest(input)
  1992. req.SetContext(ctx)
  1993. req.ApplyOptions(opts...)
  1994. return out, req.Send()
  1995. }
  1996. const opListResolvers = "ListResolvers"
  1997. // ListResolversRequest generates a "aws/request.Request" representing the
  1998. // client's request for the ListResolvers operation. The "output" return
  1999. // value will be populated with the request's response once the request completes
  2000. // successfully.
  2001. //
  2002. // Use "Send" method on the returned Request to send the API call to the service.
  2003. // the "output" return value is not valid until after Send returns without error.
  2004. //
  2005. // See ListResolvers for more information on using the ListResolvers
  2006. // API call, and error handling.
  2007. //
  2008. // This method is useful when you want to inject custom logic or configuration
  2009. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2010. //
  2011. //
  2012. // // Example sending a request using the ListResolversRequest method.
  2013. // req, resp := client.ListResolversRequest(params)
  2014. //
  2015. // err := req.Send()
  2016. // if err == nil { // resp is now filled
  2017. // fmt.Println(resp)
  2018. // }
  2019. //
  2020. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/ListResolvers
  2021. func (c *AppSync) ListResolversRequest(input *ListResolversInput) (req *request.Request, output *ListResolversOutput) {
  2022. op := &request.Operation{
  2023. Name: opListResolvers,
  2024. HTTPMethod: "GET",
  2025. HTTPPath: "/v1/apis/{apiId}/types/{typeName}/resolvers",
  2026. }
  2027. if input == nil {
  2028. input = &ListResolversInput{}
  2029. }
  2030. output = &ListResolversOutput{}
  2031. req = c.newRequest(op, input, output)
  2032. return
  2033. }
  2034. // ListResolvers API operation for AWS AppSync.
  2035. //
  2036. // Lists the resolvers for a given API and type.
  2037. //
  2038. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2039. // with awserr.Error's Code and Message methods to get detailed information about
  2040. // the error.
  2041. //
  2042. // See the AWS API reference guide for AWS AppSync's
  2043. // API operation ListResolvers for usage and error information.
  2044. //
  2045. // Returned Error Codes:
  2046. // * ErrCodeBadRequestException "BadRequestException"
  2047. // The request is not well formed. For example, a value is invalid or a required
  2048. // field is missing. Check the field values, and then try again.
  2049. //
  2050. // * ErrCodeNotFoundException "NotFoundException"
  2051. // The resource specified in the request was not found. Check the resource,
  2052. // and then try again.
  2053. //
  2054. // * ErrCodeUnauthorizedException "UnauthorizedException"
  2055. // You are not authorized to perform this operation.
  2056. //
  2057. // * ErrCodeInternalFailureException "InternalFailureException"
  2058. // An internal AWS AppSync error occurred. Try your request again.
  2059. //
  2060. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/ListResolvers
  2061. func (c *AppSync) ListResolvers(input *ListResolversInput) (*ListResolversOutput, error) {
  2062. req, out := c.ListResolversRequest(input)
  2063. return out, req.Send()
  2064. }
  2065. // ListResolversWithContext is the same as ListResolvers with the addition of
  2066. // the ability to pass a context and additional request options.
  2067. //
  2068. // See ListResolvers for details on how to use this API operation.
  2069. //
  2070. // The context must be non-nil and will be used for request cancellation. If
  2071. // the context is nil a panic will occur. In the future the SDK may create
  2072. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2073. // for more information on using Contexts.
  2074. func (c *AppSync) ListResolversWithContext(ctx aws.Context, input *ListResolversInput, opts ...request.Option) (*ListResolversOutput, error) {
  2075. req, out := c.ListResolversRequest(input)
  2076. req.SetContext(ctx)
  2077. req.ApplyOptions(opts...)
  2078. return out, req.Send()
  2079. }
  2080. const opListResolversByFunction = "ListResolversByFunction"
  2081. // ListResolversByFunctionRequest generates a "aws/request.Request" representing the
  2082. // client's request for the ListResolversByFunction operation. The "output" return
  2083. // value will be populated with the request's response once the request completes
  2084. // successfully.
  2085. //
  2086. // Use "Send" method on the returned Request to send the API call to the service.
  2087. // the "output" return value is not valid until after Send returns without error.
  2088. //
  2089. // See ListResolversByFunction for more information on using the ListResolversByFunction
  2090. // API call, and error handling.
  2091. //
  2092. // This method is useful when you want to inject custom logic or configuration
  2093. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2094. //
  2095. //
  2096. // // Example sending a request using the ListResolversByFunctionRequest method.
  2097. // req, resp := client.ListResolversByFunctionRequest(params)
  2098. //
  2099. // err := req.Send()
  2100. // if err == nil { // resp is now filled
  2101. // fmt.Println(resp)
  2102. // }
  2103. //
  2104. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/ListResolversByFunction
  2105. func (c *AppSync) ListResolversByFunctionRequest(input *ListResolversByFunctionInput) (req *request.Request, output *ListResolversByFunctionOutput) {
  2106. op := &request.Operation{
  2107. Name: opListResolversByFunction,
  2108. HTTPMethod: "GET",
  2109. HTTPPath: "/v1/apis/{apiId}/functions/{functionId}/resolvers",
  2110. }
  2111. if input == nil {
  2112. input = &ListResolversByFunctionInput{}
  2113. }
  2114. output = &ListResolversByFunctionOutput{}
  2115. req = c.newRequest(op, input, output)
  2116. return
  2117. }
  2118. // ListResolversByFunction API operation for AWS AppSync.
  2119. //
  2120. // List the resolvers that are associated with a specific function.
  2121. //
  2122. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2123. // with awserr.Error's Code and Message methods to get detailed information about
  2124. // the error.
  2125. //
  2126. // See the AWS API reference guide for AWS AppSync's
  2127. // API operation ListResolversByFunction for usage and error information.
  2128. //
  2129. // Returned Error Codes:
  2130. // * ErrCodeBadRequestException "BadRequestException"
  2131. // The request is not well formed. For example, a value is invalid or a required
  2132. // field is missing. Check the field values, and then try again.
  2133. //
  2134. // * ErrCodeNotFoundException "NotFoundException"
  2135. // The resource specified in the request was not found. Check the resource,
  2136. // and then try again.
  2137. //
  2138. // * ErrCodeUnauthorizedException "UnauthorizedException"
  2139. // You are not authorized to perform this operation.
  2140. //
  2141. // * ErrCodeInternalFailureException "InternalFailureException"
  2142. // An internal AWS AppSync error occurred. Try your request again.
  2143. //
  2144. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/ListResolversByFunction
  2145. func (c *AppSync) ListResolversByFunction(input *ListResolversByFunctionInput) (*ListResolversByFunctionOutput, error) {
  2146. req, out := c.ListResolversByFunctionRequest(input)
  2147. return out, req.Send()
  2148. }
  2149. // ListResolversByFunctionWithContext is the same as ListResolversByFunction with the addition of
  2150. // the ability to pass a context and additional request options.
  2151. //
  2152. // See ListResolversByFunction for details on how to use this API operation.
  2153. //
  2154. // The context must be non-nil and will be used for request cancellation. If
  2155. // the context is nil a panic will occur. In the future the SDK may create
  2156. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2157. // for more information on using Contexts.
  2158. func (c *AppSync) ListResolversByFunctionWithContext(ctx aws.Context, input *ListResolversByFunctionInput, opts ...request.Option) (*ListResolversByFunctionOutput, error) {
  2159. req, out := c.ListResolversByFunctionRequest(input)
  2160. req.SetContext(ctx)
  2161. req.ApplyOptions(opts...)
  2162. return out, req.Send()
  2163. }
  2164. const opListTypes = "ListTypes"
  2165. // ListTypesRequest generates a "aws/request.Request" representing the
  2166. // client's request for the ListTypes operation. The "output" return
  2167. // value will be populated with the request's response once the request completes
  2168. // successfully.
  2169. //
  2170. // Use "Send" method on the returned Request to send the API call to the service.
  2171. // the "output" return value is not valid until after Send returns without error.
  2172. //
  2173. // See ListTypes for more information on using the ListTypes
  2174. // API call, and error handling.
  2175. //
  2176. // This method is useful when you want to inject custom logic or configuration
  2177. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2178. //
  2179. //
  2180. // // Example sending a request using the ListTypesRequest method.
  2181. // req, resp := client.ListTypesRequest(params)
  2182. //
  2183. // err := req.Send()
  2184. // if err == nil { // resp is now filled
  2185. // fmt.Println(resp)
  2186. // }
  2187. //
  2188. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/ListTypes
  2189. func (c *AppSync) ListTypesRequest(input *ListTypesInput) (req *request.Request, output *ListTypesOutput) {
  2190. op := &request.Operation{
  2191. Name: opListTypes,
  2192. HTTPMethod: "GET",
  2193. HTTPPath: "/v1/apis/{apiId}/types",
  2194. }
  2195. if input == nil {
  2196. input = &ListTypesInput{}
  2197. }
  2198. output = &ListTypesOutput{}
  2199. req = c.newRequest(op, input, output)
  2200. return
  2201. }
  2202. // ListTypes API operation for AWS AppSync.
  2203. //
  2204. // Lists the types for a given API.
  2205. //
  2206. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2207. // with awserr.Error's Code and Message methods to get detailed information about
  2208. // the error.
  2209. //
  2210. // See the AWS API reference guide for AWS AppSync's
  2211. // API operation ListTypes for usage and error information.
  2212. //
  2213. // Returned Error Codes:
  2214. // * ErrCodeBadRequestException "BadRequestException"
  2215. // The request is not well formed. For example, a value is invalid or a required
  2216. // field is missing. Check the field values, and then try again.
  2217. //
  2218. // * ErrCodeConcurrentModificationException "ConcurrentModificationException"
  2219. // Another modification is in progress at this time and it must complete before
  2220. // you can make your change.
  2221. //
  2222. // * ErrCodeNotFoundException "NotFoundException"
  2223. // The resource specified in the request was not found. Check the resource,
  2224. // and then try again.
  2225. //
  2226. // * ErrCodeUnauthorizedException "UnauthorizedException"
  2227. // You are not authorized to perform this operation.
  2228. //
  2229. // * ErrCodeInternalFailureException "InternalFailureException"
  2230. // An internal AWS AppSync error occurred. Try your request again.
  2231. //
  2232. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/ListTypes
  2233. func (c *AppSync) ListTypes(input *ListTypesInput) (*ListTypesOutput, error) {
  2234. req, out := c.ListTypesRequest(input)
  2235. return out, req.Send()
  2236. }
  2237. // ListTypesWithContext is the same as ListTypes with the addition of
  2238. // the ability to pass a context and additional request options.
  2239. //
  2240. // See ListTypes for details on how to use this API operation.
  2241. //
  2242. // The context must be non-nil and will be used for request cancellation. If
  2243. // the context is nil a panic will occur. In the future the SDK may create
  2244. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2245. // for more information on using Contexts.
  2246. func (c *AppSync) ListTypesWithContext(ctx aws.Context, input *ListTypesInput, opts ...request.Option) (*ListTypesOutput, error) {
  2247. req, out := c.ListTypesRequest(input)
  2248. req.SetContext(ctx)
  2249. req.ApplyOptions(opts...)
  2250. return out, req.Send()
  2251. }
  2252. const opStartSchemaCreation = "StartSchemaCreation"
  2253. // StartSchemaCreationRequest generates a "aws/request.Request" representing the
  2254. // client's request for the StartSchemaCreation operation. The "output" return
  2255. // value will be populated with the request's response once the request completes
  2256. // successfully.
  2257. //
  2258. // Use "Send" method on the returned Request to send the API call to the service.
  2259. // the "output" return value is not valid until after Send returns without error.
  2260. //
  2261. // See StartSchemaCreation for more information on using the StartSchemaCreation
  2262. // API call, and error handling.
  2263. //
  2264. // This method is useful when you want to inject custom logic or configuration
  2265. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2266. //
  2267. //
  2268. // // Example sending a request using the StartSchemaCreationRequest method.
  2269. // req, resp := client.StartSchemaCreationRequest(params)
  2270. //
  2271. // err := req.Send()
  2272. // if err == nil { // resp is now filled
  2273. // fmt.Println(resp)
  2274. // }
  2275. //
  2276. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/StartSchemaCreation
  2277. func (c *AppSync) StartSchemaCreationRequest(input *StartSchemaCreationInput) (req *request.Request, output *StartSchemaCreationOutput) {
  2278. op := &request.Operation{
  2279. Name: opStartSchemaCreation,
  2280. HTTPMethod: "POST",
  2281. HTTPPath: "/v1/apis/{apiId}/schemacreation",
  2282. }
  2283. if input == nil {
  2284. input = &StartSchemaCreationInput{}
  2285. }
  2286. output = &StartSchemaCreationOutput{}
  2287. req = c.newRequest(op, input, output)
  2288. return
  2289. }
  2290. // StartSchemaCreation API operation for AWS AppSync.
  2291. //
  2292. // Adds a new schema to your GraphQL API.
  2293. //
  2294. // This operation is asynchronous. Use to determine when it has completed.
  2295. //
  2296. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2297. // with awserr.Error's Code and Message methods to get detailed information about
  2298. // the error.
  2299. //
  2300. // See the AWS API reference guide for AWS AppSync's
  2301. // API operation StartSchemaCreation for usage and error information.
  2302. //
  2303. // Returned Error Codes:
  2304. // * ErrCodeBadRequestException "BadRequestException"
  2305. // The request is not well formed. For example, a value is invalid or a required
  2306. // field is missing. Check the field values, and then try again.
  2307. //
  2308. // * ErrCodeConcurrentModificationException "ConcurrentModificationException"
  2309. // Another modification is in progress at this time and it must complete before
  2310. // you can make your change.
  2311. //
  2312. // * ErrCodeNotFoundException "NotFoundException"
  2313. // The resource specified in the request was not found. Check the resource,
  2314. // and then try again.
  2315. //
  2316. // * ErrCodeUnauthorizedException "UnauthorizedException"
  2317. // You are not authorized to perform this operation.
  2318. //
  2319. // * ErrCodeInternalFailureException "InternalFailureException"
  2320. // An internal AWS AppSync error occurred. Try your request again.
  2321. //
  2322. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/StartSchemaCreation
  2323. func (c *AppSync) StartSchemaCreation(input *StartSchemaCreationInput) (*StartSchemaCreationOutput, error) {
  2324. req, out := c.StartSchemaCreationRequest(input)
  2325. return out, req.Send()
  2326. }
  2327. // StartSchemaCreationWithContext is the same as StartSchemaCreation with the addition of
  2328. // the ability to pass a context and additional request options.
  2329. //
  2330. // See StartSchemaCreation for details on how to use this API operation.
  2331. //
  2332. // The context must be non-nil and will be used for request cancellation. If
  2333. // the context is nil a panic will occur. In the future the SDK may create
  2334. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2335. // for more information on using Contexts.
  2336. func (c *AppSync) StartSchemaCreationWithContext(ctx aws.Context, input *StartSchemaCreationInput, opts ...request.Option) (*StartSchemaCreationOutput, error) {
  2337. req, out := c.StartSchemaCreationRequest(input)
  2338. req.SetContext(ctx)
  2339. req.ApplyOptions(opts...)
  2340. return out, req.Send()
  2341. }
  2342. const opUpdateApiKey = "UpdateApiKey"
  2343. // UpdateApiKeyRequest generates a "aws/request.Request" representing the
  2344. // client's request for the UpdateApiKey operation. The "output" return
  2345. // value will be populated with the request's response once the request completes
  2346. // successfully.
  2347. //
  2348. // Use "Send" method on the returned Request to send the API call to the service.
  2349. // the "output" return value is not valid until after Send returns without error.
  2350. //
  2351. // See UpdateApiKey for more information on using the UpdateApiKey
  2352. // API call, and error handling.
  2353. //
  2354. // This method is useful when you want to inject custom logic or configuration
  2355. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2356. //
  2357. //
  2358. // // Example sending a request using the UpdateApiKeyRequest method.
  2359. // req, resp := client.UpdateApiKeyRequest(params)
  2360. //
  2361. // err := req.Send()
  2362. // if err == nil { // resp is now filled
  2363. // fmt.Println(resp)
  2364. // }
  2365. //
  2366. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/UpdateApiKey
  2367. func (c *AppSync) UpdateApiKeyRequest(input *UpdateApiKeyInput) (req *request.Request, output *UpdateApiKeyOutput) {
  2368. op := &request.Operation{
  2369. Name: opUpdateApiKey,
  2370. HTTPMethod: "POST",
  2371. HTTPPath: "/v1/apis/{apiId}/apikeys/{id}",
  2372. }
  2373. if input == nil {
  2374. input = &UpdateApiKeyInput{}
  2375. }
  2376. output = &UpdateApiKeyOutput{}
  2377. req = c.newRequest(op, input, output)
  2378. return
  2379. }
  2380. // UpdateApiKey API operation for AWS AppSync.
  2381. //
  2382. // Updates an API key.
  2383. //
  2384. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2385. // with awserr.Error's Code and Message methods to get detailed information about
  2386. // the error.
  2387. //
  2388. // See the AWS API reference guide for AWS AppSync's
  2389. // API operation UpdateApiKey for usage and error information.
  2390. //
  2391. // Returned Error Codes:
  2392. // * ErrCodeBadRequestException "BadRequestException"
  2393. // The request is not well formed. For example, a value is invalid or a required
  2394. // field is missing. Check the field values, and then try again.
  2395. //
  2396. // * ErrCodeNotFoundException "NotFoundException"
  2397. // The resource specified in the request was not found. Check the resource,
  2398. // and then try again.
  2399. //
  2400. // * ErrCodeUnauthorizedException "UnauthorizedException"
  2401. // You are not authorized to perform this operation.
  2402. //
  2403. // * ErrCodeLimitExceededException "LimitExceededException"
  2404. // The request exceeded a limit. Try your request again.
  2405. //
  2406. // * ErrCodeInternalFailureException "InternalFailureException"
  2407. // An internal AWS AppSync error occurred. Try your request again.
  2408. //
  2409. // * ErrCodeApiKeyValidityOutOfBoundsException "ApiKeyValidityOutOfBoundsException"
  2410. // The API key expiration must be set to a value between 1 and 365 days from
  2411. // creation (for CreateApiKey) or from update (for UpdateApiKey).
  2412. //
  2413. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/UpdateApiKey
  2414. func (c *AppSync) UpdateApiKey(input *UpdateApiKeyInput) (*UpdateApiKeyOutput, error) {
  2415. req, out := c.UpdateApiKeyRequest(input)
  2416. return out, req.Send()
  2417. }
  2418. // UpdateApiKeyWithContext is the same as UpdateApiKey with the addition of
  2419. // the ability to pass a context and additional request options.
  2420. //
  2421. // See UpdateApiKey for details on how to use this API operation.
  2422. //
  2423. // The context must be non-nil and will be used for request cancellation. If
  2424. // the context is nil a panic will occur. In the future the SDK may create
  2425. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2426. // for more information on using Contexts.
  2427. func (c *AppSync) UpdateApiKeyWithContext(ctx aws.Context, input *UpdateApiKeyInput, opts ...request.Option) (*UpdateApiKeyOutput, error) {
  2428. req, out := c.UpdateApiKeyRequest(input)
  2429. req.SetContext(ctx)
  2430. req.ApplyOptions(opts...)
  2431. return out, req.Send()
  2432. }
  2433. const opUpdateDataSource = "UpdateDataSource"
  2434. // UpdateDataSourceRequest generates a "aws/request.Request" representing the
  2435. // client's request for the UpdateDataSource operation. The "output" return
  2436. // value will be populated with the request's response once the request completes
  2437. // successfully.
  2438. //
  2439. // Use "Send" method on the returned Request to send the API call to the service.
  2440. // the "output" return value is not valid until after Send returns without error.
  2441. //
  2442. // See UpdateDataSource for more information on using the UpdateDataSource
  2443. // API call, and error handling.
  2444. //
  2445. // This method is useful when you want to inject custom logic or configuration
  2446. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2447. //
  2448. //
  2449. // // Example sending a request using the UpdateDataSourceRequest method.
  2450. // req, resp := client.UpdateDataSourceRequest(params)
  2451. //
  2452. // err := req.Send()
  2453. // if err == nil { // resp is now filled
  2454. // fmt.Println(resp)
  2455. // }
  2456. //
  2457. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/UpdateDataSource
  2458. func (c *AppSync) UpdateDataSourceRequest(input *UpdateDataSourceInput) (req *request.Request, output *UpdateDataSourceOutput) {
  2459. op := &request.Operation{
  2460. Name: opUpdateDataSource,
  2461. HTTPMethod: "POST",
  2462. HTTPPath: "/v1/apis/{apiId}/datasources/{name}",
  2463. }
  2464. if input == nil {
  2465. input = &UpdateDataSourceInput{}
  2466. }
  2467. output = &UpdateDataSourceOutput{}
  2468. req = c.newRequest(op, input, output)
  2469. return
  2470. }
  2471. // UpdateDataSource API operation for AWS AppSync.
  2472. //
  2473. // Updates a DataSource object.
  2474. //
  2475. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2476. // with awserr.Error's Code and Message methods to get detailed information about
  2477. // the error.
  2478. //
  2479. // See the AWS API reference guide for AWS AppSync's
  2480. // API operation UpdateDataSource for usage and error information.
  2481. //
  2482. // Returned Error Codes:
  2483. // * ErrCodeBadRequestException "BadRequestException"
  2484. // The request is not well formed. For example, a value is invalid or a required
  2485. // field is missing. Check the field values, and then try again.
  2486. //
  2487. // * ErrCodeConcurrentModificationException "ConcurrentModificationException"
  2488. // Another modification is in progress at this time and it must complete before
  2489. // you can make your change.
  2490. //
  2491. // * ErrCodeNotFoundException "NotFoundException"
  2492. // The resource specified in the request was not found. Check the resource,
  2493. // and then try again.
  2494. //
  2495. // * ErrCodeUnauthorizedException "UnauthorizedException"
  2496. // You are not authorized to perform this operation.
  2497. //
  2498. // * ErrCodeInternalFailureException "InternalFailureException"
  2499. // An internal AWS AppSync error occurred. Try your request again.
  2500. //
  2501. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/UpdateDataSource
  2502. func (c *AppSync) UpdateDataSource(input *UpdateDataSourceInput) (*UpdateDataSourceOutput, error) {
  2503. req, out := c.UpdateDataSourceRequest(input)
  2504. return out, req.Send()
  2505. }
  2506. // UpdateDataSourceWithContext is the same as UpdateDataSource with the addition of
  2507. // the ability to pass a context and additional request options.
  2508. //
  2509. // See UpdateDataSource for details on how to use this API operation.
  2510. //
  2511. // The context must be non-nil and will be used for request cancellation. If
  2512. // the context is nil a panic will occur. In the future the SDK may create
  2513. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2514. // for more information on using Contexts.
  2515. func (c *AppSync) UpdateDataSourceWithContext(ctx aws.Context, input *UpdateDataSourceInput, opts ...request.Option) (*UpdateDataSourceOutput, error) {
  2516. req, out := c.UpdateDataSourceRequest(input)
  2517. req.SetContext(ctx)
  2518. req.ApplyOptions(opts...)
  2519. return out, req.Send()
  2520. }
  2521. const opUpdateFunction = "UpdateFunction"
  2522. // UpdateFunctionRequest generates a "aws/request.Request" representing the
  2523. // client's request for the UpdateFunction operation. The "output" return
  2524. // value will be populated with the request's response once the request completes
  2525. // successfully.
  2526. //
  2527. // Use "Send" method on the returned Request to send the API call to the service.
  2528. // the "output" return value is not valid until after Send returns without error.
  2529. //
  2530. // See UpdateFunction for more information on using the UpdateFunction
  2531. // API call, and error handling.
  2532. //
  2533. // This method is useful when you want to inject custom logic or configuration
  2534. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2535. //
  2536. //
  2537. // // Example sending a request using the UpdateFunctionRequest method.
  2538. // req, resp := client.UpdateFunctionRequest(params)
  2539. //
  2540. // err := req.Send()
  2541. // if err == nil { // resp is now filled
  2542. // fmt.Println(resp)
  2543. // }
  2544. //
  2545. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/UpdateFunction
  2546. func (c *AppSync) UpdateFunctionRequest(input *UpdateFunctionInput) (req *request.Request, output *UpdateFunctionOutput) {
  2547. op := &request.Operation{
  2548. Name: opUpdateFunction,
  2549. HTTPMethod: "POST",
  2550. HTTPPath: "/v1/apis/{apiId}/functions/{functionId}",
  2551. }
  2552. if input == nil {
  2553. input = &UpdateFunctionInput{}
  2554. }
  2555. output = &UpdateFunctionOutput{}
  2556. req = c.newRequest(op, input, output)
  2557. return
  2558. }
  2559. // UpdateFunction API operation for AWS AppSync.
  2560. //
  2561. // Updates a Function object.
  2562. //
  2563. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2564. // with awserr.Error's Code and Message methods to get detailed information about
  2565. // the error.
  2566. //
  2567. // See the AWS API reference guide for AWS AppSync's
  2568. // API operation UpdateFunction for usage and error information.
  2569. //
  2570. // Returned Error Codes:
  2571. // * ErrCodeConcurrentModificationException "ConcurrentModificationException"
  2572. // Another modification is in progress at this time and it must complete before
  2573. // you can make your change.
  2574. //
  2575. // * ErrCodeNotFoundException "NotFoundException"
  2576. // The resource specified in the request was not found. Check the resource,
  2577. // and then try again.
  2578. //
  2579. // * ErrCodeUnauthorizedException "UnauthorizedException"
  2580. // You are not authorized to perform this operation.
  2581. //
  2582. // * ErrCodeInternalFailureException "InternalFailureException"
  2583. // An internal AWS AppSync error occurred. Try your request again.
  2584. //
  2585. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/UpdateFunction
  2586. func (c *AppSync) UpdateFunction(input *UpdateFunctionInput) (*UpdateFunctionOutput, error) {
  2587. req, out := c.UpdateFunctionRequest(input)
  2588. return out, req.Send()
  2589. }
  2590. // UpdateFunctionWithContext is the same as UpdateFunction with the addition of
  2591. // the ability to pass a context and additional request options.
  2592. //
  2593. // See UpdateFunction for details on how to use this API operation.
  2594. //
  2595. // The context must be non-nil and will be used for request cancellation. If
  2596. // the context is nil a panic will occur. In the future the SDK may create
  2597. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2598. // for more information on using Contexts.
  2599. func (c *AppSync) UpdateFunctionWithContext(ctx aws.Context, input *UpdateFunctionInput, opts ...request.Option) (*UpdateFunctionOutput, error) {
  2600. req, out := c.UpdateFunctionRequest(input)
  2601. req.SetContext(ctx)
  2602. req.ApplyOptions(opts...)
  2603. return out, req.Send()
  2604. }
  2605. const opUpdateGraphqlApi = "UpdateGraphqlApi"
  2606. // UpdateGraphqlApiRequest generates a "aws/request.Request" representing the
  2607. // client's request for the UpdateGraphqlApi operation. The "output" return
  2608. // value will be populated with the request's response once the request completes
  2609. // successfully.
  2610. //
  2611. // Use "Send" method on the returned Request to send the API call to the service.
  2612. // the "output" return value is not valid until after Send returns without error.
  2613. //
  2614. // See UpdateGraphqlApi for more information on using the UpdateGraphqlApi
  2615. // API call, and error handling.
  2616. //
  2617. // This method is useful when you want to inject custom logic or configuration
  2618. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2619. //
  2620. //
  2621. // // Example sending a request using the UpdateGraphqlApiRequest method.
  2622. // req, resp := client.UpdateGraphqlApiRequest(params)
  2623. //
  2624. // err := req.Send()
  2625. // if err == nil { // resp is now filled
  2626. // fmt.Println(resp)
  2627. // }
  2628. //
  2629. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/UpdateGraphqlApi
  2630. func (c *AppSync) UpdateGraphqlApiRequest(input *UpdateGraphqlApiInput) (req *request.Request, output *UpdateGraphqlApiOutput) {
  2631. op := &request.Operation{
  2632. Name: opUpdateGraphqlApi,
  2633. HTTPMethod: "POST",
  2634. HTTPPath: "/v1/apis/{apiId}",
  2635. }
  2636. if input == nil {
  2637. input = &UpdateGraphqlApiInput{}
  2638. }
  2639. output = &UpdateGraphqlApiOutput{}
  2640. req = c.newRequest(op, input, output)
  2641. return
  2642. }
  2643. // UpdateGraphqlApi API operation for AWS AppSync.
  2644. //
  2645. // Updates a GraphqlApi object.
  2646. //
  2647. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2648. // with awserr.Error's Code and Message methods to get detailed information about
  2649. // the error.
  2650. //
  2651. // See the AWS API reference guide for AWS AppSync's
  2652. // API operation UpdateGraphqlApi for usage and error information.
  2653. //
  2654. // Returned Error Codes:
  2655. // * ErrCodeBadRequestException "BadRequestException"
  2656. // The request is not well formed. For example, a value is invalid or a required
  2657. // field is missing. Check the field values, and then try again.
  2658. //
  2659. // * ErrCodeConcurrentModificationException "ConcurrentModificationException"
  2660. // Another modification is in progress at this time and it must complete before
  2661. // you can make your change.
  2662. //
  2663. // * ErrCodeNotFoundException "NotFoundException"
  2664. // The resource specified in the request was not found. Check the resource,
  2665. // and then try again.
  2666. //
  2667. // * ErrCodeUnauthorizedException "UnauthorizedException"
  2668. // You are not authorized to perform this operation.
  2669. //
  2670. // * ErrCodeInternalFailureException "InternalFailureException"
  2671. // An internal AWS AppSync error occurred. Try your request again.
  2672. //
  2673. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/UpdateGraphqlApi
  2674. func (c *AppSync) UpdateGraphqlApi(input *UpdateGraphqlApiInput) (*UpdateGraphqlApiOutput, error) {
  2675. req, out := c.UpdateGraphqlApiRequest(input)
  2676. return out, req.Send()
  2677. }
  2678. // UpdateGraphqlApiWithContext is the same as UpdateGraphqlApi with the addition of
  2679. // the ability to pass a context and additional request options.
  2680. //
  2681. // See UpdateGraphqlApi for details on how to use this API operation.
  2682. //
  2683. // The context must be non-nil and will be used for request cancellation. If
  2684. // the context is nil a panic will occur. In the future the SDK may create
  2685. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2686. // for more information on using Contexts.
  2687. func (c *AppSync) UpdateGraphqlApiWithContext(ctx aws.Context, input *UpdateGraphqlApiInput, opts ...request.Option) (*UpdateGraphqlApiOutput, error) {
  2688. req, out := c.UpdateGraphqlApiRequest(input)
  2689. req.SetContext(ctx)
  2690. req.ApplyOptions(opts...)
  2691. return out, req.Send()
  2692. }
  2693. const opUpdateResolver = "UpdateResolver"
  2694. // UpdateResolverRequest generates a "aws/request.Request" representing the
  2695. // client's request for the UpdateResolver operation. The "output" return
  2696. // value will be populated with the request's response once the request completes
  2697. // successfully.
  2698. //
  2699. // Use "Send" method on the returned Request to send the API call to the service.
  2700. // the "output" return value is not valid until after Send returns without error.
  2701. //
  2702. // See UpdateResolver for more information on using the UpdateResolver
  2703. // API call, and error handling.
  2704. //
  2705. // This method is useful when you want to inject custom logic or configuration
  2706. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2707. //
  2708. //
  2709. // // Example sending a request using the UpdateResolverRequest method.
  2710. // req, resp := client.UpdateResolverRequest(params)
  2711. //
  2712. // err := req.Send()
  2713. // if err == nil { // resp is now filled
  2714. // fmt.Println(resp)
  2715. // }
  2716. //
  2717. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/UpdateResolver
  2718. func (c *AppSync) UpdateResolverRequest(input *UpdateResolverInput) (req *request.Request, output *UpdateResolverOutput) {
  2719. op := &request.Operation{
  2720. Name: opUpdateResolver,
  2721. HTTPMethod: "POST",
  2722. HTTPPath: "/v1/apis/{apiId}/types/{typeName}/resolvers/{fieldName}",
  2723. }
  2724. if input == nil {
  2725. input = &UpdateResolverInput{}
  2726. }
  2727. output = &UpdateResolverOutput{}
  2728. req = c.newRequest(op, input, output)
  2729. return
  2730. }
  2731. // UpdateResolver API operation for AWS AppSync.
  2732. //
  2733. // Updates a Resolver object.
  2734. //
  2735. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2736. // with awserr.Error's Code and Message methods to get detailed information about
  2737. // the error.
  2738. //
  2739. // See the AWS API reference guide for AWS AppSync's
  2740. // API operation UpdateResolver for usage and error information.
  2741. //
  2742. // Returned Error Codes:
  2743. // * ErrCodeConcurrentModificationException "ConcurrentModificationException"
  2744. // Another modification is in progress at this time and it must complete before
  2745. // you can make your change.
  2746. //
  2747. // * ErrCodeNotFoundException "NotFoundException"
  2748. // The resource specified in the request was not found. Check the resource,
  2749. // and then try again.
  2750. //
  2751. // * ErrCodeUnauthorizedException "UnauthorizedException"
  2752. // You are not authorized to perform this operation.
  2753. //
  2754. // * ErrCodeInternalFailureException "InternalFailureException"
  2755. // An internal AWS AppSync error occurred. Try your request again.
  2756. //
  2757. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/UpdateResolver
  2758. func (c *AppSync) UpdateResolver(input *UpdateResolverInput) (*UpdateResolverOutput, error) {
  2759. req, out := c.UpdateResolverRequest(input)
  2760. return out, req.Send()
  2761. }
  2762. // UpdateResolverWithContext is the same as UpdateResolver with the addition of
  2763. // the ability to pass a context and additional request options.
  2764. //
  2765. // See UpdateResolver for details on how to use this API operation.
  2766. //
  2767. // The context must be non-nil and will be used for request cancellation. If
  2768. // the context is nil a panic will occur. In the future the SDK may create
  2769. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2770. // for more information on using Contexts.
  2771. func (c *AppSync) UpdateResolverWithContext(ctx aws.Context, input *UpdateResolverInput, opts ...request.Option) (*UpdateResolverOutput, error) {
  2772. req, out := c.UpdateResolverRequest(input)
  2773. req.SetContext(ctx)
  2774. req.ApplyOptions(opts...)
  2775. return out, req.Send()
  2776. }
  2777. const opUpdateType = "UpdateType"
  2778. // UpdateTypeRequest generates a "aws/request.Request" representing the
  2779. // client's request for the UpdateType operation. The "output" return
  2780. // value will be populated with the request's response once the request completes
  2781. // successfully.
  2782. //
  2783. // Use "Send" method on the returned Request to send the API call to the service.
  2784. // the "output" return value is not valid until after Send returns without error.
  2785. //
  2786. // See UpdateType for more information on using the UpdateType
  2787. // API call, and error handling.
  2788. //
  2789. // This method is useful when you want to inject custom logic or configuration
  2790. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2791. //
  2792. //
  2793. // // Example sending a request using the UpdateTypeRequest method.
  2794. // req, resp := client.UpdateTypeRequest(params)
  2795. //
  2796. // err := req.Send()
  2797. // if err == nil { // resp is now filled
  2798. // fmt.Println(resp)
  2799. // }
  2800. //
  2801. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/UpdateType
  2802. func (c *AppSync) UpdateTypeRequest(input *UpdateTypeInput) (req *request.Request, output *UpdateTypeOutput) {
  2803. op := &request.Operation{
  2804. Name: opUpdateType,
  2805. HTTPMethod: "POST",
  2806. HTTPPath: "/v1/apis/{apiId}/types/{typeName}",
  2807. }
  2808. if input == nil {
  2809. input = &UpdateTypeInput{}
  2810. }
  2811. output = &UpdateTypeOutput{}
  2812. req = c.newRequest(op, input, output)
  2813. return
  2814. }
  2815. // UpdateType API operation for AWS AppSync.
  2816. //
  2817. // Updates a Type object.
  2818. //
  2819. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2820. // with awserr.Error's Code and Message methods to get detailed information about
  2821. // the error.
  2822. //
  2823. // See the AWS API reference guide for AWS AppSync's
  2824. // API operation UpdateType for usage and error information.
  2825. //
  2826. // Returned Error Codes:
  2827. // * ErrCodeBadRequestException "BadRequestException"
  2828. // The request is not well formed. For example, a value is invalid or a required
  2829. // field is missing. Check the field values, and then try again.
  2830. //
  2831. // * ErrCodeConcurrentModificationException "ConcurrentModificationException"
  2832. // Another modification is in progress at this time and it must complete before
  2833. // you can make your change.
  2834. //
  2835. // * ErrCodeNotFoundException "NotFoundException"
  2836. // The resource specified in the request was not found. Check the resource,
  2837. // and then try again.
  2838. //
  2839. // * ErrCodeUnauthorizedException "UnauthorizedException"
  2840. // You are not authorized to perform this operation.
  2841. //
  2842. // * ErrCodeInternalFailureException "InternalFailureException"
  2843. // An internal AWS AppSync error occurred. Try your request again.
  2844. //
  2845. // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/UpdateType
  2846. func (c *AppSync) UpdateType(input *UpdateTypeInput) (*UpdateTypeOutput, error) {
  2847. req, out := c.UpdateTypeRequest(input)
  2848. return out, req.Send()
  2849. }
  2850. // UpdateTypeWithContext is the same as UpdateType with the addition of
  2851. // the ability to pass a context and additional request options.
  2852. //
  2853. // See UpdateType for details on how to use this API operation.
  2854. //
  2855. // The context must be non-nil and will be used for request cancellation. If
  2856. // the context is nil a panic will occur. In the future the SDK may create
  2857. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2858. // for more information on using Contexts.
  2859. func (c *AppSync) UpdateTypeWithContext(ctx aws.Context, input *UpdateTypeInput, opts ...request.Option) (*UpdateTypeOutput, error) {
  2860. req, out := c.UpdateTypeRequest(input)
  2861. req.SetContext(ctx)
  2862. req.ApplyOptions(opts...)
  2863. return out, req.Send()
  2864. }
  2865. // Describes an API key.
  2866. //
  2867. // Customers invoke AWS AppSync GraphQL API operations with API keys as an identity
  2868. // mechanism. There are two key versions:
  2869. //
  2870. // da1: This version was introduced at launch in November 2017. These keys always
  2871. // expire after 7 days. Key expiration is managed by Amazon DynamoDB TTL. The
  2872. // keys ceased to be valid after February 21, 2018 and should not be used after
  2873. // that date.
  2874. //
  2875. // * ListApiKeys returns the expiration time in milliseconds.
  2876. //
  2877. // * CreateApiKey returns the expiration time in milliseconds.
  2878. //
  2879. // * UpdateApiKey is not available for this key version.
  2880. //
  2881. // * DeleteApiKey deletes the item from the table.
  2882. //
  2883. // * Expiration is stored in Amazon DynamoDB as milliseconds. This results
  2884. // in a bug where keys are not automatically deleted because DynamoDB expects
  2885. // the TTL to be stored in seconds. As a one-time action, we will delete
  2886. // these keys from the table after February 21, 2018.
  2887. //
  2888. // da2: This version was introduced in February 2018 when AppSync added support
  2889. // to extend key expiration.
  2890. //
  2891. // * ListApiKeys returns the expiration time in seconds.
  2892. //
  2893. // * CreateApiKey returns the expiration time in seconds and accepts a user-provided
  2894. // expiration time in seconds.
  2895. //
  2896. // * UpdateApiKey returns the expiration time in seconds and accepts a user-provided
  2897. // expiration time in seconds. Key expiration can only be updated while the
  2898. // key has not expired.
  2899. //
  2900. // * DeleteApiKey deletes the item from the table.
  2901. //
  2902. // * Expiration is stored in Amazon DynamoDB as seconds.
  2903. type ApiKey struct {
  2904. _ struct{} `type:"structure"`
  2905. // A description of the purpose of the API key.
  2906. Description *string `locationName:"description" type:"string"`
  2907. // The time after which the API key expires. The date is represented as seconds
  2908. // since the epoch, rounded down to the nearest hour.
  2909. Expires *int64 `locationName:"expires" type:"long"`
  2910. // The API key ID.
  2911. Id *string `locationName:"id" type:"string"`
  2912. }
  2913. // String returns the string representation
  2914. func (s ApiKey) String() string {
  2915. return awsutil.Prettify(s)
  2916. }
  2917. // GoString returns the string representation
  2918. func (s ApiKey) GoString() string {
  2919. return s.String()
  2920. }
  2921. // SetDescription sets the Description field's value.
  2922. func (s *ApiKey) SetDescription(v string) *ApiKey {
  2923. s.Description = &v
  2924. return s
  2925. }
  2926. // SetExpires sets the Expires field's value.
  2927. func (s *ApiKey) SetExpires(v int64) *ApiKey {
  2928. s.Expires = &v
  2929. return s
  2930. }
  2931. // SetId sets the Id field's value.
  2932. func (s *ApiKey) SetId(v string) *ApiKey {
  2933. s.Id = &v
  2934. return s
  2935. }
  2936. // The authorization config in case the HTTP endpoint requires authorization.
  2937. type AuthorizationConfig struct {
  2938. _ struct{} `type:"structure"`
  2939. // The authorization type required by the HTTP endpoint.
  2940. //
  2941. // * AWS_IAM: The authorization type is Sigv4.
  2942. //
  2943. // AuthorizationType is a required field
  2944. AuthorizationType *string `locationName:"authorizationType" type:"string" required:"true" enum:"AuthorizationType"`
  2945. // The AWS IAM settings.
  2946. AwsIamConfig *AwsIamConfig `locationName:"awsIamConfig" type:"structure"`
  2947. }
  2948. // String returns the string representation
  2949. func (s AuthorizationConfig) String() string {
  2950. return awsutil.Prettify(s)
  2951. }
  2952. // GoString returns the string representation
  2953. func (s AuthorizationConfig) GoString() string {
  2954. return s.String()
  2955. }
  2956. // Validate inspects the fields of the type to determine if they are valid.
  2957. func (s *AuthorizationConfig) Validate() error {
  2958. invalidParams := request.ErrInvalidParams{Context: "AuthorizationConfig"}
  2959. if s.AuthorizationType == nil {
  2960. invalidParams.Add(request.NewErrParamRequired("AuthorizationType"))
  2961. }
  2962. if invalidParams.Len() > 0 {
  2963. return invalidParams
  2964. }
  2965. return nil
  2966. }
  2967. // SetAuthorizationType sets the AuthorizationType field's value.
  2968. func (s *AuthorizationConfig) SetAuthorizationType(v string) *AuthorizationConfig {
  2969. s.AuthorizationType = &v
  2970. return s
  2971. }
  2972. // SetAwsIamConfig sets the AwsIamConfig field's value.
  2973. func (s *AuthorizationConfig) SetAwsIamConfig(v *AwsIamConfig) *AuthorizationConfig {
  2974. s.AwsIamConfig = v
  2975. return s
  2976. }
  2977. // The AWS IAM configuration.
  2978. type AwsIamConfig struct {
  2979. _ struct{} `type:"structure"`
  2980. // The signing region for AWS IAM authorization.
  2981. SigningRegion *string `locationName:"signingRegion" type:"string"`
  2982. // The signing service name for AWS IAM authorization.
  2983. SigningServiceName *string `locationName:"signingServiceName" type:"string"`
  2984. }
  2985. // String returns the string representation
  2986. func (s AwsIamConfig) String() string {
  2987. return awsutil.Prettify(s)
  2988. }
  2989. // GoString returns the string representation
  2990. func (s AwsIamConfig) GoString() string {
  2991. return s.String()
  2992. }
  2993. // SetSigningRegion sets the SigningRegion field's value.
  2994. func (s *AwsIamConfig) SetSigningRegion(v string) *AwsIamConfig {
  2995. s.SigningRegion = &v
  2996. return s
  2997. }
  2998. // SetSigningServiceName sets the SigningServiceName field's value.
  2999. func (s *AwsIamConfig) SetSigningServiceName(v string) *AwsIamConfig {
  3000. s.SigningServiceName = &v
  3001. return s
  3002. }
  3003. type CreateApiKeyInput struct {
  3004. _ struct{} `type:"structure"`
  3005. // The ID for your GraphQL API.
  3006. //
  3007. // ApiId is a required field
  3008. ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"`
  3009. // A description of the purpose of the API key.
  3010. Description *string `locationName:"description" type:"string"`
  3011. // The time from creation time after which the API key expires. The date is
  3012. // represented as seconds since the epoch, rounded down to the nearest hour.
  3013. // The default value for this parameter is 7 days from creation time. For more
  3014. // information, see .
  3015. Expires *int64 `locationName:"expires" type:"long"`
  3016. }
  3017. // String returns the string representation
  3018. func (s CreateApiKeyInput) String() string {
  3019. return awsutil.Prettify(s)
  3020. }
  3021. // GoString returns the string representation
  3022. func (s CreateApiKeyInput) GoString() string {
  3023. return s.String()
  3024. }
  3025. // Validate inspects the fields of the type to determine if they are valid.
  3026. func (s *CreateApiKeyInput) Validate() error {
  3027. invalidParams := request.ErrInvalidParams{Context: "CreateApiKeyInput"}
  3028. if s.ApiId == nil {
  3029. invalidParams.Add(request.NewErrParamRequired("ApiId"))
  3030. }
  3031. if s.ApiId != nil && len(*s.ApiId) < 1 {
  3032. invalidParams.Add(request.NewErrParamMinLen("ApiId", 1))
  3033. }
  3034. if invalidParams.Len() > 0 {
  3035. return invalidParams
  3036. }
  3037. return nil
  3038. }
  3039. // SetApiId sets the ApiId field's value.
  3040. func (s *CreateApiKeyInput) SetApiId(v string) *CreateApiKeyInput {
  3041. s.ApiId = &v
  3042. return s
  3043. }
  3044. // SetDescription sets the Description field's value.
  3045. func (s *CreateApiKeyInput) SetDescription(v string) *CreateApiKeyInput {
  3046. s.Description = &v
  3047. return s
  3048. }
  3049. // SetExpires sets the Expires field's value.
  3050. func (s *CreateApiKeyInput) SetExpires(v int64) *CreateApiKeyInput {
  3051. s.Expires = &v
  3052. return s
  3053. }
  3054. type CreateApiKeyOutput struct {
  3055. _ struct{} `type:"structure"`
  3056. // The API key.
  3057. ApiKey *ApiKey `locationName:"apiKey" type:"structure"`
  3058. }
  3059. // String returns the string representation
  3060. func (s CreateApiKeyOutput) String() string {
  3061. return awsutil.Prettify(s)
  3062. }
  3063. // GoString returns the string representation
  3064. func (s CreateApiKeyOutput) GoString() string {
  3065. return s.String()
  3066. }
  3067. // SetApiKey sets the ApiKey field's value.
  3068. func (s *CreateApiKeyOutput) SetApiKey(v *ApiKey) *CreateApiKeyOutput {
  3069. s.ApiKey = v
  3070. return s
  3071. }
  3072. type CreateDataSourceInput struct {
  3073. _ struct{} `type:"structure"`
  3074. // The API ID for the GraphQL API for the DataSource.
  3075. //
  3076. // ApiId is a required field
  3077. ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"`
  3078. // A description of the DataSource.
  3079. Description *string `locationName:"description" type:"string"`
  3080. // Amazon DynamoDB settings.
  3081. DynamodbConfig *DynamodbDataSourceConfig `locationName:"dynamodbConfig" type:"structure"`
  3082. // Amazon Elasticsearch Service settings.
  3083. ElasticsearchConfig *ElasticsearchDataSourceConfig `locationName:"elasticsearchConfig" type:"structure"`
  3084. // HTTP endpoint settings.
  3085. HttpConfig *HttpDataSourceConfig `locationName:"httpConfig" type:"structure"`
  3086. // AWS Lambda settings.
  3087. LambdaConfig *LambdaDataSourceConfig `locationName:"lambdaConfig" type:"structure"`
  3088. // A user-supplied name for the DataSource.
  3089. //
  3090. // Name is a required field
  3091. Name *string `locationName:"name" type:"string" required:"true"`
  3092. // Relational database settings.
  3093. RelationalDatabaseConfig *RelationalDatabaseDataSourceConfig `locationName:"relationalDatabaseConfig" type:"structure"`
  3094. // The AWS IAM service role ARN for the data source. The system assumes this
  3095. // role when accessing the data source.
  3096. ServiceRoleArn *string `locationName:"serviceRoleArn" type:"string"`
  3097. // The type of the DataSource.
  3098. //
  3099. // Type is a required field
  3100. Type *string `locationName:"type" type:"string" required:"true" enum:"DataSourceType"`
  3101. }
  3102. // String returns the string representation
  3103. func (s CreateDataSourceInput) String() string {
  3104. return awsutil.Prettify(s)
  3105. }
  3106. // GoString returns the string representation
  3107. func (s CreateDataSourceInput) GoString() string {
  3108. return s.String()
  3109. }
  3110. // Validate inspects the fields of the type to determine if they are valid.
  3111. func (s *CreateDataSourceInput) Validate() error {
  3112. invalidParams := request.ErrInvalidParams{Context: "CreateDataSourceInput"}
  3113. if s.ApiId == nil {
  3114. invalidParams.Add(request.NewErrParamRequired("ApiId"))
  3115. }
  3116. if s.ApiId != nil && len(*s.ApiId) < 1 {
  3117. invalidParams.Add(request.NewErrParamMinLen("ApiId", 1))
  3118. }
  3119. if s.Name == nil {
  3120. invalidParams.Add(request.NewErrParamRequired("Name"))
  3121. }
  3122. if s.Type == nil {
  3123. invalidParams.Add(request.NewErrParamRequired("Type"))
  3124. }
  3125. if s.DynamodbConfig != nil {
  3126. if err := s.DynamodbConfig.Validate(); err != nil {
  3127. invalidParams.AddNested("DynamodbConfig", err.(request.ErrInvalidParams))
  3128. }
  3129. }
  3130. if s.ElasticsearchConfig != nil {
  3131. if err := s.ElasticsearchConfig.Validate(); err != nil {
  3132. invalidParams.AddNested("ElasticsearchConfig", err.(request.ErrInvalidParams))
  3133. }
  3134. }
  3135. if s.HttpConfig != nil {
  3136. if err := s.HttpConfig.Validate(); err != nil {
  3137. invalidParams.AddNested("HttpConfig", err.(request.ErrInvalidParams))
  3138. }
  3139. }
  3140. if s.LambdaConfig != nil {
  3141. if err := s.LambdaConfig.Validate(); err != nil {
  3142. invalidParams.AddNested("LambdaConfig", err.(request.ErrInvalidParams))
  3143. }
  3144. }
  3145. if invalidParams.Len() > 0 {
  3146. return invalidParams
  3147. }
  3148. return nil
  3149. }
  3150. // SetApiId sets the ApiId field's value.
  3151. func (s *CreateDataSourceInput) SetApiId(v string) *CreateDataSourceInput {
  3152. s.ApiId = &v
  3153. return s
  3154. }
  3155. // SetDescription sets the Description field's value.
  3156. func (s *CreateDataSourceInput) SetDescription(v string) *CreateDataSourceInput {
  3157. s.Description = &v
  3158. return s
  3159. }
  3160. // SetDynamodbConfig sets the DynamodbConfig field's value.
  3161. func (s *CreateDataSourceInput) SetDynamodbConfig(v *DynamodbDataSourceConfig) *CreateDataSourceInput {
  3162. s.DynamodbConfig = v
  3163. return s
  3164. }
  3165. // SetElasticsearchConfig sets the ElasticsearchConfig field's value.
  3166. func (s *CreateDataSourceInput) SetElasticsearchConfig(v *ElasticsearchDataSourceConfig) *CreateDataSourceInput {
  3167. s.ElasticsearchConfig = v
  3168. return s
  3169. }
  3170. // SetHttpConfig sets the HttpConfig field's value.
  3171. func (s *CreateDataSourceInput) SetHttpConfig(v *HttpDataSourceConfig) *CreateDataSourceInput {
  3172. s.HttpConfig = v
  3173. return s
  3174. }
  3175. // SetLambdaConfig sets the LambdaConfig field's value.
  3176. func (s *CreateDataSourceInput) SetLambdaConfig(v *LambdaDataSourceConfig) *CreateDataSourceInput {
  3177. s.LambdaConfig = v
  3178. return s
  3179. }
  3180. // SetName sets the Name field's value.
  3181. func (s *CreateDataSourceInput) SetName(v string) *CreateDataSourceInput {
  3182. s.Name = &v
  3183. return s
  3184. }
  3185. // SetRelationalDatabaseConfig sets the RelationalDatabaseConfig field's value.
  3186. func (s *CreateDataSourceInput) SetRelationalDatabaseConfig(v *RelationalDatabaseDataSourceConfig) *CreateDataSourceInput {
  3187. s.RelationalDatabaseConfig = v
  3188. return s
  3189. }
  3190. // SetServiceRoleArn sets the ServiceRoleArn field's value.
  3191. func (s *CreateDataSourceInput) SetServiceRoleArn(v string) *CreateDataSourceInput {
  3192. s.ServiceRoleArn = &v
  3193. return s
  3194. }
  3195. // SetType sets the Type field's value.
  3196. func (s *CreateDataSourceInput) SetType(v string) *CreateDataSourceInput {
  3197. s.Type = &v
  3198. return s
  3199. }
  3200. type CreateDataSourceOutput struct {
  3201. _ struct{} `type:"structure"`
  3202. // The DataSource object.
  3203. DataSource *DataSource `locationName:"dataSource" type:"structure"`
  3204. }
  3205. // String returns the string representation
  3206. func (s CreateDataSourceOutput) String() string {
  3207. return awsutil.Prettify(s)
  3208. }
  3209. // GoString returns the string representation
  3210. func (s CreateDataSourceOutput) GoString() string {
  3211. return s.String()
  3212. }
  3213. // SetDataSource sets the DataSource field's value.
  3214. func (s *CreateDataSourceOutput) SetDataSource(v *DataSource) *CreateDataSourceOutput {
  3215. s.DataSource = v
  3216. return s
  3217. }
  3218. type CreateFunctionInput struct {
  3219. _ struct{} `type:"structure"`
  3220. // The GraphQL API ID.
  3221. //
  3222. // ApiId is a required field
  3223. ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"`
  3224. // The FunctionDataSource name.
  3225. //
  3226. // DataSourceName is a required field
  3227. DataSourceName *string `locationName:"dataSourceName" type:"string" required:"true"`
  3228. // The Function description.
  3229. Description *string `locationName:"description" type:"string"`
  3230. // The version of the request mapping template. Currently the supported value
  3231. // is 2018-05-29.
  3232. //
  3233. // FunctionVersion is a required field
  3234. FunctionVersion *string `locationName:"functionVersion" type:"string" required:"true"`
  3235. // The Function name. The function name does not have to be unique.
  3236. //
  3237. // Name is a required field
  3238. Name *string `locationName:"name" type:"string" required:"true"`
  3239. // The Function request mapping template. Functions support only the 2018-05-29
  3240. // version of the request mapping template.
  3241. //
  3242. // RequestMappingTemplate is a required field
  3243. RequestMappingTemplate *string `locationName:"requestMappingTemplate" min:"1" type:"string" required:"true"`
  3244. // The Function response mapping template.
  3245. ResponseMappingTemplate *string `locationName:"responseMappingTemplate" min:"1" type:"string"`
  3246. }
  3247. // String returns the string representation
  3248. func (s CreateFunctionInput) String() string {
  3249. return awsutil.Prettify(s)
  3250. }
  3251. // GoString returns the string representation
  3252. func (s CreateFunctionInput) GoString() string {
  3253. return s.String()
  3254. }
  3255. // Validate inspects the fields of the type to determine if they are valid.
  3256. func (s *CreateFunctionInput) Validate() error {
  3257. invalidParams := request.ErrInvalidParams{Context: "CreateFunctionInput"}
  3258. if s.ApiId == nil {
  3259. invalidParams.Add(request.NewErrParamRequired("ApiId"))
  3260. }
  3261. if s.ApiId != nil && len(*s.ApiId) < 1 {
  3262. invalidParams.Add(request.NewErrParamMinLen("ApiId", 1))
  3263. }
  3264. if s.DataSourceName == nil {
  3265. invalidParams.Add(request.NewErrParamRequired("DataSourceName"))
  3266. }
  3267. if s.FunctionVersion == nil {
  3268. invalidParams.Add(request.NewErrParamRequired("FunctionVersion"))
  3269. }
  3270. if s.Name == nil {
  3271. invalidParams.Add(request.NewErrParamRequired("Name"))
  3272. }
  3273. if s.RequestMappingTemplate == nil {
  3274. invalidParams.Add(request.NewErrParamRequired("RequestMappingTemplate"))
  3275. }
  3276. if s.RequestMappingTemplate != nil && len(*s.RequestMappingTemplate) < 1 {
  3277. invalidParams.Add(request.NewErrParamMinLen("RequestMappingTemplate", 1))
  3278. }
  3279. if s.ResponseMappingTemplate != nil && len(*s.ResponseMappingTemplate) < 1 {
  3280. invalidParams.Add(request.NewErrParamMinLen("ResponseMappingTemplate", 1))
  3281. }
  3282. if invalidParams.Len() > 0 {
  3283. return invalidParams
  3284. }
  3285. return nil
  3286. }
  3287. // SetApiId sets the ApiId field's value.
  3288. func (s *CreateFunctionInput) SetApiId(v string) *CreateFunctionInput {
  3289. s.ApiId = &v
  3290. return s
  3291. }
  3292. // SetDataSourceName sets the DataSourceName field's value.
  3293. func (s *CreateFunctionInput) SetDataSourceName(v string) *CreateFunctionInput {
  3294. s.DataSourceName = &v
  3295. return s
  3296. }
  3297. // SetDescription sets the Description field's value.
  3298. func (s *CreateFunctionInput) SetDescription(v string) *CreateFunctionInput {
  3299. s.Description = &v
  3300. return s
  3301. }
  3302. // SetFunctionVersion sets the FunctionVersion field's value.
  3303. func (s *CreateFunctionInput) SetFunctionVersion(v string) *CreateFunctionInput {
  3304. s.FunctionVersion = &v
  3305. return s
  3306. }
  3307. // SetName sets the Name field's value.
  3308. func (s *CreateFunctionInput) SetName(v string) *CreateFunctionInput {
  3309. s.Name = &v
  3310. return s
  3311. }
  3312. // SetRequestMappingTemplate sets the RequestMappingTemplate field's value.
  3313. func (s *CreateFunctionInput) SetRequestMappingTemplate(v string) *CreateFunctionInput {
  3314. s.RequestMappingTemplate = &v
  3315. return s
  3316. }
  3317. // SetResponseMappingTemplate sets the ResponseMappingTemplate field's value.
  3318. func (s *CreateFunctionInput) SetResponseMappingTemplate(v string) *CreateFunctionInput {
  3319. s.ResponseMappingTemplate = &v
  3320. return s
  3321. }
  3322. type CreateFunctionOutput struct {
  3323. _ struct{} `type:"structure"`
  3324. // The Function object.
  3325. FunctionConfiguration *FunctionConfiguration `locationName:"functionConfiguration" type:"structure"`
  3326. }
  3327. // String returns the string representation
  3328. func (s CreateFunctionOutput) String() string {
  3329. return awsutil.Prettify(s)
  3330. }
  3331. // GoString returns the string representation
  3332. func (s CreateFunctionOutput) GoString() string {
  3333. return s.String()
  3334. }
  3335. // SetFunctionConfiguration sets the FunctionConfiguration field's value.
  3336. func (s *CreateFunctionOutput) SetFunctionConfiguration(v *FunctionConfiguration) *CreateFunctionOutput {
  3337. s.FunctionConfiguration = v
  3338. return s
  3339. }
  3340. type CreateGraphqlApiInput struct {
  3341. _ struct{} `type:"structure"`
  3342. // The authentication type: API key, AWS IAM, or Amazon Cognito user pools.
  3343. //
  3344. // AuthenticationType is a required field
  3345. AuthenticationType *string `locationName:"authenticationType" type:"string" required:"true" enum:"AuthenticationType"`
  3346. // The Amazon CloudWatch Logs configuration.
  3347. LogConfig *LogConfig `locationName:"logConfig" type:"structure"`
  3348. // A user-supplied name for the GraphqlApi.
  3349. //
  3350. // Name is a required field
  3351. Name *string `locationName:"name" type:"string" required:"true"`
  3352. // The OpenID Connect configuration.
  3353. OpenIDConnectConfig *OpenIDConnectConfig `locationName:"openIDConnectConfig" type:"structure"`
  3354. // The Amazon Cognito user pool configuration.
  3355. UserPoolConfig *UserPoolConfig `locationName:"userPoolConfig" type:"structure"`
  3356. }
  3357. // String returns the string representation
  3358. func (s CreateGraphqlApiInput) String() string {
  3359. return awsutil.Prettify(s)
  3360. }
  3361. // GoString returns the string representation
  3362. func (s CreateGraphqlApiInput) GoString() string {
  3363. return s.String()
  3364. }
  3365. // Validate inspects the fields of the type to determine if they are valid.
  3366. func (s *CreateGraphqlApiInput) Validate() error {
  3367. invalidParams := request.ErrInvalidParams{Context: "CreateGraphqlApiInput"}
  3368. if s.AuthenticationType == nil {
  3369. invalidParams.Add(request.NewErrParamRequired("AuthenticationType"))
  3370. }
  3371. if s.Name == nil {
  3372. invalidParams.Add(request.NewErrParamRequired("Name"))
  3373. }
  3374. if s.LogConfig != nil {
  3375. if err := s.LogConfig.Validate(); err != nil {
  3376. invalidParams.AddNested("LogConfig", err.(request.ErrInvalidParams))
  3377. }
  3378. }
  3379. if s.OpenIDConnectConfig != nil {
  3380. if err := s.OpenIDConnectConfig.Validate(); err != nil {
  3381. invalidParams.AddNested("OpenIDConnectConfig", err.(request.ErrInvalidParams))
  3382. }
  3383. }
  3384. if s.UserPoolConfig != nil {
  3385. if err := s.UserPoolConfig.Validate(); err != nil {
  3386. invalidParams.AddNested("UserPoolConfig", err.(request.ErrInvalidParams))
  3387. }
  3388. }
  3389. if invalidParams.Len() > 0 {
  3390. return invalidParams
  3391. }
  3392. return nil
  3393. }
  3394. // SetAuthenticationType sets the AuthenticationType field's value.
  3395. func (s *CreateGraphqlApiInput) SetAuthenticationType(v string) *CreateGraphqlApiInput {
  3396. s.AuthenticationType = &v
  3397. return s
  3398. }
  3399. // SetLogConfig sets the LogConfig field's value.
  3400. func (s *CreateGraphqlApiInput) SetLogConfig(v *LogConfig) *CreateGraphqlApiInput {
  3401. s.LogConfig = v
  3402. return s
  3403. }
  3404. // SetName sets the Name field's value.
  3405. func (s *CreateGraphqlApiInput) SetName(v string) *CreateGraphqlApiInput {
  3406. s.Name = &v
  3407. return s
  3408. }
  3409. // SetOpenIDConnectConfig sets the OpenIDConnectConfig field's value.
  3410. func (s *CreateGraphqlApiInput) SetOpenIDConnectConfig(v *OpenIDConnectConfig) *CreateGraphqlApiInput {
  3411. s.OpenIDConnectConfig = v
  3412. return s
  3413. }
  3414. // SetUserPoolConfig sets the UserPoolConfig field's value.
  3415. func (s *CreateGraphqlApiInput) SetUserPoolConfig(v *UserPoolConfig) *CreateGraphqlApiInput {
  3416. s.UserPoolConfig = v
  3417. return s
  3418. }
  3419. type CreateGraphqlApiOutput struct {
  3420. _ struct{} `type:"structure"`
  3421. // The GraphqlApi.
  3422. GraphqlApi *GraphqlApi `locationName:"graphqlApi" type:"structure"`
  3423. }
  3424. // String returns the string representation
  3425. func (s CreateGraphqlApiOutput) String() string {
  3426. return awsutil.Prettify(s)
  3427. }
  3428. // GoString returns the string representation
  3429. func (s CreateGraphqlApiOutput) GoString() string {
  3430. return s.String()
  3431. }
  3432. // SetGraphqlApi sets the GraphqlApi field's value.
  3433. func (s *CreateGraphqlApiOutput) SetGraphqlApi(v *GraphqlApi) *CreateGraphqlApiOutput {
  3434. s.GraphqlApi = v
  3435. return s
  3436. }
  3437. type CreateResolverInput struct {
  3438. _ struct{} `type:"structure"`
  3439. // The ID for the GraphQL API for which the resolver is being created.
  3440. //
  3441. // ApiId is a required field
  3442. ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"`
  3443. // The name of the data source for which the resolver is being created.
  3444. DataSourceName *string `locationName:"dataSourceName" type:"string"`
  3445. // The name of the field to attach the resolver to.
  3446. //
  3447. // FieldName is a required field
  3448. FieldName *string `locationName:"fieldName" type:"string" required:"true"`
  3449. // The resolver type.
  3450. //
  3451. // * UNIT: A UNIT resolver type. A UNIT resolver is the default resolver
  3452. // type. A UNIT resolver enables you to execute a GraphQL query against a
  3453. // single data source.
  3454. //
  3455. // * PIPELINE: A PIPELINE resolver type. A PIPELINE resolver enables you
  3456. // to execute a series of Function in a serial manner. You can use a pipeline
  3457. // resolver to execute a GraphQL query against multiple data sources.
  3458. Kind *string `locationName:"kind" type:"string" enum:"ResolverKind"`
  3459. // The PipelineConfig.
  3460. PipelineConfig *PipelineConfig `locationName:"pipelineConfig" type:"structure"`
  3461. // The mapping template to be used for requests.
  3462. //
  3463. // A resolver uses a request mapping template to convert a GraphQL expression
  3464. // into a format that a data source can understand. Mapping templates are written
  3465. // in Apache Velocity Template Language (VTL).
  3466. //
  3467. // RequestMappingTemplate is a required field
  3468. RequestMappingTemplate *string `locationName:"requestMappingTemplate" min:"1" type:"string" required:"true"`
  3469. // The mapping template to be used for responses from the data source.
  3470. ResponseMappingTemplate *string `locationName:"responseMappingTemplate" min:"1" type:"string"`
  3471. // The name of the Type.
  3472. //
  3473. // TypeName is a required field
  3474. TypeName *string `location:"uri" locationName:"typeName" type:"string" required:"true"`
  3475. }
  3476. // String returns the string representation
  3477. func (s CreateResolverInput) String() string {
  3478. return awsutil.Prettify(s)
  3479. }
  3480. // GoString returns the string representation
  3481. func (s CreateResolverInput) GoString() string {
  3482. return s.String()
  3483. }
  3484. // Validate inspects the fields of the type to determine if they are valid.
  3485. func (s *CreateResolverInput) Validate() error {
  3486. invalidParams := request.ErrInvalidParams{Context: "CreateResolverInput"}
  3487. if s.ApiId == nil {
  3488. invalidParams.Add(request.NewErrParamRequired("ApiId"))
  3489. }
  3490. if s.ApiId != nil && len(*s.ApiId) < 1 {
  3491. invalidParams.Add(request.NewErrParamMinLen("ApiId", 1))
  3492. }
  3493. if s.FieldName == nil {
  3494. invalidParams.Add(request.NewErrParamRequired("FieldName"))
  3495. }
  3496. if s.RequestMappingTemplate == nil {
  3497. invalidParams.Add(request.NewErrParamRequired("RequestMappingTemplate"))
  3498. }
  3499. if s.RequestMappingTemplate != nil && len(*s.RequestMappingTemplate) < 1 {
  3500. invalidParams.Add(request.NewErrParamMinLen("RequestMappingTemplate", 1))
  3501. }
  3502. if s.ResponseMappingTemplate != nil && len(*s.ResponseMappingTemplate) < 1 {
  3503. invalidParams.Add(request.NewErrParamMinLen("ResponseMappingTemplate", 1))
  3504. }
  3505. if s.TypeName == nil {
  3506. invalidParams.Add(request.NewErrParamRequired("TypeName"))
  3507. }
  3508. if s.TypeName != nil && len(*s.TypeName) < 1 {
  3509. invalidParams.Add(request.NewErrParamMinLen("TypeName", 1))
  3510. }
  3511. if invalidParams.Len() > 0 {
  3512. return invalidParams
  3513. }
  3514. return nil
  3515. }
  3516. // SetApiId sets the ApiId field's value.
  3517. func (s *CreateResolverInput) SetApiId(v string) *CreateResolverInput {
  3518. s.ApiId = &v
  3519. return s
  3520. }
  3521. // SetDataSourceName sets the DataSourceName field's value.
  3522. func (s *CreateResolverInput) SetDataSourceName(v string) *CreateResolverInput {
  3523. s.DataSourceName = &v
  3524. return s
  3525. }
  3526. // SetFieldName sets the FieldName field's value.
  3527. func (s *CreateResolverInput) SetFieldName(v string) *CreateResolverInput {
  3528. s.FieldName = &v
  3529. return s
  3530. }
  3531. // SetKind sets the Kind field's value.
  3532. func (s *CreateResolverInput) SetKind(v string) *CreateResolverInput {
  3533. s.Kind = &v
  3534. return s
  3535. }
  3536. // SetPipelineConfig sets the PipelineConfig field's value.
  3537. func (s *CreateResolverInput) SetPipelineConfig(v *PipelineConfig) *CreateResolverInput {
  3538. s.PipelineConfig = v
  3539. return s
  3540. }
  3541. // SetRequestMappingTemplate sets the RequestMappingTemplate field's value.
  3542. func (s *CreateResolverInput) SetRequestMappingTemplate(v string) *CreateResolverInput {
  3543. s.RequestMappingTemplate = &v
  3544. return s
  3545. }
  3546. // SetResponseMappingTemplate sets the ResponseMappingTemplate field's value.
  3547. func (s *CreateResolverInput) SetResponseMappingTemplate(v string) *CreateResolverInput {
  3548. s.ResponseMappingTemplate = &v
  3549. return s
  3550. }
  3551. // SetTypeName sets the TypeName field's value.
  3552. func (s *CreateResolverInput) SetTypeName(v string) *CreateResolverInput {
  3553. s.TypeName = &v
  3554. return s
  3555. }
  3556. type CreateResolverOutput struct {
  3557. _ struct{} `type:"structure"`
  3558. // The Resolver object.
  3559. Resolver *Resolver `locationName:"resolver" type:"structure"`
  3560. }
  3561. // String returns the string representation
  3562. func (s CreateResolverOutput) String() string {
  3563. return awsutil.Prettify(s)
  3564. }
  3565. // GoString returns the string representation
  3566. func (s CreateResolverOutput) GoString() string {
  3567. return s.String()
  3568. }
  3569. // SetResolver sets the Resolver field's value.
  3570. func (s *CreateResolverOutput) SetResolver(v *Resolver) *CreateResolverOutput {
  3571. s.Resolver = v
  3572. return s
  3573. }
  3574. type CreateTypeInput struct {
  3575. _ struct{} `type:"structure"`
  3576. // The API ID.
  3577. //
  3578. // ApiId is a required field
  3579. ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"`
  3580. // The type definition, in GraphQL Schema Definition Language (SDL) format.
  3581. //
  3582. // For more information, see the GraphQL SDL documentation (http://graphql.org/learn/schema/).
  3583. //
  3584. // Definition is a required field
  3585. Definition *string `locationName:"definition" type:"string" required:"true"`
  3586. // The type format: SDL or JSON.
  3587. //
  3588. // Format is a required field
  3589. Format *string `locationName:"format" type:"string" required:"true" enum:"TypeDefinitionFormat"`
  3590. }
  3591. // String returns the string representation
  3592. func (s CreateTypeInput) String() string {
  3593. return awsutil.Prettify(s)
  3594. }
  3595. // GoString returns the string representation
  3596. func (s CreateTypeInput) GoString() string {
  3597. return s.String()
  3598. }
  3599. // Validate inspects the fields of the type to determine if they are valid.
  3600. func (s *CreateTypeInput) Validate() error {
  3601. invalidParams := request.ErrInvalidParams{Context: "CreateTypeInput"}
  3602. if s.ApiId == nil {
  3603. invalidParams.Add(request.NewErrParamRequired("ApiId"))
  3604. }
  3605. if s.ApiId != nil && len(*s.ApiId) < 1 {
  3606. invalidParams.Add(request.NewErrParamMinLen("ApiId", 1))
  3607. }
  3608. if s.Definition == nil {
  3609. invalidParams.Add(request.NewErrParamRequired("Definition"))
  3610. }
  3611. if s.Format == nil {
  3612. invalidParams.Add(request.NewErrParamRequired("Format"))
  3613. }
  3614. if invalidParams.Len() > 0 {
  3615. return invalidParams
  3616. }
  3617. return nil
  3618. }
  3619. // SetApiId sets the ApiId field's value.
  3620. func (s *CreateTypeInput) SetApiId(v string) *CreateTypeInput {
  3621. s.ApiId = &v
  3622. return s
  3623. }
  3624. // SetDefinition sets the Definition field's value.
  3625. func (s *CreateTypeInput) SetDefinition(v string) *CreateTypeInput {
  3626. s.Definition = &v
  3627. return s
  3628. }
  3629. // SetFormat sets the Format field's value.
  3630. func (s *CreateTypeInput) SetFormat(v string) *CreateTypeInput {
  3631. s.Format = &v
  3632. return s
  3633. }
  3634. type CreateTypeOutput struct {
  3635. _ struct{} `type:"structure"`
  3636. // The Type object.
  3637. Type *Type `locationName:"type" type:"structure"`
  3638. }
  3639. // String returns the string representation
  3640. func (s CreateTypeOutput) String() string {
  3641. return awsutil.Prettify(s)
  3642. }
  3643. // GoString returns the string representation
  3644. func (s CreateTypeOutput) GoString() string {
  3645. return s.String()
  3646. }
  3647. // SetType sets the Type field's value.
  3648. func (s *CreateTypeOutput) SetType(v *Type) *CreateTypeOutput {
  3649. s.Type = v
  3650. return s
  3651. }
  3652. // Describes a data source.
  3653. type DataSource struct {
  3654. _ struct{} `type:"structure"`
  3655. // The data source ARN.
  3656. DataSourceArn *string `locationName:"dataSourceArn" type:"string"`
  3657. // The description of the data source.
  3658. Description *string `locationName:"description" type:"string"`
  3659. // Amazon DynamoDB settings.
  3660. DynamodbConfig *DynamodbDataSourceConfig `locationName:"dynamodbConfig" type:"structure"`
  3661. // Amazon Elasticsearch Service settings.
  3662. ElasticsearchConfig *ElasticsearchDataSourceConfig `locationName:"elasticsearchConfig" type:"structure"`
  3663. // HTTP endpoint settings.
  3664. HttpConfig *HttpDataSourceConfig `locationName:"httpConfig" type:"structure"`
  3665. // AWS Lambda settings.
  3666. LambdaConfig *LambdaDataSourceConfig `locationName:"lambdaConfig" type:"structure"`
  3667. // The name of the data source.
  3668. Name *string `locationName:"name" type:"string"`
  3669. // Relational database settings.
  3670. RelationalDatabaseConfig *RelationalDatabaseDataSourceConfig `locationName:"relationalDatabaseConfig" type:"structure"`
  3671. // The AWS IAM service role ARN for the data source. The system assumes this
  3672. // role when accessing the data source.
  3673. ServiceRoleArn *string `locationName:"serviceRoleArn" type:"string"`
  3674. // The type of the data source.
  3675. //
  3676. // * AMAZON_DYNAMODB: The data source is an Amazon DynamoDB table.
  3677. //
  3678. // * AMAZON_ELASTICSEARCH: The data source is an Amazon Elasticsearch Service
  3679. // domain.
  3680. //
  3681. // * AWS_LAMBDA: The data source is an AWS Lambda function.
  3682. //
  3683. // * NONE: There is no data source. This type is used when you wish to invoke
  3684. // a GraphQL operation without connecting to a data source, such as performing
  3685. // data transformation with resolvers or triggering a subscription to be
  3686. // invoked from a mutation.
  3687. //
  3688. // * HTTP: The data source is an HTTP endpoint.
  3689. //
  3690. // * RELATIONAL_DATABASE: The data source is a relational database.
  3691. Type *string `locationName:"type" type:"string" enum:"DataSourceType"`
  3692. }
  3693. // String returns the string representation
  3694. func (s DataSource) String() string {
  3695. return awsutil.Prettify(s)
  3696. }
  3697. // GoString returns the string representation
  3698. func (s DataSource) GoString() string {
  3699. return s.String()
  3700. }
  3701. // SetDataSourceArn sets the DataSourceArn field's value.
  3702. func (s *DataSource) SetDataSourceArn(v string) *DataSource {
  3703. s.DataSourceArn = &v
  3704. return s
  3705. }
  3706. // SetDescription sets the Description field's value.
  3707. func (s *DataSource) SetDescription(v string) *DataSource {
  3708. s.Description = &v
  3709. return s
  3710. }
  3711. // SetDynamodbConfig sets the DynamodbConfig field's value.
  3712. func (s *DataSource) SetDynamodbConfig(v *DynamodbDataSourceConfig) *DataSource {
  3713. s.DynamodbConfig = v
  3714. return s
  3715. }
  3716. // SetElasticsearchConfig sets the ElasticsearchConfig field's value.
  3717. func (s *DataSource) SetElasticsearchConfig(v *ElasticsearchDataSourceConfig) *DataSource {
  3718. s.ElasticsearchConfig = v
  3719. return s
  3720. }
  3721. // SetHttpConfig sets the HttpConfig field's value.
  3722. func (s *DataSource) SetHttpConfig(v *HttpDataSourceConfig) *DataSource {
  3723. s.HttpConfig = v
  3724. return s
  3725. }
  3726. // SetLambdaConfig sets the LambdaConfig field's value.
  3727. func (s *DataSource) SetLambdaConfig(v *LambdaDataSourceConfig) *DataSource {
  3728. s.LambdaConfig = v
  3729. return s
  3730. }
  3731. // SetName sets the Name field's value.
  3732. func (s *DataSource) SetName(v string) *DataSource {
  3733. s.Name = &v
  3734. return s
  3735. }
  3736. // SetRelationalDatabaseConfig sets the RelationalDatabaseConfig field's value.
  3737. func (s *DataSource) SetRelationalDatabaseConfig(v *RelationalDatabaseDataSourceConfig) *DataSource {
  3738. s.RelationalDatabaseConfig = v
  3739. return s
  3740. }
  3741. // SetServiceRoleArn sets the ServiceRoleArn field's value.
  3742. func (s *DataSource) SetServiceRoleArn(v string) *DataSource {
  3743. s.ServiceRoleArn = &v
  3744. return s
  3745. }
  3746. // SetType sets the Type field's value.
  3747. func (s *DataSource) SetType(v string) *DataSource {
  3748. s.Type = &v
  3749. return s
  3750. }
  3751. type DeleteApiKeyInput struct {
  3752. _ struct{} `type:"structure"`
  3753. // The API ID.
  3754. //
  3755. // ApiId is a required field
  3756. ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"`
  3757. // The ID for the API key.
  3758. //
  3759. // Id is a required field
  3760. Id *string `location:"uri" locationName:"id" type:"string" required:"true"`
  3761. }
  3762. // String returns the string representation
  3763. func (s DeleteApiKeyInput) String() string {
  3764. return awsutil.Prettify(s)
  3765. }
  3766. // GoString returns the string representation
  3767. func (s DeleteApiKeyInput) GoString() string {
  3768. return s.String()
  3769. }
  3770. // Validate inspects the fields of the type to determine if they are valid.
  3771. func (s *DeleteApiKeyInput) Validate() error {
  3772. invalidParams := request.ErrInvalidParams{Context: "DeleteApiKeyInput"}
  3773. if s.ApiId == nil {
  3774. invalidParams.Add(request.NewErrParamRequired("ApiId"))
  3775. }
  3776. if s.ApiId != nil && len(*s.ApiId) < 1 {
  3777. invalidParams.Add(request.NewErrParamMinLen("ApiId", 1))
  3778. }
  3779. if s.Id == nil {
  3780. invalidParams.Add(request.NewErrParamRequired("Id"))
  3781. }
  3782. if s.Id != nil && len(*s.Id) < 1 {
  3783. invalidParams.Add(request.NewErrParamMinLen("Id", 1))
  3784. }
  3785. if invalidParams.Len() > 0 {
  3786. return invalidParams
  3787. }
  3788. return nil
  3789. }
  3790. // SetApiId sets the ApiId field's value.
  3791. func (s *DeleteApiKeyInput) SetApiId(v string) *DeleteApiKeyInput {
  3792. s.ApiId = &v
  3793. return s
  3794. }
  3795. // SetId sets the Id field's value.
  3796. func (s *DeleteApiKeyInput) SetId(v string) *DeleteApiKeyInput {
  3797. s.Id = &v
  3798. return s
  3799. }
  3800. type DeleteApiKeyOutput struct {
  3801. _ struct{} `type:"structure"`
  3802. }
  3803. // String returns the string representation
  3804. func (s DeleteApiKeyOutput) String() string {
  3805. return awsutil.Prettify(s)
  3806. }
  3807. // GoString returns the string representation
  3808. func (s DeleteApiKeyOutput) GoString() string {
  3809. return s.String()
  3810. }
  3811. type DeleteDataSourceInput struct {
  3812. _ struct{} `type:"structure"`
  3813. // The API ID.
  3814. //
  3815. // ApiId is a required field
  3816. ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"`
  3817. // The name of the data source.
  3818. //
  3819. // Name is a required field
  3820. Name *string `location:"uri" locationName:"name" type:"string" required:"true"`
  3821. }
  3822. // String returns the string representation
  3823. func (s DeleteDataSourceInput) String() string {
  3824. return awsutil.Prettify(s)
  3825. }
  3826. // GoString returns the string representation
  3827. func (s DeleteDataSourceInput) GoString() string {
  3828. return s.String()
  3829. }
  3830. // Validate inspects the fields of the type to determine if they are valid.
  3831. func (s *DeleteDataSourceInput) Validate() error {
  3832. invalidParams := request.ErrInvalidParams{Context: "DeleteDataSourceInput"}
  3833. if s.ApiId == nil {
  3834. invalidParams.Add(request.NewErrParamRequired("ApiId"))
  3835. }
  3836. if s.ApiId != nil && len(*s.ApiId) < 1 {
  3837. invalidParams.Add(request.NewErrParamMinLen("ApiId", 1))
  3838. }
  3839. if s.Name == nil {
  3840. invalidParams.Add(request.NewErrParamRequired("Name"))
  3841. }
  3842. if s.Name != nil && len(*s.Name) < 1 {
  3843. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  3844. }
  3845. if invalidParams.Len() > 0 {
  3846. return invalidParams
  3847. }
  3848. return nil
  3849. }
  3850. // SetApiId sets the ApiId field's value.
  3851. func (s *DeleteDataSourceInput) SetApiId(v string) *DeleteDataSourceInput {
  3852. s.ApiId = &v
  3853. return s
  3854. }
  3855. // SetName sets the Name field's value.
  3856. func (s *DeleteDataSourceInput) SetName(v string) *DeleteDataSourceInput {
  3857. s.Name = &v
  3858. return s
  3859. }
  3860. type DeleteDataSourceOutput struct {
  3861. _ struct{} `type:"structure"`
  3862. }
  3863. // String returns the string representation
  3864. func (s DeleteDataSourceOutput) String() string {
  3865. return awsutil.Prettify(s)
  3866. }
  3867. // GoString returns the string representation
  3868. func (s DeleteDataSourceOutput) GoString() string {
  3869. return s.String()
  3870. }
  3871. type DeleteFunctionInput struct {
  3872. _ struct{} `type:"structure"`
  3873. // The GraphQL API ID.
  3874. //
  3875. // ApiId is a required field
  3876. ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"`
  3877. // The Function ID.
  3878. //
  3879. // FunctionId is a required field
  3880. FunctionId *string `location:"uri" locationName:"functionId" type:"string" required:"true"`
  3881. }
  3882. // String returns the string representation
  3883. func (s DeleteFunctionInput) String() string {
  3884. return awsutil.Prettify(s)
  3885. }
  3886. // GoString returns the string representation
  3887. func (s DeleteFunctionInput) GoString() string {
  3888. return s.String()
  3889. }
  3890. // Validate inspects the fields of the type to determine if they are valid.
  3891. func (s *DeleteFunctionInput) Validate() error {
  3892. invalidParams := request.ErrInvalidParams{Context: "DeleteFunctionInput"}
  3893. if s.ApiId == nil {
  3894. invalidParams.Add(request.NewErrParamRequired("ApiId"))
  3895. }
  3896. if s.ApiId != nil && len(*s.ApiId) < 1 {
  3897. invalidParams.Add(request.NewErrParamMinLen("ApiId", 1))
  3898. }
  3899. if s.FunctionId == nil {
  3900. invalidParams.Add(request.NewErrParamRequired("FunctionId"))
  3901. }
  3902. if s.FunctionId != nil && len(*s.FunctionId) < 1 {
  3903. invalidParams.Add(request.NewErrParamMinLen("FunctionId", 1))
  3904. }
  3905. if invalidParams.Len() > 0 {
  3906. return invalidParams
  3907. }
  3908. return nil
  3909. }
  3910. // SetApiId sets the ApiId field's value.
  3911. func (s *DeleteFunctionInput) SetApiId(v string) *DeleteFunctionInput {
  3912. s.ApiId = &v
  3913. return s
  3914. }
  3915. // SetFunctionId sets the FunctionId field's value.
  3916. func (s *DeleteFunctionInput) SetFunctionId(v string) *DeleteFunctionInput {
  3917. s.FunctionId = &v
  3918. return s
  3919. }
  3920. type DeleteFunctionOutput struct {
  3921. _ struct{} `type:"structure"`
  3922. }
  3923. // String returns the string representation
  3924. func (s DeleteFunctionOutput) String() string {
  3925. return awsutil.Prettify(s)
  3926. }
  3927. // GoString returns the string representation
  3928. func (s DeleteFunctionOutput) GoString() string {
  3929. return s.String()
  3930. }
  3931. type DeleteGraphqlApiInput struct {
  3932. _ struct{} `type:"structure"`
  3933. // The API ID.
  3934. //
  3935. // ApiId is a required field
  3936. ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"`
  3937. }
  3938. // String returns the string representation
  3939. func (s DeleteGraphqlApiInput) String() string {
  3940. return awsutil.Prettify(s)
  3941. }
  3942. // GoString returns the string representation
  3943. func (s DeleteGraphqlApiInput) GoString() string {
  3944. return s.String()
  3945. }
  3946. // Validate inspects the fields of the type to determine if they are valid.
  3947. func (s *DeleteGraphqlApiInput) Validate() error {
  3948. invalidParams := request.ErrInvalidParams{Context: "DeleteGraphqlApiInput"}
  3949. if s.ApiId == nil {
  3950. invalidParams.Add(request.NewErrParamRequired("ApiId"))
  3951. }
  3952. if s.ApiId != nil && len(*s.ApiId) < 1 {
  3953. invalidParams.Add(request.NewErrParamMinLen("ApiId", 1))
  3954. }
  3955. if invalidParams.Len() > 0 {
  3956. return invalidParams
  3957. }
  3958. return nil
  3959. }
  3960. // SetApiId sets the ApiId field's value.
  3961. func (s *DeleteGraphqlApiInput) SetApiId(v string) *DeleteGraphqlApiInput {
  3962. s.ApiId = &v
  3963. return s
  3964. }
  3965. type DeleteGraphqlApiOutput struct {
  3966. _ struct{} `type:"structure"`
  3967. }
  3968. // String returns the string representation
  3969. func (s DeleteGraphqlApiOutput) String() string {
  3970. return awsutil.Prettify(s)
  3971. }
  3972. // GoString returns the string representation
  3973. func (s DeleteGraphqlApiOutput) GoString() string {
  3974. return s.String()
  3975. }
  3976. type DeleteResolverInput struct {
  3977. _ struct{} `type:"structure"`
  3978. // The API ID.
  3979. //
  3980. // ApiId is a required field
  3981. ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"`
  3982. // The resolver field name.
  3983. //
  3984. // FieldName is a required field
  3985. FieldName *string `location:"uri" locationName:"fieldName" type:"string" required:"true"`
  3986. // The name of the resolver type.
  3987. //
  3988. // TypeName is a required field
  3989. TypeName *string `location:"uri" locationName:"typeName" type:"string" required:"true"`
  3990. }
  3991. // String returns the string representation
  3992. func (s DeleteResolverInput) String() string {
  3993. return awsutil.Prettify(s)
  3994. }
  3995. // GoString returns the string representation
  3996. func (s DeleteResolverInput) GoString() string {
  3997. return s.String()
  3998. }
  3999. // Validate inspects the fields of the type to determine if they are valid.
  4000. func (s *DeleteResolverInput) Validate() error {
  4001. invalidParams := request.ErrInvalidParams{Context: "DeleteResolverInput"}
  4002. if s.ApiId == nil {
  4003. invalidParams.Add(request.NewErrParamRequired("ApiId"))
  4004. }
  4005. if s.ApiId != nil && len(*s.ApiId) < 1 {
  4006. invalidParams.Add(request.NewErrParamMinLen("ApiId", 1))
  4007. }
  4008. if s.FieldName == nil {
  4009. invalidParams.Add(request.NewErrParamRequired("FieldName"))
  4010. }
  4011. if s.FieldName != nil && len(*s.FieldName) < 1 {
  4012. invalidParams.Add(request.NewErrParamMinLen("FieldName", 1))
  4013. }
  4014. if s.TypeName == nil {
  4015. invalidParams.Add(request.NewErrParamRequired("TypeName"))
  4016. }
  4017. if s.TypeName != nil && len(*s.TypeName) < 1 {
  4018. invalidParams.Add(request.NewErrParamMinLen("TypeName", 1))
  4019. }
  4020. if invalidParams.Len() > 0 {
  4021. return invalidParams
  4022. }
  4023. return nil
  4024. }
  4025. // SetApiId sets the ApiId field's value.
  4026. func (s *DeleteResolverInput) SetApiId(v string) *DeleteResolverInput {
  4027. s.ApiId = &v
  4028. return s
  4029. }
  4030. // SetFieldName sets the FieldName field's value.
  4031. func (s *DeleteResolverInput) SetFieldName(v string) *DeleteResolverInput {
  4032. s.FieldName = &v
  4033. return s
  4034. }
  4035. // SetTypeName sets the TypeName field's value.
  4036. func (s *DeleteResolverInput) SetTypeName(v string) *DeleteResolverInput {
  4037. s.TypeName = &v
  4038. return s
  4039. }
  4040. type DeleteResolverOutput struct {
  4041. _ struct{} `type:"structure"`
  4042. }
  4043. // String returns the string representation
  4044. func (s DeleteResolverOutput) String() string {
  4045. return awsutil.Prettify(s)
  4046. }
  4047. // GoString returns the string representation
  4048. func (s DeleteResolverOutput) GoString() string {
  4049. return s.String()
  4050. }
  4051. type DeleteTypeInput struct {
  4052. _ struct{} `type:"structure"`
  4053. // The API ID.
  4054. //
  4055. // ApiId is a required field
  4056. ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"`
  4057. // The type name.
  4058. //
  4059. // TypeName is a required field
  4060. TypeName *string `location:"uri" locationName:"typeName" type:"string" required:"true"`
  4061. }
  4062. // String returns the string representation
  4063. func (s DeleteTypeInput) String() string {
  4064. return awsutil.Prettify(s)
  4065. }
  4066. // GoString returns the string representation
  4067. func (s DeleteTypeInput) GoString() string {
  4068. return s.String()
  4069. }
  4070. // Validate inspects the fields of the type to determine if they are valid.
  4071. func (s *DeleteTypeInput) Validate() error {
  4072. invalidParams := request.ErrInvalidParams{Context: "DeleteTypeInput"}
  4073. if s.ApiId == nil {
  4074. invalidParams.Add(request.NewErrParamRequired("ApiId"))
  4075. }
  4076. if s.ApiId != nil && len(*s.ApiId) < 1 {
  4077. invalidParams.Add(request.NewErrParamMinLen("ApiId", 1))
  4078. }
  4079. if s.TypeName == nil {
  4080. invalidParams.Add(request.NewErrParamRequired("TypeName"))
  4081. }
  4082. if s.TypeName != nil && len(*s.TypeName) < 1 {
  4083. invalidParams.Add(request.NewErrParamMinLen("TypeName", 1))
  4084. }
  4085. if invalidParams.Len() > 0 {
  4086. return invalidParams
  4087. }
  4088. return nil
  4089. }
  4090. // SetApiId sets the ApiId field's value.
  4091. func (s *DeleteTypeInput) SetApiId(v string) *DeleteTypeInput {
  4092. s.ApiId = &v
  4093. return s
  4094. }
  4095. // SetTypeName sets the TypeName field's value.
  4096. func (s *DeleteTypeInput) SetTypeName(v string) *DeleteTypeInput {
  4097. s.TypeName = &v
  4098. return s
  4099. }
  4100. type DeleteTypeOutput struct {
  4101. _ struct{} `type:"structure"`
  4102. }
  4103. // String returns the string representation
  4104. func (s DeleteTypeOutput) String() string {
  4105. return awsutil.Prettify(s)
  4106. }
  4107. // GoString returns the string representation
  4108. func (s DeleteTypeOutput) GoString() string {
  4109. return s.String()
  4110. }
  4111. // Describes an Amazon DynamoDB data source configuration.
  4112. type DynamodbDataSourceConfig struct {
  4113. _ struct{} `type:"structure"`
  4114. // The AWS Region.
  4115. //
  4116. // AwsRegion is a required field
  4117. AwsRegion *string `locationName:"awsRegion" type:"string" required:"true"`
  4118. // The table name.
  4119. //
  4120. // TableName is a required field
  4121. TableName *string `locationName:"tableName" type:"string" required:"true"`
  4122. // Set to TRUE to use Amazon Cognito credentials with this data source.
  4123. UseCallerCredentials *bool `locationName:"useCallerCredentials" type:"boolean"`
  4124. }
  4125. // String returns the string representation
  4126. func (s DynamodbDataSourceConfig) String() string {
  4127. return awsutil.Prettify(s)
  4128. }
  4129. // GoString returns the string representation
  4130. func (s DynamodbDataSourceConfig) GoString() string {
  4131. return s.String()
  4132. }
  4133. // Validate inspects the fields of the type to determine if they are valid.
  4134. func (s *DynamodbDataSourceConfig) Validate() error {
  4135. invalidParams := request.ErrInvalidParams{Context: "DynamodbDataSourceConfig"}
  4136. if s.AwsRegion == nil {
  4137. invalidParams.Add(request.NewErrParamRequired("AwsRegion"))
  4138. }
  4139. if s.TableName == nil {
  4140. invalidParams.Add(request.NewErrParamRequired("TableName"))
  4141. }
  4142. if invalidParams.Len() > 0 {
  4143. return invalidParams
  4144. }
  4145. return nil
  4146. }
  4147. // SetAwsRegion sets the AwsRegion field's value.
  4148. func (s *DynamodbDataSourceConfig) SetAwsRegion(v string) *DynamodbDataSourceConfig {
  4149. s.AwsRegion = &v
  4150. return s
  4151. }
  4152. // SetTableName sets the TableName field's value.
  4153. func (s *DynamodbDataSourceConfig) SetTableName(v string) *DynamodbDataSourceConfig {
  4154. s.TableName = &v
  4155. return s
  4156. }
  4157. // SetUseCallerCredentials sets the UseCallerCredentials field's value.
  4158. func (s *DynamodbDataSourceConfig) SetUseCallerCredentials(v bool) *DynamodbDataSourceConfig {
  4159. s.UseCallerCredentials = &v
  4160. return s
  4161. }
  4162. // Describes an Elasticsearch data source configuration.
  4163. type ElasticsearchDataSourceConfig struct {
  4164. _ struct{} `type:"structure"`
  4165. // The AWS Region.
  4166. //
  4167. // AwsRegion is a required field
  4168. AwsRegion *string `locationName:"awsRegion" type:"string" required:"true"`
  4169. // The endpoint.
  4170. //
  4171. // Endpoint is a required field
  4172. Endpoint *string `locationName:"endpoint" type:"string" required:"true"`
  4173. }
  4174. // String returns the string representation
  4175. func (s ElasticsearchDataSourceConfig) String() string {
  4176. return awsutil.Prettify(s)
  4177. }
  4178. // GoString returns the string representation
  4179. func (s ElasticsearchDataSourceConfig) GoString() string {
  4180. return s.String()
  4181. }
  4182. // Validate inspects the fields of the type to determine if they are valid.
  4183. func (s *ElasticsearchDataSourceConfig) Validate() error {
  4184. invalidParams := request.ErrInvalidParams{Context: "ElasticsearchDataSourceConfig"}
  4185. if s.AwsRegion == nil {
  4186. invalidParams.Add(request.NewErrParamRequired("AwsRegion"))
  4187. }
  4188. if s.Endpoint == nil {
  4189. invalidParams.Add(request.NewErrParamRequired("Endpoint"))
  4190. }
  4191. if invalidParams.Len() > 0 {
  4192. return invalidParams
  4193. }
  4194. return nil
  4195. }
  4196. // SetAwsRegion sets the AwsRegion field's value.
  4197. func (s *ElasticsearchDataSourceConfig) SetAwsRegion(v string) *ElasticsearchDataSourceConfig {
  4198. s.AwsRegion = &v
  4199. return s
  4200. }
  4201. // SetEndpoint sets the Endpoint field's value.
  4202. func (s *ElasticsearchDataSourceConfig) SetEndpoint(v string) *ElasticsearchDataSourceConfig {
  4203. s.Endpoint = &v
  4204. return s
  4205. }
  4206. // A function is a reusable entity. Multiple functions can be used to compose
  4207. // the resolver logic.
  4208. type FunctionConfiguration struct {
  4209. _ struct{} `type:"structure"`
  4210. // The name of the DataSource.
  4211. DataSourceName *string `locationName:"dataSourceName" type:"string"`
  4212. // The Function description.
  4213. Description *string `locationName:"description" type:"string"`
  4214. // The ARN of the Function object.
  4215. FunctionArn *string `locationName:"functionArn" type:"string"`
  4216. // A unique ID representing the Function object.
  4217. FunctionId *string `locationName:"functionId" type:"string"`
  4218. // The version of the request mapping template. Currently only the 2018-05-29
  4219. // version of the template is supported.
  4220. FunctionVersion *string `locationName:"functionVersion" type:"string"`
  4221. // The name of the Function object.
  4222. Name *string `locationName:"name" type:"string"`
  4223. // The Function request mapping template. Functions support only the 2018-05-29
  4224. // version of the request mapping template.
  4225. RequestMappingTemplate *string `locationName:"requestMappingTemplate" min:"1" type:"string"`
  4226. // The Function response mapping template.
  4227. ResponseMappingTemplate *string `locationName:"responseMappingTemplate" min:"1" type:"string"`
  4228. }
  4229. // String returns the string representation
  4230. func (s FunctionConfiguration) String() string {
  4231. return awsutil.Prettify(s)
  4232. }
  4233. // GoString returns the string representation
  4234. func (s FunctionConfiguration) GoString() string {
  4235. return s.String()
  4236. }
  4237. // SetDataSourceName sets the DataSourceName field's value.
  4238. func (s *FunctionConfiguration) SetDataSourceName(v string) *FunctionConfiguration {
  4239. s.DataSourceName = &v
  4240. return s
  4241. }
  4242. // SetDescription sets the Description field's value.
  4243. func (s *FunctionConfiguration) SetDescription(v string) *FunctionConfiguration {
  4244. s.Description = &v
  4245. return s
  4246. }
  4247. // SetFunctionArn sets the FunctionArn field's value.
  4248. func (s *FunctionConfiguration) SetFunctionArn(v string) *FunctionConfiguration {
  4249. s.FunctionArn = &v
  4250. return s
  4251. }
  4252. // SetFunctionId sets the FunctionId field's value.
  4253. func (s *FunctionConfiguration) SetFunctionId(v string) *FunctionConfiguration {
  4254. s.FunctionId = &v
  4255. return s
  4256. }
  4257. // SetFunctionVersion sets the FunctionVersion field's value.
  4258. func (s *FunctionConfiguration) SetFunctionVersion(v string) *FunctionConfiguration {
  4259. s.FunctionVersion = &v
  4260. return s
  4261. }
  4262. // SetName sets the Name field's value.
  4263. func (s *FunctionConfiguration) SetName(v string) *FunctionConfiguration {
  4264. s.Name = &v
  4265. return s
  4266. }
  4267. // SetRequestMappingTemplate sets the RequestMappingTemplate field's value.
  4268. func (s *FunctionConfiguration) SetRequestMappingTemplate(v string) *FunctionConfiguration {
  4269. s.RequestMappingTemplate = &v
  4270. return s
  4271. }
  4272. // SetResponseMappingTemplate sets the ResponseMappingTemplate field's value.
  4273. func (s *FunctionConfiguration) SetResponseMappingTemplate(v string) *FunctionConfiguration {
  4274. s.ResponseMappingTemplate = &v
  4275. return s
  4276. }
  4277. type GetDataSourceInput struct {
  4278. _ struct{} `type:"structure"`
  4279. // The API ID.
  4280. //
  4281. // ApiId is a required field
  4282. ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"`
  4283. // The name of the data source.
  4284. //
  4285. // Name is a required field
  4286. Name *string `location:"uri" locationName:"name" type:"string" required:"true"`
  4287. }
  4288. // String returns the string representation
  4289. func (s GetDataSourceInput) String() string {
  4290. return awsutil.Prettify(s)
  4291. }
  4292. // GoString returns the string representation
  4293. func (s GetDataSourceInput) GoString() string {
  4294. return s.String()
  4295. }
  4296. // Validate inspects the fields of the type to determine if they are valid.
  4297. func (s *GetDataSourceInput) Validate() error {
  4298. invalidParams := request.ErrInvalidParams{Context: "GetDataSourceInput"}
  4299. if s.ApiId == nil {
  4300. invalidParams.Add(request.NewErrParamRequired("ApiId"))
  4301. }
  4302. if s.ApiId != nil && len(*s.ApiId) < 1 {
  4303. invalidParams.Add(request.NewErrParamMinLen("ApiId", 1))
  4304. }
  4305. if s.Name == nil {
  4306. invalidParams.Add(request.NewErrParamRequired("Name"))
  4307. }
  4308. if s.Name != nil && len(*s.Name) < 1 {
  4309. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  4310. }
  4311. if invalidParams.Len() > 0 {
  4312. return invalidParams
  4313. }
  4314. return nil
  4315. }
  4316. // SetApiId sets the ApiId field's value.
  4317. func (s *GetDataSourceInput) SetApiId(v string) *GetDataSourceInput {
  4318. s.ApiId = &v
  4319. return s
  4320. }
  4321. // SetName sets the Name field's value.
  4322. func (s *GetDataSourceInput) SetName(v string) *GetDataSourceInput {
  4323. s.Name = &v
  4324. return s
  4325. }
  4326. type GetDataSourceOutput struct {
  4327. _ struct{} `type:"structure"`
  4328. // The DataSource object.
  4329. DataSource *DataSource `locationName:"dataSource" type:"structure"`
  4330. }
  4331. // String returns the string representation
  4332. func (s GetDataSourceOutput) String() string {
  4333. return awsutil.Prettify(s)
  4334. }
  4335. // GoString returns the string representation
  4336. func (s GetDataSourceOutput) GoString() string {
  4337. return s.String()
  4338. }
  4339. // SetDataSource sets the DataSource field's value.
  4340. func (s *GetDataSourceOutput) SetDataSource(v *DataSource) *GetDataSourceOutput {
  4341. s.DataSource = v
  4342. return s
  4343. }
  4344. type GetFunctionInput struct {
  4345. _ struct{} `type:"structure"`
  4346. // The GraphQL API ID.
  4347. //
  4348. // ApiId is a required field
  4349. ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"`
  4350. // The Function ID.
  4351. //
  4352. // FunctionId is a required field
  4353. FunctionId *string `location:"uri" locationName:"functionId" type:"string" required:"true"`
  4354. }
  4355. // String returns the string representation
  4356. func (s GetFunctionInput) String() string {
  4357. return awsutil.Prettify(s)
  4358. }
  4359. // GoString returns the string representation
  4360. func (s GetFunctionInput) GoString() string {
  4361. return s.String()
  4362. }
  4363. // Validate inspects the fields of the type to determine if they are valid.
  4364. func (s *GetFunctionInput) Validate() error {
  4365. invalidParams := request.ErrInvalidParams{Context: "GetFunctionInput"}
  4366. if s.ApiId == nil {
  4367. invalidParams.Add(request.NewErrParamRequired("ApiId"))
  4368. }
  4369. if s.ApiId != nil && len(*s.ApiId) < 1 {
  4370. invalidParams.Add(request.NewErrParamMinLen("ApiId", 1))
  4371. }
  4372. if s.FunctionId == nil {
  4373. invalidParams.Add(request.NewErrParamRequired("FunctionId"))
  4374. }
  4375. if s.FunctionId != nil && len(*s.FunctionId) < 1 {
  4376. invalidParams.Add(request.NewErrParamMinLen("FunctionId", 1))
  4377. }
  4378. if invalidParams.Len() > 0 {
  4379. return invalidParams
  4380. }
  4381. return nil
  4382. }
  4383. // SetApiId sets the ApiId field's value.
  4384. func (s *GetFunctionInput) SetApiId(v string) *GetFunctionInput {
  4385. s.ApiId = &v
  4386. return s
  4387. }
  4388. // SetFunctionId sets the FunctionId field's value.
  4389. func (s *GetFunctionInput) SetFunctionId(v string) *GetFunctionInput {
  4390. s.FunctionId = &v
  4391. return s
  4392. }
  4393. type GetFunctionOutput struct {
  4394. _ struct{} `type:"structure"`
  4395. // The Function object.
  4396. FunctionConfiguration *FunctionConfiguration `locationName:"functionConfiguration" type:"structure"`
  4397. }
  4398. // String returns the string representation
  4399. func (s GetFunctionOutput) String() string {
  4400. return awsutil.Prettify(s)
  4401. }
  4402. // GoString returns the string representation
  4403. func (s GetFunctionOutput) GoString() string {
  4404. return s.String()
  4405. }
  4406. // SetFunctionConfiguration sets the FunctionConfiguration field's value.
  4407. func (s *GetFunctionOutput) SetFunctionConfiguration(v *FunctionConfiguration) *GetFunctionOutput {
  4408. s.FunctionConfiguration = v
  4409. return s
  4410. }
  4411. type GetGraphqlApiInput struct {
  4412. _ struct{} `type:"structure"`
  4413. // The API ID for the GraphQL API.
  4414. //
  4415. // ApiId is a required field
  4416. ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"`
  4417. }
  4418. // String returns the string representation
  4419. func (s GetGraphqlApiInput) String() string {
  4420. return awsutil.Prettify(s)
  4421. }
  4422. // GoString returns the string representation
  4423. func (s GetGraphqlApiInput) GoString() string {
  4424. return s.String()
  4425. }
  4426. // Validate inspects the fields of the type to determine if they are valid.
  4427. func (s *GetGraphqlApiInput) Validate() error {
  4428. invalidParams := request.ErrInvalidParams{Context: "GetGraphqlApiInput"}
  4429. if s.ApiId == nil {
  4430. invalidParams.Add(request.NewErrParamRequired("ApiId"))
  4431. }
  4432. if s.ApiId != nil && len(*s.ApiId) < 1 {
  4433. invalidParams.Add(request.NewErrParamMinLen("ApiId", 1))
  4434. }
  4435. if invalidParams.Len() > 0 {
  4436. return invalidParams
  4437. }
  4438. return nil
  4439. }
  4440. // SetApiId sets the ApiId field's value.
  4441. func (s *GetGraphqlApiInput) SetApiId(v string) *GetGraphqlApiInput {
  4442. s.ApiId = &v
  4443. return s
  4444. }
  4445. type GetGraphqlApiOutput struct {
  4446. _ struct{} `type:"structure"`
  4447. // The GraphqlApi object.
  4448. GraphqlApi *GraphqlApi `locationName:"graphqlApi" type:"structure"`
  4449. }
  4450. // String returns the string representation
  4451. func (s GetGraphqlApiOutput) String() string {
  4452. return awsutil.Prettify(s)
  4453. }
  4454. // GoString returns the string representation
  4455. func (s GetGraphqlApiOutput) GoString() string {
  4456. return s.String()
  4457. }
  4458. // SetGraphqlApi sets the GraphqlApi field's value.
  4459. func (s *GetGraphqlApiOutput) SetGraphqlApi(v *GraphqlApi) *GetGraphqlApiOutput {
  4460. s.GraphqlApi = v
  4461. return s
  4462. }
  4463. type GetIntrospectionSchemaInput struct {
  4464. _ struct{} `type:"structure"`
  4465. // The API ID.
  4466. //
  4467. // ApiId is a required field
  4468. ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"`
  4469. // The schema format: SDL or JSON.
  4470. //
  4471. // Format is a required field
  4472. Format *string `location:"querystring" locationName:"format" type:"string" required:"true" enum:"OutputType"`
  4473. }
  4474. // String returns the string representation
  4475. func (s GetIntrospectionSchemaInput) String() string {
  4476. return awsutil.Prettify(s)
  4477. }
  4478. // GoString returns the string representation
  4479. func (s GetIntrospectionSchemaInput) GoString() string {
  4480. return s.String()
  4481. }
  4482. // Validate inspects the fields of the type to determine if they are valid.
  4483. func (s *GetIntrospectionSchemaInput) Validate() error {
  4484. invalidParams := request.ErrInvalidParams{Context: "GetIntrospectionSchemaInput"}
  4485. if s.ApiId == nil {
  4486. invalidParams.Add(request.NewErrParamRequired("ApiId"))
  4487. }
  4488. if s.ApiId != nil && len(*s.ApiId) < 1 {
  4489. invalidParams.Add(request.NewErrParamMinLen("ApiId", 1))
  4490. }
  4491. if s.Format == nil {
  4492. invalidParams.Add(request.NewErrParamRequired("Format"))
  4493. }
  4494. if invalidParams.Len() > 0 {
  4495. return invalidParams
  4496. }
  4497. return nil
  4498. }
  4499. // SetApiId sets the ApiId field's value.
  4500. func (s *GetIntrospectionSchemaInput) SetApiId(v string) *GetIntrospectionSchemaInput {
  4501. s.ApiId = &v
  4502. return s
  4503. }
  4504. // SetFormat sets the Format field's value.
  4505. func (s *GetIntrospectionSchemaInput) SetFormat(v string) *GetIntrospectionSchemaInput {
  4506. s.Format = &v
  4507. return s
  4508. }
  4509. type GetIntrospectionSchemaOutput struct {
  4510. _ struct{} `type:"structure" payload:"Schema"`
  4511. // The schema, in GraphQL Schema Definition Language (SDL) format.
  4512. //
  4513. // For more information, see the GraphQL SDL documentation (http://graphql.org/learn/schema/).
  4514. Schema []byte `locationName:"schema" type:"blob"`
  4515. }
  4516. // String returns the string representation
  4517. func (s GetIntrospectionSchemaOutput) String() string {
  4518. return awsutil.Prettify(s)
  4519. }
  4520. // GoString returns the string representation
  4521. func (s GetIntrospectionSchemaOutput) GoString() string {
  4522. return s.String()
  4523. }
  4524. // SetSchema sets the Schema field's value.
  4525. func (s *GetIntrospectionSchemaOutput) SetSchema(v []byte) *GetIntrospectionSchemaOutput {
  4526. s.Schema = v
  4527. return s
  4528. }
  4529. type GetResolverInput struct {
  4530. _ struct{} `type:"structure"`
  4531. // The API ID.
  4532. //
  4533. // ApiId is a required field
  4534. ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"`
  4535. // The resolver field name.
  4536. //
  4537. // FieldName is a required field
  4538. FieldName *string `location:"uri" locationName:"fieldName" type:"string" required:"true"`
  4539. // The resolver type name.
  4540. //
  4541. // TypeName is a required field
  4542. TypeName *string `location:"uri" locationName:"typeName" type:"string" required:"true"`
  4543. }
  4544. // String returns the string representation
  4545. func (s GetResolverInput) String() string {
  4546. return awsutil.Prettify(s)
  4547. }
  4548. // GoString returns the string representation
  4549. func (s GetResolverInput) GoString() string {
  4550. return s.String()
  4551. }
  4552. // Validate inspects the fields of the type to determine if they are valid.
  4553. func (s *GetResolverInput) Validate() error {
  4554. invalidParams := request.ErrInvalidParams{Context: "GetResolverInput"}
  4555. if s.ApiId == nil {
  4556. invalidParams.Add(request.NewErrParamRequired("ApiId"))
  4557. }
  4558. if s.ApiId != nil && len(*s.ApiId) < 1 {
  4559. invalidParams.Add(request.NewErrParamMinLen("ApiId", 1))
  4560. }
  4561. if s.FieldName == nil {
  4562. invalidParams.Add(request.NewErrParamRequired("FieldName"))
  4563. }
  4564. if s.FieldName != nil && len(*s.FieldName) < 1 {
  4565. invalidParams.Add(request.NewErrParamMinLen("FieldName", 1))
  4566. }
  4567. if s.TypeName == nil {
  4568. invalidParams.Add(request.NewErrParamRequired("TypeName"))
  4569. }
  4570. if s.TypeName != nil && len(*s.TypeName) < 1 {
  4571. invalidParams.Add(request.NewErrParamMinLen("TypeName", 1))
  4572. }
  4573. if invalidParams.Len() > 0 {
  4574. return invalidParams
  4575. }
  4576. return nil
  4577. }
  4578. // SetApiId sets the ApiId field's value.
  4579. func (s *GetResolverInput) SetApiId(v string) *GetResolverInput {
  4580. s.ApiId = &v
  4581. return s
  4582. }
  4583. // SetFieldName sets the FieldName field's value.
  4584. func (s *GetResolverInput) SetFieldName(v string) *GetResolverInput {
  4585. s.FieldName = &v
  4586. return s
  4587. }
  4588. // SetTypeName sets the TypeName field's value.
  4589. func (s *GetResolverInput) SetTypeName(v string) *GetResolverInput {
  4590. s.TypeName = &v
  4591. return s
  4592. }
  4593. type GetResolverOutput struct {
  4594. _ struct{} `type:"structure"`
  4595. // The Resolver object.
  4596. Resolver *Resolver `locationName:"resolver" type:"structure"`
  4597. }
  4598. // String returns the string representation
  4599. func (s GetResolverOutput) String() string {
  4600. return awsutil.Prettify(s)
  4601. }
  4602. // GoString returns the string representation
  4603. func (s GetResolverOutput) GoString() string {
  4604. return s.String()
  4605. }
  4606. // SetResolver sets the Resolver field's value.
  4607. func (s *GetResolverOutput) SetResolver(v *Resolver) *GetResolverOutput {
  4608. s.Resolver = v
  4609. return s
  4610. }
  4611. type GetSchemaCreationStatusInput struct {
  4612. _ struct{} `type:"structure"`
  4613. // The API ID.
  4614. //
  4615. // ApiId is a required field
  4616. ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"`
  4617. }
  4618. // String returns the string representation
  4619. func (s GetSchemaCreationStatusInput) String() string {
  4620. return awsutil.Prettify(s)
  4621. }
  4622. // GoString returns the string representation
  4623. func (s GetSchemaCreationStatusInput) GoString() string {
  4624. return s.String()
  4625. }
  4626. // Validate inspects the fields of the type to determine if they are valid.
  4627. func (s *GetSchemaCreationStatusInput) Validate() error {
  4628. invalidParams := request.ErrInvalidParams{Context: "GetSchemaCreationStatusInput"}
  4629. if s.ApiId == nil {
  4630. invalidParams.Add(request.NewErrParamRequired("ApiId"))
  4631. }
  4632. if s.ApiId != nil && len(*s.ApiId) < 1 {
  4633. invalidParams.Add(request.NewErrParamMinLen("ApiId", 1))
  4634. }
  4635. if invalidParams.Len() > 0 {
  4636. return invalidParams
  4637. }
  4638. return nil
  4639. }
  4640. // SetApiId sets the ApiId field's value.
  4641. func (s *GetSchemaCreationStatusInput) SetApiId(v string) *GetSchemaCreationStatusInput {
  4642. s.ApiId = &v
  4643. return s
  4644. }
  4645. type GetSchemaCreationStatusOutput struct {
  4646. _ struct{} `type:"structure"`
  4647. // Detailed information about the status of the schema creation operation.
  4648. Details *string `locationName:"details" type:"string"`
  4649. // The current state of the schema (PROCESSING, ACTIVE, or DELETING). Once the
  4650. // schema is in the ACTIVE state, you can add data.
  4651. Status *string `locationName:"status" type:"string" enum:"SchemaStatus"`
  4652. }
  4653. // String returns the string representation
  4654. func (s GetSchemaCreationStatusOutput) String() string {
  4655. return awsutil.Prettify(s)
  4656. }
  4657. // GoString returns the string representation
  4658. func (s GetSchemaCreationStatusOutput) GoString() string {
  4659. return s.String()
  4660. }
  4661. // SetDetails sets the Details field's value.
  4662. func (s *GetSchemaCreationStatusOutput) SetDetails(v string) *GetSchemaCreationStatusOutput {
  4663. s.Details = &v
  4664. return s
  4665. }
  4666. // SetStatus sets the Status field's value.
  4667. func (s *GetSchemaCreationStatusOutput) SetStatus(v string) *GetSchemaCreationStatusOutput {
  4668. s.Status = &v
  4669. return s
  4670. }
  4671. type GetTypeInput struct {
  4672. _ struct{} `type:"structure"`
  4673. // The API ID.
  4674. //
  4675. // ApiId is a required field
  4676. ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"`
  4677. // The type format: SDL or JSON.
  4678. //
  4679. // Format is a required field
  4680. Format *string `location:"querystring" locationName:"format" type:"string" required:"true" enum:"TypeDefinitionFormat"`
  4681. // The type name.
  4682. //
  4683. // TypeName is a required field
  4684. TypeName *string `location:"uri" locationName:"typeName" type:"string" required:"true"`
  4685. }
  4686. // String returns the string representation
  4687. func (s GetTypeInput) String() string {
  4688. return awsutil.Prettify(s)
  4689. }
  4690. // GoString returns the string representation
  4691. func (s GetTypeInput) GoString() string {
  4692. return s.String()
  4693. }
  4694. // Validate inspects the fields of the type to determine if they are valid.
  4695. func (s *GetTypeInput) Validate() error {
  4696. invalidParams := request.ErrInvalidParams{Context: "GetTypeInput"}
  4697. if s.ApiId == nil {
  4698. invalidParams.Add(request.NewErrParamRequired("ApiId"))
  4699. }
  4700. if s.ApiId != nil && len(*s.ApiId) < 1 {
  4701. invalidParams.Add(request.NewErrParamMinLen("ApiId", 1))
  4702. }
  4703. if s.Format == nil {
  4704. invalidParams.Add(request.NewErrParamRequired("Format"))
  4705. }
  4706. if s.TypeName == nil {
  4707. invalidParams.Add(request.NewErrParamRequired("TypeName"))
  4708. }
  4709. if s.TypeName != nil && len(*s.TypeName) < 1 {
  4710. invalidParams.Add(request.NewErrParamMinLen("TypeName", 1))
  4711. }
  4712. if invalidParams.Len() > 0 {
  4713. return invalidParams
  4714. }
  4715. return nil
  4716. }
  4717. // SetApiId sets the ApiId field's value.
  4718. func (s *GetTypeInput) SetApiId(v string) *GetTypeInput {
  4719. s.ApiId = &v
  4720. return s
  4721. }
  4722. // SetFormat sets the Format field's value.
  4723. func (s *GetTypeInput) SetFormat(v string) *GetTypeInput {
  4724. s.Format = &v
  4725. return s
  4726. }
  4727. // SetTypeName sets the TypeName field's value.
  4728. func (s *GetTypeInput) SetTypeName(v string) *GetTypeInput {
  4729. s.TypeName = &v
  4730. return s
  4731. }
  4732. type GetTypeOutput struct {
  4733. _ struct{} `type:"structure"`
  4734. // The Type object.
  4735. Type *Type `locationName:"type" type:"structure"`
  4736. }
  4737. // String returns the string representation
  4738. func (s GetTypeOutput) String() string {
  4739. return awsutil.Prettify(s)
  4740. }
  4741. // GoString returns the string representation
  4742. func (s GetTypeOutput) GoString() string {
  4743. return s.String()
  4744. }
  4745. // SetType sets the Type field's value.
  4746. func (s *GetTypeOutput) SetType(v *Type) *GetTypeOutput {
  4747. s.Type = v
  4748. return s
  4749. }
  4750. // Describes a GraphQL API.
  4751. type GraphqlApi struct {
  4752. _ struct{} `type:"structure"`
  4753. // The API ID.
  4754. ApiId *string `locationName:"apiId" type:"string"`
  4755. // The ARN.
  4756. Arn *string `locationName:"arn" type:"string"`
  4757. // The authentication type.
  4758. AuthenticationType *string `locationName:"authenticationType" type:"string" enum:"AuthenticationType"`
  4759. // The Amazon CloudWatch Logs configuration.
  4760. LogConfig *LogConfig `locationName:"logConfig" type:"structure"`
  4761. // The API name.
  4762. Name *string `locationName:"name" type:"string"`
  4763. // The OpenID Connect configuration.
  4764. OpenIDConnectConfig *OpenIDConnectConfig `locationName:"openIDConnectConfig" type:"structure"`
  4765. // The URIs.
  4766. Uris map[string]*string `locationName:"uris" type:"map"`
  4767. // The Amazon Cognito user pool configuration.
  4768. UserPoolConfig *UserPoolConfig `locationName:"userPoolConfig" type:"structure"`
  4769. }
  4770. // String returns the string representation
  4771. func (s GraphqlApi) String() string {
  4772. return awsutil.Prettify(s)
  4773. }
  4774. // GoString returns the string representation
  4775. func (s GraphqlApi) GoString() string {
  4776. return s.String()
  4777. }
  4778. // SetApiId sets the ApiId field's value.
  4779. func (s *GraphqlApi) SetApiId(v string) *GraphqlApi {
  4780. s.ApiId = &v
  4781. return s
  4782. }
  4783. // SetArn sets the Arn field's value.
  4784. func (s *GraphqlApi) SetArn(v string) *GraphqlApi {
  4785. s.Arn = &v
  4786. return s
  4787. }
  4788. // SetAuthenticationType sets the AuthenticationType field's value.
  4789. func (s *GraphqlApi) SetAuthenticationType(v string) *GraphqlApi {
  4790. s.AuthenticationType = &v
  4791. return s
  4792. }
  4793. // SetLogConfig sets the LogConfig field's value.
  4794. func (s *GraphqlApi) SetLogConfig(v *LogConfig) *GraphqlApi {
  4795. s.LogConfig = v
  4796. return s
  4797. }
  4798. // SetName sets the Name field's value.
  4799. func (s *GraphqlApi) SetName(v string) *GraphqlApi {
  4800. s.Name = &v
  4801. return s
  4802. }
  4803. // SetOpenIDConnectConfig sets the OpenIDConnectConfig field's value.
  4804. func (s *GraphqlApi) SetOpenIDConnectConfig(v *OpenIDConnectConfig) *GraphqlApi {
  4805. s.OpenIDConnectConfig = v
  4806. return s
  4807. }
  4808. // SetUris sets the Uris field's value.
  4809. func (s *GraphqlApi) SetUris(v map[string]*string) *GraphqlApi {
  4810. s.Uris = v
  4811. return s
  4812. }
  4813. // SetUserPoolConfig sets the UserPoolConfig field's value.
  4814. func (s *GraphqlApi) SetUserPoolConfig(v *UserPoolConfig) *GraphqlApi {
  4815. s.UserPoolConfig = v
  4816. return s
  4817. }
  4818. // Describes an HTTP data source configuration.
  4819. type HttpDataSourceConfig struct {
  4820. _ struct{} `type:"structure"`
  4821. // The authorization config in case the HTTP endpoint requires authorization.
  4822. AuthorizationConfig *AuthorizationConfig `locationName:"authorizationConfig" type:"structure"`
  4823. // The HTTP URL endpoint. You can either specify the domain name or IP, and
  4824. // port combination, and the URL scheme must be HTTP or HTTPS. If the port is
  4825. // not specified, AWS AppSync uses the default port 80 for the HTTP endpoint
  4826. // and port 443 for HTTPS endpoints.
  4827. Endpoint *string `locationName:"endpoint" type:"string"`
  4828. }
  4829. // String returns the string representation
  4830. func (s HttpDataSourceConfig) String() string {
  4831. return awsutil.Prettify(s)
  4832. }
  4833. // GoString returns the string representation
  4834. func (s HttpDataSourceConfig) GoString() string {
  4835. return s.String()
  4836. }
  4837. // Validate inspects the fields of the type to determine if they are valid.
  4838. func (s *HttpDataSourceConfig) Validate() error {
  4839. invalidParams := request.ErrInvalidParams{Context: "HttpDataSourceConfig"}
  4840. if s.AuthorizationConfig != nil {
  4841. if err := s.AuthorizationConfig.Validate(); err != nil {
  4842. invalidParams.AddNested("AuthorizationConfig", err.(request.ErrInvalidParams))
  4843. }
  4844. }
  4845. if invalidParams.Len() > 0 {
  4846. return invalidParams
  4847. }
  4848. return nil
  4849. }
  4850. // SetAuthorizationConfig sets the AuthorizationConfig field's value.
  4851. func (s *HttpDataSourceConfig) SetAuthorizationConfig(v *AuthorizationConfig) *HttpDataSourceConfig {
  4852. s.AuthorizationConfig = v
  4853. return s
  4854. }
  4855. // SetEndpoint sets the Endpoint field's value.
  4856. func (s *HttpDataSourceConfig) SetEndpoint(v string) *HttpDataSourceConfig {
  4857. s.Endpoint = &v
  4858. return s
  4859. }
  4860. // Describes an AWS Lambda data source configuration.
  4861. type LambdaDataSourceConfig struct {
  4862. _ struct{} `type:"structure"`
  4863. // The ARN for the Lambda function.
  4864. //
  4865. // LambdaFunctionArn is a required field
  4866. LambdaFunctionArn *string `locationName:"lambdaFunctionArn" type:"string" required:"true"`
  4867. }
  4868. // String returns the string representation
  4869. func (s LambdaDataSourceConfig) String() string {
  4870. return awsutil.Prettify(s)
  4871. }
  4872. // GoString returns the string representation
  4873. func (s LambdaDataSourceConfig) GoString() string {
  4874. return s.String()
  4875. }
  4876. // Validate inspects the fields of the type to determine if they are valid.
  4877. func (s *LambdaDataSourceConfig) Validate() error {
  4878. invalidParams := request.ErrInvalidParams{Context: "LambdaDataSourceConfig"}
  4879. if s.LambdaFunctionArn == nil {
  4880. invalidParams.Add(request.NewErrParamRequired("LambdaFunctionArn"))
  4881. }
  4882. if invalidParams.Len() > 0 {
  4883. return invalidParams
  4884. }
  4885. return nil
  4886. }
  4887. // SetLambdaFunctionArn sets the LambdaFunctionArn field's value.
  4888. func (s *LambdaDataSourceConfig) SetLambdaFunctionArn(v string) *LambdaDataSourceConfig {
  4889. s.LambdaFunctionArn = &v
  4890. return s
  4891. }
  4892. type ListApiKeysInput struct {
  4893. _ struct{} `type:"structure"`
  4894. // The API ID.
  4895. //
  4896. // ApiId is a required field
  4897. ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"`
  4898. // The maximum number of results you want the request to return.
  4899. MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"`
  4900. // An identifier that was returned from the previous call to this operation,
  4901. // which can be used to return the next set of items in the list.
  4902. NextToken *string `location:"querystring" locationName:"nextToken" type:"string"`
  4903. }
  4904. // String returns the string representation
  4905. func (s ListApiKeysInput) String() string {
  4906. return awsutil.Prettify(s)
  4907. }
  4908. // GoString returns the string representation
  4909. func (s ListApiKeysInput) GoString() string {
  4910. return s.String()
  4911. }
  4912. // Validate inspects the fields of the type to determine if they are valid.
  4913. func (s *ListApiKeysInput) Validate() error {
  4914. invalidParams := request.ErrInvalidParams{Context: "ListApiKeysInput"}
  4915. if s.ApiId == nil {
  4916. invalidParams.Add(request.NewErrParamRequired("ApiId"))
  4917. }
  4918. if s.ApiId != nil && len(*s.ApiId) < 1 {
  4919. invalidParams.Add(request.NewErrParamMinLen("ApiId", 1))
  4920. }
  4921. if invalidParams.Len() > 0 {
  4922. return invalidParams
  4923. }
  4924. return nil
  4925. }
  4926. // SetApiId sets the ApiId field's value.
  4927. func (s *ListApiKeysInput) SetApiId(v string) *ListApiKeysInput {
  4928. s.ApiId = &v
  4929. return s
  4930. }
  4931. // SetMaxResults sets the MaxResults field's value.
  4932. func (s *ListApiKeysInput) SetMaxResults(v int64) *ListApiKeysInput {
  4933. s.MaxResults = &v
  4934. return s
  4935. }
  4936. // SetNextToken sets the NextToken field's value.
  4937. func (s *ListApiKeysInput) SetNextToken(v string) *ListApiKeysInput {
  4938. s.NextToken = &v
  4939. return s
  4940. }
  4941. type ListApiKeysOutput struct {
  4942. _ struct{} `type:"structure"`
  4943. // The ApiKey objects.
  4944. ApiKeys []*ApiKey `locationName:"apiKeys" type:"list"`
  4945. // An identifier to be passed in the next request to this operation to return
  4946. // the next set of items in the list.
  4947. NextToken *string `locationName:"nextToken" type:"string"`
  4948. }
  4949. // String returns the string representation
  4950. func (s ListApiKeysOutput) String() string {
  4951. return awsutil.Prettify(s)
  4952. }
  4953. // GoString returns the string representation
  4954. func (s ListApiKeysOutput) GoString() string {
  4955. return s.String()
  4956. }
  4957. // SetApiKeys sets the ApiKeys field's value.
  4958. func (s *ListApiKeysOutput) SetApiKeys(v []*ApiKey) *ListApiKeysOutput {
  4959. s.ApiKeys = v
  4960. return s
  4961. }
  4962. // SetNextToken sets the NextToken field's value.
  4963. func (s *ListApiKeysOutput) SetNextToken(v string) *ListApiKeysOutput {
  4964. s.NextToken = &v
  4965. return s
  4966. }
  4967. type ListDataSourcesInput struct {
  4968. _ struct{} `type:"structure"`
  4969. // The API ID.
  4970. //
  4971. // ApiId is a required field
  4972. ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"`
  4973. // The maximum number of results you want the request to return.
  4974. MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"`
  4975. // An identifier that was returned from the previous call to this operation,
  4976. // which can be used to return the next set of items in the list.
  4977. NextToken *string `location:"querystring" locationName:"nextToken" type:"string"`
  4978. }
  4979. // String returns the string representation
  4980. func (s ListDataSourcesInput) String() string {
  4981. return awsutil.Prettify(s)
  4982. }
  4983. // GoString returns the string representation
  4984. func (s ListDataSourcesInput) GoString() string {
  4985. return s.String()
  4986. }
  4987. // Validate inspects the fields of the type to determine if they are valid.
  4988. func (s *ListDataSourcesInput) Validate() error {
  4989. invalidParams := request.ErrInvalidParams{Context: "ListDataSourcesInput"}
  4990. if s.ApiId == nil {
  4991. invalidParams.Add(request.NewErrParamRequired("ApiId"))
  4992. }
  4993. if s.ApiId != nil && len(*s.ApiId) < 1 {
  4994. invalidParams.Add(request.NewErrParamMinLen("ApiId", 1))
  4995. }
  4996. if invalidParams.Len() > 0 {
  4997. return invalidParams
  4998. }
  4999. return nil
  5000. }
  5001. // SetApiId sets the ApiId field's value.
  5002. func (s *ListDataSourcesInput) SetApiId(v string) *ListDataSourcesInput {
  5003. s.ApiId = &v
  5004. return s
  5005. }
  5006. // SetMaxResults sets the MaxResults field's value.
  5007. func (s *ListDataSourcesInput) SetMaxResults(v int64) *ListDataSourcesInput {
  5008. s.MaxResults = &v
  5009. return s
  5010. }
  5011. // SetNextToken sets the NextToken field's value.
  5012. func (s *ListDataSourcesInput) SetNextToken(v string) *ListDataSourcesInput {
  5013. s.NextToken = &v
  5014. return s
  5015. }
  5016. type ListDataSourcesOutput struct {
  5017. _ struct{} `type:"structure"`
  5018. // The DataSource objects.
  5019. DataSources []*DataSource `locationName:"dataSources" type:"list"`
  5020. // An identifier to be passed in the next request to this operation to return
  5021. // the next set of items in the list.
  5022. NextToken *string `locationName:"nextToken" type:"string"`
  5023. }
  5024. // String returns the string representation
  5025. func (s ListDataSourcesOutput) String() string {
  5026. return awsutil.Prettify(s)
  5027. }
  5028. // GoString returns the string representation
  5029. func (s ListDataSourcesOutput) GoString() string {
  5030. return s.String()
  5031. }
  5032. // SetDataSources sets the DataSources field's value.
  5033. func (s *ListDataSourcesOutput) SetDataSources(v []*DataSource) *ListDataSourcesOutput {
  5034. s.DataSources = v
  5035. return s
  5036. }
  5037. // SetNextToken sets the NextToken field's value.
  5038. func (s *ListDataSourcesOutput) SetNextToken(v string) *ListDataSourcesOutput {
  5039. s.NextToken = &v
  5040. return s
  5041. }
  5042. type ListFunctionsInput struct {
  5043. _ struct{} `type:"structure"`
  5044. // The GraphQL API ID.
  5045. //
  5046. // ApiId is a required field
  5047. ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"`
  5048. // The maximum number of results you want the request to return.
  5049. MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"`
  5050. // An identifier that was returned from the previous call to this operation,
  5051. // which can be used to return the next set of items in the list.
  5052. NextToken *string `location:"querystring" locationName:"nextToken" type:"string"`
  5053. }
  5054. // String returns the string representation
  5055. func (s ListFunctionsInput) String() string {
  5056. return awsutil.Prettify(s)
  5057. }
  5058. // GoString returns the string representation
  5059. func (s ListFunctionsInput) GoString() string {
  5060. return s.String()
  5061. }
  5062. // Validate inspects the fields of the type to determine if they are valid.
  5063. func (s *ListFunctionsInput) Validate() error {
  5064. invalidParams := request.ErrInvalidParams{Context: "ListFunctionsInput"}
  5065. if s.ApiId == nil {
  5066. invalidParams.Add(request.NewErrParamRequired("ApiId"))
  5067. }
  5068. if s.ApiId != nil && len(*s.ApiId) < 1 {
  5069. invalidParams.Add(request.NewErrParamMinLen("ApiId", 1))
  5070. }
  5071. if invalidParams.Len() > 0 {
  5072. return invalidParams
  5073. }
  5074. return nil
  5075. }
  5076. // SetApiId sets the ApiId field's value.
  5077. func (s *ListFunctionsInput) SetApiId(v string) *ListFunctionsInput {
  5078. s.ApiId = &v
  5079. return s
  5080. }
  5081. // SetMaxResults sets the MaxResults field's value.
  5082. func (s *ListFunctionsInput) SetMaxResults(v int64) *ListFunctionsInput {
  5083. s.MaxResults = &v
  5084. return s
  5085. }
  5086. // SetNextToken sets the NextToken field's value.
  5087. func (s *ListFunctionsInput) SetNextToken(v string) *ListFunctionsInput {
  5088. s.NextToken = &v
  5089. return s
  5090. }
  5091. type ListFunctionsOutput struct {
  5092. _ struct{} `type:"structure"`
  5093. // A list of Function objects.
  5094. Functions []*FunctionConfiguration `locationName:"functions" type:"list"`
  5095. // An identifier that was returned from the previous call to this operation,
  5096. // which can be used to return the next set of items in the list.
  5097. NextToken *string `locationName:"nextToken" type:"string"`
  5098. }
  5099. // String returns the string representation
  5100. func (s ListFunctionsOutput) String() string {
  5101. return awsutil.Prettify(s)
  5102. }
  5103. // GoString returns the string representation
  5104. func (s ListFunctionsOutput) GoString() string {
  5105. return s.String()
  5106. }
  5107. // SetFunctions sets the Functions field's value.
  5108. func (s *ListFunctionsOutput) SetFunctions(v []*FunctionConfiguration) *ListFunctionsOutput {
  5109. s.Functions = v
  5110. return s
  5111. }
  5112. // SetNextToken sets the NextToken field's value.
  5113. func (s *ListFunctionsOutput) SetNextToken(v string) *ListFunctionsOutput {
  5114. s.NextToken = &v
  5115. return s
  5116. }
  5117. type ListGraphqlApisInput struct {
  5118. _ struct{} `type:"structure"`
  5119. // The maximum number of results you want the request to return.
  5120. MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"`
  5121. // An identifier that was returned from the previous call to this operation,
  5122. // which can be used to return the next set of items in the list.
  5123. NextToken *string `location:"querystring" locationName:"nextToken" type:"string"`
  5124. }
  5125. // String returns the string representation
  5126. func (s ListGraphqlApisInput) String() string {
  5127. return awsutil.Prettify(s)
  5128. }
  5129. // GoString returns the string representation
  5130. func (s ListGraphqlApisInput) GoString() string {
  5131. return s.String()
  5132. }
  5133. // SetMaxResults sets the MaxResults field's value.
  5134. func (s *ListGraphqlApisInput) SetMaxResults(v int64) *ListGraphqlApisInput {
  5135. s.MaxResults = &v
  5136. return s
  5137. }
  5138. // SetNextToken sets the NextToken field's value.
  5139. func (s *ListGraphqlApisInput) SetNextToken(v string) *ListGraphqlApisInput {
  5140. s.NextToken = &v
  5141. return s
  5142. }
  5143. type ListGraphqlApisOutput struct {
  5144. _ struct{} `type:"structure"`
  5145. // The GraphqlApi objects.
  5146. GraphqlApis []*GraphqlApi `locationName:"graphqlApis" type:"list"`
  5147. // An identifier to be passed in the next request to this operation to return
  5148. // the next set of items in the list.
  5149. NextToken *string `locationName:"nextToken" type:"string"`
  5150. }
  5151. // String returns the string representation
  5152. func (s ListGraphqlApisOutput) String() string {
  5153. return awsutil.Prettify(s)
  5154. }
  5155. // GoString returns the string representation
  5156. func (s ListGraphqlApisOutput) GoString() string {
  5157. return s.String()
  5158. }
  5159. // SetGraphqlApis sets the GraphqlApis field's value.
  5160. func (s *ListGraphqlApisOutput) SetGraphqlApis(v []*GraphqlApi) *ListGraphqlApisOutput {
  5161. s.GraphqlApis = v
  5162. return s
  5163. }
  5164. // SetNextToken sets the NextToken field's value.
  5165. func (s *ListGraphqlApisOutput) SetNextToken(v string) *ListGraphqlApisOutput {
  5166. s.NextToken = &v
  5167. return s
  5168. }
  5169. type ListResolversByFunctionInput struct {
  5170. _ struct{} `type:"structure"`
  5171. // The API ID.
  5172. //
  5173. // ApiId is a required field
  5174. ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"`
  5175. // The Function ID.
  5176. //
  5177. // FunctionId is a required field
  5178. FunctionId *string `location:"uri" locationName:"functionId" type:"string" required:"true"`
  5179. // The maximum number of results you want the request to return.
  5180. MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"`
  5181. // An identifier that was returned from the previous call to this operation,
  5182. // which you can use to return the next set of items in the list.
  5183. NextToken *string `location:"querystring" locationName:"nextToken" type:"string"`
  5184. }
  5185. // String returns the string representation
  5186. func (s ListResolversByFunctionInput) String() string {
  5187. return awsutil.Prettify(s)
  5188. }
  5189. // GoString returns the string representation
  5190. func (s ListResolversByFunctionInput) GoString() string {
  5191. return s.String()
  5192. }
  5193. // Validate inspects the fields of the type to determine if they are valid.
  5194. func (s *ListResolversByFunctionInput) Validate() error {
  5195. invalidParams := request.ErrInvalidParams{Context: "ListResolversByFunctionInput"}
  5196. if s.ApiId == nil {
  5197. invalidParams.Add(request.NewErrParamRequired("ApiId"))
  5198. }
  5199. if s.ApiId != nil && len(*s.ApiId) < 1 {
  5200. invalidParams.Add(request.NewErrParamMinLen("ApiId", 1))
  5201. }
  5202. if s.FunctionId == nil {
  5203. invalidParams.Add(request.NewErrParamRequired("FunctionId"))
  5204. }
  5205. if s.FunctionId != nil && len(*s.FunctionId) < 1 {
  5206. invalidParams.Add(request.NewErrParamMinLen("FunctionId", 1))
  5207. }
  5208. if invalidParams.Len() > 0 {
  5209. return invalidParams
  5210. }
  5211. return nil
  5212. }
  5213. // SetApiId sets the ApiId field's value.
  5214. func (s *ListResolversByFunctionInput) SetApiId(v string) *ListResolversByFunctionInput {
  5215. s.ApiId = &v
  5216. return s
  5217. }
  5218. // SetFunctionId sets the FunctionId field's value.
  5219. func (s *ListResolversByFunctionInput) SetFunctionId(v string) *ListResolversByFunctionInput {
  5220. s.FunctionId = &v
  5221. return s
  5222. }
  5223. // SetMaxResults sets the MaxResults field's value.
  5224. func (s *ListResolversByFunctionInput) SetMaxResults(v int64) *ListResolversByFunctionInput {
  5225. s.MaxResults = &v
  5226. return s
  5227. }
  5228. // SetNextToken sets the NextToken field's value.
  5229. func (s *ListResolversByFunctionInput) SetNextToken(v string) *ListResolversByFunctionInput {
  5230. s.NextToken = &v
  5231. return s
  5232. }
  5233. type ListResolversByFunctionOutput struct {
  5234. _ struct{} `type:"structure"`
  5235. // An identifier that can be used to return the next set of items in the list.
  5236. NextToken *string `locationName:"nextToken" type:"string"`
  5237. // The list of resolvers.
  5238. Resolvers []*Resolver `locationName:"resolvers" type:"list"`
  5239. }
  5240. // String returns the string representation
  5241. func (s ListResolversByFunctionOutput) String() string {
  5242. return awsutil.Prettify(s)
  5243. }
  5244. // GoString returns the string representation
  5245. func (s ListResolversByFunctionOutput) GoString() string {
  5246. return s.String()
  5247. }
  5248. // SetNextToken sets the NextToken field's value.
  5249. func (s *ListResolversByFunctionOutput) SetNextToken(v string) *ListResolversByFunctionOutput {
  5250. s.NextToken = &v
  5251. return s
  5252. }
  5253. // SetResolvers sets the Resolvers field's value.
  5254. func (s *ListResolversByFunctionOutput) SetResolvers(v []*Resolver) *ListResolversByFunctionOutput {
  5255. s.Resolvers = v
  5256. return s
  5257. }
  5258. type ListResolversInput struct {
  5259. _ struct{} `type:"structure"`
  5260. // The API ID.
  5261. //
  5262. // ApiId is a required field
  5263. ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"`
  5264. // The maximum number of results you want the request to return.
  5265. MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"`
  5266. // An identifier that was returned from the previous call to this operation,
  5267. // which can be used to return the next set of items in the list.
  5268. NextToken *string `location:"querystring" locationName:"nextToken" type:"string"`
  5269. // The type name.
  5270. //
  5271. // TypeName is a required field
  5272. TypeName *string `location:"uri" locationName:"typeName" type:"string" required:"true"`
  5273. }
  5274. // String returns the string representation
  5275. func (s ListResolversInput) String() string {
  5276. return awsutil.Prettify(s)
  5277. }
  5278. // GoString returns the string representation
  5279. func (s ListResolversInput) GoString() string {
  5280. return s.String()
  5281. }
  5282. // Validate inspects the fields of the type to determine if they are valid.
  5283. func (s *ListResolversInput) Validate() error {
  5284. invalidParams := request.ErrInvalidParams{Context: "ListResolversInput"}
  5285. if s.ApiId == nil {
  5286. invalidParams.Add(request.NewErrParamRequired("ApiId"))
  5287. }
  5288. if s.ApiId != nil && len(*s.ApiId) < 1 {
  5289. invalidParams.Add(request.NewErrParamMinLen("ApiId", 1))
  5290. }
  5291. if s.TypeName == nil {
  5292. invalidParams.Add(request.NewErrParamRequired("TypeName"))
  5293. }
  5294. if s.TypeName != nil && len(*s.TypeName) < 1 {
  5295. invalidParams.Add(request.NewErrParamMinLen("TypeName", 1))
  5296. }
  5297. if invalidParams.Len() > 0 {
  5298. return invalidParams
  5299. }
  5300. return nil
  5301. }
  5302. // SetApiId sets the ApiId field's value.
  5303. func (s *ListResolversInput) SetApiId(v string) *ListResolversInput {
  5304. s.ApiId = &v
  5305. return s
  5306. }
  5307. // SetMaxResults sets the MaxResults field's value.
  5308. func (s *ListResolversInput) SetMaxResults(v int64) *ListResolversInput {
  5309. s.MaxResults = &v
  5310. return s
  5311. }
  5312. // SetNextToken sets the NextToken field's value.
  5313. func (s *ListResolversInput) SetNextToken(v string) *ListResolversInput {
  5314. s.NextToken = &v
  5315. return s
  5316. }
  5317. // SetTypeName sets the TypeName field's value.
  5318. func (s *ListResolversInput) SetTypeName(v string) *ListResolversInput {
  5319. s.TypeName = &v
  5320. return s
  5321. }
  5322. type ListResolversOutput struct {
  5323. _ struct{} `type:"structure"`
  5324. // An identifier to be passed in the next request to this operation to return
  5325. // the next set of items in the list.
  5326. NextToken *string `locationName:"nextToken" type:"string"`
  5327. // The Resolver objects.
  5328. Resolvers []*Resolver `locationName:"resolvers" type:"list"`
  5329. }
  5330. // String returns the string representation
  5331. func (s ListResolversOutput) String() string {
  5332. return awsutil.Prettify(s)
  5333. }
  5334. // GoString returns the string representation
  5335. func (s ListResolversOutput) GoString() string {
  5336. return s.String()
  5337. }
  5338. // SetNextToken sets the NextToken field's value.
  5339. func (s *ListResolversOutput) SetNextToken(v string) *ListResolversOutput {
  5340. s.NextToken = &v
  5341. return s
  5342. }
  5343. // SetResolvers sets the Resolvers field's value.
  5344. func (s *ListResolversOutput) SetResolvers(v []*Resolver) *ListResolversOutput {
  5345. s.Resolvers = v
  5346. return s
  5347. }
  5348. type ListTypesInput struct {
  5349. _ struct{} `type:"structure"`
  5350. // The API ID.
  5351. //
  5352. // ApiId is a required field
  5353. ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"`
  5354. // The type format: SDL or JSON.
  5355. //
  5356. // Format is a required field
  5357. Format *string `location:"querystring" locationName:"format" type:"string" required:"true" enum:"TypeDefinitionFormat"`
  5358. // The maximum number of results you want the request to return.
  5359. MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"`
  5360. // An identifier that was returned from the previous call to this operation,
  5361. // which can be used to return the next set of items in the list.
  5362. NextToken *string `location:"querystring" locationName:"nextToken" type:"string"`
  5363. }
  5364. // String returns the string representation
  5365. func (s ListTypesInput) String() string {
  5366. return awsutil.Prettify(s)
  5367. }
  5368. // GoString returns the string representation
  5369. func (s ListTypesInput) GoString() string {
  5370. return s.String()
  5371. }
  5372. // Validate inspects the fields of the type to determine if they are valid.
  5373. func (s *ListTypesInput) Validate() error {
  5374. invalidParams := request.ErrInvalidParams{Context: "ListTypesInput"}
  5375. if s.ApiId == nil {
  5376. invalidParams.Add(request.NewErrParamRequired("ApiId"))
  5377. }
  5378. if s.ApiId != nil && len(*s.ApiId) < 1 {
  5379. invalidParams.Add(request.NewErrParamMinLen("ApiId", 1))
  5380. }
  5381. if s.Format == nil {
  5382. invalidParams.Add(request.NewErrParamRequired("Format"))
  5383. }
  5384. if invalidParams.Len() > 0 {
  5385. return invalidParams
  5386. }
  5387. return nil
  5388. }
  5389. // SetApiId sets the ApiId field's value.
  5390. func (s *ListTypesInput) SetApiId(v string) *ListTypesInput {
  5391. s.ApiId = &v
  5392. return s
  5393. }
  5394. // SetFormat sets the Format field's value.
  5395. func (s *ListTypesInput) SetFormat(v string) *ListTypesInput {
  5396. s.Format = &v
  5397. return s
  5398. }
  5399. // SetMaxResults sets the MaxResults field's value.
  5400. func (s *ListTypesInput) SetMaxResults(v int64) *ListTypesInput {
  5401. s.MaxResults = &v
  5402. return s
  5403. }
  5404. // SetNextToken sets the NextToken field's value.
  5405. func (s *ListTypesInput) SetNextToken(v string) *ListTypesInput {
  5406. s.NextToken = &v
  5407. return s
  5408. }
  5409. type ListTypesOutput struct {
  5410. _ struct{} `type:"structure"`
  5411. // An identifier to be passed in the next request to this operation to return
  5412. // the next set of items in the list.
  5413. NextToken *string `locationName:"nextToken" type:"string"`
  5414. // The Type objects.
  5415. Types []*Type `locationName:"types" type:"list"`
  5416. }
  5417. // String returns the string representation
  5418. func (s ListTypesOutput) String() string {
  5419. return awsutil.Prettify(s)
  5420. }
  5421. // GoString returns the string representation
  5422. func (s ListTypesOutput) GoString() string {
  5423. return s.String()
  5424. }
  5425. // SetNextToken sets the NextToken field's value.
  5426. func (s *ListTypesOutput) SetNextToken(v string) *ListTypesOutput {
  5427. s.NextToken = &v
  5428. return s
  5429. }
  5430. // SetTypes sets the Types field's value.
  5431. func (s *ListTypesOutput) SetTypes(v []*Type) *ListTypesOutput {
  5432. s.Types = v
  5433. return s
  5434. }
  5435. // The CloudWatch Logs configuration.
  5436. type LogConfig struct {
  5437. _ struct{} `type:"structure"`
  5438. // The service role that AWS AppSync will assume to publish to Amazon CloudWatch
  5439. // logs in your account.
  5440. //
  5441. // CloudWatchLogsRoleArn is a required field
  5442. CloudWatchLogsRoleArn *string `locationName:"cloudWatchLogsRoleArn" type:"string" required:"true"`
  5443. // The field logging level. Values can be NONE, ERROR, or ALL.
  5444. //
  5445. // * NONE: No field-level logs are captured.
  5446. //
  5447. // * ERROR: Logs the following information only for the fields that are in
  5448. // error:
  5449. //
  5450. // The error section in the server response.
  5451. //
  5452. // Field-level errors.
  5453. //
  5454. // The generated request/response functions that got resolved for error fields.
  5455. //
  5456. // * ALL: The following information is logged for all fields in the query:
  5457. //
  5458. // Field-level tracing information.
  5459. //
  5460. // The generated request/response functions that got resolved for each field.
  5461. //
  5462. // FieldLogLevel is a required field
  5463. FieldLogLevel *string `locationName:"fieldLogLevel" type:"string" required:"true" enum:"FieldLogLevel"`
  5464. }
  5465. // String returns the string representation
  5466. func (s LogConfig) String() string {
  5467. return awsutil.Prettify(s)
  5468. }
  5469. // GoString returns the string representation
  5470. func (s LogConfig) GoString() string {
  5471. return s.String()
  5472. }
  5473. // Validate inspects the fields of the type to determine if they are valid.
  5474. func (s *LogConfig) Validate() error {
  5475. invalidParams := request.ErrInvalidParams{Context: "LogConfig"}
  5476. if s.CloudWatchLogsRoleArn == nil {
  5477. invalidParams.Add(request.NewErrParamRequired("CloudWatchLogsRoleArn"))
  5478. }
  5479. if s.FieldLogLevel == nil {
  5480. invalidParams.Add(request.NewErrParamRequired("FieldLogLevel"))
  5481. }
  5482. if invalidParams.Len() > 0 {
  5483. return invalidParams
  5484. }
  5485. return nil
  5486. }
  5487. // SetCloudWatchLogsRoleArn sets the CloudWatchLogsRoleArn field's value.
  5488. func (s *LogConfig) SetCloudWatchLogsRoleArn(v string) *LogConfig {
  5489. s.CloudWatchLogsRoleArn = &v
  5490. return s
  5491. }
  5492. // SetFieldLogLevel sets the FieldLogLevel field's value.
  5493. func (s *LogConfig) SetFieldLogLevel(v string) *LogConfig {
  5494. s.FieldLogLevel = &v
  5495. return s
  5496. }
  5497. // Describes an OpenID Connect configuration.
  5498. type OpenIDConnectConfig struct {
  5499. _ struct{} `type:"structure"`
  5500. // The number of milliseconds a token is valid after being authenticated.
  5501. AuthTTL *int64 `locationName:"authTTL" type:"long"`
  5502. // The client identifier of the Relying party at the OpenID identity provider.
  5503. // This identifier is typically obtained when the Relying party is registered
  5504. // with the OpenID identity provider. You can specify a regular expression so
  5505. // the AWS AppSync can validate against multiple client identifiers at a time.
  5506. ClientId *string `locationName:"clientId" type:"string"`
  5507. // The number of milliseconds a token is valid after being issued to a user.
  5508. IatTTL *int64 `locationName:"iatTTL" type:"long"`
  5509. // The issuer for the OpenID Connect configuration. The issuer returned by discovery
  5510. // must exactly match the value of iss in the ID token.
  5511. //
  5512. // Issuer is a required field
  5513. Issuer *string `locationName:"issuer" type:"string" required:"true"`
  5514. }
  5515. // String returns the string representation
  5516. func (s OpenIDConnectConfig) String() string {
  5517. return awsutil.Prettify(s)
  5518. }
  5519. // GoString returns the string representation
  5520. func (s OpenIDConnectConfig) GoString() string {
  5521. return s.String()
  5522. }
  5523. // Validate inspects the fields of the type to determine if they are valid.
  5524. func (s *OpenIDConnectConfig) Validate() error {
  5525. invalidParams := request.ErrInvalidParams{Context: "OpenIDConnectConfig"}
  5526. if s.Issuer == nil {
  5527. invalidParams.Add(request.NewErrParamRequired("Issuer"))
  5528. }
  5529. if invalidParams.Len() > 0 {
  5530. return invalidParams
  5531. }
  5532. return nil
  5533. }
  5534. // SetAuthTTL sets the AuthTTL field's value.
  5535. func (s *OpenIDConnectConfig) SetAuthTTL(v int64) *OpenIDConnectConfig {
  5536. s.AuthTTL = &v
  5537. return s
  5538. }
  5539. // SetClientId sets the ClientId field's value.
  5540. func (s *OpenIDConnectConfig) SetClientId(v string) *OpenIDConnectConfig {
  5541. s.ClientId = &v
  5542. return s
  5543. }
  5544. // SetIatTTL sets the IatTTL field's value.
  5545. func (s *OpenIDConnectConfig) SetIatTTL(v int64) *OpenIDConnectConfig {
  5546. s.IatTTL = &v
  5547. return s
  5548. }
  5549. // SetIssuer sets the Issuer field's value.
  5550. func (s *OpenIDConnectConfig) SetIssuer(v string) *OpenIDConnectConfig {
  5551. s.Issuer = &v
  5552. return s
  5553. }
  5554. // The pipeline configuration for a resolver of kind PIPELINE.
  5555. type PipelineConfig struct {
  5556. _ struct{} `type:"structure"`
  5557. // A list of Function objects.
  5558. Functions []*string `locationName:"functions" type:"list"`
  5559. }
  5560. // String returns the string representation
  5561. func (s PipelineConfig) String() string {
  5562. return awsutil.Prettify(s)
  5563. }
  5564. // GoString returns the string representation
  5565. func (s PipelineConfig) GoString() string {
  5566. return s.String()
  5567. }
  5568. // SetFunctions sets the Functions field's value.
  5569. func (s *PipelineConfig) SetFunctions(v []*string) *PipelineConfig {
  5570. s.Functions = v
  5571. return s
  5572. }
  5573. // The Amazon RDS HTTP endpoint configuration.
  5574. type RdsHttpEndpointConfig struct {
  5575. _ struct{} `type:"structure"`
  5576. // AWS Region for RDS HTTP endpoint.
  5577. AwsRegion *string `locationName:"awsRegion" type:"string"`
  5578. // AWS secret store ARN for database credentials.
  5579. AwsSecretStoreArn *string `locationName:"awsSecretStoreArn" type:"string"`
  5580. // Logical database name.
  5581. DatabaseName *string `locationName:"databaseName" type:"string"`
  5582. // Amazon RDS cluster identifier.
  5583. DbClusterIdentifier *string `locationName:"dbClusterIdentifier" type:"string"`
  5584. // Logical schema name.
  5585. Schema *string `locationName:"schema" type:"string"`
  5586. }
  5587. // String returns the string representation
  5588. func (s RdsHttpEndpointConfig) String() string {
  5589. return awsutil.Prettify(s)
  5590. }
  5591. // GoString returns the string representation
  5592. func (s RdsHttpEndpointConfig) GoString() string {
  5593. return s.String()
  5594. }
  5595. // SetAwsRegion sets the AwsRegion field's value.
  5596. func (s *RdsHttpEndpointConfig) SetAwsRegion(v string) *RdsHttpEndpointConfig {
  5597. s.AwsRegion = &v
  5598. return s
  5599. }
  5600. // SetAwsSecretStoreArn sets the AwsSecretStoreArn field's value.
  5601. func (s *RdsHttpEndpointConfig) SetAwsSecretStoreArn(v string) *RdsHttpEndpointConfig {
  5602. s.AwsSecretStoreArn = &v
  5603. return s
  5604. }
  5605. // SetDatabaseName sets the DatabaseName field's value.
  5606. func (s *RdsHttpEndpointConfig) SetDatabaseName(v string) *RdsHttpEndpointConfig {
  5607. s.DatabaseName = &v
  5608. return s
  5609. }
  5610. // SetDbClusterIdentifier sets the DbClusterIdentifier field's value.
  5611. func (s *RdsHttpEndpointConfig) SetDbClusterIdentifier(v string) *RdsHttpEndpointConfig {
  5612. s.DbClusterIdentifier = &v
  5613. return s
  5614. }
  5615. // SetSchema sets the Schema field's value.
  5616. func (s *RdsHttpEndpointConfig) SetSchema(v string) *RdsHttpEndpointConfig {
  5617. s.Schema = &v
  5618. return s
  5619. }
  5620. // Describes a relational database data source configuration.
  5621. type RelationalDatabaseDataSourceConfig struct {
  5622. _ struct{} `type:"structure"`
  5623. // Amazon RDS HTTP endpoint settings.
  5624. RdsHttpEndpointConfig *RdsHttpEndpointConfig `locationName:"rdsHttpEndpointConfig" type:"structure"`
  5625. // Source type for the relational database.
  5626. //
  5627. // * RDS_HTTP_ENDPOINT: The relational database source type is an Amazon
  5628. // RDS HTTP endpoint.
  5629. RelationalDatabaseSourceType *string `locationName:"relationalDatabaseSourceType" type:"string" enum:"RelationalDatabaseSourceType"`
  5630. }
  5631. // String returns the string representation
  5632. func (s RelationalDatabaseDataSourceConfig) String() string {
  5633. return awsutil.Prettify(s)
  5634. }
  5635. // GoString returns the string representation
  5636. func (s RelationalDatabaseDataSourceConfig) GoString() string {
  5637. return s.String()
  5638. }
  5639. // SetRdsHttpEndpointConfig sets the RdsHttpEndpointConfig field's value.
  5640. func (s *RelationalDatabaseDataSourceConfig) SetRdsHttpEndpointConfig(v *RdsHttpEndpointConfig) *RelationalDatabaseDataSourceConfig {
  5641. s.RdsHttpEndpointConfig = v
  5642. return s
  5643. }
  5644. // SetRelationalDatabaseSourceType sets the RelationalDatabaseSourceType field's value.
  5645. func (s *RelationalDatabaseDataSourceConfig) SetRelationalDatabaseSourceType(v string) *RelationalDatabaseDataSourceConfig {
  5646. s.RelationalDatabaseSourceType = &v
  5647. return s
  5648. }
  5649. // Describes a resolver.
  5650. type Resolver struct {
  5651. _ struct{} `type:"structure"`
  5652. // The resolver data source name.
  5653. DataSourceName *string `locationName:"dataSourceName" type:"string"`
  5654. // The resolver field name.
  5655. FieldName *string `locationName:"fieldName" type:"string"`
  5656. // The resolver type.
  5657. //
  5658. // * UNIT: A UNIT resolver type. A UNIT resolver is the default resolver
  5659. // type. A UNIT resolver enables you to execute a GraphQL query against a
  5660. // single data source.
  5661. //
  5662. // * PIPELINE: A PIPELINE resolver type. A PIPELINE resolver enables you
  5663. // to execute a series of Function in a serial manner. You can use a pipeline
  5664. // resolver to execute a GraphQL query against multiple data sources.
  5665. Kind *string `locationName:"kind" type:"string" enum:"ResolverKind"`
  5666. // The PipelineConfig.
  5667. PipelineConfig *PipelineConfig `locationName:"pipelineConfig" type:"structure"`
  5668. // The request mapping template.
  5669. RequestMappingTemplate *string `locationName:"requestMappingTemplate" min:"1" type:"string"`
  5670. // The resolver ARN.
  5671. ResolverArn *string `locationName:"resolverArn" type:"string"`
  5672. // The response mapping template.
  5673. ResponseMappingTemplate *string `locationName:"responseMappingTemplate" min:"1" type:"string"`
  5674. // The resolver type name.
  5675. TypeName *string `locationName:"typeName" type:"string"`
  5676. }
  5677. // String returns the string representation
  5678. func (s Resolver) String() string {
  5679. return awsutil.Prettify(s)
  5680. }
  5681. // GoString returns the string representation
  5682. func (s Resolver) GoString() string {
  5683. return s.String()
  5684. }
  5685. // SetDataSourceName sets the DataSourceName field's value.
  5686. func (s *Resolver) SetDataSourceName(v string) *Resolver {
  5687. s.DataSourceName = &v
  5688. return s
  5689. }
  5690. // SetFieldName sets the FieldName field's value.
  5691. func (s *Resolver) SetFieldName(v string) *Resolver {
  5692. s.FieldName = &v
  5693. return s
  5694. }
  5695. // SetKind sets the Kind field's value.
  5696. func (s *Resolver) SetKind(v string) *Resolver {
  5697. s.Kind = &v
  5698. return s
  5699. }
  5700. // SetPipelineConfig sets the PipelineConfig field's value.
  5701. func (s *Resolver) SetPipelineConfig(v *PipelineConfig) *Resolver {
  5702. s.PipelineConfig = v
  5703. return s
  5704. }
  5705. // SetRequestMappingTemplate sets the RequestMappingTemplate field's value.
  5706. func (s *Resolver) SetRequestMappingTemplate(v string) *Resolver {
  5707. s.RequestMappingTemplate = &v
  5708. return s
  5709. }
  5710. // SetResolverArn sets the ResolverArn field's value.
  5711. func (s *Resolver) SetResolverArn(v string) *Resolver {
  5712. s.ResolverArn = &v
  5713. return s
  5714. }
  5715. // SetResponseMappingTemplate sets the ResponseMappingTemplate field's value.
  5716. func (s *Resolver) SetResponseMappingTemplate(v string) *Resolver {
  5717. s.ResponseMappingTemplate = &v
  5718. return s
  5719. }
  5720. // SetTypeName sets the TypeName field's value.
  5721. func (s *Resolver) SetTypeName(v string) *Resolver {
  5722. s.TypeName = &v
  5723. return s
  5724. }
  5725. type StartSchemaCreationInput struct {
  5726. _ struct{} `type:"structure"`
  5727. // The API ID.
  5728. //
  5729. // ApiId is a required field
  5730. ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"`
  5731. // The schema definition, in GraphQL schema language format.
  5732. //
  5733. // Definition is automatically base64 encoded/decoded by the SDK.
  5734. //
  5735. // Definition is a required field
  5736. Definition []byte `locationName:"definition" type:"blob" required:"true"`
  5737. }
  5738. // String returns the string representation
  5739. func (s StartSchemaCreationInput) String() string {
  5740. return awsutil.Prettify(s)
  5741. }
  5742. // GoString returns the string representation
  5743. func (s StartSchemaCreationInput) GoString() string {
  5744. return s.String()
  5745. }
  5746. // Validate inspects the fields of the type to determine if they are valid.
  5747. func (s *StartSchemaCreationInput) Validate() error {
  5748. invalidParams := request.ErrInvalidParams{Context: "StartSchemaCreationInput"}
  5749. if s.ApiId == nil {
  5750. invalidParams.Add(request.NewErrParamRequired("ApiId"))
  5751. }
  5752. if s.ApiId != nil && len(*s.ApiId) < 1 {
  5753. invalidParams.Add(request.NewErrParamMinLen("ApiId", 1))
  5754. }
  5755. if s.Definition == nil {
  5756. invalidParams.Add(request.NewErrParamRequired("Definition"))
  5757. }
  5758. if invalidParams.Len() > 0 {
  5759. return invalidParams
  5760. }
  5761. return nil
  5762. }
  5763. // SetApiId sets the ApiId field's value.
  5764. func (s *StartSchemaCreationInput) SetApiId(v string) *StartSchemaCreationInput {
  5765. s.ApiId = &v
  5766. return s
  5767. }
  5768. // SetDefinition sets the Definition field's value.
  5769. func (s *StartSchemaCreationInput) SetDefinition(v []byte) *StartSchemaCreationInput {
  5770. s.Definition = v
  5771. return s
  5772. }
  5773. type StartSchemaCreationOutput struct {
  5774. _ struct{} `type:"structure"`
  5775. // The current state of the schema (PROCESSING, ACTIVE, or DELETING). When the
  5776. // schema is in the ACTIVE state, you can add data.
  5777. Status *string `locationName:"status" type:"string" enum:"SchemaStatus"`
  5778. }
  5779. // String returns the string representation
  5780. func (s StartSchemaCreationOutput) String() string {
  5781. return awsutil.Prettify(s)
  5782. }
  5783. // GoString returns the string representation
  5784. func (s StartSchemaCreationOutput) GoString() string {
  5785. return s.String()
  5786. }
  5787. // SetStatus sets the Status field's value.
  5788. func (s *StartSchemaCreationOutput) SetStatus(v string) *StartSchemaCreationOutput {
  5789. s.Status = &v
  5790. return s
  5791. }
  5792. // Describes a type.
  5793. type Type struct {
  5794. _ struct{} `type:"structure"`
  5795. // The type ARN.
  5796. Arn *string `locationName:"arn" type:"string"`
  5797. // The type definition.
  5798. Definition *string `locationName:"definition" type:"string"`
  5799. // The type description.
  5800. Description *string `locationName:"description" type:"string"`
  5801. // The type format: SDL or JSON.
  5802. Format *string `locationName:"format" type:"string" enum:"TypeDefinitionFormat"`
  5803. // The type name.
  5804. Name *string `locationName:"name" type:"string"`
  5805. }
  5806. // String returns the string representation
  5807. func (s Type) String() string {
  5808. return awsutil.Prettify(s)
  5809. }
  5810. // GoString returns the string representation
  5811. func (s Type) GoString() string {
  5812. return s.String()
  5813. }
  5814. // SetArn sets the Arn field's value.
  5815. func (s *Type) SetArn(v string) *Type {
  5816. s.Arn = &v
  5817. return s
  5818. }
  5819. // SetDefinition sets the Definition field's value.
  5820. func (s *Type) SetDefinition(v string) *Type {
  5821. s.Definition = &v
  5822. return s
  5823. }
  5824. // SetDescription sets the Description field's value.
  5825. func (s *Type) SetDescription(v string) *Type {
  5826. s.Description = &v
  5827. return s
  5828. }
  5829. // SetFormat sets the Format field's value.
  5830. func (s *Type) SetFormat(v string) *Type {
  5831. s.Format = &v
  5832. return s
  5833. }
  5834. // SetName sets the Name field's value.
  5835. func (s *Type) SetName(v string) *Type {
  5836. s.Name = &v
  5837. return s
  5838. }
  5839. type UpdateApiKeyInput struct {
  5840. _ struct{} `type:"structure"`
  5841. // The ID for the GraphQL API.
  5842. //
  5843. // ApiId is a required field
  5844. ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"`
  5845. // A description of the purpose of the API key.
  5846. Description *string `locationName:"description" type:"string"`
  5847. // The time from update time after which the API key expires. The date is represented
  5848. // as seconds since the epoch. For more information, see .
  5849. Expires *int64 `locationName:"expires" type:"long"`
  5850. // The API key ID.
  5851. //
  5852. // Id is a required field
  5853. Id *string `location:"uri" locationName:"id" type:"string" required:"true"`
  5854. }
  5855. // String returns the string representation
  5856. func (s UpdateApiKeyInput) String() string {
  5857. return awsutil.Prettify(s)
  5858. }
  5859. // GoString returns the string representation
  5860. func (s UpdateApiKeyInput) GoString() string {
  5861. return s.String()
  5862. }
  5863. // Validate inspects the fields of the type to determine if they are valid.
  5864. func (s *UpdateApiKeyInput) Validate() error {
  5865. invalidParams := request.ErrInvalidParams{Context: "UpdateApiKeyInput"}
  5866. if s.ApiId == nil {
  5867. invalidParams.Add(request.NewErrParamRequired("ApiId"))
  5868. }
  5869. if s.ApiId != nil && len(*s.ApiId) < 1 {
  5870. invalidParams.Add(request.NewErrParamMinLen("ApiId", 1))
  5871. }
  5872. if s.Id == nil {
  5873. invalidParams.Add(request.NewErrParamRequired("Id"))
  5874. }
  5875. if s.Id != nil && len(*s.Id) < 1 {
  5876. invalidParams.Add(request.NewErrParamMinLen("Id", 1))
  5877. }
  5878. if invalidParams.Len() > 0 {
  5879. return invalidParams
  5880. }
  5881. return nil
  5882. }
  5883. // SetApiId sets the ApiId field's value.
  5884. func (s *UpdateApiKeyInput) SetApiId(v string) *UpdateApiKeyInput {
  5885. s.ApiId = &v
  5886. return s
  5887. }
  5888. // SetDescription sets the Description field's value.
  5889. func (s *UpdateApiKeyInput) SetDescription(v string) *UpdateApiKeyInput {
  5890. s.Description = &v
  5891. return s
  5892. }
  5893. // SetExpires sets the Expires field's value.
  5894. func (s *UpdateApiKeyInput) SetExpires(v int64) *UpdateApiKeyInput {
  5895. s.Expires = &v
  5896. return s
  5897. }
  5898. // SetId sets the Id field's value.
  5899. func (s *UpdateApiKeyInput) SetId(v string) *UpdateApiKeyInput {
  5900. s.Id = &v
  5901. return s
  5902. }
  5903. type UpdateApiKeyOutput struct {
  5904. _ struct{} `type:"structure"`
  5905. // The API key.
  5906. ApiKey *ApiKey `locationName:"apiKey" type:"structure"`
  5907. }
  5908. // String returns the string representation
  5909. func (s UpdateApiKeyOutput) String() string {
  5910. return awsutil.Prettify(s)
  5911. }
  5912. // GoString returns the string representation
  5913. func (s UpdateApiKeyOutput) GoString() string {
  5914. return s.String()
  5915. }
  5916. // SetApiKey sets the ApiKey field's value.
  5917. func (s *UpdateApiKeyOutput) SetApiKey(v *ApiKey) *UpdateApiKeyOutput {
  5918. s.ApiKey = v
  5919. return s
  5920. }
  5921. type UpdateDataSourceInput struct {
  5922. _ struct{} `type:"structure"`
  5923. // The API ID.
  5924. //
  5925. // ApiId is a required field
  5926. ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"`
  5927. // The new description for the data source.
  5928. Description *string `locationName:"description" type:"string"`
  5929. // The new Amazon DynamoDB configuration.
  5930. DynamodbConfig *DynamodbDataSourceConfig `locationName:"dynamodbConfig" type:"structure"`
  5931. // The new Elasticsearch Service configuration.
  5932. ElasticsearchConfig *ElasticsearchDataSourceConfig `locationName:"elasticsearchConfig" type:"structure"`
  5933. // The new HTTP endpoint configuration.
  5934. HttpConfig *HttpDataSourceConfig `locationName:"httpConfig" type:"structure"`
  5935. // The new AWS Lambda configuration.
  5936. LambdaConfig *LambdaDataSourceConfig `locationName:"lambdaConfig" type:"structure"`
  5937. // The new name for the data source.
  5938. //
  5939. // Name is a required field
  5940. Name *string `location:"uri" locationName:"name" type:"string" required:"true"`
  5941. // The new relational database configuration.
  5942. RelationalDatabaseConfig *RelationalDatabaseDataSourceConfig `locationName:"relationalDatabaseConfig" type:"structure"`
  5943. // The new service role ARN for the data source.
  5944. ServiceRoleArn *string `locationName:"serviceRoleArn" type:"string"`
  5945. // The new data source type.
  5946. //
  5947. // Type is a required field
  5948. Type *string `locationName:"type" type:"string" required:"true" enum:"DataSourceType"`
  5949. }
  5950. // String returns the string representation
  5951. func (s UpdateDataSourceInput) String() string {
  5952. return awsutil.Prettify(s)
  5953. }
  5954. // GoString returns the string representation
  5955. func (s UpdateDataSourceInput) GoString() string {
  5956. return s.String()
  5957. }
  5958. // Validate inspects the fields of the type to determine if they are valid.
  5959. func (s *UpdateDataSourceInput) Validate() error {
  5960. invalidParams := request.ErrInvalidParams{Context: "UpdateDataSourceInput"}
  5961. if s.ApiId == nil {
  5962. invalidParams.Add(request.NewErrParamRequired("ApiId"))
  5963. }
  5964. if s.ApiId != nil && len(*s.ApiId) < 1 {
  5965. invalidParams.Add(request.NewErrParamMinLen("ApiId", 1))
  5966. }
  5967. if s.Name == nil {
  5968. invalidParams.Add(request.NewErrParamRequired("Name"))
  5969. }
  5970. if s.Name != nil && len(*s.Name) < 1 {
  5971. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  5972. }
  5973. if s.Type == nil {
  5974. invalidParams.Add(request.NewErrParamRequired("Type"))
  5975. }
  5976. if s.DynamodbConfig != nil {
  5977. if err := s.DynamodbConfig.Validate(); err != nil {
  5978. invalidParams.AddNested("DynamodbConfig", err.(request.ErrInvalidParams))
  5979. }
  5980. }
  5981. if s.ElasticsearchConfig != nil {
  5982. if err := s.ElasticsearchConfig.Validate(); err != nil {
  5983. invalidParams.AddNested("ElasticsearchConfig", err.(request.ErrInvalidParams))
  5984. }
  5985. }
  5986. if s.HttpConfig != nil {
  5987. if err := s.HttpConfig.Validate(); err != nil {
  5988. invalidParams.AddNested("HttpConfig", err.(request.ErrInvalidParams))
  5989. }
  5990. }
  5991. if s.LambdaConfig != nil {
  5992. if err := s.LambdaConfig.Validate(); err != nil {
  5993. invalidParams.AddNested("LambdaConfig", err.(request.ErrInvalidParams))
  5994. }
  5995. }
  5996. if invalidParams.Len() > 0 {
  5997. return invalidParams
  5998. }
  5999. return nil
  6000. }
  6001. // SetApiId sets the ApiId field's value.
  6002. func (s *UpdateDataSourceInput) SetApiId(v string) *UpdateDataSourceInput {
  6003. s.ApiId = &v
  6004. return s
  6005. }
  6006. // SetDescription sets the Description field's value.
  6007. func (s *UpdateDataSourceInput) SetDescription(v string) *UpdateDataSourceInput {
  6008. s.Description = &v
  6009. return s
  6010. }
  6011. // SetDynamodbConfig sets the DynamodbConfig field's value.
  6012. func (s *UpdateDataSourceInput) SetDynamodbConfig(v *DynamodbDataSourceConfig) *UpdateDataSourceInput {
  6013. s.DynamodbConfig = v
  6014. return s
  6015. }
  6016. // SetElasticsearchConfig sets the ElasticsearchConfig field's value.
  6017. func (s *UpdateDataSourceInput) SetElasticsearchConfig(v *ElasticsearchDataSourceConfig) *UpdateDataSourceInput {
  6018. s.ElasticsearchConfig = v
  6019. return s
  6020. }
  6021. // SetHttpConfig sets the HttpConfig field's value.
  6022. func (s *UpdateDataSourceInput) SetHttpConfig(v *HttpDataSourceConfig) *UpdateDataSourceInput {
  6023. s.HttpConfig = v
  6024. return s
  6025. }
  6026. // SetLambdaConfig sets the LambdaConfig field's value.
  6027. func (s *UpdateDataSourceInput) SetLambdaConfig(v *LambdaDataSourceConfig) *UpdateDataSourceInput {
  6028. s.LambdaConfig = v
  6029. return s
  6030. }
  6031. // SetName sets the Name field's value.
  6032. func (s *UpdateDataSourceInput) SetName(v string) *UpdateDataSourceInput {
  6033. s.Name = &v
  6034. return s
  6035. }
  6036. // SetRelationalDatabaseConfig sets the RelationalDatabaseConfig field's value.
  6037. func (s *UpdateDataSourceInput) SetRelationalDatabaseConfig(v *RelationalDatabaseDataSourceConfig) *UpdateDataSourceInput {
  6038. s.RelationalDatabaseConfig = v
  6039. return s
  6040. }
  6041. // SetServiceRoleArn sets the ServiceRoleArn field's value.
  6042. func (s *UpdateDataSourceInput) SetServiceRoleArn(v string) *UpdateDataSourceInput {
  6043. s.ServiceRoleArn = &v
  6044. return s
  6045. }
  6046. // SetType sets the Type field's value.
  6047. func (s *UpdateDataSourceInput) SetType(v string) *UpdateDataSourceInput {
  6048. s.Type = &v
  6049. return s
  6050. }
  6051. type UpdateDataSourceOutput struct {
  6052. _ struct{} `type:"structure"`
  6053. // The updated DataSource object.
  6054. DataSource *DataSource `locationName:"dataSource" type:"structure"`
  6055. }
  6056. // String returns the string representation
  6057. func (s UpdateDataSourceOutput) String() string {
  6058. return awsutil.Prettify(s)
  6059. }
  6060. // GoString returns the string representation
  6061. func (s UpdateDataSourceOutput) GoString() string {
  6062. return s.String()
  6063. }
  6064. // SetDataSource sets the DataSource field's value.
  6065. func (s *UpdateDataSourceOutput) SetDataSource(v *DataSource) *UpdateDataSourceOutput {
  6066. s.DataSource = v
  6067. return s
  6068. }
  6069. type UpdateFunctionInput struct {
  6070. _ struct{} `type:"structure"`
  6071. // The GraphQL API ID.
  6072. //
  6073. // ApiId is a required field
  6074. ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"`
  6075. // The FunctionDataSource name.
  6076. //
  6077. // DataSourceName is a required field
  6078. DataSourceName *string `locationName:"dataSourceName" type:"string" required:"true"`
  6079. // The Function description.
  6080. Description *string `locationName:"description" type:"string"`
  6081. // The function ID.
  6082. //
  6083. // FunctionId is a required field
  6084. FunctionId *string `location:"uri" locationName:"functionId" type:"string" required:"true"`
  6085. // The version of the request mapping template. Currently the supported value
  6086. // is 2018-05-29.
  6087. //
  6088. // FunctionVersion is a required field
  6089. FunctionVersion *string `locationName:"functionVersion" type:"string" required:"true"`
  6090. // The Function name.
  6091. //
  6092. // Name is a required field
  6093. Name *string `locationName:"name" type:"string" required:"true"`
  6094. // The Function request mapping template. Functions support only the 2018-05-29
  6095. // version of the request mapping template.
  6096. //
  6097. // RequestMappingTemplate is a required field
  6098. RequestMappingTemplate *string `locationName:"requestMappingTemplate" min:"1" type:"string" required:"true"`
  6099. // The Function request mapping template.
  6100. ResponseMappingTemplate *string `locationName:"responseMappingTemplate" min:"1" type:"string"`
  6101. }
  6102. // String returns the string representation
  6103. func (s UpdateFunctionInput) String() string {
  6104. return awsutil.Prettify(s)
  6105. }
  6106. // GoString returns the string representation
  6107. func (s UpdateFunctionInput) GoString() string {
  6108. return s.String()
  6109. }
  6110. // Validate inspects the fields of the type to determine if they are valid.
  6111. func (s *UpdateFunctionInput) Validate() error {
  6112. invalidParams := request.ErrInvalidParams{Context: "UpdateFunctionInput"}
  6113. if s.ApiId == nil {
  6114. invalidParams.Add(request.NewErrParamRequired("ApiId"))
  6115. }
  6116. if s.ApiId != nil && len(*s.ApiId) < 1 {
  6117. invalidParams.Add(request.NewErrParamMinLen("ApiId", 1))
  6118. }
  6119. if s.DataSourceName == nil {
  6120. invalidParams.Add(request.NewErrParamRequired("DataSourceName"))
  6121. }
  6122. if s.FunctionId == nil {
  6123. invalidParams.Add(request.NewErrParamRequired("FunctionId"))
  6124. }
  6125. if s.FunctionId != nil && len(*s.FunctionId) < 1 {
  6126. invalidParams.Add(request.NewErrParamMinLen("FunctionId", 1))
  6127. }
  6128. if s.FunctionVersion == nil {
  6129. invalidParams.Add(request.NewErrParamRequired("FunctionVersion"))
  6130. }
  6131. if s.Name == nil {
  6132. invalidParams.Add(request.NewErrParamRequired("Name"))
  6133. }
  6134. if s.RequestMappingTemplate == nil {
  6135. invalidParams.Add(request.NewErrParamRequired("RequestMappingTemplate"))
  6136. }
  6137. if s.RequestMappingTemplate != nil && len(*s.RequestMappingTemplate) < 1 {
  6138. invalidParams.Add(request.NewErrParamMinLen("RequestMappingTemplate", 1))
  6139. }
  6140. if s.ResponseMappingTemplate != nil && len(*s.ResponseMappingTemplate) < 1 {
  6141. invalidParams.Add(request.NewErrParamMinLen("ResponseMappingTemplate", 1))
  6142. }
  6143. if invalidParams.Len() > 0 {
  6144. return invalidParams
  6145. }
  6146. return nil
  6147. }
  6148. // SetApiId sets the ApiId field's value.
  6149. func (s *UpdateFunctionInput) SetApiId(v string) *UpdateFunctionInput {
  6150. s.ApiId = &v
  6151. return s
  6152. }
  6153. // SetDataSourceName sets the DataSourceName field's value.
  6154. func (s *UpdateFunctionInput) SetDataSourceName(v string) *UpdateFunctionInput {
  6155. s.DataSourceName = &v
  6156. return s
  6157. }
  6158. // SetDescription sets the Description field's value.
  6159. func (s *UpdateFunctionInput) SetDescription(v string) *UpdateFunctionInput {
  6160. s.Description = &v
  6161. return s
  6162. }
  6163. // SetFunctionId sets the FunctionId field's value.
  6164. func (s *UpdateFunctionInput) SetFunctionId(v string) *UpdateFunctionInput {
  6165. s.FunctionId = &v
  6166. return s
  6167. }
  6168. // SetFunctionVersion sets the FunctionVersion field's value.
  6169. func (s *UpdateFunctionInput) SetFunctionVersion(v string) *UpdateFunctionInput {
  6170. s.FunctionVersion = &v
  6171. return s
  6172. }
  6173. // SetName sets the Name field's value.
  6174. func (s *UpdateFunctionInput) SetName(v string) *UpdateFunctionInput {
  6175. s.Name = &v
  6176. return s
  6177. }
  6178. // SetRequestMappingTemplate sets the RequestMappingTemplate field's value.
  6179. func (s *UpdateFunctionInput) SetRequestMappingTemplate(v string) *UpdateFunctionInput {
  6180. s.RequestMappingTemplate = &v
  6181. return s
  6182. }
  6183. // SetResponseMappingTemplate sets the ResponseMappingTemplate field's value.
  6184. func (s *UpdateFunctionInput) SetResponseMappingTemplate(v string) *UpdateFunctionInput {
  6185. s.ResponseMappingTemplate = &v
  6186. return s
  6187. }
  6188. type UpdateFunctionOutput struct {
  6189. _ struct{} `type:"structure"`
  6190. // The Function object.
  6191. FunctionConfiguration *FunctionConfiguration `locationName:"functionConfiguration" type:"structure"`
  6192. }
  6193. // String returns the string representation
  6194. func (s UpdateFunctionOutput) String() string {
  6195. return awsutil.Prettify(s)
  6196. }
  6197. // GoString returns the string representation
  6198. func (s UpdateFunctionOutput) GoString() string {
  6199. return s.String()
  6200. }
  6201. // SetFunctionConfiguration sets the FunctionConfiguration field's value.
  6202. func (s *UpdateFunctionOutput) SetFunctionConfiguration(v *FunctionConfiguration) *UpdateFunctionOutput {
  6203. s.FunctionConfiguration = v
  6204. return s
  6205. }
  6206. type UpdateGraphqlApiInput struct {
  6207. _ struct{} `type:"structure"`
  6208. // The API ID.
  6209. //
  6210. // ApiId is a required field
  6211. ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"`
  6212. // The new authentication type for the GraphqlApi object.
  6213. AuthenticationType *string `locationName:"authenticationType" type:"string" enum:"AuthenticationType"`
  6214. // The Amazon CloudWatch Logs configuration for the GraphqlApi object.
  6215. LogConfig *LogConfig `locationName:"logConfig" type:"structure"`
  6216. // The new name for the GraphqlApi object.
  6217. //
  6218. // Name is a required field
  6219. Name *string `locationName:"name" type:"string" required:"true"`
  6220. // The OpenID Connect configuration for the GraphqlApi object.
  6221. OpenIDConnectConfig *OpenIDConnectConfig `locationName:"openIDConnectConfig" type:"structure"`
  6222. // The new Amazon Cognito user pool configuration for the GraphqlApi object.
  6223. UserPoolConfig *UserPoolConfig `locationName:"userPoolConfig" type:"structure"`
  6224. }
  6225. // String returns the string representation
  6226. func (s UpdateGraphqlApiInput) String() string {
  6227. return awsutil.Prettify(s)
  6228. }
  6229. // GoString returns the string representation
  6230. func (s UpdateGraphqlApiInput) GoString() string {
  6231. return s.String()
  6232. }
  6233. // Validate inspects the fields of the type to determine if they are valid.
  6234. func (s *UpdateGraphqlApiInput) Validate() error {
  6235. invalidParams := request.ErrInvalidParams{Context: "UpdateGraphqlApiInput"}
  6236. if s.ApiId == nil {
  6237. invalidParams.Add(request.NewErrParamRequired("ApiId"))
  6238. }
  6239. if s.ApiId != nil && len(*s.ApiId) < 1 {
  6240. invalidParams.Add(request.NewErrParamMinLen("ApiId", 1))
  6241. }
  6242. if s.Name == nil {
  6243. invalidParams.Add(request.NewErrParamRequired("Name"))
  6244. }
  6245. if s.LogConfig != nil {
  6246. if err := s.LogConfig.Validate(); err != nil {
  6247. invalidParams.AddNested("LogConfig", err.(request.ErrInvalidParams))
  6248. }
  6249. }
  6250. if s.OpenIDConnectConfig != nil {
  6251. if err := s.OpenIDConnectConfig.Validate(); err != nil {
  6252. invalidParams.AddNested("OpenIDConnectConfig", err.(request.ErrInvalidParams))
  6253. }
  6254. }
  6255. if s.UserPoolConfig != nil {
  6256. if err := s.UserPoolConfig.Validate(); err != nil {
  6257. invalidParams.AddNested("UserPoolConfig", err.(request.ErrInvalidParams))
  6258. }
  6259. }
  6260. if invalidParams.Len() > 0 {
  6261. return invalidParams
  6262. }
  6263. return nil
  6264. }
  6265. // SetApiId sets the ApiId field's value.
  6266. func (s *UpdateGraphqlApiInput) SetApiId(v string) *UpdateGraphqlApiInput {
  6267. s.ApiId = &v
  6268. return s
  6269. }
  6270. // SetAuthenticationType sets the AuthenticationType field's value.
  6271. func (s *UpdateGraphqlApiInput) SetAuthenticationType(v string) *UpdateGraphqlApiInput {
  6272. s.AuthenticationType = &v
  6273. return s
  6274. }
  6275. // SetLogConfig sets the LogConfig field's value.
  6276. func (s *UpdateGraphqlApiInput) SetLogConfig(v *LogConfig) *UpdateGraphqlApiInput {
  6277. s.LogConfig = v
  6278. return s
  6279. }
  6280. // SetName sets the Name field's value.
  6281. func (s *UpdateGraphqlApiInput) SetName(v string) *UpdateGraphqlApiInput {
  6282. s.Name = &v
  6283. return s
  6284. }
  6285. // SetOpenIDConnectConfig sets the OpenIDConnectConfig field's value.
  6286. func (s *UpdateGraphqlApiInput) SetOpenIDConnectConfig(v *OpenIDConnectConfig) *UpdateGraphqlApiInput {
  6287. s.OpenIDConnectConfig = v
  6288. return s
  6289. }
  6290. // SetUserPoolConfig sets the UserPoolConfig field's value.
  6291. func (s *UpdateGraphqlApiInput) SetUserPoolConfig(v *UserPoolConfig) *UpdateGraphqlApiInput {
  6292. s.UserPoolConfig = v
  6293. return s
  6294. }
  6295. type UpdateGraphqlApiOutput struct {
  6296. _ struct{} `type:"structure"`
  6297. // The updated GraphqlApi object.
  6298. GraphqlApi *GraphqlApi `locationName:"graphqlApi" type:"structure"`
  6299. }
  6300. // String returns the string representation
  6301. func (s UpdateGraphqlApiOutput) String() string {
  6302. return awsutil.Prettify(s)
  6303. }
  6304. // GoString returns the string representation
  6305. func (s UpdateGraphqlApiOutput) GoString() string {
  6306. return s.String()
  6307. }
  6308. // SetGraphqlApi sets the GraphqlApi field's value.
  6309. func (s *UpdateGraphqlApiOutput) SetGraphqlApi(v *GraphqlApi) *UpdateGraphqlApiOutput {
  6310. s.GraphqlApi = v
  6311. return s
  6312. }
  6313. type UpdateResolverInput struct {
  6314. _ struct{} `type:"structure"`
  6315. // The API ID.
  6316. //
  6317. // ApiId is a required field
  6318. ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"`
  6319. // The new data source name.
  6320. DataSourceName *string `locationName:"dataSourceName" type:"string"`
  6321. // The new field name.
  6322. //
  6323. // FieldName is a required field
  6324. FieldName *string `location:"uri" locationName:"fieldName" type:"string" required:"true"`
  6325. // The resolver type.
  6326. //
  6327. // * UNIT: A UNIT resolver type. A UNIT resolver is the default resolver
  6328. // type. A UNIT resolver enables you to execute a GraphQL query against a
  6329. // single data source.
  6330. //
  6331. // * PIPELINE: A PIPELINE resolver type. A PIPELINE resolver enables you
  6332. // to execute a series of Function in a serial manner. You can use a pipeline
  6333. // resolver to execute a GraphQL query against multiple data sources.
  6334. Kind *string `locationName:"kind" type:"string" enum:"ResolverKind"`
  6335. // The PipelineConfig.
  6336. PipelineConfig *PipelineConfig `locationName:"pipelineConfig" type:"structure"`
  6337. // The new request mapping template.
  6338. //
  6339. // RequestMappingTemplate is a required field
  6340. RequestMappingTemplate *string `locationName:"requestMappingTemplate" min:"1" type:"string" required:"true"`
  6341. // The new response mapping template.
  6342. ResponseMappingTemplate *string `locationName:"responseMappingTemplate" min:"1" type:"string"`
  6343. // The new type name.
  6344. //
  6345. // TypeName is a required field
  6346. TypeName *string `location:"uri" locationName:"typeName" type:"string" required:"true"`
  6347. }
  6348. // String returns the string representation
  6349. func (s UpdateResolverInput) String() string {
  6350. return awsutil.Prettify(s)
  6351. }
  6352. // GoString returns the string representation
  6353. func (s UpdateResolverInput) GoString() string {
  6354. return s.String()
  6355. }
  6356. // Validate inspects the fields of the type to determine if they are valid.
  6357. func (s *UpdateResolverInput) Validate() error {
  6358. invalidParams := request.ErrInvalidParams{Context: "UpdateResolverInput"}
  6359. if s.ApiId == nil {
  6360. invalidParams.Add(request.NewErrParamRequired("ApiId"))
  6361. }
  6362. if s.ApiId != nil && len(*s.ApiId) < 1 {
  6363. invalidParams.Add(request.NewErrParamMinLen("ApiId", 1))
  6364. }
  6365. if s.FieldName == nil {
  6366. invalidParams.Add(request.NewErrParamRequired("FieldName"))
  6367. }
  6368. if s.FieldName != nil && len(*s.FieldName) < 1 {
  6369. invalidParams.Add(request.NewErrParamMinLen("FieldName", 1))
  6370. }
  6371. if s.RequestMappingTemplate == nil {
  6372. invalidParams.Add(request.NewErrParamRequired("RequestMappingTemplate"))
  6373. }
  6374. if s.RequestMappingTemplate != nil && len(*s.RequestMappingTemplate) < 1 {
  6375. invalidParams.Add(request.NewErrParamMinLen("RequestMappingTemplate", 1))
  6376. }
  6377. if s.ResponseMappingTemplate != nil && len(*s.ResponseMappingTemplate) < 1 {
  6378. invalidParams.Add(request.NewErrParamMinLen("ResponseMappingTemplate", 1))
  6379. }
  6380. if s.TypeName == nil {
  6381. invalidParams.Add(request.NewErrParamRequired("TypeName"))
  6382. }
  6383. if s.TypeName != nil && len(*s.TypeName) < 1 {
  6384. invalidParams.Add(request.NewErrParamMinLen("TypeName", 1))
  6385. }
  6386. if invalidParams.Len() > 0 {
  6387. return invalidParams
  6388. }
  6389. return nil
  6390. }
  6391. // SetApiId sets the ApiId field's value.
  6392. func (s *UpdateResolverInput) SetApiId(v string) *UpdateResolverInput {
  6393. s.ApiId = &v
  6394. return s
  6395. }
  6396. // SetDataSourceName sets the DataSourceName field's value.
  6397. func (s *UpdateResolverInput) SetDataSourceName(v string) *UpdateResolverInput {
  6398. s.DataSourceName = &v
  6399. return s
  6400. }
  6401. // SetFieldName sets the FieldName field's value.
  6402. func (s *UpdateResolverInput) SetFieldName(v string) *UpdateResolverInput {
  6403. s.FieldName = &v
  6404. return s
  6405. }
  6406. // SetKind sets the Kind field's value.
  6407. func (s *UpdateResolverInput) SetKind(v string) *UpdateResolverInput {
  6408. s.Kind = &v
  6409. return s
  6410. }
  6411. // SetPipelineConfig sets the PipelineConfig field's value.
  6412. func (s *UpdateResolverInput) SetPipelineConfig(v *PipelineConfig) *UpdateResolverInput {
  6413. s.PipelineConfig = v
  6414. return s
  6415. }
  6416. // SetRequestMappingTemplate sets the RequestMappingTemplate field's value.
  6417. func (s *UpdateResolverInput) SetRequestMappingTemplate(v string) *UpdateResolverInput {
  6418. s.RequestMappingTemplate = &v
  6419. return s
  6420. }
  6421. // SetResponseMappingTemplate sets the ResponseMappingTemplate field's value.
  6422. func (s *UpdateResolverInput) SetResponseMappingTemplate(v string) *UpdateResolverInput {
  6423. s.ResponseMappingTemplate = &v
  6424. return s
  6425. }
  6426. // SetTypeName sets the TypeName field's value.
  6427. func (s *UpdateResolverInput) SetTypeName(v string) *UpdateResolverInput {
  6428. s.TypeName = &v
  6429. return s
  6430. }
  6431. type UpdateResolverOutput struct {
  6432. _ struct{} `type:"structure"`
  6433. // The updated Resolver object.
  6434. Resolver *Resolver `locationName:"resolver" type:"structure"`
  6435. }
  6436. // String returns the string representation
  6437. func (s UpdateResolverOutput) String() string {
  6438. return awsutil.Prettify(s)
  6439. }
  6440. // GoString returns the string representation
  6441. func (s UpdateResolverOutput) GoString() string {
  6442. return s.String()
  6443. }
  6444. // SetResolver sets the Resolver field's value.
  6445. func (s *UpdateResolverOutput) SetResolver(v *Resolver) *UpdateResolverOutput {
  6446. s.Resolver = v
  6447. return s
  6448. }
  6449. type UpdateTypeInput struct {
  6450. _ struct{} `type:"structure"`
  6451. // The API ID.
  6452. //
  6453. // ApiId is a required field
  6454. ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"`
  6455. // The new definition.
  6456. Definition *string `locationName:"definition" type:"string"`
  6457. // The new type format: SDL or JSON.
  6458. //
  6459. // Format is a required field
  6460. Format *string `locationName:"format" type:"string" required:"true" enum:"TypeDefinitionFormat"`
  6461. // The new type name.
  6462. //
  6463. // TypeName is a required field
  6464. TypeName *string `location:"uri" locationName:"typeName" type:"string" required:"true"`
  6465. }
  6466. // String returns the string representation
  6467. func (s UpdateTypeInput) String() string {
  6468. return awsutil.Prettify(s)
  6469. }
  6470. // GoString returns the string representation
  6471. func (s UpdateTypeInput) GoString() string {
  6472. return s.String()
  6473. }
  6474. // Validate inspects the fields of the type to determine if they are valid.
  6475. func (s *UpdateTypeInput) Validate() error {
  6476. invalidParams := request.ErrInvalidParams{Context: "UpdateTypeInput"}
  6477. if s.ApiId == nil {
  6478. invalidParams.Add(request.NewErrParamRequired("ApiId"))
  6479. }
  6480. if s.ApiId != nil && len(*s.ApiId) < 1 {
  6481. invalidParams.Add(request.NewErrParamMinLen("ApiId", 1))
  6482. }
  6483. if s.Format == nil {
  6484. invalidParams.Add(request.NewErrParamRequired("Format"))
  6485. }
  6486. if s.TypeName == nil {
  6487. invalidParams.Add(request.NewErrParamRequired("TypeName"))
  6488. }
  6489. if s.TypeName != nil && len(*s.TypeName) < 1 {
  6490. invalidParams.Add(request.NewErrParamMinLen("TypeName", 1))
  6491. }
  6492. if invalidParams.Len() > 0 {
  6493. return invalidParams
  6494. }
  6495. return nil
  6496. }
  6497. // SetApiId sets the ApiId field's value.
  6498. func (s *UpdateTypeInput) SetApiId(v string) *UpdateTypeInput {
  6499. s.ApiId = &v
  6500. return s
  6501. }
  6502. // SetDefinition sets the Definition field's value.
  6503. func (s *UpdateTypeInput) SetDefinition(v string) *UpdateTypeInput {
  6504. s.Definition = &v
  6505. return s
  6506. }
  6507. // SetFormat sets the Format field's value.
  6508. func (s *UpdateTypeInput) SetFormat(v string) *UpdateTypeInput {
  6509. s.Format = &v
  6510. return s
  6511. }
  6512. // SetTypeName sets the TypeName field's value.
  6513. func (s *UpdateTypeInput) SetTypeName(v string) *UpdateTypeInput {
  6514. s.TypeName = &v
  6515. return s
  6516. }
  6517. type UpdateTypeOutput struct {
  6518. _ struct{} `type:"structure"`
  6519. // The updated Type object.
  6520. Type *Type `locationName:"type" type:"structure"`
  6521. }
  6522. // String returns the string representation
  6523. func (s UpdateTypeOutput) String() string {
  6524. return awsutil.Prettify(s)
  6525. }
  6526. // GoString returns the string representation
  6527. func (s UpdateTypeOutput) GoString() string {
  6528. return s.String()
  6529. }
  6530. // SetType sets the Type field's value.
  6531. func (s *UpdateTypeOutput) SetType(v *Type) *UpdateTypeOutput {
  6532. s.Type = v
  6533. return s
  6534. }
  6535. // Describes an Amazon Cognito user pool configuration.
  6536. type UserPoolConfig struct {
  6537. _ struct{} `type:"structure"`
  6538. // A regular expression for validating the incoming Amazon Cognito user pool
  6539. // app client ID.
  6540. AppIdClientRegex *string `locationName:"appIdClientRegex" type:"string"`
  6541. // The AWS Region in which the user pool was created.
  6542. //
  6543. // AwsRegion is a required field
  6544. AwsRegion *string `locationName:"awsRegion" type:"string" required:"true"`
  6545. // The action that you want your GraphQL API to take when a request that uses
  6546. // Amazon Cognito user pool authentication doesn't match the Amazon Cognito
  6547. // user pool configuration.
  6548. //
  6549. // DefaultAction is a required field
  6550. DefaultAction *string `locationName:"defaultAction" type:"string" required:"true" enum:"DefaultAction"`
  6551. // The user pool ID.
  6552. //
  6553. // UserPoolId is a required field
  6554. UserPoolId *string `locationName:"userPoolId" type:"string" required:"true"`
  6555. }
  6556. // String returns the string representation
  6557. func (s UserPoolConfig) String() string {
  6558. return awsutil.Prettify(s)
  6559. }
  6560. // GoString returns the string representation
  6561. func (s UserPoolConfig) GoString() string {
  6562. return s.String()
  6563. }
  6564. // Validate inspects the fields of the type to determine if they are valid.
  6565. func (s *UserPoolConfig) Validate() error {
  6566. invalidParams := request.ErrInvalidParams{Context: "UserPoolConfig"}
  6567. if s.AwsRegion == nil {
  6568. invalidParams.Add(request.NewErrParamRequired("AwsRegion"))
  6569. }
  6570. if s.DefaultAction == nil {
  6571. invalidParams.Add(request.NewErrParamRequired("DefaultAction"))
  6572. }
  6573. if s.UserPoolId == nil {
  6574. invalidParams.Add(request.NewErrParamRequired("UserPoolId"))
  6575. }
  6576. if invalidParams.Len() > 0 {
  6577. return invalidParams
  6578. }
  6579. return nil
  6580. }
  6581. // SetAppIdClientRegex sets the AppIdClientRegex field's value.
  6582. func (s *UserPoolConfig) SetAppIdClientRegex(v string) *UserPoolConfig {
  6583. s.AppIdClientRegex = &v
  6584. return s
  6585. }
  6586. // SetAwsRegion sets the AwsRegion field's value.
  6587. func (s *UserPoolConfig) SetAwsRegion(v string) *UserPoolConfig {
  6588. s.AwsRegion = &v
  6589. return s
  6590. }
  6591. // SetDefaultAction sets the DefaultAction field's value.
  6592. func (s *UserPoolConfig) SetDefaultAction(v string) *UserPoolConfig {
  6593. s.DefaultAction = &v
  6594. return s
  6595. }
  6596. // SetUserPoolId sets the UserPoolId field's value.
  6597. func (s *UserPoolConfig) SetUserPoolId(v string) *UserPoolConfig {
  6598. s.UserPoolId = &v
  6599. return s
  6600. }
  6601. const (
  6602. // AuthenticationTypeApiKey is a AuthenticationType enum value
  6603. AuthenticationTypeApiKey = "API_KEY"
  6604. // AuthenticationTypeAwsIam is a AuthenticationType enum value
  6605. AuthenticationTypeAwsIam = "AWS_IAM"
  6606. // AuthenticationTypeAmazonCognitoUserPools is a AuthenticationType enum value
  6607. AuthenticationTypeAmazonCognitoUserPools = "AMAZON_COGNITO_USER_POOLS"
  6608. // AuthenticationTypeOpenidConnect is a AuthenticationType enum value
  6609. AuthenticationTypeOpenidConnect = "OPENID_CONNECT"
  6610. )
  6611. const (
  6612. // AuthorizationTypeAwsIam is a AuthorizationType enum value
  6613. AuthorizationTypeAwsIam = "AWS_IAM"
  6614. )
  6615. const (
  6616. // DataSourceTypeAwsLambda is a DataSourceType enum value
  6617. DataSourceTypeAwsLambda = "AWS_LAMBDA"
  6618. // DataSourceTypeAmazonDynamodb is a DataSourceType enum value
  6619. DataSourceTypeAmazonDynamodb = "AMAZON_DYNAMODB"
  6620. // DataSourceTypeAmazonElasticsearch is a DataSourceType enum value
  6621. DataSourceTypeAmazonElasticsearch = "AMAZON_ELASTICSEARCH"
  6622. // DataSourceTypeNone is a DataSourceType enum value
  6623. DataSourceTypeNone = "NONE"
  6624. // DataSourceTypeHttp is a DataSourceType enum value
  6625. DataSourceTypeHttp = "HTTP"
  6626. // DataSourceTypeRelationalDatabase is a DataSourceType enum value
  6627. DataSourceTypeRelationalDatabase = "RELATIONAL_DATABASE"
  6628. )
  6629. const (
  6630. // DefaultActionAllow is a DefaultAction enum value
  6631. DefaultActionAllow = "ALLOW"
  6632. // DefaultActionDeny is a DefaultAction enum value
  6633. DefaultActionDeny = "DENY"
  6634. )
  6635. const (
  6636. // FieldLogLevelNone is a FieldLogLevel enum value
  6637. FieldLogLevelNone = "NONE"
  6638. // FieldLogLevelError is a FieldLogLevel enum value
  6639. FieldLogLevelError = "ERROR"
  6640. // FieldLogLevelAll is a FieldLogLevel enum value
  6641. FieldLogLevelAll = "ALL"
  6642. )
  6643. const (
  6644. // OutputTypeSdl is a OutputType enum value
  6645. OutputTypeSdl = "SDL"
  6646. // OutputTypeJson is a OutputType enum value
  6647. OutputTypeJson = "JSON"
  6648. )
  6649. const (
  6650. // RelationalDatabaseSourceTypeRdsHttpEndpoint is a RelationalDatabaseSourceType enum value
  6651. RelationalDatabaseSourceTypeRdsHttpEndpoint = "RDS_HTTP_ENDPOINT"
  6652. )
  6653. const (
  6654. // ResolverKindUnit is a ResolverKind enum value
  6655. ResolverKindUnit = "UNIT"
  6656. // ResolverKindPipeline is a ResolverKind enum value
  6657. ResolverKindPipeline = "PIPELINE"
  6658. )
  6659. const (
  6660. // SchemaStatusProcessing is a SchemaStatus enum value
  6661. SchemaStatusProcessing = "PROCESSING"
  6662. // SchemaStatusActive is a SchemaStatus enum value
  6663. SchemaStatusActive = "ACTIVE"
  6664. // SchemaStatusDeleting is a SchemaStatus enum value
  6665. SchemaStatusDeleting = "DELETING"
  6666. )
  6667. const (
  6668. // TypeDefinitionFormatSdl is a TypeDefinitionFormat enum value
  6669. TypeDefinitionFormatSdl = "SDL"
  6670. // TypeDefinitionFormatJson is a TypeDefinitionFormat enum value
  6671. TypeDefinitionFormatJson = "JSON"
  6672. )