api.go 308 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035
  1. // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
  2. // Package waf provides a client for AWS WAF.
  3. package waf
  4. import (
  5. "fmt"
  6. "time"
  7. "github.com/aws/aws-sdk-go/aws/awsutil"
  8. "github.com/aws/aws-sdk-go/aws/request"
  9. )
  10. const opCreateByteMatchSet = "CreateByteMatchSet"
  11. // CreateByteMatchSetRequest generates a "aws/request.Request" representing the
  12. // client's request for the CreateByteMatchSet operation. The "output" return
  13. // value can be used to capture response data after the request's "Send" method
  14. // is called.
  15. //
  16. // See CreateByteMatchSet for usage and error information.
  17. //
  18. // Creating a request object using this method should be used when you want to inject
  19. // custom logic into the request's lifecycle using a custom handler, or if you want to
  20. // access properties on the request object before or after sending the request. If
  21. // you just want the service response, call the CreateByteMatchSet method directly
  22. // instead.
  23. //
  24. // Note: You must call the "Send" method on the returned request object in order
  25. // to execute the request.
  26. //
  27. // // Example sending a request using the CreateByteMatchSetRequest method.
  28. // req, resp := client.CreateByteMatchSetRequest(params)
  29. //
  30. // err := req.Send()
  31. // if err == nil { // resp is now filled
  32. // fmt.Println(resp)
  33. // }
  34. //
  35. func (c *WAF) CreateByteMatchSetRequest(input *CreateByteMatchSetInput) (req *request.Request, output *CreateByteMatchSetOutput) {
  36. op := &request.Operation{
  37. Name: opCreateByteMatchSet,
  38. HTTPMethod: "POST",
  39. HTTPPath: "/",
  40. }
  41. if input == nil {
  42. input = &CreateByteMatchSetInput{}
  43. }
  44. req = c.newRequest(op, input, output)
  45. output = &CreateByteMatchSetOutput{}
  46. req.Data = output
  47. return
  48. }
  49. // CreateByteMatchSet API operation for AWS WAF.
  50. //
  51. // Creates a ByteMatchSet. You then use UpdateByteMatchSet to identify the part
  52. // of a web request that you want AWS WAF to inspect, such as the values of
  53. // the User-Agent header or the query string. For example, you can create a
  54. // ByteMatchSet that matches any requests with User-Agent headers that contain
  55. // the string BadBot. You can then configure AWS WAF to reject those requests.
  56. //
  57. // To create and configure a ByteMatchSet, perform the following steps:
  58. //
  59. // Use GetChangeToken to get the change token that you provide in the ChangeToken
  60. // parameter of a CreateByteMatchSet request.
  61. //
  62. // Submit a CreateByteMatchSet request.
  63. //
  64. // Use GetChangeToken to get the change token that you provide in the ChangeToken
  65. // parameter of an UpdateByteMatchSet request.
  66. //
  67. // Submit an UpdateByteMatchSet request to specify the part of the request that
  68. // you want AWS WAF to inspect (for example, the header or the URI) and the
  69. // value that you want AWS WAF to watch for.
  70. //
  71. // For more information about how to use the AWS WAF API to allow or block HTTP
  72. // requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/).
  73. //
  74. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  75. // with awserr.Error's Code and Message methods to get detailed information about
  76. // the error.
  77. //
  78. // See the AWS API reference guide for AWS WAF's
  79. // API operation CreateByteMatchSet for usage and error information.
  80. //
  81. // Returned Error Codes:
  82. // * DisallowedNameException
  83. // The name specified is invalid.
  84. //
  85. // * InternalErrorException
  86. // The operation failed because of a system problem, even though the request
  87. // was valid. Retry your request.
  88. //
  89. // * InvalidAccountException
  90. // The operation failed because you tried to create, update, or delete an object
  91. // by using an invalid account identifier.
  92. //
  93. // * InvalidParameterException
  94. // The operation failed because AWS WAF didn't recognize a parameter in the
  95. // request. For example:
  96. //
  97. // * You specified an invalid parameter name.
  98. //
  99. // * You specified an invalid value.
  100. //
  101. // * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL)
  102. // using an action other than INSERT or DELETE.
  103. //
  104. // * You tried to create a WebACL with a DefaultActionType other than ALLOW,
  105. // BLOCK, or COUNT.
  106. //
  107. // * You tried to update a WebACL with a WafActionType other than ALLOW,
  108. // BLOCK, or COUNT.
  109. //
  110. // * You tried to update a ByteMatchSet with a FieldToMatchType other than
  111. // HEADER, QUERY_STRING, or URI.
  112. //
  113. // * You tried to update a ByteMatchSet with a Field of HEADER but no value
  114. // for Data.
  115. //
  116. // * StaleDataException
  117. // The operation failed because you tried to create, update, or delete an object
  118. // by using a change token that has already been used.
  119. //
  120. // * LimitsExceededException
  121. // The operation exceeds a resource limit, for example, the maximum number of
  122. // WebACL objects that you can create for an AWS account. For more information,
  123. // see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
  124. // in the AWS WAF Developer Guide.
  125. //
  126. func (c *WAF) CreateByteMatchSet(input *CreateByteMatchSetInput) (*CreateByteMatchSetOutput, error) {
  127. req, out := c.CreateByteMatchSetRequest(input)
  128. err := req.Send()
  129. return out, err
  130. }
  131. const opCreateIPSet = "CreateIPSet"
  132. // CreateIPSetRequest generates a "aws/request.Request" representing the
  133. // client's request for the CreateIPSet operation. The "output" return
  134. // value can be used to capture response data after the request's "Send" method
  135. // is called.
  136. //
  137. // See CreateIPSet for usage and error information.
  138. //
  139. // Creating a request object using this method should be used when you want to inject
  140. // custom logic into the request's lifecycle using a custom handler, or if you want to
  141. // access properties on the request object before or after sending the request. If
  142. // you just want the service response, call the CreateIPSet method directly
  143. // instead.
  144. //
  145. // Note: You must call the "Send" method on the returned request object in order
  146. // to execute the request.
  147. //
  148. // // Example sending a request using the CreateIPSetRequest method.
  149. // req, resp := client.CreateIPSetRequest(params)
  150. //
  151. // err := req.Send()
  152. // if err == nil { // resp is now filled
  153. // fmt.Println(resp)
  154. // }
  155. //
  156. func (c *WAF) CreateIPSetRequest(input *CreateIPSetInput) (req *request.Request, output *CreateIPSetOutput) {
  157. op := &request.Operation{
  158. Name: opCreateIPSet,
  159. HTTPMethod: "POST",
  160. HTTPPath: "/",
  161. }
  162. if input == nil {
  163. input = &CreateIPSetInput{}
  164. }
  165. req = c.newRequest(op, input, output)
  166. output = &CreateIPSetOutput{}
  167. req.Data = output
  168. return
  169. }
  170. // CreateIPSet API operation for AWS WAF.
  171. //
  172. // Creates an IPSet, which you use to specify which web requests you want to
  173. // allow or block based on the IP addresses that the requests originate from.
  174. // For example, if you're receiving a lot of requests from one or more individual
  175. // IP addresses or one or more ranges of IP addresses and you want to block
  176. // the requests, you can create an IPSet that contains those IP addresses and
  177. // then configure AWS WAF to block the requests.
  178. //
  179. // To create and configure an IPSet, perform the following steps:
  180. //
  181. // Use GetChangeToken to get the change token that you provide in the ChangeToken
  182. // parameter of a CreateIPSet request.
  183. //
  184. // Submit a CreateIPSet request.
  185. //
  186. // Use GetChangeToken to get the change token that you provide in the ChangeToken
  187. // parameter of an UpdateIPSet request.
  188. //
  189. // Submit an UpdateIPSet request to specify the IP addresses that you want AWS
  190. // WAF to watch for.
  191. //
  192. // For more information about how to use the AWS WAF API to allow or block HTTP
  193. // requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/).
  194. //
  195. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  196. // with awserr.Error's Code and Message methods to get detailed information about
  197. // the error.
  198. //
  199. // See the AWS API reference guide for AWS WAF's
  200. // API operation CreateIPSet for usage and error information.
  201. //
  202. // Returned Error Codes:
  203. // * StaleDataException
  204. // The operation failed because you tried to create, update, or delete an object
  205. // by using a change token that has already been used.
  206. //
  207. // * InternalErrorException
  208. // The operation failed because of a system problem, even though the request
  209. // was valid. Retry your request.
  210. //
  211. // * InvalidAccountException
  212. // The operation failed because you tried to create, update, or delete an object
  213. // by using an invalid account identifier.
  214. //
  215. // * DisallowedNameException
  216. // The name specified is invalid.
  217. //
  218. // * InvalidParameterException
  219. // The operation failed because AWS WAF didn't recognize a parameter in the
  220. // request. For example:
  221. //
  222. // * You specified an invalid parameter name.
  223. //
  224. // * You specified an invalid value.
  225. //
  226. // * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL)
  227. // using an action other than INSERT or DELETE.
  228. //
  229. // * You tried to create a WebACL with a DefaultActionType other than ALLOW,
  230. // BLOCK, or COUNT.
  231. //
  232. // * You tried to update a WebACL with a WafActionType other than ALLOW,
  233. // BLOCK, or COUNT.
  234. //
  235. // * You tried to update a ByteMatchSet with a FieldToMatchType other than
  236. // HEADER, QUERY_STRING, or URI.
  237. //
  238. // * You tried to update a ByteMatchSet with a Field of HEADER but no value
  239. // for Data.
  240. //
  241. // * LimitsExceededException
  242. // The operation exceeds a resource limit, for example, the maximum number of
  243. // WebACL objects that you can create for an AWS account. For more information,
  244. // see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
  245. // in the AWS WAF Developer Guide.
  246. //
  247. func (c *WAF) CreateIPSet(input *CreateIPSetInput) (*CreateIPSetOutput, error) {
  248. req, out := c.CreateIPSetRequest(input)
  249. err := req.Send()
  250. return out, err
  251. }
  252. const opCreateRule = "CreateRule"
  253. // CreateRuleRequest generates a "aws/request.Request" representing the
  254. // client's request for the CreateRule operation. The "output" return
  255. // value can be used to capture response data after the request's "Send" method
  256. // is called.
  257. //
  258. // See CreateRule for usage and error information.
  259. //
  260. // Creating a request object using this method should be used when you want to inject
  261. // custom logic into the request's lifecycle using a custom handler, or if you want to
  262. // access properties on the request object before or after sending the request. If
  263. // you just want the service response, call the CreateRule method directly
  264. // instead.
  265. //
  266. // Note: You must call the "Send" method on the returned request object in order
  267. // to execute the request.
  268. //
  269. // // Example sending a request using the CreateRuleRequest method.
  270. // req, resp := client.CreateRuleRequest(params)
  271. //
  272. // err := req.Send()
  273. // if err == nil { // resp is now filled
  274. // fmt.Println(resp)
  275. // }
  276. //
  277. func (c *WAF) CreateRuleRequest(input *CreateRuleInput) (req *request.Request, output *CreateRuleOutput) {
  278. op := &request.Operation{
  279. Name: opCreateRule,
  280. HTTPMethod: "POST",
  281. HTTPPath: "/",
  282. }
  283. if input == nil {
  284. input = &CreateRuleInput{}
  285. }
  286. req = c.newRequest(op, input, output)
  287. output = &CreateRuleOutput{}
  288. req.Data = output
  289. return
  290. }
  291. // CreateRule API operation for AWS WAF.
  292. //
  293. // Creates a Rule, which contains the IPSet objects, ByteMatchSet objects, and
  294. // other predicates that identify the requests that you want to block. If you
  295. // add more than one predicate to a Rule, a request must match all of the specifications
  296. // to be allowed or blocked. For example, suppose you add the following to a
  297. // Rule:
  298. //
  299. // * An IPSet that matches the IP address 192.0.2.44/32
  300. //
  301. // * A ByteMatchSet that matches BadBot in the User-Agent header
  302. //
  303. // You then add the Rule to a WebACL and specify that you want to blocks requests
  304. // that satisfy the Rule. For a request to be blocked, it must come from the
  305. // IP address 192.0.2.44 and the User-Agent header in the request must contain
  306. // the value BadBot.
  307. //
  308. // To create and configure a Rule, perform the following steps:
  309. //
  310. // Create and update the predicates that you want to include in the Rule. For
  311. // more information, see CreateByteMatchSet, CreateIPSet, and CreateSqlInjectionMatchSet.
  312. //
  313. // Use GetChangeToken to get the change token that you provide in the ChangeToken
  314. // parameter of a CreateRule request.
  315. //
  316. // Submit a CreateRule request.
  317. //
  318. // Use GetChangeToken to get the change token that you provide in the ChangeToken
  319. // parameter of an UpdateRule request.
  320. //
  321. // Submit an UpdateRule request to specify the predicates that you want to include
  322. // in the Rule.
  323. //
  324. // Create and update a WebACL that contains the Rule. For more information,
  325. // see CreateWebACL.
  326. //
  327. // For more information about how to use the AWS WAF API to allow or block HTTP
  328. // requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/).
  329. //
  330. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  331. // with awserr.Error's Code and Message methods to get detailed information about
  332. // the error.
  333. //
  334. // See the AWS API reference guide for AWS WAF's
  335. // API operation CreateRule for usage and error information.
  336. //
  337. // Returned Error Codes:
  338. // * StaleDataException
  339. // The operation failed because you tried to create, update, or delete an object
  340. // by using a change token that has already been used.
  341. //
  342. // * InternalErrorException
  343. // The operation failed because of a system problem, even though the request
  344. // was valid. Retry your request.
  345. //
  346. // * DisallowedNameException
  347. // The name specified is invalid.
  348. //
  349. // * InvalidParameterException
  350. // The operation failed because AWS WAF didn't recognize a parameter in the
  351. // request. For example:
  352. //
  353. // * You specified an invalid parameter name.
  354. //
  355. // * You specified an invalid value.
  356. //
  357. // * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL)
  358. // using an action other than INSERT or DELETE.
  359. //
  360. // * You tried to create a WebACL with a DefaultActionType other than ALLOW,
  361. // BLOCK, or COUNT.
  362. //
  363. // * You tried to update a WebACL with a WafActionType other than ALLOW,
  364. // BLOCK, or COUNT.
  365. //
  366. // * You tried to update a ByteMatchSet with a FieldToMatchType other than
  367. // HEADER, QUERY_STRING, or URI.
  368. //
  369. // * You tried to update a ByteMatchSet with a Field of HEADER but no value
  370. // for Data.
  371. //
  372. // * LimitsExceededException
  373. // The operation exceeds a resource limit, for example, the maximum number of
  374. // WebACL objects that you can create for an AWS account. For more information,
  375. // see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
  376. // in the AWS WAF Developer Guide.
  377. //
  378. func (c *WAF) CreateRule(input *CreateRuleInput) (*CreateRuleOutput, error) {
  379. req, out := c.CreateRuleRequest(input)
  380. err := req.Send()
  381. return out, err
  382. }
  383. const opCreateSizeConstraintSet = "CreateSizeConstraintSet"
  384. // CreateSizeConstraintSetRequest generates a "aws/request.Request" representing the
  385. // client's request for the CreateSizeConstraintSet operation. The "output" return
  386. // value can be used to capture response data after the request's "Send" method
  387. // is called.
  388. //
  389. // See CreateSizeConstraintSet for usage and error information.
  390. //
  391. // Creating a request object using this method should be used when you want to inject
  392. // custom logic into the request's lifecycle using a custom handler, or if you want to
  393. // access properties on the request object before or after sending the request. If
  394. // you just want the service response, call the CreateSizeConstraintSet method directly
  395. // instead.
  396. //
  397. // Note: You must call the "Send" method on the returned request object in order
  398. // to execute the request.
  399. //
  400. // // Example sending a request using the CreateSizeConstraintSetRequest method.
  401. // req, resp := client.CreateSizeConstraintSetRequest(params)
  402. //
  403. // err := req.Send()
  404. // if err == nil { // resp is now filled
  405. // fmt.Println(resp)
  406. // }
  407. //
  408. func (c *WAF) CreateSizeConstraintSetRequest(input *CreateSizeConstraintSetInput) (req *request.Request, output *CreateSizeConstraintSetOutput) {
  409. op := &request.Operation{
  410. Name: opCreateSizeConstraintSet,
  411. HTTPMethod: "POST",
  412. HTTPPath: "/",
  413. }
  414. if input == nil {
  415. input = &CreateSizeConstraintSetInput{}
  416. }
  417. req = c.newRequest(op, input, output)
  418. output = &CreateSizeConstraintSetOutput{}
  419. req.Data = output
  420. return
  421. }
  422. // CreateSizeConstraintSet API operation for AWS WAF.
  423. //
  424. // Creates a SizeConstraintSet. You then use UpdateSizeConstraintSet to identify
  425. // the part of a web request that you want AWS WAF to check for length, such
  426. // as the length of the User-Agent header or the length of the query string.
  427. // For example, you can create a SizeConstraintSet that matches any requests
  428. // that have a query string that is longer than 100 bytes. You can then configure
  429. // AWS WAF to reject those requests.
  430. //
  431. // To create and configure a SizeConstraintSet, perform the following steps:
  432. //
  433. // Use GetChangeToken to get the change token that you provide in the ChangeToken
  434. // parameter of a CreateSizeConstraintSet request.
  435. //
  436. // Submit a CreateSizeConstraintSet request.
  437. //
  438. // Use GetChangeToken to get the change token that you provide in the ChangeToken
  439. // parameter of an UpdateSizeConstraintSet request.
  440. //
  441. // Submit an UpdateSizeConstraintSet request to specify the part of the request
  442. // that you want AWS WAF to inspect (for example, the header or the URI) and
  443. // the value that you want AWS WAF to watch for.
  444. //
  445. // For more information about how to use the AWS WAF API to allow or block HTTP
  446. // requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/).
  447. //
  448. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  449. // with awserr.Error's Code and Message methods to get detailed information about
  450. // the error.
  451. //
  452. // See the AWS API reference guide for AWS WAF's
  453. // API operation CreateSizeConstraintSet for usage and error information.
  454. //
  455. // Returned Error Codes:
  456. // * StaleDataException
  457. // The operation failed because you tried to create, update, or delete an object
  458. // by using a change token that has already been used.
  459. //
  460. // * InternalErrorException
  461. // The operation failed because of a system problem, even though the request
  462. // was valid. Retry your request.
  463. //
  464. // * InvalidAccountException
  465. // The operation failed because you tried to create, update, or delete an object
  466. // by using an invalid account identifier.
  467. //
  468. // * DisallowedNameException
  469. // The name specified is invalid.
  470. //
  471. // * InvalidParameterException
  472. // The operation failed because AWS WAF didn't recognize a parameter in the
  473. // request. For example:
  474. //
  475. // * You specified an invalid parameter name.
  476. //
  477. // * You specified an invalid value.
  478. //
  479. // * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL)
  480. // using an action other than INSERT or DELETE.
  481. //
  482. // * You tried to create a WebACL with a DefaultActionType other than ALLOW,
  483. // BLOCK, or COUNT.
  484. //
  485. // * You tried to update a WebACL with a WafActionType other than ALLOW,
  486. // BLOCK, or COUNT.
  487. //
  488. // * You tried to update a ByteMatchSet with a FieldToMatchType other than
  489. // HEADER, QUERY_STRING, or URI.
  490. //
  491. // * You tried to update a ByteMatchSet with a Field of HEADER but no value
  492. // for Data.
  493. //
  494. // * LimitsExceededException
  495. // The operation exceeds a resource limit, for example, the maximum number of
  496. // WebACL objects that you can create for an AWS account. For more information,
  497. // see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
  498. // in the AWS WAF Developer Guide.
  499. //
  500. func (c *WAF) CreateSizeConstraintSet(input *CreateSizeConstraintSetInput) (*CreateSizeConstraintSetOutput, error) {
  501. req, out := c.CreateSizeConstraintSetRequest(input)
  502. err := req.Send()
  503. return out, err
  504. }
  505. const opCreateSqlInjectionMatchSet = "CreateSqlInjectionMatchSet"
  506. // CreateSqlInjectionMatchSetRequest generates a "aws/request.Request" representing the
  507. // client's request for the CreateSqlInjectionMatchSet operation. The "output" return
  508. // value can be used to capture response data after the request's "Send" method
  509. // is called.
  510. //
  511. // See CreateSqlInjectionMatchSet for usage and error information.
  512. //
  513. // Creating a request object using this method should be used when you want to inject
  514. // custom logic into the request's lifecycle using a custom handler, or if you want to
  515. // access properties on the request object before or after sending the request. If
  516. // you just want the service response, call the CreateSqlInjectionMatchSet method directly
  517. // instead.
  518. //
  519. // Note: You must call the "Send" method on the returned request object in order
  520. // to execute the request.
  521. //
  522. // // Example sending a request using the CreateSqlInjectionMatchSetRequest method.
  523. // req, resp := client.CreateSqlInjectionMatchSetRequest(params)
  524. //
  525. // err := req.Send()
  526. // if err == nil { // resp is now filled
  527. // fmt.Println(resp)
  528. // }
  529. //
  530. func (c *WAF) CreateSqlInjectionMatchSetRequest(input *CreateSqlInjectionMatchSetInput) (req *request.Request, output *CreateSqlInjectionMatchSetOutput) {
  531. op := &request.Operation{
  532. Name: opCreateSqlInjectionMatchSet,
  533. HTTPMethod: "POST",
  534. HTTPPath: "/",
  535. }
  536. if input == nil {
  537. input = &CreateSqlInjectionMatchSetInput{}
  538. }
  539. req = c.newRequest(op, input, output)
  540. output = &CreateSqlInjectionMatchSetOutput{}
  541. req.Data = output
  542. return
  543. }
  544. // CreateSqlInjectionMatchSet API operation for AWS WAF.
  545. //
  546. // Creates a SqlInjectionMatchSet, which you use to allow, block, or count requests
  547. // that contain snippets of SQL code in a specified part of web requests. AWS
  548. // WAF searches for character sequences that are likely to be malicious strings.
  549. //
  550. // To create and configure a SqlInjectionMatchSet, perform the following steps:
  551. //
  552. // Use GetChangeToken to get the change token that you provide in the ChangeToken
  553. // parameter of a CreateSqlInjectionMatchSet request.
  554. //
  555. // Submit a CreateSqlInjectionMatchSet request.
  556. //
  557. // Use GetChangeToken to get the change token that you provide in the ChangeToken
  558. // parameter of an UpdateSqlInjectionMatchSet request.
  559. //
  560. // Submit an UpdateSqlInjectionMatchSet request to specify the parts of web
  561. // requests in which you want to allow, block, or count malicious SQL code.
  562. //
  563. // For more information about how to use the AWS WAF API to allow or block HTTP
  564. // requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/).
  565. //
  566. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  567. // with awserr.Error's Code and Message methods to get detailed information about
  568. // the error.
  569. //
  570. // See the AWS API reference guide for AWS WAF's
  571. // API operation CreateSqlInjectionMatchSet for usage and error information.
  572. //
  573. // Returned Error Codes:
  574. // * DisallowedNameException
  575. // The name specified is invalid.
  576. //
  577. // * InternalErrorException
  578. // The operation failed because of a system problem, even though the request
  579. // was valid. Retry your request.
  580. //
  581. // * InvalidAccountException
  582. // The operation failed because you tried to create, update, or delete an object
  583. // by using an invalid account identifier.
  584. //
  585. // * InvalidParameterException
  586. // The operation failed because AWS WAF didn't recognize a parameter in the
  587. // request. For example:
  588. //
  589. // * You specified an invalid parameter name.
  590. //
  591. // * You specified an invalid value.
  592. //
  593. // * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL)
  594. // using an action other than INSERT or DELETE.
  595. //
  596. // * You tried to create a WebACL with a DefaultActionType other than ALLOW,
  597. // BLOCK, or COUNT.
  598. //
  599. // * You tried to update a WebACL with a WafActionType other than ALLOW,
  600. // BLOCK, or COUNT.
  601. //
  602. // * You tried to update a ByteMatchSet with a FieldToMatchType other than
  603. // HEADER, QUERY_STRING, or URI.
  604. //
  605. // * You tried to update a ByteMatchSet with a Field of HEADER but no value
  606. // for Data.
  607. //
  608. // * StaleDataException
  609. // The operation failed because you tried to create, update, or delete an object
  610. // by using a change token that has already been used.
  611. //
  612. // * LimitsExceededException
  613. // The operation exceeds a resource limit, for example, the maximum number of
  614. // WebACL objects that you can create for an AWS account. For more information,
  615. // see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
  616. // in the AWS WAF Developer Guide.
  617. //
  618. func (c *WAF) CreateSqlInjectionMatchSet(input *CreateSqlInjectionMatchSetInput) (*CreateSqlInjectionMatchSetOutput, error) {
  619. req, out := c.CreateSqlInjectionMatchSetRequest(input)
  620. err := req.Send()
  621. return out, err
  622. }
  623. const opCreateWebACL = "CreateWebACL"
  624. // CreateWebACLRequest generates a "aws/request.Request" representing the
  625. // client's request for the CreateWebACL operation. The "output" return
  626. // value can be used to capture response data after the request's "Send" method
  627. // is called.
  628. //
  629. // See CreateWebACL for usage and error information.
  630. //
  631. // Creating a request object using this method should be used when you want to inject
  632. // custom logic into the request's lifecycle using a custom handler, or if you want to
  633. // access properties on the request object before or after sending the request. If
  634. // you just want the service response, call the CreateWebACL method directly
  635. // instead.
  636. //
  637. // Note: You must call the "Send" method on the returned request object in order
  638. // to execute the request.
  639. //
  640. // // Example sending a request using the CreateWebACLRequest method.
  641. // req, resp := client.CreateWebACLRequest(params)
  642. //
  643. // err := req.Send()
  644. // if err == nil { // resp is now filled
  645. // fmt.Println(resp)
  646. // }
  647. //
  648. func (c *WAF) CreateWebACLRequest(input *CreateWebACLInput) (req *request.Request, output *CreateWebACLOutput) {
  649. op := &request.Operation{
  650. Name: opCreateWebACL,
  651. HTTPMethod: "POST",
  652. HTTPPath: "/",
  653. }
  654. if input == nil {
  655. input = &CreateWebACLInput{}
  656. }
  657. req = c.newRequest(op, input, output)
  658. output = &CreateWebACLOutput{}
  659. req.Data = output
  660. return
  661. }
  662. // CreateWebACL API operation for AWS WAF.
  663. //
  664. // Creates a WebACL, which contains the Rules that identify the CloudFront web
  665. // requests that you want to allow, block, or count. AWS WAF evaluates Rules
  666. // in order based on the value of Priority for each Rule.
  667. //
  668. // You also specify a default action, either ALLOW or BLOCK. If a web request
  669. // doesn't match any of the Rules in a WebACL, AWS WAF responds to the request
  670. // with the default action.
  671. //
  672. // To create and configure a WebACL, perform the following steps:
  673. //
  674. // Create and update the ByteMatchSet objects and other predicates that you
  675. // want to include in Rules. For more information, see CreateByteMatchSet, UpdateByteMatchSet,
  676. // CreateIPSet, UpdateIPSet, CreateSqlInjectionMatchSet, and UpdateSqlInjectionMatchSet.
  677. //
  678. // Create and update the Rules that you want to include in the WebACL. For more
  679. // information, see CreateRule and UpdateRule.
  680. //
  681. // Use GetChangeToken to get the change token that you provide in the ChangeToken
  682. // parameter of a CreateWebACL request.
  683. //
  684. // Submit a CreateWebACL request.
  685. //
  686. // Use GetChangeToken to get the change token that you provide in the ChangeToken
  687. // parameter of an UpdateWebACL request.
  688. //
  689. // Submit an UpdateWebACL request to specify the Rules that you want to include
  690. // in the WebACL, to specify the default action, and to associate the WebACL
  691. // with a CloudFront distribution.
  692. //
  693. // For more information about how to use the AWS WAF API, see the AWS WAF Developer
  694. // Guide (http://docs.aws.amazon.com/waf/latest/developerguide/).
  695. //
  696. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  697. // with awserr.Error's Code and Message methods to get detailed information about
  698. // the error.
  699. //
  700. // See the AWS API reference guide for AWS WAF's
  701. // API operation CreateWebACL for usage and error information.
  702. //
  703. // Returned Error Codes:
  704. // * StaleDataException
  705. // The operation failed because you tried to create, update, or delete an object
  706. // by using a change token that has already been used.
  707. //
  708. // * InternalErrorException
  709. // The operation failed because of a system problem, even though the request
  710. // was valid. Retry your request.
  711. //
  712. // * InvalidAccountException
  713. // The operation failed because you tried to create, update, or delete an object
  714. // by using an invalid account identifier.
  715. //
  716. // * DisallowedNameException
  717. // The name specified is invalid.
  718. //
  719. // * InvalidParameterException
  720. // The operation failed because AWS WAF didn't recognize a parameter in the
  721. // request. For example:
  722. //
  723. // * You specified an invalid parameter name.
  724. //
  725. // * You specified an invalid value.
  726. //
  727. // * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL)
  728. // using an action other than INSERT or DELETE.
  729. //
  730. // * You tried to create a WebACL with a DefaultActionType other than ALLOW,
  731. // BLOCK, or COUNT.
  732. //
  733. // * You tried to update a WebACL with a WafActionType other than ALLOW,
  734. // BLOCK, or COUNT.
  735. //
  736. // * You tried to update a ByteMatchSet with a FieldToMatchType other than
  737. // HEADER, QUERY_STRING, or URI.
  738. //
  739. // * You tried to update a ByteMatchSet with a Field of HEADER but no value
  740. // for Data.
  741. //
  742. // * LimitsExceededException
  743. // The operation exceeds a resource limit, for example, the maximum number of
  744. // WebACL objects that you can create for an AWS account. For more information,
  745. // see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
  746. // in the AWS WAF Developer Guide.
  747. //
  748. func (c *WAF) CreateWebACL(input *CreateWebACLInput) (*CreateWebACLOutput, error) {
  749. req, out := c.CreateWebACLRequest(input)
  750. err := req.Send()
  751. return out, err
  752. }
  753. const opCreateXssMatchSet = "CreateXssMatchSet"
  754. // CreateXssMatchSetRequest generates a "aws/request.Request" representing the
  755. // client's request for the CreateXssMatchSet operation. The "output" return
  756. // value can be used to capture response data after the request's "Send" method
  757. // is called.
  758. //
  759. // See CreateXssMatchSet for usage and error information.
  760. //
  761. // Creating a request object using this method should be used when you want to inject
  762. // custom logic into the request's lifecycle using a custom handler, or if you want to
  763. // access properties on the request object before or after sending the request. If
  764. // you just want the service response, call the CreateXssMatchSet method directly
  765. // instead.
  766. //
  767. // Note: You must call the "Send" method on the returned request object in order
  768. // to execute the request.
  769. //
  770. // // Example sending a request using the CreateXssMatchSetRequest method.
  771. // req, resp := client.CreateXssMatchSetRequest(params)
  772. //
  773. // err := req.Send()
  774. // if err == nil { // resp is now filled
  775. // fmt.Println(resp)
  776. // }
  777. //
  778. func (c *WAF) CreateXssMatchSetRequest(input *CreateXssMatchSetInput) (req *request.Request, output *CreateXssMatchSetOutput) {
  779. op := &request.Operation{
  780. Name: opCreateXssMatchSet,
  781. HTTPMethod: "POST",
  782. HTTPPath: "/",
  783. }
  784. if input == nil {
  785. input = &CreateXssMatchSetInput{}
  786. }
  787. req = c.newRequest(op, input, output)
  788. output = &CreateXssMatchSetOutput{}
  789. req.Data = output
  790. return
  791. }
  792. // CreateXssMatchSet API operation for AWS WAF.
  793. //
  794. // Creates an XssMatchSet, which you use to allow, block, or count requests
  795. // that contain cross-site scripting attacks in the specified part of web requests.
  796. // AWS WAF searches for character sequences that are likely to be malicious
  797. // strings.
  798. //
  799. // To create and configure an XssMatchSet, perform the following steps:
  800. //
  801. // Use GetChangeToken to get the change token that you provide in the ChangeToken
  802. // parameter of a CreateXssMatchSet request.
  803. //
  804. // Submit a CreateXssMatchSet request.
  805. //
  806. // Use GetChangeToken to get the change token that you provide in the ChangeToken
  807. // parameter of an UpdateXssMatchSet request.
  808. //
  809. // Submit an UpdateXssMatchSet request to specify the parts of web requests
  810. // in which you want to allow, block, or count cross-site scripting attacks.
  811. //
  812. // For more information about how to use the AWS WAF API to allow or block HTTP
  813. // requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/).
  814. //
  815. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  816. // with awserr.Error's Code and Message methods to get detailed information about
  817. // the error.
  818. //
  819. // See the AWS API reference guide for AWS WAF's
  820. // API operation CreateXssMatchSet for usage and error information.
  821. //
  822. // Returned Error Codes:
  823. // * DisallowedNameException
  824. // The name specified is invalid.
  825. //
  826. // * InternalErrorException
  827. // The operation failed because of a system problem, even though the request
  828. // was valid. Retry your request.
  829. //
  830. // * InvalidAccountException
  831. // The operation failed because you tried to create, update, or delete an object
  832. // by using an invalid account identifier.
  833. //
  834. // * InvalidParameterException
  835. // The operation failed because AWS WAF didn't recognize a parameter in the
  836. // request. For example:
  837. //
  838. // * You specified an invalid parameter name.
  839. //
  840. // * You specified an invalid value.
  841. //
  842. // * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL)
  843. // using an action other than INSERT or DELETE.
  844. //
  845. // * You tried to create a WebACL with a DefaultActionType other than ALLOW,
  846. // BLOCK, or COUNT.
  847. //
  848. // * You tried to update a WebACL with a WafActionType other than ALLOW,
  849. // BLOCK, or COUNT.
  850. //
  851. // * You tried to update a ByteMatchSet with a FieldToMatchType other than
  852. // HEADER, QUERY_STRING, or URI.
  853. //
  854. // * You tried to update a ByteMatchSet with a Field of HEADER but no value
  855. // for Data.
  856. //
  857. // * StaleDataException
  858. // The operation failed because you tried to create, update, or delete an object
  859. // by using a change token that has already been used.
  860. //
  861. // * LimitsExceededException
  862. // The operation exceeds a resource limit, for example, the maximum number of
  863. // WebACL objects that you can create for an AWS account. For more information,
  864. // see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
  865. // in the AWS WAF Developer Guide.
  866. //
  867. func (c *WAF) CreateXssMatchSet(input *CreateXssMatchSetInput) (*CreateXssMatchSetOutput, error) {
  868. req, out := c.CreateXssMatchSetRequest(input)
  869. err := req.Send()
  870. return out, err
  871. }
  872. const opDeleteByteMatchSet = "DeleteByteMatchSet"
  873. // DeleteByteMatchSetRequest generates a "aws/request.Request" representing the
  874. // client's request for the DeleteByteMatchSet operation. The "output" return
  875. // value can be used to capture response data after the request's "Send" method
  876. // is called.
  877. //
  878. // See DeleteByteMatchSet for usage and error information.
  879. //
  880. // Creating a request object using this method should be used when you want to inject
  881. // custom logic into the request's lifecycle using a custom handler, or if you want to
  882. // access properties on the request object before or after sending the request. If
  883. // you just want the service response, call the DeleteByteMatchSet method directly
  884. // instead.
  885. //
  886. // Note: You must call the "Send" method on the returned request object in order
  887. // to execute the request.
  888. //
  889. // // Example sending a request using the DeleteByteMatchSetRequest method.
  890. // req, resp := client.DeleteByteMatchSetRequest(params)
  891. //
  892. // err := req.Send()
  893. // if err == nil { // resp is now filled
  894. // fmt.Println(resp)
  895. // }
  896. //
  897. func (c *WAF) DeleteByteMatchSetRequest(input *DeleteByteMatchSetInput) (req *request.Request, output *DeleteByteMatchSetOutput) {
  898. op := &request.Operation{
  899. Name: opDeleteByteMatchSet,
  900. HTTPMethod: "POST",
  901. HTTPPath: "/",
  902. }
  903. if input == nil {
  904. input = &DeleteByteMatchSetInput{}
  905. }
  906. req = c.newRequest(op, input, output)
  907. output = &DeleteByteMatchSetOutput{}
  908. req.Data = output
  909. return
  910. }
  911. // DeleteByteMatchSet API operation for AWS WAF.
  912. //
  913. // Permanently deletes a ByteMatchSet. You can't delete a ByteMatchSet if it's
  914. // still used in any Rules or if it still includes any ByteMatchTuple objects
  915. // (any filters).
  916. //
  917. // If you just want to remove a ByteMatchSet from a Rule, use UpdateRule.
  918. //
  919. // To permanently delete a ByteMatchSet, perform the following steps:
  920. //
  921. // Update the ByteMatchSet to remove filters, if any. For more information,
  922. // see UpdateByteMatchSet.
  923. //
  924. // Use GetChangeToken to get the change token that you provide in the ChangeToken
  925. // parameter of a DeleteByteMatchSet request.
  926. //
  927. // Submit a DeleteByteMatchSet request.
  928. //
  929. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  930. // with awserr.Error's Code and Message methods to get detailed information about
  931. // the error.
  932. //
  933. // See the AWS API reference guide for AWS WAF's
  934. // API operation DeleteByteMatchSet for usage and error information.
  935. //
  936. // Returned Error Codes:
  937. // * InternalErrorException
  938. // The operation failed because of a system problem, even though the request
  939. // was valid. Retry your request.
  940. //
  941. // * InvalidAccountException
  942. // The operation failed because you tried to create, update, or delete an object
  943. // by using an invalid account identifier.
  944. //
  945. // * NonexistentItemException
  946. // The operation failed because the referenced object doesn't exist.
  947. //
  948. // * ReferencedItemException
  949. // The operation failed because you tried to delete an object that is still
  950. // in use. For example:
  951. //
  952. // * You tried to delete a ByteMatchSet that is still referenced by a Rule.
  953. //
  954. // * You tried to delete a Rule that is still referenced by a WebACL.
  955. //
  956. // * StaleDataException
  957. // The operation failed because you tried to create, update, or delete an object
  958. // by using a change token that has already been used.
  959. //
  960. // * NonEmptyEntityException
  961. // The operation failed because you tried to delete an object that isn't empty.
  962. // For example:
  963. //
  964. // * You tried to delete a WebACL that still contains one or more Rule objects.
  965. //
  966. // * You tried to delete a Rule that still contains one or more ByteMatchSet
  967. // objects or other predicates.
  968. //
  969. // * You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple
  970. // objects.
  971. //
  972. // * You tried to delete an IPSet that references one or more IP addresses.
  973. //
  974. func (c *WAF) DeleteByteMatchSet(input *DeleteByteMatchSetInput) (*DeleteByteMatchSetOutput, error) {
  975. req, out := c.DeleteByteMatchSetRequest(input)
  976. err := req.Send()
  977. return out, err
  978. }
  979. const opDeleteIPSet = "DeleteIPSet"
  980. // DeleteIPSetRequest generates a "aws/request.Request" representing the
  981. // client's request for the DeleteIPSet operation. The "output" return
  982. // value can be used to capture response data after the request's "Send" method
  983. // is called.
  984. //
  985. // See DeleteIPSet for usage and error information.
  986. //
  987. // Creating a request object using this method should be used when you want to inject
  988. // custom logic into the request's lifecycle using a custom handler, or if you want to
  989. // access properties on the request object before or after sending the request. If
  990. // you just want the service response, call the DeleteIPSet method directly
  991. // instead.
  992. //
  993. // Note: You must call the "Send" method on the returned request object in order
  994. // to execute the request.
  995. //
  996. // // Example sending a request using the DeleteIPSetRequest method.
  997. // req, resp := client.DeleteIPSetRequest(params)
  998. //
  999. // err := req.Send()
  1000. // if err == nil { // resp is now filled
  1001. // fmt.Println(resp)
  1002. // }
  1003. //
  1004. func (c *WAF) DeleteIPSetRequest(input *DeleteIPSetInput) (req *request.Request, output *DeleteIPSetOutput) {
  1005. op := &request.Operation{
  1006. Name: opDeleteIPSet,
  1007. HTTPMethod: "POST",
  1008. HTTPPath: "/",
  1009. }
  1010. if input == nil {
  1011. input = &DeleteIPSetInput{}
  1012. }
  1013. req = c.newRequest(op, input, output)
  1014. output = &DeleteIPSetOutput{}
  1015. req.Data = output
  1016. return
  1017. }
  1018. // DeleteIPSet API operation for AWS WAF.
  1019. //
  1020. // Permanently deletes an IPSet. You can't delete an IPSet if it's still used
  1021. // in any Rules or if it still includes any IP addresses.
  1022. //
  1023. // If you just want to remove an IPSet from a Rule, use UpdateRule.
  1024. //
  1025. // To permanently delete an IPSet from AWS WAF, perform the following steps:
  1026. //
  1027. // Update the IPSet to remove IP address ranges, if any. For more information,
  1028. // see UpdateIPSet.
  1029. //
  1030. // Use GetChangeToken to get the change token that you provide in the ChangeToken
  1031. // parameter of a DeleteIPSet request.
  1032. //
  1033. // Submit a DeleteIPSet request.
  1034. //
  1035. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1036. // with awserr.Error's Code and Message methods to get detailed information about
  1037. // the error.
  1038. //
  1039. // See the AWS API reference guide for AWS WAF's
  1040. // API operation DeleteIPSet for usage and error information.
  1041. //
  1042. // Returned Error Codes:
  1043. // * StaleDataException
  1044. // The operation failed because you tried to create, update, or delete an object
  1045. // by using a change token that has already been used.
  1046. //
  1047. // * InternalErrorException
  1048. // The operation failed because of a system problem, even though the request
  1049. // was valid. Retry your request.
  1050. //
  1051. // * InvalidAccountException
  1052. // The operation failed because you tried to create, update, or delete an object
  1053. // by using an invalid account identifier.
  1054. //
  1055. // * NonexistentItemException
  1056. // The operation failed because the referenced object doesn't exist.
  1057. //
  1058. // * ReferencedItemException
  1059. // The operation failed because you tried to delete an object that is still
  1060. // in use. For example:
  1061. //
  1062. // * You tried to delete a ByteMatchSet that is still referenced by a Rule.
  1063. //
  1064. // * You tried to delete a Rule that is still referenced by a WebACL.
  1065. //
  1066. // * NonEmptyEntityException
  1067. // The operation failed because you tried to delete an object that isn't empty.
  1068. // For example:
  1069. //
  1070. // * You tried to delete a WebACL that still contains one or more Rule objects.
  1071. //
  1072. // * You tried to delete a Rule that still contains one or more ByteMatchSet
  1073. // objects or other predicates.
  1074. //
  1075. // * You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple
  1076. // objects.
  1077. //
  1078. // * You tried to delete an IPSet that references one or more IP addresses.
  1079. //
  1080. func (c *WAF) DeleteIPSet(input *DeleteIPSetInput) (*DeleteIPSetOutput, error) {
  1081. req, out := c.DeleteIPSetRequest(input)
  1082. err := req.Send()
  1083. return out, err
  1084. }
  1085. const opDeleteRule = "DeleteRule"
  1086. // DeleteRuleRequest generates a "aws/request.Request" representing the
  1087. // client's request for the DeleteRule operation. The "output" return
  1088. // value can be used to capture response data after the request's "Send" method
  1089. // is called.
  1090. //
  1091. // See DeleteRule for usage and error information.
  1092. //
  1093. // Creating a request object using this method should be used when you want to inject
  1094. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1095. // access properties on the request object before or after sending the request. If
  1096. // you just want the service response, call the DeleteRule method directly
  1097. // instead.
  1098. //
  1099. // Note: You must call the "Send" method on the returned request object in order
  1100. // to execute the request.
  1101. //
  1102. // // Example sending a request using the DeleteRuleRequest method.
  1103. // req, resp := client.DeleteRuleRequest(params)
  1104. //
  1105. // err := req.Send()
  1106. // if err == nil { // resp is now filled
  1107. // fmt.Println(resp)
  1108. // }
  1109. //
  1110. func (c *WAF) DeleteRuleRequest(input *DeleteRuleInput) (req *request.Request, output *DeleteRuleOutput) {
  1111. op := &request.Operation{
  1112. Name: opDeleteRule,
  1113. HTTPMethod: "POST",
  1114. HTTPPath: "/",
  1115. }
  1116. if input == nil {
  1117. input = &DeleteRuleInput{}
  1118. }
  1119. req = c.newRequest(op, input, output)
  1120. output = &DeleteRuleOutput{}
  1121. req.Data = output
  1122. return
  1123. }
  1124. // DeleteRule API operation for AWS WAF.
  1125. //
  1126. // Permanently deletes a Rule. You can't delete a Rule if it's still used in
  1127. // any WebACL objects or if it still includes any predicates, such as ByteMatchSet
  1128. // objects.
  1129. //
  1130. // If you just want to remove a Rule from a WebACL, use UpdateWebACL.
  1131. //
  1132. // To permanently delete a Rule from AWS WAF, perform the following steps:
  1133. //
  1134. // Update the Rule to remove predicates, if any. For more information, see UpdateRule.
  1135. //
  1136. // Use GetChangeToken to get the change token that you provide in the ChangeToken
  1137. // parameter of a DeleteRule request.
  1138. //
  1139. // Submit a DeleteRule request.
  1140. //
  1141. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1142. // with awserr.Error's Code and Message methods to get detailed information about
  1143. // the error.
  1144. //
  1145. // See the AWS API reference guide for AWS WAF's
  1146. // API operation DeleteRule for usage and error information.
  1147. //
  1148. // Returned Error Codes:
  1149. // * StaleDataException
  1150. // The operation failed because you tried to create, update, or delete an object
  1151. // by using a change token that has already been used.
  1152. //
  1153. // * InternalErrorException
  1154. // The operation failed because of a system problem, even though the request
  1155. // was valid. Retry your request.
  1156. //
  1157. // * InvalidAccountException
  1158. // The operation failed because you tried to create, update, or delete an object
  1159. // by using an invalid account identifier.
  1160. //
  1161. // * NonexistentItemException
  1162. // The operation failed because the referenced object doesn't exist.
  1163. //
  1164. // * ReferencedItemException
  1165. // The operation failed because you tried to delete an object that is still
  1166. // in use. For example:
  1167. //
  1168. // * You tried to delete a ByteMatchSet that is still referenced by a Rule.
  1169. //
  1170. // * You tried to delete a Rule that is still referenced by a WebACL.
  1171. //
  1172. // * NonEmptyEntityException
  1173. // The operation failed because you tried to delete an object that isn't empty.
  1174. // For example:
  1175. //
  1176. // * You tried to delete a WebACL that still contains one or more Rule objects.
  1177. //
  1178. // * You tried to delete a Rule that still contains one or more ByteMatchSet
  1179. // objects or other predicates.
  1180. //
  1181. // * You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple
  1182. // objects.
  1183. //
  1184. // * You tried to delete an IPSet that references one or more IP addresses.
  1185. //
  1186. func (c *WAF) DeleteRule(input *DeleteRuleInput) (*DeleteRuleOutput, error) {
  1187. req, out := c.DeleteRuleRequest(input)
  1188. err := req.Send()
  1189. return out, err
  1190. }
  1191. const opDeleteSizeConstraintSet = "DeleteSizeConstraintSet"
  1192. // DeleteSizeConstraintSetRequest generates a "aws/request.Request" representing the
  1193. // client's request for the DeleteSizeConstraintSet operation. The "output" return
  1194. // value can be used to capture response data after the request's "Send" method
  1195. // is called.
  1196. //
  1197. // See DeleteSizeConstraintSet for usage and error information.
  1198. //
  1199. // Creating a request object using this method should be used when you want to inject
  1200. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1201. // access properties on the request object before or after sending the request. If
  1202. // you just want the service response, call the DeleteSizeConstraintSet method directly
  1203. // instead.
  1204. //
  1205. // Note: You must call the "Send" method on the returned request object in order
  1206. // to execute the request.
  1207. //
  1208. // // Example sending a request using the DeleteSizeConstraintSetRequest method.
  1209. // req, resp := client.DeleteSizeConstraintSetRequest(params)
  1210. //
  1211. // err := req.Send()
  1212. // if err == nil { // resp is now filled
  1213. // fmt.Println(resp)
  1214. // }
  1215. //
  1216. func (c *WAF) DeleteSizeConstraintSetRequest(input *DeleteSizeConstraintSetInput) (req *request.Request, output *DeleteSizeConstraintSetOutput) {
  1217. op := &request.Operation{
  1218. Name: opDeleteSizeConstraintSet,
  1219. HTTPMethod: "POST",
  1220. HTTPPath: "/",
  1221. }
  1222. if input == nil {
  1223. input = &DeleteSizeConstraintSetInput{}
  1224. }
  1225. req = c.newRequest(op, input, output)
  1226. output = &DeleteSizeConstraintSetOutput{}
  1227. req.Data = output
  1228. return
  1229. }
  1230. // DeleteSizeConstraintSet API operation for AWS WAF.
  1231. //
  1232. // Permanently deletes a SizeConstraintSet. You can't delete a SizeConstraintSet
  1233. // if it's still used in any Rules or if it still includes any SizeConstraint
  1234. // objects (any filters).
  1235. //
  1236. // If you just want to remove a SizeConstraintSet from a Rule, use UpdateRule.
  1237. //
  1238. // To permanently delete a SizeConstraintSet, perform the following steps:
  1239. //
  1240. // Update the SizeConstraintSet to remove filters, if any. For more information,
  1241. // see UpdateSizeConstraintSet.
  1242. //
  1243. // Use GetChangeToken to get the change token that you provide in the ChangeToken
  1244. // parameter of a DeleteSizeConstraintSet request.
  1245. //
  1246. // Submit a DeleteSizeConstraintSet request.
  1247. //
  1248. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1249. // with awserr.Error's Code and Message methods to get detailed information about
  1250. // the error.
  1251. //
  1252. // See the AWS API reference guide for AWS WAF's
  1253. // API operation DeleteSizeConstraintSet for usage and error information.
  1254. //
  1255. // Returned Error Codes:
  1256. // * StaleDataException
  1257. // The operation failed because you tried to create, update, or delete an object
  1258. // by using a change token that has already been used.
  1259. //
  1260. // * InternalErrorException
  1261. // The operation failed because of a system problem, even though the request
  1262. // was valid. Retry your request.
  1263. //
  1264. // * InvalidAccountException
  1265. // The operation failed because you tried to create, update, or delete an object
  1266. // by using an invalid account identifier.
  1267. //
  1268. // * NonexistentItemException
  1269. // The operation failed because the referenced object doesn't exist.
  1270. //
  1271. // * ReferencedItemException
  1272. // The operation failed because you tried to delete an object that is still
  1273. // in use. For example:
  1274. //
  1275. // * You tried to delete a ByteMatchSet that is still referenced by a Rule.
  1276. //
  1277. // * You tried to delete a Rule that is still referenced by a WebACL.
  1278. //
  1279. // * NonEmptyEntityException
  1280. // The operation failed because you tried to delete an object that isn't empty.
  1281. // For example:
  1282. //
  1283. // * You tried to delete a WebACL that still contains one or more Rule objects.
  1284. //
  1285. // * You tried to delete a Rule that still contains one or more ByteMatchSet
  1286. // objects or other predicates.
  1287. //
  1288. // * You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple
  1289. // objects.
  1290. //
  1291. // * You tried to delete an IPSet that references one or more IP addresses.
  1292. //
  1293. func (c *WAF) DeleteSizeConstraintSet(input *DeleteSizeConstraintSetInput) (*DeleteSizeConstraintSetOutput, error) {
  1294. req, out := c.DeleteSizeConstraintSetRequest(input)
  1295. err := req.Send()
  1296. return out, err
  1297. }
  1298. const opDeleteSqlInjectionMatchSet = "DeleteSqlInjectionMatchSet"
  1299. // DeleteSqlInjectionMatchSetRequest generates a "aws/request.Request" representing the
  1300. // client's request for the DeleteSqlInjectionMatchSet operation. The "output" return
  1301. // value can be used to capture response data after the request's "Send" method
  1302. // is called.
  1303. //
  1304. // See DeleteSqlInjectionMatchSet for usage and error information.
  1305. //
  1306. // Creating a request object using this method should be used when you want to inject
  1307. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1308. // access properties on the request object before or after sending the request. If
  1309. // you just want the service response, call the DeleteSqlInjectionMatchSet method directly
  1310. // instead.
  1311. //
  1312. // Note: You must call the "Send" method on the returned request object in order
  1313. // to execute the request.
  1314. //
  1315. // // Example sending a request using the DeleteSqlInjectionMatchSetRequest method.
  1316. // req, resp := client.DeleteSqlInjectionMatchSetRequest(params)
  1317. //
  1318. // err := req.Send()
  1319. // if err == nil { // resp is now filled
  1320. // fmt.Println(resp)
  1321. // }
  1322. //
  1323. func (c *WAF) DeleteSqlInjectionMatchSetRequest(input *DeleteSqlInjectionMatchSetInput) (req *request.Request, output *DeleteSqlInjectionMatchSetOutput) {
  1324. op := &request.Operation{
  1325. Name: opDeleteSqlInjectionMatchSet,
  1326. HTTPMethod: "POST",
  1327. HTTPPath: "/",
  1328. }
  1329. if input == nil {
  1330. input = &DeleteSqlInjectionMatchSetInput{}
  1331. }
  1332. req = c.newRequest(op, input, output)
  1333. output = &DeleteSqlInjectionMatchSetOutput{}
  1334. req.Data = output
  1335. return
  1336. }
  1337. // DeleteSqlInjectionMatchSet API operation for AWS WAF.
  1338. //
  1339. // Permanently deletes a SqlInjectionMatchSet. You can't delete a SqlInjectionMatchSet
  1340. // if it's still used in any Rules or if it still contains any SqlInjectionMatchTuple
  1341. // objects.
  1342. //
  1343. // If you just want to remove a SqlInjectionMatchSet from a Rule, use UpdateRule.
  1344. //
  1345. // To permanently delete a SqlInjectionMatchSet from AWS WAF, perform the following
  1346. // steps:
  1347. //
  1348. // Update the SqlInjectionMatchSet to remove filters, if any. For more information,
  1349. // see UpdateSqlInjectionMatchSet.
  1350. //
  1351. // Use GetChangeToken to get the change token that you provide in the ChangeToken
  1352. // parameter of a DeleteSqlInjectionMatchSet request.
  1353. //
  1354. // Submit a DeleteSqlInjectionMatchSet request.
  1355. //
  1356. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1357. // with awserr.Error's Code and Message methods to get detailed information about
  1358. // the error.
  1359. //
  1360. // See the AWS API reference guide for AWS WAF's
  1361. // API operation DeleteSqlInjectionMatchSet for usage and error information.
  1362. //
  1363. // Returned Error Codes:
  1364. // * InternalErrorException
  1365. // The operation failed because of a system problem, even though the request
  1366. // was valid. Retry your request.
  1367. //
  1368. // * InvalidAccountException
  1369. // The operation failed because you tried to create, update, or delete an object
  1370. // by using an invalid account identifier.
  1371. //
  1372. // * NonexistentItemException
  1373. // The operation failed because the referenced object doesn't exist.
  1374. //
  1375. // * ReferencedItemException
  1376. // The operation failed because you tried to delete an object that is still
  1377. // in use. For example:
  1378. //
  1379. // * You tried to delete a ByteMatchSet that is still referenced by a Rule.
  1380. //
  1381. // * You tried to delete a Rule that is still referenced by a WebACL.
  1382. //
  1383. // * StaleDataException
  1384. // The operation failed because you tried to create, update, or delete an object
  1385. // by using a change token that has already been used.
  1386. //
  1387. // * NonEmptyEntityException
  1388. // The operation failed because you tried to delete an object that isn't empty.
  1389. // For example:
  1390. //
  1391. // * You tried to delete a WebACL that still contains one or more Rule objects.
  1392. //
  1393. // * You tried to delete a Rule that still contains one or more ByteMatchSet
  1394. // objects or other predicates.
  1395. //
  1396. // * You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple
  1397. // objects.
  1398. //
  1399. // * You tried to delete an IPSet that references one or more IP addresses.
  1400. //
  1401. func (c *WAF) DeleteSqlInjectionMatchSet(input *DeleteSqlInjectionMatchSetInput) (*DeleteSqlInjectionMatchSetOutput, error) {
  1402. req, out := c.DeleteSqlInjectionMatchSetRequest(input)
  1403. err := req.Send()
  1404. return out, err
  1405. }
  1406. const opDeleteWebACL = "DeleteWebACL"
  1407. // DeleteWebACLRequest generates a "aws/request.Request" representing the
  1408. // client's request for the DeleteWebACL operation. The "output" return
  1409. // value can be used to capture response data after the request's "Send" method
  1410. // is called.
  1411. //
  1412. // See DeleteWebACL for usage and error information.
  1413. //
  1414. // Creating a request object using this method should be used when you want to inject
  1415. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1416. // access properties on the request object before or after sending the request. If
  1417. // you just want the service response, call the DeleteWebACL method directly
  1418. // instead.
  1419. //
  1420. // Note: You must call the "Send" method on the returned request object in order
  1421. // to execute the request.
  1422. //
  1423. // // Example sending a request using the DeleteWebACLRequest method.
  1424. // req, resp := client.DeleteWebACLRequest(params)
  1425. //
  1426. // err := req.Send()
  1427. // if err == nil { // resp is now filled
  1428. // fmt.Println(resp)
  1429. // }
  1430. //
  1431. func (c *WAF) DeleteWebACLRequest(input *DeleteWebACLInput) (req *request.Request, output *DeleteWebACLOutput) {
  1432. op := &request.Operation{
  1433. Name: opDeleteWebACL,
  1434. HTTPMethod: "POST",
  1435. HTTPPath: "/",
  1436. }
  1437. if input == nil {
  1438. input = &DeleteWebACLInput{}
  1439. }
  1440. req = c.newRequest(op, input, output)
  1441. output = &DeleteWebACLOutput{}
  1442. req.Data = output
  1443. return
  1444. }
  1445. // DeleteWebACL API operation for AWS WAF.
  1446. //
  1447. // Permanently deletes a WebACL. You can't delete a WebACL if it still contains
  1448. // any Rules.
  1449. //
  1450. // To delete a WebACL, perform the following steps:
  1451. //
  1452. // Update the WebACL to remove Rules, if any. For more information, see UpdateWebACL.
  1453. //
  1454. // Use GetChangeToken to get the change token that you provide in the ChangeToken
  1455. // parameter of a DeleteWebACL request.
  1456. //
  1457. // Submit a DeleteWebACL request.
  1458. //
  1459. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1460. // with awserr.Error's Code and Message methods to get detailed information about
  1461. // the error.
  1462. //
  1463. // See the AWS API reference guide for AWS WAF's
  1464. // API operation DeleteWebACL for usage and error information.
  1465. //
  1466. // Returned Error Codes:
  1467. // * StaleDataException
  1468. // The operation failed because you tried to create, update, or delete an object
  1469. // by using a change token that has already been used.
  1470. //
  1471. // * InternalErrorException
  1472. // The operation failed because of a system problem, even though the request
  1473. // was valid. Retry your request.
  1474. //
  1475. // * InvalidAccountException
  1476. // The operation failed because you tried to create, update, or delete an object
  1477. // by using an invalid account identifier.
  1478. //
  1479. // * NonexistentItemException
  1480. // The operation failed because the referenced object doesn't exist.
  1481. //
  1482. // * ReferencedItemException
  1483. // The operation failed because you tried to delete an object that is still
  1484. // in use. For example:
  1485. //
  1486. // * You tried to delete a ByteMatchSet that is still referenced by a Rule.
  1487. //
  1488. // * You tried to delete a Rule that is still referenced by a WebACL.
  1489. //
  1490. // * NonEmptyEntityException
  1491. // The operation failed because you tried to delete an object that isn't empty.
  1492. // For example:
  1493. //
  1494. // * You tried to delete a WebACL that still contains one or more Rule objects.
  1495. //
  1496. // * You tried to delete a Rule that still contains one or more ByteMatchSet
  1497. // objects or other predicates.
  1498. //
  1499. // * You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple
  1500. // objects.
  1501. //
  1502. // * You tried to delete an IPSet that references one or more IP addresses.
  1503. //
  1504. func (c *WAF) DeleteWebACL(input *DeleteWebACLInput) (*DeleteWebACLOutput, error) {
  1505. req, out := c.DeleteWebACLRequest(input)
  1506. err := req.Send()
  1507. return out, err
  1508. }
  1509. const opDeleteXssMatchSet = "DeleteXssMatchSet"
  1510. // DeleteXssMatchSetRequest generates a "aws/request.Request" representing the
  1511. // client's request for the DeleteXssMatchSet operation. The "output" return
  1512. // value can be used to capture response data after the request's "Send" method
  1513. // is called.
  1514. //
  1515. // See DeleteXssMatchSet for usage and error information.
  1516. //
  1517. // Creating a request object using this method should be used when you want to inject
  1518. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1519. // access properties on the request object before or after sending the request. If
  1520. // you just want the service response, call the DeleteXssMatchSet method directly
  1521. // instead.
  1522. //
  1523. // Note: You must call the "Send" method on the returned request object in order
  1524. // to execute the request.
  1525. //
  1526. // // Example sending a request using the DeleteXssMatchSetRequest method.
  1527. // req, resp := client.DeleteXssMatchSetRequest(params)
  1528. //
  1529. // err := req.Send()
  1530. // if err == nil { // resp is now filled
  1531. // fmt.Println(resp)
  1532. // }
  1533. //
  1534. func (c *WAF) DeleteXssMatchSetRequest(input *DeleteXssMatchSetInput) (req *request.Request, output *DeleteXssMatchSetOutput) {
  1535. op := &request.Operation{
  1536. Name: opDeleteXssMatchSet,
  1537. HTTPMethod: "POST",
  1538. HTTPPath: "/",
  1539. }
  1540. if input == nil {
  1541. input = &DeleteXssMatchSetInput{}
  1542. }
  1543. req = c.newRequest(op, input, output)
  1544. output = &DeleteXssMatchSetOutput{}
  1545. req.Data = output
  1546. return
  1547. }
  1548. // DeleteXssMatchSet API operation for AWS WAF.
  1549. //
  1550. // Permanently deletes an XssMatchSet. You can't delete an XssMatchSet if it's
  1551. // still used in any Rules or if it still contains any XssMatchTuple objects.
  1552. //
  1553. // If you just want to remove an XssMatchSet from a Rule, use UpdateRule.
  1554. //
  1555. // To permanently delete an XssMatchSet from AWS WAF, perform the following
  1556. // steps:
  1557. //
  1558. // Update the XssMatchSet to remove filters, if any. For more information, see
  1559. // UpdateXssMatchSet.
  1560. //
  1561. // Use GetChangeToken to get the change token that you provide in the ChangeToken
  1562. // parameter of a DeleteXssMatchSet request.
  1563. //
  1564. // Submit a DeleteXssMatchSet request.
  1565. //
  1566. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1567. // with awserr.Error's Code and Message methods to get detailed information about
  1568. // the error.
  1569. //
  1570. // See the AWS API reference guide for AWS WAF's
  1571. // API operation DeleteXssMatchSet for usage and error information.
  1572. //
  1573. // Returned Error Codes:
  1574. // * InternalErrorException
  1575. // The operation failed because of a system problem, even though the request
  1576. // was valid. Retry your request.
  1577. //
  1578. // * InvalidAccountException
  1579. // The operation failed because you tried to create, update, or delete an object
  1580. // by using an invalid account identifier.
  1581. //
  1582. // * NonexistentItemException
  1583. // The operation failed because the referenced object doesn't exist.
  1584. //
  1585. // * ReferencedItemException
  1586. // The operation failed because you tried to delete an object that is still
  1587. // in use. For example:
  1588. //
  1589. // * You tried to delete a ByteMatchSet that is still referenced by a Rule.
  1590. //
  1591. // * You tried to delete a Rule that is still referenced by a WebACL.
  1592. //
  1593. // * StaleDataException
  1594. // The operation failed because you tried to create, update, or delete an object
  1595. // by using a change token that has already been used.
  1596. //
  1597. // * NonEmptyEntityException
  1598. // The operation failed because you tried to delete an object that isn't empty.
  1599. // For example:
  1600. //
  1601. // * You tried to delete a WebACL that still contains one or more Rule objects.
  1602. //
  1603. // * You tried to delete a Rule that still contains one or more ByteMatchSet
  1604. // objects or other predicates.
  1605. //
  1606. // * You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple
  1607. // objects.
  1608. //
  1609. // * You tried to delete an IPSet that references one or more IP addresses.
  1610. //
  1611. func (c *WAF) DeleteXssMatchSet(input *DeleteXssMatchSetInput) (*DeleteXssMatchSetOutput, error) {
  1612. req, out := c.DeleteXssMatchSetRequest(input)
  1613. err := req.Send()
  1614. return out, err
  1615. }
  1616. const opGetByteMatchSet = "GetByteMatchSet"
  1617. // GetByteMatchSetRequest generates a "aws/request.Request" representing the
  1618. // client's request for the GetByteMatchSet operation. The "output" return
  1619. // value can be used to capture response data after the request's "Send" method
  1620. // is called.
  1621. //
  1622. // See GetByteMatchSet for usage and error information.
  1623. //
  1624. // Creating a request object using this method should be used when you want to inject
  1625. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1626. // access properties on the request object before or after sending the request. If
  1627. // you just want the service response, call the GetByteMatchSet method directly
  1628. // instead.
  1629. //
  1630. // Note: You must call the "Send" method on the returned request object in order
  1631. // to execute the request.
  1632. //
  1633. // // Example sending a request using the GetByteMatchSetRequest method.
  1634. // req, resp := client.GetByteMatchSetRequest(params)
  1635. //
  1636. // err := req.Send()
  1637. // if err == nil { // resp is now filled
  1638. // fmt.Println(resp)
  1639. // }
  1640. //
  1641. func (c *WAF) GetByteMatchSetRequest(input *GetByteMatchSetInput) (req *request.Request, output *GetByteMatchSetOutput) {
  1642. op := &request.Operation{
  1643. Name: opGetByteMatchSet,
  1644. HTTPMethod: "POST",
  1645. HTTPPath: "/",
  1646. }
  1647. if input == nil {
  1648. input = &GetByteMatchSetInput{}
  1649. }
  1650. req = c.newRequest(op, input, output)
  1651. output = &GetByteMatchSetOutput{}
  1652. req.Data = output
  1653. return
  1654. }
  1655. // GetByteMatchSet API operation for AWS WAF.
  1656. //
  1657. // Returns the ByteMatchSet specified by ByteMatchSetId.
  1658. //
  1659. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1660. // with awserr.Error's Code and Message methods to get detailed information about
  1661. // the error.
  1662. //
  1663. // See the AWS API reference guide for AWS WAF's
  1664. // API operation GetByteMatchSet for usage and error information.
  1665. //
  1666. // Returned Error Codes:
  1667. // * InternalErrorException
  1668. // The operation failed because of a system problem, even though the request
  1669. // was valid. Retry your request.
  1670. //
  1671. // * InvalidAccountException
  1672. // The operation failed because you tried to create, update, or delete an object
  1673. // by using an invalid account identifier.
  1674. //
  1675. // * NonexistentItemException
  1676. // The operation failed because the referenced object doesn't exist.
  1677. //
  1678. func (c *WAF) GetByteMatchSet(input *GetByteMatchSetInput) (*GetByteMatchSetOutput, error) {
  1679. req, out := c.GetByteMatchSetRequest(input)
  1680. err := req.Send()
  1681. return out, err
  1682. }
  1683. const opGetChangeToken = "GetChangeToken"
  1684. // GetChangeTokenRequest generates a "aws/request.Request" representing the
  1685. // client's request for the GetChangeToken operation. The "output" return
  1686. // value can be used to capture response data after the request's "Send" method
  1687. // is called.
  1688. //
  1689. // See GetChangeToken for usage and error information.
  1690. //
  1691. // Creating a request object using this method should be used when you want to inject
  1692. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1693. // access properties on the request object before or after sending the request. If
  1694. // you just want the service response, call the GetChangeToken method directly
  1695. // instead.
  1696. //
  1697. // Note: You must call the "Send" method on the returned request object in order
  1698. // to execute the request.
  1699. //
  1700. // // Example sending a request using the GetChangeTokenRequest method.
  1701. // req, resp := client.GetChangeTokenRequest(params)
  1702. //
  1703. // err := req.Send()
  1704. // if err == nil { // resp is now filled
  1705. // fmt.Println(resp)
  1706. // }
  1707. //
  1708. func (c *WAF) GetChangeTokenRequest(input *GetChangeTokenInput) (req *request.Request, output *GetChangeTokenOutput) {
  1709. op := &request.Operation{
  1710. Name: opGetChangeToken,
  1711. HTTPMethod: "POST",
  1712. HTTPPath: "/",
  1713. }
  1714. if input == nil {
  1715. input = &GetChangeTokenInput{}
  1716. }
  1717. req = c.newRequest(op, input, output)
  1718. output = &GetChangeTokenOutput{}
  1719. req.Data = output
  1720. return
  1721. }
  1722. // GetChangeToken API operation for AWS WAF.
  1723. //
  1724. // When you want to create, update, or delete AWS WAF objects, get a change
  1725. // token and include the change token in the create, update, or delete request.
  1726. // Change tokens ensure that your application doesn't submit conflicting requests
  1727. // to AWS WAF.
  1728. //
  1729. // Each create, update, or delete request must use a unique change token. If
  1730. // your application submits a GetChangeToken request and then submits a second
  1731. // GetChangeToken request before submitting a create, update, or delete request,
  1732. // the second GetChangeToken request returns the same value as the first GetChangeToken
  1733. // request.
  1734. //
  1735. // When you use a change token in a create, update, or delete request, the status
  1736. // of the change token changes to PENDING, which indicates that AWS WAF is propagating
  1737. // the change to all AWS WAF servers. Use GetChangeTokenStatus to determine
  1738. // the status of your change token.
  1739. //
  1740. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1741. // with awserr.Error's Code and Message methods to get detailed information about
  1742. // the error.
  1743. //
  1744. // See the AWS API reference guide for AWS WAF's
  1745. // API operation GetChangeToken for usage and error information.
  1746. //
  1747. // Returned Error Codes:
  1748. // * InternalErrorException
  1749. // The operation failed because of a system problem, even though the request
  1750. // was valid. Retry your request.
  1751. //
  1752. func (c *WAF) GetChangeToken(input *GetChangeTokenInput) (*GetChangeTokenOutput, error) {
  1753. req, out := c.GetChangeTokenRequest(input)
  1754. err := req.Send()
  1755. return out, err
  1756. }
  1757. const opGetChangeTokenStatus = "GetChangeTokenStatus"
  1758. // GetChangeTokenStatusRequest generates a "aws/request.Request" representing the
  1759. // client's request for the GetChangeTokenStatus operation. The "output" return
  1760. // value can be used to capture response data after the request's "Send" method
  1761. // is called.
  1762. //
  1763. // See GetChangeTokenStatus for usage and error information.
  1764. //
  1765. // Creating a request object using this method should be used when you want to inject
  1766. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1767. // access properties on the request object before or after sending the request. If
  1768. // you just want the service response, call the GetChangeTokenStatus method directly
  1769. // instead.
  1770. //
  1771. // Note: You must call the "Send" method on the returned request object in order
  1772. // to execute the request.
  1773. //
  1774. // // Example sending a request using the GetChangeTokenStatusRequest method.
  1775. // req, resp := client.GetChangeTokenStatusRequest(params)
  1776. //
  1777. // err := req.Send()
  1778. // if err == nil { // resp is now filled
  1779. // fmt.Println(resp)
  1780. // }
  1781. //
  1782. func (c *WAF) GetChangeTokenStatusRequest(input *GetChangeTokenStatusInput) (req *request.Request, output *GetChangeTokenStatusOutput) {
  1783. op := &request.Operation{
  1784. Name: opGetChangeTokenStatus,
  1785. HTTPMethod: "POST",
  1786. HTTPPath: "/",
  1787. }
  1788. if input == nil {
  1789. input = &GetChangeTokenStatusInput{}
  1790. }
  1791. req = c.newRequest(op, input, output)
  1792. output = &GetChangeTokenStatusOutput{}
  1793. req.Data = output
  1794. return
  1795. }
  1796. // GetChangeTokenStatus API operation for AWS WAF.
  1797. //
  1798. // Returns the status of a ChangeToken that you got by calling GetChangeToken.
  1799. // ChangeTokenStatus is one of the following values:
  1800. //
  1801. // * PROVISIONED: You requested the change token by calling GetChangeToken,
  1802. // but you haven't used it yet in a call to create, update, or delete an
  1803. // AWS WAF object.
  1804. //
  1805. // * PENDING: AWS WAF is propagating the create, update, or delete request
  1806. // to all AWS WAF servers.
  1807. //
  1808. // * IN_SYNC: Propagation is complete.
  1809. //
  1810. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1811. // with awserr.Error's Code and Message methods to get detailed information about
  1812. // the error.
  1813. //
  1814. // See the AWS API reference guide for AWS WAF's
  1815. // API operation GetChangeTokenStatus for usage and error information.
  1816. //
  1817. // Returned Error Codes:
  1818. // * NonexistentItemException
  1819. // The operation failed because the referenced object doesn't exist.
  1820. //
  1821. // * InternalErrorException
  1822. // The operation failed because of a system problem, even though the request
  1823. // was valid. Retry your request.
  1824. //
  1825. func (c *WAF) GetChangeTokenStatus(input *GetChangeTokenStatusInput) (*GetChangeTokenStatusOutput, error) {
  1826. req, out := c.GetChangeTokenStatusRequest(input)
  1827. err := req.Send()
  1828. return out, err
  1829. }
  1830. const opGetIPSet = "GetIPSet"
  1831. // GetIPSetRequest generates a "aws/request.Request" representing the
  1832. // client's request for the GetIPSet operation. The "output" return
  1833. // value can be used to capture response data after the request's "Send" method
  1834. // is called.
  1835. //
  1836. // See GetIPSet for usage and error information.
  1837. //
  1838. // Creating a request object using this method should be used when you want to inject
  1839. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1840. // access properties on the request object before or after sending the request. If
  1841. // you just want the service response, call the GetIPSet method directly
  1842. // instead.
  1843. //
  1844. // Note: You must call the "Send" method on the returned request object in order
  1845. // to execute the request.
  1846. //
  1847. // // Example sending a request using the GetIPSetRequest method.
  1848. // req, resp := client.GetIPSetRequest(params)
  1849. //
  1850. // err := req.Send()
  1851. // if err == nil { // resp is now filled
  1852. // fmt.Println(resp)
  1853. // }
  1854. //
  1855. func (c *WAF) GetIPSetRequest(input *GetIPSetInput) (req *request.Request, output *GetIPSetOutput) {
  1856. op := &request.Operation{
  1857. Name: opGetIPSet,
  1858. HTTPMethod: "POST",
  1859. HTTPPath: "/",
  1860. }
  1861. if input == nil {
  1862. input = &GetIPSetInput{}
  1863. }
  1864. req = c.newRequest(op, input, output)
  1865. output = &GetIPSetOutput{}
  1866. req.Data = output
  1867. return
  1868. }
  1869. // GetIPSet API operation for AWS WAF.
  1870. //
  1871. // Returns the IPSet that is specified by IPSetId.
  1872. //
  1873. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1874. // with awserr.Error's Code and Message methods to get detailed information about
  1875. // the error.
  1876. //
  1877. // See the AWS API reference guide for AWS WAF's
  1878. // API operation GetIPSet for usage and error information.
  1879. //
  1880. // Returned Error Codes:
  1881. // * InternalErrorException
  1882. // The operation failed because of a system problem, even though the request
  1883. // was valid. Retry your request.
  1884. //
  1885. // * InvalidAccountException
  1886. // The operation failed because you tried to create, update, or delete an object
  1887. // by using an invalid account identifier.
  1888. //
  1889. // * NonexistentItemException
  1890. // The operation failed because the referenced object doesn't exist.
  1891. //
  1892. func (c *WAF) GetIPSet(input *GetIPSetInput) (*GetIPSetOutput, error) {
  1893. req, out := c.GetIPSetRequest(input)
  1894. err := req.Send()
  1895. return out, err
  1896. }
  1897. const opGetRule = "GetRule"
  1898. // GetRuleRequest generates a "aws/request.Request" representing the
  1899. // client's request for the GetRule operation. The "output" return
  1900. // value can be used to capture response data after the request's "Send" method
  1901. // is called.
  1902. //
  1903. // See GetRule for usage and error information.
  1904. //
  1905. // Creating a request object using this method should be used when you want to inject
  1906. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1907. // access properties on the request object before or after sending the request. If
  1908. // you just want the service response, call the GetRule method directly
  1909. // instead.
  1910. //
  1911. // Note: You must call the "Send" method on the returned request object in order
  1912. // to execute the request.
  1913. //
  1914. // // Example sending a request using the GetRuleRequest method.
  1915. // req, resp := client.GetRuleRequest(params)
  1916. //
  1917. // err := req.Send()
  1918. // if err == nil { // resp is now filled
  1919. // fmt.Println(resp)
  1920. // }
  1921. //
  1922. func (c *WAF) GetRuleRequest(input *GetRuleInput) (req *request.Request, output *GetRuleOutput) {
  1923. op := &request.Operation{
  1924. Name: opGetRule,
  1925. HTTPMethod: "POST",
  1926. HTTPPath: "/",
  1927. }
  1928. if input == nil {
  1929. input = &GetRuleInput{}
  1930. }
  1931. req = c.newRequest(op, input, output)
  1932. output = &GetRuleOutput{}
  1933. req.Data = output
  1934. return
  1935. }
  1936. // GetRule API operation for AWS WAF.
  1937. //
  1938. // Returns the Rule that is specified by the RuleId that you included in the
  1939. // GetRule request.
  1940. //
  1941. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1942. // with awserr.Error's Code and Message methods to get detailed information about
  1943. // the error.
  1944. //
  1945. // See the AWS API reference guide for AWS WAF's
  1946. // API operation GetRule for usage and error information.
  1947. //
  1948. // Returned Error Codes:
  1949. // * InternalErrorException
  1950. // The operation failed because of a system problem, even though the request
  1951. // was valid. Retry your request.
  1952. //
  1953. // * InvalidAccountException
  1954. // The operation failed because you tried to create, update, or delete an object
  1955. // by using an invalid account identifier.
  1956. //
  1957. // * NonexistentItemException
  1958. // The operation failed because the referenced object doesn't exist.
  1959. //
  1960. func (c *WAF) GetRule(input *GetRuleInput) (*GetRuleOutput, error) {
  1961. req, out := c.GetRuleRequest(input)
  1962. err := req.Send()
  1963. return out, err
  1964. }
  1965. const opGetSampledRequests = "GetSampledRequests"
  1966. // GetSampledRequestsRequest generates a "aws/request.Request" representing the
  1967. // client's request for the GetSampledRequests operation. The "output" return
  1968. // value can be used to capture response data after the request's "Send" method
  1969. // is called.
  1970. //
  1971. // See GetSampledRequests for usage and error information.
  1972. //
  1973. // Creating a request object using this method should be used when you want to inject
  1974. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1975. // access properties on the request object before or after sending the request. If
  1976. // you just want the service response, call the GetSampledRequests method directly
  1977. // instead.
  1978. //
  1979. // Note: You must call the "Send" method on the returned request object in order
  1980. // to execute the request.
  1981. //
  1982. // // Example sending a request using the GetSampledRequestsRequest method.
  1983. // req, resp := client.GetSampledRequestsRequest(params)
  1984. //
  1985. // err := req.Send()
  1986. // if err == nil { // resp is now filled
  1987. // fmt.Println(resp)
  1988. // }
  1989. //
  1990. func (c *WAF) GetSampledRequestsRequest(input *GetSampledRequestsInput) (req *request.Request, output *GetSampledRequestsOutput) {
  1991. op := &request.Operation{
  1992. Name: opGetSampledRequests,
  1993. HTTPMethod: "POST",
  1994. HTTPPath: "/",
  1995. }
  1996. if input == nil {
  1997. input = &GetSampledRequestsInput{}
  1998. }
  1999. req = c.newRequest(op, input, output)
  2000. output = &GetSampledRequestsOutput{}
  2001. req.Data = output
  2002. return
  2003. }
  2004. // GetSampledRequests API operation for AWS WAF.
  2005. //
  2006. // Gets detailed information about a specified number of requests--a sample--that
  2007. // AWS WAF randomly selects from among the first 5,000 requests that your AWS
  2008. // resource received during a time range that you choose. You can specify a
  2009. // sample size of up to 100 requests, and you can specify any time range in
  2010. // the previous three hours.
  2011. //
  2012. // GetSampledRequests returns a time range, which is usually the time range
  2013. // that you specified. However, if your resource (such as a CloudFront distribution)
  2014. // received 5,000 requests before the specified time range elapsed, GetSampledRequests
  2015. // returns an updated time range. This new time range indicates the actual period
  2016. // during which AWS WAF selected the requests in the sample.
  2017. //
  2018. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2019. // with awserr.Error's Code and Message methods to get detailed information about
  2020. // the error.
  2021. //
  2022. // See the AWS API reference guide for AWS WAF's
  2023. // API operation GetSampledRequests for usage and error information.
  2024. //
  2025. // Returned Error Codes:
  2026. // * NonexistentItemException
  2027. // The operation failed because the referenced object doesn't exist.
  2028. //
  2029. // * InternalErrorException
  2030. // The operation failed because of a system problem, even though the request
  2031. // was valid. Retry your request.
  2032. //
  2033. func (c *WAF) GetSampledRequests(input *GetSampledRequestsInput) (*GetSampledRequestsOutput, error) {
  2034. req, out := c.GetSampledRequestsRequest(input)
  2035. err := req.Send()
  2036. return out, err
  2037. }
  2038. const opGetSizeConstraintSet = "GetSizeConstraintSet"
  2039. // GetSizeConstraintSetRequest generates a "aws/request.Request" representing the
  2040. // client's request for the GetSizeConstraintSet operation. The "output" return
  2041. // value can be used to capture response data after the request's "Send" method
  2042. // is called.
  2043. //
  2044. // See GetSizeConstraintSet for usage and error information.
  2045. //
  2046. // Creating a request object using this method should be used when you want to inject
  2047. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2048. // access properties on the request object before or after sending the request. If
  2049. // you just want the service response, call the GetSizeConstraintSet method directly
  2050. // instead.
  2051. //
  2052. // Note: You must call the "Send" method on the returned request object in order
  2053. // to execute the request.
  2054. //
  2055. // // Example sending a request using the GetSizeConstraintSetRequest method.
  2056. // req, resp := client.GetSizeConstraintSetRequest(params)
  2057. //
  2058. // err := req.Send()
  2059. // if err == nil { // resp is now filled
  2060. // fmt.Println(resp)
  2061. // }
  2062. //
  2063. func (c *WAF) GetSizeConstraintSetRequest(input *GetSizeConstraintSetInput) (req *request.Request, output *GetSizeConstraintSetOutput) {
  2064. op := &request.Operation{
  2065. Name: opGetSizeConstraintSet,
  2066. HTTPMethod: "POST",
  2067. HTTPPath: "/",
  2068. }
  2069. if input == nil {
  2070. input = &GetSizeConstraintSetInput{}
  2071. }
  2072. req = c.newRequest(op, input, output)
  2073. output = &GetSizeConstraintSetOutput{}
  2074. req.Data = output
  2075. return
  2076. }
  2077. // GetSizeConstraintSet API operation for AWS WAF.
  2078. //
  2079. // Returns the SizeConstraintSet specified by SizeConstraintSetId.
  2080. //
  2081. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2082. // with awserr.Error's Code and Message methods to get detailed information about
  2083. // the error.
  2084. //
  2085. // See the AWS API reference guide for AWS WAF's
  2086. // API operation GetSizeConstraintSet for usage and error information.
  2087. //
  2088. // Returned Error Codes:
  2089. // * InternalErrorException
  2090. // The operation failed because of a system problem, even though the request
  2091. // was valid. Retry your request.
  2092. //
  2093. // * InvalidAccountException
  2094. // The operation failed because you tried to create, update, or delete an object
  2095. // by using an invalid account identifier.
  2096. //
  2097. // * NonexistentItemException
  2098. // The operation failed because the referenced object doesn't exist.
  2099. //
  2100. func (c *WAF) GetSizeConstraintSet(input *GetSizeConstraintSetInput) (*GetSizeConstraintSetOutput, error) {
  2101. req, out := c.GetSizeConstraintSetRequest(input)
  2102. err := req.Send()
  2103. return out, err
  2104. }
  2105. const opGetSqlInjectionMatchSet = "GetSqlInjectionMatchSet"
  2106. // GetSqlInjectionMatchSetRequest generates a "aws/request.Request" representing the
  2107. // client's request for the GetSqlInjectionMatchSet operation. The "output" return
  2108. // value can be used to capture response data after the request's "Send" method
  2109. // is called.
  2110. //
  2111. // See GetSqlInjectionMatchSet for usage and error information.
  2112. //
  2113. // Creating a request object using this method should be used when you want to inject
  2114. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2115. // access properties on the request object before or after sending the request. If
  2116. // you just want the service response, call the GetSqlInjectionMatchSet method directly
  2117. // instead.
  2118. //
  2119. // Note: You must call the "Send" method on the returned request object in order
  2120. // to execute the request.
  2121. //
  2122. // // Example sending a request using the GetSqlInjectionMatchSetRequest method.
  2123. // req, resp := client.GetSqlInjectionMatchSetRequest(params)
  2124. //
  2125. // err := req.Send()
  2126. // if err == nil { // resp is now filled
  2127. // fmt.Println(resp)
  2128. // }
  2129. //
  2130. func (c *WAF) GetSqlInjectionMatchSetRequest(input *GetSqlInjectionMatchSetInput) (req *request.Request, output *GetSqlInjectionMatchSetOutput) {
  2131. op := &request.Operation{
  2132. Name: opGetSqlInjectionMatchSet,
  2133. HTTPMethod: "POST",
  2134. HTTPPath: "/",
  2135. }
  2136. if input == nil {
  2137. input = &GetSqlInjectionMatchSetInput{}
  2138. }
  2139. req = c.newRequest(op, input, output)
  2140. output = &GetSqlInjectionMatchSetOutput{}
  2141. req.Data = output
  2142. return
  2143. }
  2144. // GetSqlInjectionMatchSet API operation for AWS WAF.
  2145. //
  2146. // Returns the SqlInjectionMatchSet that is specified by SqlInjectionMatchSetId.
  2147. //
  2148. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2149. // with awserr.Error's Code and Message methods to get detailed information about
  2150. // the error.
  2151. //
  2152. // See the AWS API reference guide for AWS WAF's
  2153. // API operation GetSqlInjectionMatchSet for usage and error information.
  2154. //
  2155. // Returned Error Codes:
  2156. // * InternalErrorException
  2157. // The operation failed because of a system problem, even though the request
  2158. // was valid. Retry your request.
  2159. //
  2160. // * InvalidAccountException
  2161. // The operation failed because you tried to create, update, or delete an object
  2162. // by using an invalid account identifier.
  2163. //
  2164. // * NonexistentItemException
  2165. // The operation failed because the referenced object doesn't exist.
  2166. //
  2167. func (c *WAF) GetSqlInjectionMatchSet(input *GetSqlInjectionMatchSetInput) (*GetSqlInjectionMatchSetOutput, error) {
  2168. req, out := c.GetSqlInjectionMatchSetRequest(input)
  2169. err := req.Send()
  2170. return out, err
  2171. }
  2172. const opGetWebACL = "GetWebACL"
  2173. // GetWebACLRequest generates a "aws/request.Request" representing the
  2174. // client's request for the GetWebACL operation. The "output" return
  2175. // value can be used to capture response data after the request's "Send" method
  2176. // is called.
  2177. //
  2178. // See GetWebACL for usage and error information.
  2179. //
  2180. // Creating a request object using this method should be used when you want to inject
  2181. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2182. // access properties on the request object before or after sending the request. If
  2183. // you just want the service response, call the GetWebACL method directly
  2184. // instead.
  2185. //
  2186. // Note: You must call the "Send" method on the returned request object in order
  2187. // to execute the request.
  2188. //
  2189. // // Example sending a request using the GetWebACLRequest method.
  2190. // req, resp := client.GetWebACLRequest(params)
  2191. //
  2192. // err := req.Send()
  2193. // if err == nil { // resp is now filled
  2194. // fmt.Println(resp)
  2195. // }
  2196. //
  2197. func (c *WAF) GetWebACLRequest(input *GetWebACLInput) (req *request.Request, output *GetWebACLOutput) {
  2198. op := &request.Operation{
  2199. Name: opGetWebACL,
  2200. HTTPMethod: "POST",
  2201. HTTPPath: "/",
  2202. }
  2203. if input == nil {
  2204. input = &GetWebACLInput{}
  2205. }
  2206. req = c.newRequest(op, input, output)
  2207. output = &GetWebACLOutput{}
  2208. req.Data = output
  2209. return
  2210. }
  2211. // GetWebACL API operation for AWS WAF.
  2212. //
  2213. // Returns the WebACL that is specified by WebACLId.
  2214. //
  2215. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2216. // with awserr.Error's Code and Message methods to get detailed information about
  2217. // the error.
  2218. //
  2219. // See the AWS API reference guide for AWS WAF's
  2220. // API operation GetWebACL for usage and error information.
  2221. //
  2222. // Returned Error Codes:
  2223. // * InternalErrorException
  2224. // The operation failed because of a system problem, even though the request
  2225. // was valid. Retry your request.
  2226. //
  2227. // * InvalidAccountException
  2228. // The operation failed because you tried to create, update, or delete an object
  2229. // by using an invalid account identifier.
  2230. //
  2231. // * NonexistentItemException
  2232. // The operation failed because the referenced object doesn't exist.
  2233. //
  2234. func (c *WAF) GetWebACL(input *GetWebACLInput) (*GetWebACLOutput, error) {
  2235. req, out := c.GetWebACLRequest(input)
  2236. err := req.Send()
  2237. return out, err
  2238. }
  2239. const opGetXssMatchSet = "GetXssMatchSet"
  2240. // GetXssMatchSetRequest generates a "aws/request.Request" representing the
  2241. // client's request for the GetXssMatchSet operation. The "output" return
  2242. // value can be used to capture response data after the request's "Send" method
  2243. // is called.
  2244. //
  2245. // See GetXssMatchSet for usage and error information.
  2246. //
  2247. // Creating a request object using this method should be used when you want to inject
  2248. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2249. // access properties on the request object before or after sending the request. If
  2250. // you just want the service response, call the GetXssMatchSet method directly
  2251. // instead.
  2252. //
  2253. // Note: You must call the "Send" method on the returned request object in order
  2254. // to execute the request.
  2255. //
  2256. // // Example sending a request using the GetXssMatchSetRequest method.
  2257. // req, resp := client.GetXssMatchSetRequest(params)
  2258. //
  2259. // err := req.Send()
  2260. // if err == nil { // resp is now filled
  2261. // fmt.Println(resp)
  2262. // }
  2263. //
  2264. func (c *WAF) GetXssMatchSetRequest(input *GetXssMatchSetInput) (req *request.Request, output *GetXssMatchSetOutput) {
  2265. op := &request.Operation{
  2266. Name: opGetXssMatchSet,
  2267. HTTPMethod: "POST",
  2268. HTTPPath: "/",
  2269. }
  2270. if input == nil {
  2271. input = &GetXssMatchSetInput{}
  2272. }
  2273. req = c.newRequest(op, input, output)
  2274. output = &GetXssMatchSetOutput{}
  2275. req.Data = output
  2276. return
  2277. }
  2278. // GetXssMatchSet API operation for AWS WAF.
  2279. //
  2280. // Returns the XssMatchSet that is specified by XssMatchSetId.
  2281. //
  2282. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2283. // with awserr.Error's Code and Message methods to get detailed information about
  2284. // the error.
  2285. //
  2286. // See the AWS API reference guide for AWS WAF's
  2287. // API operation GetXssMatchSet for usage and error information.
  2288. //
  2289. // Returned Error Codes:
  2290. // * InternalErrorException
  2291. // The operation failed because of a system problem, even though the request
  2292. // was valid. Retry your request.
  2293. //
  2294. // * InvalidAccountException
  2295. // The operation failed because you tried to create, update, or delete an object
  2296. // by using an invalid account identifier.
  2297. //
  2298. // * NonexistentItemException
  2299. // The operation failed because the referenced object doesn't exist.
  2300. //
  2301. func (c *WAF) GetXssMatchSet(input *GetXssMatchSetInput) (*GetXssMatchSetOutput, error) {
  2302. req, out := c.GetXssMatchSetRequest(input)
  2303. err := req.Send()
  2304. return out, err
  2305. }
  2306. const opListByteMatchSets = "ListByteMatchSets"
  2307. // ListByteMatchSetsRequest generates a "aws/request.Request" representing the
  2308. // client's request for the ListByteMatchSets operation. The "output" return
  2309. // value can be used to capture response data after the request's "Send" method
  2310. // is called.
  2311. //
  2312. // See ListByteMatchSets for usage and error information.
  2313. //
  2314. // Creating a request object using this method should be used when you want to inject
  2315. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2316. // access properties on the request object before or after sending the request. If
  2317. // you just want the service response, call the ListByteMatchSets method directly
  2318. // instead.
  2319. //
  2320. // Note: You must call the "Send" method on the returned request object in order
  2321. // to execute the request.
  2322. //
  2323. // // Example sending a request using the ListByteMatchSetsRequest method.
  2324. // req, resp := client.ListByteMatchSetsRequest(params)
  2325. //
  2326. // err := req.Send()
  2327. // if err == nil { // resp is now filled
  2328. // fmt.Println(resp)
  2329. // }
  2330. //
  2331. func (c *WAF) ListByteMatchSetsRequest(input *ListByteMatchSetsInput) (req *request.Request, output *ListByteMatchSetsOutput) {
  2332. op := &request.Operation{
  2333. Name: opListByteMatchSets,
  2334. HTTPMethod: "POST",
  2335. HTTPPath: "/",
  2336. }
  2337. if input == nil {
  2338. input = &ListByteMatchSetsInput{}
  2339. }
  2340. req = c.newRequest(op, input, output)
  2341. output = &ListByteMatchSetsOutput{}
  2342. req.Data = output
  2343. return
  2344. }
  2345. // ListByteMatchSets API operation for AWS WAF.
  2346. //
  2347. // Returns an array of ByteMatchSetSummary objects.
  2348. //
  2349. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2350. // with awserr.Error's Code and Message methods to get detailed information about
  2351. // the error.
  2352. //
  2353. // See the AWS API reference guide for AWS WAF's
  2354. // API operation ListByteMatchSets for usage and error information.
  2355. //
  2356. // Returned Error Codes:
  2357. // * InternalErrorException
  2358. // The operation failed because of a system problem, even though the request
  2359. // was valid. Retry your request.
  2360. //
  2361. // * InvalidAccountException
  2362. // The operation failed because you tried to create, update, or delete an object
  2363. // by using an invalid account identifier.
  2364. //
  2365. func (c *WAF) ListByteMatchSets(input *ListByteMatchSetsInput) (*ListByteMatchSetsOutput, error) {
  2366. req, out := c.ListByteMatchSetsRequest(input)
  2367. err := req.Send()
  2368. return out, err
  2369. }
  2370. const opListIPSets = "ListIPSets"
  2371. // ListIPSetsRequest generates a "aws/request.Request" representing the
  2372. // client's request for the ListIPSets operation. The "output" return
  2373. // value can be used to capture response data after the request's "Send" method
  2374. // is called.
  2375. //
  2376. // See ListIPSets for usage and error information.
  2377. //
  2378. // Creating a request object using this method should be used when you want to inject
  2379. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2380. // access properties on the request object before or after sending the request. If
  2381. // you just want the service response, call the ListIPSets method directly
  2382. // instead.
  2383. //
  2384. // Note: You must call the "Send" method on the returned request object in order
  2385. // to execute the request.
  2386. //
  2387. // // Example sending a request using the ListIPSetsRequest method.
  2388. // req, resp := client.ListIPSetsRequest(params)
  2389. //
  2390. // err := req.Send()
  2391. // if err == nil { // resp is now filled
  2392. // fmt.Println(resp)
  2393. // }
  2394. //
  2395. func (c *WAF) ListIPSetsRequest(input *ListIPSetsInput) (req *request.Request, output *ListIPSetsOutput) {
  2396. op := &request.Operation{
  2397. Name: opListIPSets,
  2398. HTTPMethod: "POST",
  2399. HTTPPath: "/",
  2400. }
  2401. if input == nil {
  2402. input = &ListIPSetsInput{}
  2403. }
  2404. req = c.newRequest(op, input, output)
  2405. output = &ListIPSetsOutput{}
  2406. req.Data = output
  2407. return
  2408. }
  2409. // ListIPSets API operation for AWS WAF.
  2410. //
  2411. // Returns an array of IPSetSummary objects in the response.
  2412. //
  2413. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2414. // with awserr.Error's Code and Message methods to get detailed information about
  2415. // the error.
  2416. //
  2417. // See the AWS API reference guide for AWS WAF's
  2418. // API operation ListIPSets for usage and error information.
  2419. //
  2420. // Returned Error Codes:
  2421. // * InternalErrorException
  2422. // The operation failed because of a system problem, even though the request
  2423. // was valid. Retry your request.
  2424. //
  2425. // * InvalidAccountException
  2426. // The operation failed because you tried to create, update, or delete an object
  2427. // by using an invalid account identifier.
  2428. //
  2429. func (c *WAF) ListIPSets(input *ListIPSetsInput) (*ListIPSetsOutput, error) {
  2430. req, out := c.ListIPSetsRequest(input)
  2431. err := req.Send()
  2432. return out, err
  2433. }
  2434. const opListRules = "ListRules"
  2435. // ListRulesRequest generates a "aws/request.Request" representing the
  2436. // client's request for the ListRules operation. The "output" return
  2437. // value can be used to capture response data after the request's "Send" method
  2438. // is called.
  2439. //
  2440. // See ListRules for usage and error information.
  2441. //
  2442. // Creating a request object using this method should be used when you want to inject
  2443. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2444. // access properties on the request object before or after sending the request. If
  2445. // you just want the service response, call the ListRules method directly
  2446. // instead.
  2447. //
  2448. // Note: You must call the "Send" method on the returned request object in order
  2449. // to execute the request.
  2450. //
  2451. // // Example sending a request using the ListRulesRequest method.
  2452. // req, resp := client.ListRulesRequest(params)
  2453. //
  2454. // err := req.Send()
  2455. // if err == nil { // resp is now filled
  2456. // fmt.Println(resp)
  2457. // }
  2458. //
  2459. func (c *WAF) ListRulesRequest(input *ListRulesInput) (req *request.Request, output *ListRulesOutput) {
  2460. op := &request.Operation{
  2461. Name: opListRules,
  2462. HTTPMethod: "POST",
  2463. HTTPPath: "/",
  2464. }
  2465. if input == nil {
  2466. input = &ListRulesInput{}
  2467. }
  2468. req = c.newRequest(op, input, output)
  2469. output = &ListRulesOutput{}
  2470. req.Data = output
  2471. return
  2472. }
  2473. // ListRules API operation for AWS WAF.
  2474. //
  2475. // Returns an array of RuleSummary objects.
  2476. //
  2477. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2478. // with awserr.Error's Code and Message methods to get detailed information about
  2479. // the error.
  2480. //
  2481. // See the AWS API reference guide for AWS WAF's
  2482. // API operation ListRules for usage and error information.
  2483. //
  2484. // Returned Error Codes:
  2485. // * InternalErrorException
  2486. // The operation failed because of a system problem, even though the request
  2487. // was valid. Retry your request.
  2488. //
  2489. // * InvalidAccountException
  2490. // The operation failed because you tried to create, update, or delete an object
  2491. // by using an invalid account identifier.
  2492. //
  2493. func (c *WAF) ListRules(input *ListRulesInput) (*ListRulesOutput, error) {
  2494. req, out := c.ListRulesRequest(input)
  2495. err := req.Send()
  2496. return out, err
  2497. }
  2498. const opListSizeConstraintSets = "ListSizeConstraintSets"
  2499. // ListSizeConstraintSetsRequest generates a "aws/request.Request" representing the
  2500. // client's request for the ListSizeConstraintSets operation. The "output" return
  2501. // value can be used to capture response data after the request's "Send" method
  2502. // is called.
  2503. //
  2504. // See ListSizeConstraintSets for usage and error information.
  2505. //
  2506. // Creating a request object using this method should be used when you want to inject
  2507. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2508. // access properties on the request object before or after sending the request. If
  2509. // you just want the service response, call the ListSizeConstraintSets method directly
  2510. // instead.
  2511. //
  2512. // Note: You must call the "Send" method on the returned request object in order
  2513. // to execute the request.
  2514. //
  2515. // // Example sending a request using the ListSizeConstraintSetsRequest method.
  2516. // req, resp := client.ListSizeConstraintSetsRequest(params)
  2517. //
  2518. // err := req.Send()
  2519. // if err == nil { // resp is now filled
  2520. // fmt.Println(resp)
  2521. // }
  2522. //
  2523. func (c *WAF) ListSizeConstraintSetsRequest(input *ListSizeConstraintSetsInput) (req *request.Request, output *ListSizeConstraintSetsOutput) {
  2524. op := &request.Operation{
  2525. Name: opListSizeConstraintSets,
  2526. HTTPMethod: "POST",
  2527. HTTPPath: "/",
  2528. }
  2529. if input == nil {
  2530. input = &ListSizeConstraintSetsInput{}
  2531. }
  2532. req = c.newRequest(op, input, output)
  2533. output = &ListSizeConstraintSetsOutput{}
  2534. req.Data = output
  2535. return
  2536. }
  2537. // ListSizeConstraintSets API operation for AWS WAF.
  2538. //
  2539. // Returns an array of SizeConstraintSetSummary objects.
  2540. //
  2541. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2542. // with awserr.Error's Code and Message methods to get detailed information about
  2543. // the error.
  2544. //
  2545. // See the AWS API reference guide for AWS WAF's
  2546. // API operation ListSizeConstraintSets for usage and error information.
  2547. //
  2548. // Returned Error Codes:
  2549. // * InternalErrorException
  2550. // The operation failed because of a system problem, even though the request
  2551. // was valid. Retry your request.
  2552. //
  2553. // * InvalidAccountException
  2554. // The operation failed because you tried to create, update, or delete an object
  2555. // by using an invalid account identifier.
  2556. //
  2557. func (c *WAF) ListSizeConstraintSets(input *ListSizeConstraintSetsInput) (*ListSizeConstraintSetsOutput, error) {
  2558. req, out := c.ListSizeConstraintSetsRequest(input)
  2559. err := req.Send()
  2560. return out, err
  2561. }
  2562. const opListSqlInjectionMatchSets = "ListSqlInjectionMatchSets"
  2563. // ListSqlInjectionMatchSetsRequest generates a "aws/request.Request" representing the
  2564. // client's request for the ListSqlInjectionMatchSets operation. The "output" return
  2565. // value can be used to capture response data after the request's "Send" method
  2566. // is called.
  2567. //
  2568. // See ListSqlInjectionMatchSets for usage and error information.
  2569. //
  2570. // Creating a request object using this method should be used when you want to inject
  2571. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2572. // access properties on the request object before or after sending the request. If
  2573. // you just want the service response, call the ListSqlInjectionMatchSets method directly
  2574. // instead.
  2575. //
  2576. // Note: You must call the "Send" method on the returned request object in order
  2577. // to execute the request.
  2578. //
  2579. // // Example sending a request using the ListSqlInjectionMatchSetsRequest method.
  2580. // req, resp := client.ListSqlInjectionMatchSetsRequest(params)
  2581. //
  2582. // err := req.Send()
  2583. // if err == nil { // resp is now filled
  2584. // fmt.Println(resp)
  2585. // }
  2586. //
  2587. func (c *WAF) ListSqlInjectionMatchSetsRequest(input *ListSqlInjectionMatchSetsInput) (req *request.Request, output *ListSqlInjectionMatchSetsOutput) {
  2588. op := &request.Operation{
  2589. Name: opListSqlInjectionMatchSets,
  2590. HTTPMethod: "POST",
  2591. HTTPPath: "/",
  2592. }
  2593. if input == nil {
  2594. input = &ListSqlInjectionMatchSetsInput{}
  2595. }
  2596. req = c.newRequest(op, input, output)
  2597. output = &ListSqlInjectionMatchSetsOutput{}
  2598. req.Data = output
  2599. return
  2600. }
  2601. // ListSqlInjectionMatchSets API operation for AWS WAF.
  2602. //
  2603. // Returns an array of SqlInjectionMatchSet objects.
  2604. //
  2605. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2606. // with awserr.Error's Code and Message methods to get detailed information about
  2607. // the error.
  2608. //
  2609. // See the AWS API reference guide for AWS WAF's
  2610. // API operation ListSqlInjectionMatchSets for usage and error information.
  2611. //
  2612. // Returned Error Codes:
  2613. // * InternalErrorException
  2614. // The operation failed because of a system problem, even though the request
  2615. // was valid. Retry your request.
  2616. //
  2617. // * InvalidAccountException
  2618. // The operation failed because you tried to create, update, or delete an object
  2619. // by using an invalid account identifier.
  2620. //
  2621. func (c *WAF) ListSqlInjectionMatchSets(input *ListSqlInjectionMatchSetsInput) (*ListSqlInjectionMatchSetsOutput, error) {
  2622. req, out := c.ListSqlInjectionMatchSetsRequest(input)
  2623. err := req.Send()
  2624. return out, err
  2625. }
  2626. const opListWebACLs = "ListWebACLs"
  2627. // ListWebACLsRequest generates a "aws/request.Request" representing the
  2628. // client's request for the ListWebACLs operation. The "output" return
  2629. // value can be used to capture response data after the request's "Send" method
  2630. // is called.
  2631. //
  2632. // See ListWebACLs for usage and error information.
  2633. //
  2634. // Creating a request object using this method should be used when you want to inject
  2635. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2636. // access properties on the request object before or after sending the request. If
  2637. // you just want the service response, call the ListWebACLs method directly
  2638. // instead.
  2639. //
  2640. // Note: You must call the "Send" method on the returned request object in order
  2641. // to execute the request.
  2642. //
  2643. // // Example sending a request using the ListWebACLsRequest method.
  2644. // req, resp := client.ListWebACLsRequest(params)
  2645. //
  2646. // err := req.Send()
  2647. // if err == nil { // resp is now filled
  2648. // fmt.Println(resp)
  2649. // }
  2650. //
  2651. func (c *WAF) ListWebACLsRequest(input *ListWebACLsInput) (req *request.Request, output *ListWebACLsOutput) {
  2652. op := &request.Operation{
  2653. Name: opListWebACLs,
  2654. HTTPMethod: "POST",
  2655. HTTPPath: "/",
  2656. }
  2657. if input == nil {
  2658. input = &ListWebACLsInput{}
  2659. }
  2660. req = c.newRequest(op, input, output)
  2661. output = &ListWebACLsOutput{}
  2662. req.Data = output
  2663. return
  2664. }
  2665. // ListWebACLs API operation for AWS WAF.
  2666. //
  2667. // Returns an array of WebACLSummary objects in the response.
  2668. //
  2669. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2670. // with awserr.Error's Code and Message methods to get detailed information about
  2671. // the error.
  2672. //
  2673. // See the AWS API reference guide for AWS WAF's
  2674. // API operation ListWebACLs for usage and error information.
  2675. //
  2676. // Returned Error Codes:
  2677. // * InternalErrorException
  2678. // The operation failed because of a system problem, even though the request
  2679. // was valid. Retry your request.
  2680. //
  2681. // * InvalidAccountException
  2682. // The operation failed because you tried to create, update, or delete an object
  2683. // by using an invalid account identifier.
  2684. //
  2685. func (c *WAF) ListWebACLs(input *ListWebACLsInput) (*ListWebACLsOutput, error) {
  2686. req, out := c.ListWebACLsRequest(input)
  2687. err := req.Send()
  2688. return out, err
  2689. }
  2690. const opListXssMatchSets = "ListXssMatchSets"
  2691. // ListXssMatchSetsRequest generates a "aws/request.Request" representing the
  2692. // client's request for the ListXssMatchSets operation. The "output" return
  2693. // value can be used to capture response data after the request's "Send" method
  2694. // is called.
  2695. //
  2696. // See ListXssMatchSets for usage and error information.
  2697. //
  2698. // Creating a request object using this method should be used when you want to inject
  2699. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2700. // access properties on the request object before or after sending the request. If
  2701. // you just want the service response, call the ListXssMatchSets method directly
  2702. // instead.
  2703. //
  2704. // Note: You must call the "Send" method on the returned request object in order
  2705. // to execute the request.
  2706. //
  2707. // // Example sending a request using the ListXssMatchSetsRequest method.
  2708. // req, resp := client.ListXssMatchSetsRequest(params)
  2709. //
  2710. // err := req.Send()
  2711. // if err == nil { // resp is now filled
  2712. // fmt.Println(resp)
  2713. // }
  2714. //
  2715. func (c *WAF) ListXssMatchSetsRequest(input *ListXssMatchSetsInput) (req *request.Request, output *ListXssMatchSetsOutput) {
  2716. op := &request.Operation{
  2717. Name: opListXssMatchSets,
  2718. HTTPMethod: "POST",
  2719. HTTPPath: "/",
  2720. }
  2721. if input == nil {
  2722. input = &ListXssMatchSetsInput{}
  2723. }
  2724. req = c.newRequest(op, input, output)
  2725. output = &ListXssMatchSetsOutput{}
  2726. req.Data = output
  2727. return
  2728. }
  2729. // ListXssMatchSets API operation for AWS WAF.
  2730. //
  2731. // Returns an array of XssMatchSet objects.
  2732. //
  2733. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2734. // with awserr.Error's Code and Message methods to get detailed information about
  2735. // the error.
  2736. //
  2737. // See the AWS API reference guide for AWS WAF's
  2738. // API operation ListXssMatchSets for usage and error information.
  2739. //
  2740. // Returned Error Codes:
  2741. // * InternalErrorException
  2742. // The operation failed because of a system problem, even though the request
  2743. // was valid. Retry your request.
  2744. //
  2745. // * InvalidAccountException
  2746. // The operation failed because you tried to create, update, or delete an object
  2747. // by using an invalid account identifier.
  2748. //
  2749. func (c *WAF) ListXssMatchSets(input *ListXssMatchSetsInput) (*ListXssMatchSetsOutput, error) {
  2750. req, out := c.ListXssMatchSetsRequest(input)
  2751. err := req.Send()
  2752. return out, err
  2753. }
  2754. const opUpdateByteMatchSet = "UpdateByteMatchSet"
  2755. // UpdateByteMatchSetRequest generates a "aws/request.Request" representing the
  2756. // client's request for the UpdateByteMatchSet operation. The "output" return
  2757. // value can be used to capture response data after the request's "Send" method
  2758. // is called.
  2759. //
  2760. // See UpdateByteMatchSet for usage and error information.
  2761. //
  2762. // Creating a request object using this method should be used when you want to inject
  2763. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2764. // access properties on the request object before or after sending the request. If
  2765. // you just want the service response, call the UpdateByteMatchSet method directly
  2766. // instead.
  2767. //
  2768. // Note: You must call the "Send" method on the returned request object in order
  2769. // to execute the request.
  2770. //
  2771. // // Example sending a request using the UpdateByteMatchSetRequest method.
  2772. // req, resp := client.UpdateByteMatchSetRequest(params)
  2773. //
  2774. // err := req.Send()
  2775. // if err == nil { // resp is now filled
  2776. // fmt.Println(resp)
  2777. // }
  2778. //
  2779. func (c *WAF) UpdateByteMatchSetRequest(input *UpdateByteMatchSetInput) (req *request.Request, output *UpdateByteMatchSetOutput) {
  2780. op := &request.Operation{
  2781. Name: opUpdateByteMatchSet,
  2782. HTTPMethod: "POST",
  2783. HTTPPath: "/",
  2784. }
  2785. if input == nil {
  2786. input = &UpdateByteMatchSetInput{}
  2787. }
  2788. req = c.newRequest(op, input, output)
  2789. output = &UpdateByteMatchSetOutput{}
  2790. req.Data = output
  2791. return
  2792. }
  2793. // UpdateByteMatchSet API operation for AWS WAF.
  2794. //
  2795. // Inserts or deletes ByteMatchTuple objects (filters) in a ByteMatchSet. For
  2796. // each ByteMatchTuple object, you specify the following values:
  2797. //
  2798. // * Whether to insert or delete the object from the array. If you want to
  2799. // change a ByteMatchSetUpdate object, you delete the existing object and
  2800. // add a new one.
  2801. //
  2802. // * The part of a web request that you want AWS WAF to inspect, such as
  2803. // a query string or the value of the User-Agent header.
  2804. //
  2805. // * The bytes (typically a string that corresponds with ASCII characters)
  2806. // that you want AWS WAF to look for. For more information, including how
  2807. // you specify the values for the AWS WAF API and the AWS CLI or SDKs, see
  2808. // TargetString in the ByteMatchTuple data type.
  2809. //
  2810. // * Where to look, such as at the beginning or the end of a query string.
  2811. //
  2812. // * Whether to perform any conversions on the request, such as converting
  2813. // it to lowercase, before inspecting it for the specified string.
  2814. //
  2815. // For example, you can add a ByteMatchSetUpdate object that matches web requests
  2816. // in which User-Agent headers contain the string BadBot. You can then configure
  2817. // AWS WAF to block those requests.
  2818. //
  2819. // To create and configure a ByteMatchSet, perform the following steps:
  2820. //
  2821. // Create a ByteMatchSet. For more information, see CreateByteMatchSet.
  2822. //
  2823. // Use GetChangeToken to get the change token that you provide in the ChangeToken
  2824. // parameter of an UpdateByteMatchSet request.
  2825. //
  2826. // Submit an UpdateByteMatchSet request to specify the part of the request that
  2827. // you want AWS WAF to inspect (for example, the header or the URI) and the
  2828. // value that you want AWS WAF to watch for.
  2829. //
  2830. // For more information about how to use the AWS WAF API to allow or block HTTP
  2831. // requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/).
  2832. //
  2833. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2834. // with awserr.Error's Code and Message methods to get detailed information about
  2835. // the error.
  2836. //
  2837. // See the AWS API reference guide for AWS WAF's
  2838. // API operation UpdateByteMatchSet for usage and error information.
  2839. //
  2840. // Returned Error Codes:
  2841. // * InternalErrorException
  2842. // The operation failed because of a system problem, even though the request
  2843. // was valid. Retry your request.
  2844. //
  2845. // * InvalidAccountException
  2846. // The operation failed because you tried to create, update, or delete an object
  2847. // by using an invalid account identifier.
  2848. //
  2849. // * InvalidOperationException
  2850. // The operation failed because there was nothing to do. For example:
  2851. //
  2852. // * You tried to remove a Rule from a WebACL, but the Rule isn't in the
  2853. // specified WebACL.
  2854. //
  2855. // * You tried to remove an IP address from an IPSet, but the IP address
  2856. // isn't in the specified IPSet.
  2857. //
  2858. // * You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple
  2859. // isn't in the specified WebACL.
  2860. //
  2861. // * You tried to add a Rule to a WebACL, but the Rule already exists in
  2862. // the specified WebACL.
  2863. //
  2864. // * You tried to add an IP address to an IPSet, but the IP address already
  2865. // exists in the specified IPSet.
  2866. //
  2867. // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple
  2868. // already exists in the specified WebACL.
  2869. //
  2870. // * InvalidParameterException
  2871. // The operation failed because AWS WAF didn't recognize a parameter in the
  2872. // request. For example:
  2873. //
  2874. // * You specified an invalid parameter name.
  2875. //
  2876. // * You specified an invalid value.
  2877. //
  2878. // * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL)
  2879. // using an action other than INSERT or DELETE.
  2880. //
  2881. // * You tried to create a WebACL with a DefaultActionType other than ALLOW,
  2882. // BLOCK, or COUNT.
  2883. //
  2884. // * You tried to update a WebACL with a WafActionType other than ALLOW,
  2885. // BLOCK, or COUNT.
  2886. //
  2887. // * You tried to update a ByteMatchSet with a FieldToMatchType other than
  2888. // HEADER, QUERY_STRING, or URI.
  2889. //
  2890. // * You tried to update a ByteMatchSet with a Field of HEADER but no value
  2891. // for Data.
  2892. //
  2893. // * NonexistentContainerException
  2894. // The operation failed because you tried to add an object to or delete an object
  2895. // from another object that doesn't exist. For example:
  2896. //
  2897. // * You tried to add a Rule to or delete a Rule from a WebACL that doesn't
  2898. // exist.
  2899. //
  2900. // * You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule
  2901. // that doesn't exist.
  2902. //
  2903. // * You tried to add an IP address to or delete an IP address from an IPSet
  2904. // that doesn't exist.
  2905. //
  2906. // * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from
  2907. // a ByteMatchSet that doesn't exist.
  2908. //
  2909. // * NonexistentItemException
  2910. // The operation failed because the referenced object doesn't exist.
  2911. //
  2912. // * StaleDataException
  2913. // The operation failed because you tried to create, update, or delete an object
  2914. // by using a change token that has already been used.
  2915. //
  2916. // * LimitsExceededException
  2917. // The operation exceeds a resource limit, for example, the maximum number of
  2918. // WebACL objects that you can create for an AWS account. For more information,
  2919. // see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
  2920. // in the AWS WAF Developer Guide.
  2921. //
  2922. func (c *WAF) UpdateByteMatchSet(input *UpdateByteMatchSetInput) (*UpdateByteMatchSetOutput, error) {
  2923. req, out := c.UpdateByteMatchSetRequest(input)
  2924. err := req.Send()
  2925. return out, err
  2926. }
  2927. const opUpdateIPSet = "UpdateIPSet"
  2928. // UpdateIPSetRequest generates a "aws/request.Request" representing the
  2929. // client's request for the UpdateIPSet operation. The "output" return
  2930. // value can be used to capture response data after the request's "Send" method
  2931. // is called.
  2932. //
  2933. // See UpdateIPSet for usage and error information.
  2934. //
  2935. // Creating a request object using this method should be used when you want to inject
  2936. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2937. // access properties on the request object before or after sending the request. If
  2938. // you just want the service response, call the UpdateIPSet method directly
  2939. // instead.
  2940. //
  2941. // Note: You must call the "Send" method on the returned request object in order
  2942. // to execute the request.
  2943. //
  2944. // // Example sending a request using the UpdateIPSetRequest method.
  2945. // req, resp := client.UpdateIPSetRequest(params)
  2946. //
  2947. // err := req.Send()
  2948. // if err == nil { // resp is now filled
  2949. // fmt.Println(resp)
  2950. // }
  2951. //
  2952. func (c *WAF) UpdateIPSetRequest(input *UpdateIPSetInput) (req *request.Request, output *UpdateIPSetOutput) {
  2953. op := &request.Operation{
  2954. Name: opUpdateIPSet,
  2955. HTTPMethod: "POST",
  2956. HTTPPath: "/",
  2957. }
  2958. if input == nil {
  2959. input = &UpdateIPSetInput{}
  2960. }
  2961. req = c.newRequest(op, input, output)
  2962. output = &UpdateIPSetOutput{}
  2963. req.Data = output
  2964. return
  2965. }
  2966. // UpdateIPSet API operation for AWS WAF.
  2967. //
  2968. // Inserts or deletes IPSetDescriptor objects in an IPSet. For each IPSetDescriptor
  2969. // object, you specify the following values:
  2970. //
  2971. // * Whether to insert or delete the object from the array. If you want to
  2972. // change an IPSetDescriptor object, you delete the existing object and add
  2973. // a new one.
  2974. //
  2975. // * The IP address version, IPv4.
  2976. //
  2977. // * The IP address in CIDR notation, for example, 192.0.2.0/24 (for the
  2978. // range of IP addresses from 192.0.2.0 to 192.0.2.255) or 192.0.2.44/32
  2979. // (for the individual IP address 192.0.2.44).
  2980. //
  2981. // AWS WAF supports /8, /16, /24, and /32 IP address ranges. For more information
  2982. // about CIDR notation, see the Wikipedia entry Classless Inter-Domain Routing
  2983. // (https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing).
  2984. //
  2985. // You use an IPSet to specify which web requests you want to allow or block
  2986. // based on the IP addresses that the requests originated from. For example,
  2987. // if you're receiving a lot of requests from one or a small number of IP addresses
  2988. // and you want to block the requests, you can create an IPSet that specifies
  2989. // those IP addresses, and then configure AWS WAF to block the requests.
  2990. //
  2991. // To create and configure an IPSet, perform the following steps:
  2992. //
  2993. // Submit a CreateIPSet request.
  2994. //
  2995. // Use GetChangeToken to get the change token that you provide in the ChangeToken
  2996. // parameter of an UpdateIPSet request.
  2997. //
  2998. // Submit an UpdateIPSet request to specify the IP addresses that you want AWS
  2999. // WAF to watch for.
  3000. //
  3001. // When you update an IPSet, you specify the IP addresses that you want to add
  3002. // and/or the IP addresses that you want to delete. If you want to change an
  3003. // IP address, you delete the existing IP address and add the new one.
  3004. //
  3005. // For more information about how to use the AWS WAF API to allow or block HTTP
  3006. // requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/).
  3007. //
  3008. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3009. // with awserr.Error's Code and Message methods to get detailed information about
  3010. // the error.
  3011. //
  3012. // See the AWS API reference guide for AWS WAF's
  3013. // API operation UpdateIPSet for usage and error information.
  3014. //
  3015. // Returned Error Codes:
  3016. // * StaleDataException
  3017. // The operation failed because you tried to create, update, or delete an object
  3018. // by using a change token that has already been used.
  3019. //
  3020. // * InternalErrorException
  3021. // The operation failed because of a system problem, even though the request
  3022. // was valid. Retry your request.
  3023. //
  3024. // * InvalidAccountException
  3025. // The operation failed because you tried to create, update, or delete an object
  3026. // by using an invalid account identifier.
  3027. //
  3028. // * InvalidOperationException
  3029. // The operation failed because there was nothing to do. For example:
  3030. //
  3031. // * You tried to remove a Rule from a WebACL, but the Rule isn't in the
  3032. // specified WebACL.
  3033. //
  3034. // * You tried to remove an IP address from an IPSet, but the IP address
  3035. // isn't in the specified IPSet.
  3036. //
  3037. // * You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple
  3038. // isn't in the specified WebACL.
  3039. //
  3040. // * You tried to add a Rule to a WebACL, but the Rule already exists in
  3041. // the specified WebACL.
  3042. //
  3043. // * You tried to add an IP address to an IPSet, but the IP address already
  3044. // exists in the specified IPSet.
  3045. //
  3046. // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple
  3047. // already exists in the specified WebACL.
  3048. //
  3049. // * InvalidParameterException
  3050. // The operation failed because AWS WAF didn't recognize a parameter in the
  3051. // request. For example:
  3052. //
  3053. // * You specified an invalid parameter name.
  3054. //
  3055. // * You specified an invalid value.
  3056. //
  3057. // * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL)
  3058. // using an action other than INSERT or DELETE.
  3059. //
  3060. // * You tried to create a WebACL with a DefaultActionType other than ALLOW,
  3061. // BLOCK, or COUNT.
  3062. //
  3063. // * You tried to update a WebACL with a WafActionType other than ALLOW,
  3064. // BLOCK, or COUNT.
  3065. //
  3066. // * You tried to update a ByteMatchSet with a FieldToMatchType other than
  3067. // HEADER, QUERY_STRING, or URI.
  3068. //
  3069. // * You tried to update a ByteMatchSet with a Field of HEADER but no value
  3070. // for Data.
  3071. //
  3072. // * NonexistentContainerException
  3073. // The operation failed because you tried to add an object to or delete an object
  3074. // from another object that doesn't exist. For example:
  3075. //
  3076. // * You tried to add a Rule to or delete a Rule from a WebACL that doesn't
  3077. // exist.
  3078. //
  3079. // * You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule
  3080. // that doesn't exist.
  3081. //
  3082. // * You tried to add an IP address to or delete an IP address from an IPSet
  3083. // that doesn't exist.
  3084. //
  3085. // * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from
  3086. // a ByteMatchSet that doesn't exist.
  3087. //
  3088. // * NonexistentItemException
  3089. // The operation failed because the referenced object doesn't exist.
  3090. //
  3091. // * ReferencedItemException
  3092. // The operation failed because you tried to delete an object that is still
  3093. // in use. For example:
  3094. //
  3095. // * You tried to delete a ByteMatchSet that is still referenced by a Rule.
  3096. //
  3097. // * You tried to delete a Rule that is still referenced by a WebACL.
  3098. //
  3099. // * LimitsExceededException
  3100. // The operation exceeds a resource limit, for example, the maximum number of
  3101. // WebACL objects that you can create for an AWS account. For more information,
  3102. // see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
  3103. // in the AWS WAF Developer Guide.
  3104. //
  3105. func (c *WAF) UpdateIPSet(input *UpdateIPSetInput) (*UpdateIPSetOutput, error) {
  3106. req, out := c.UpdateIPSetRequest(input)
  3107. err := req.Send()
  3108. return out, err
  3109. }
  3110. const opUpdateRule = "UpdateRule"
  3111. // UpdateRuleRequest generates a "aws/request.Request" representing the
  3112. // client's request for the UpdateRule operation. The "output" return
  3113. // value can be used to capture response data after the request's "Send" method
  3114. // is called.
  3115. //
  3116. // See UpdateRule for usage and error information.
  3117. //
  3118. // Creating a request object using this method should be used when you want to inject
  3119. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3120. // access properties on the request object before or after sending the request. If
  3121. // you just want the service response, call the UpdateRule method directly
  3122. // instead.
  3123. //
  3124. // Note: You must call the "Send" method on the returned request object in order
  3125. // to execute the request.
  3126. //
  3127. // // Example sending a request using the UpdateRuleRequest method.
  3128. // req, resp := client.UpdateRuleRequest(params)
  3129. //
  3130. // err := req.Send()
  3131. // if err == nil { // resp is now filled
  3132. // fmt.Println(resp)
  3133. // }
  3134. //
  3135. func (c *WAF) UpdateRuleRequest(input *UpdateRuleInput) (req *request.Request, output *UpdateRuleOutput) {
  3136. op := &request.Operation{
  3137. Name: opUpdateRule,
  3138. HTTPMethod: "POST",
  3139. HTTPPath: "/",
  3140. }
  3141. if input == nil {
  3142. input = &UpdateRuleInput{}
  3143. }
  3144. req = c.newRequest(op, input, output)
  3145. output = &UpdateRuleOutput{}
  3146. req.Data = output
  3147. return
  3148. }
  3149. // UpdateRule API operation for AWS WAF.
  3150. //
  3151. // Inserts or deletes Predicate objects in a Rule. Each Predicate object identifies
  3152. // a predicate, such as a ByteMatchSet or an IPSet, that specifies the web requests
  3153. // that you want to allow, block, or count. If you add more than one predicate
  3154. // to a Rule, a request must match all of the specifications to be allowed,
  3155. // blocked, or counted. For example, suppose you add the following to a Rule:
  3156. //
  3157. // * A ByteMatchSet that matches the value BadBot in the User-Agent header
  3158. //
  3159. // * An IPSet that matches the IP address 192.0.2.44
  3160. //
  3161. // You then add the Rule to a WebACL and specify that you want to block requests
  3162. // that satisfy the Rule. For a request to be blocked, the User-Agent header
  3163. // in the request must contain the value BadBotand the request must originate
  3164. // from the IP address 192.0.2.44.
  3165. //
  3166. // To create and configure a Rule, perform the following steps:
  3167. //
  3168. // Create and update the predicates that you want to include in the Rule.
  3169. //
  3170. // Create the Rule. See CreateRule.
  3171. //
  3172. // Use GetChangeToken to get the change token that you provide in the ChangeToken
  3173. // parameter of an UpdateRule request.
  3174. //
  3175. // Submit an UpdateRule request to add predicates to the Rule.
  3176. //
  3177. // Create and update a WebACL that contains the Rule. See CreateWebACL.
  3178. //
  3179. // If you want to replace one ByteMatchSet or IPSet with another, you delete
  3180. // the existing one and add the new one.
  3181. //
  3182. // For more information about how to use the AWS WAF API to allow or block HTTP
  3183. // requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/).
  3184. //
  3185. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3186. // with awserr.Error's Code and Message methods to get detailed information about
  3187. // the error.
  3188. //
  3189. // See the AWS API reference guide for AWS WAF's
  3190. // API operation UpdateRule for usage and error information.
  3191. //
  3192. // Returned Error Codes:
  3193. // * StaleDataException
  3194. // The operation failed because you tried to create, update, or delete an object
  3195. // by using a change token that has already been used.
  3196. //
  3197. // * InternalErrorException
  3198. // The operation failed because of a system problem, even though the request
  3199. // was valid. Retry your request.
  3200. //
  3201. // * InvalidAccountException
  3202. // The operation failed because you tried to create, update, or delete an object
  3203. // by using an invalid account identifier.
  3204. //
  3205. // * InvalidOperationException
  3206. // The operation failed because there was nothing to do. For example:
  3207. //
  3208. // * You tried to remove a Rule from a WebACL, but the Rule isn't in the
  3209. // specified WebACL.
  3210. //
  3211. // * You tried to remove an IP address from an IPSet, but the IP address
  3212. // isn't in the specified IPSet.
  3213. //
  3214. // * You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple
  3215. // isn't in the specified WebACL.
  3216. //
  3217. // * You tried to add a Rule to a WebACL, but the Rule already exists in
  3218. // the specified WebACL.
  3219. //
  3220. // * You tried to add an IP address to an IPSet, but the IP address already
  3221. // exists in the specified IPSet.
  3222. //
  3223. // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple
  3224. // already exists in the specified WebACL.
  3225. //
  3226. // * InvalidParameterException
  3227. // The operation failed because AWS WAF didn't recognize a parameter in the
  3228. // request. For example:
  3229. //
  3230. // * You specified an invalid parameter name.
  3231. //
  3232. // * You specified an invalid value.
  3233. //
  3234. // * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL)
  3235. // using an action other than INSERT or DELETE.
  3236. //
  3237. // * You tried to create a WebACL with a DefaultActionType other than ALLOW,
  3238. // BLOCK, or COUNT.
  3239. //
  3240. // * You tried to update a WebACL with a WafActionType other than ALLOW,
  3241. // BLOCK, or COUNT.
  3242. //
  3243. // * You tried to update a ByteMatchSet with a FieldToMatchType other than
  3244. // HEADER, QUERY_STRING, or URI.
  3245. //
  3246. // * You tried to update a ByteMatchSet with a Field of HEADER but no value
  3247. // for Data.
  3248. //
  3249. // * NonexistentContainerException
  3250. // The operation failed because you tried to add an object to or delete an object
  3251. // from another object that doesn't exist. For example:
  3252. //
  3253. // * You tried to add a Rule to or delete a Rule from a WebACL that doesn't
  3254. // exist.
  3255. //
  3256. // * You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule
  3257. // that doesn't exist.
  3258. //
  3259. // * You tried to add an IP address to or delete an IP address from an IPSet
  3260. // that doesn't exist.
  3261. //
  3262. // * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from
  3263. // a ByteMatchSet that doesn't exist.
  3264. //
  3265. // * NonexistentItemException
  3266. // The operation failed because the referenced object doesn't exist.
  3267. //
  3268. // * ReferencedItemException
  3269. // The operation failed because you tried to delete an object that is still
  3270. // in use. For example:
  3271. //
  3272. // * You tried to delete a ByteMatchSet that is still referenced by a Rule.
  3273. //
  3274. // * You tried to delete a Rule that is still referenced by a WebACL.
  3275. //
  3276. // * LimitsExceededException
  3277. // The operation exceeds a resource limit, for example, the maximum number of
  3278. // WebACL objects that you can create for an AWS account. For more information,
  3279. // see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
  3280. // in the AWS WAF Developer Guide.
  3281. //
  3282. func (c *WAF) UpdateRule(input *UpdateRuleInput) (*UpdateRuleOutput, error) {
  3283. req, out := c.UpdateRuleRequest(input)
  3284. err := req.Send()
  3285. return out, err
  3286. }
  3287. const opUpdateSizeConstraintSet = "UpdateSizeConstraintSet"
  3288. // UpdateSizeConstraintSetRequest generates a "aws/request.Request" representing the
  3289. // client's request for the UpdateSizeConstraintSet operation. The "output" return
  3290. // value can be used to capture response data after the request's "Send" method
  3291. // is called.
  3292. //
  3293. // See UpdateSizeConstraintSet for usage and error information.
  3294. //
  3295. // Creating a request object using this method should be used when you want to inject
  3296. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3297. // access properties on the request object before or after sending the request. If
  3298. // you just want the service response, call the UpdateSizeConstraintSet method directly
  3299. // instead.
  3300. //
  3301. // Note: You must call the "Send" method on the returned request object in order
  3302. // to execute the request.
  3303. //
  3304. // // Example sending a request using the UpdateSizeConstraintSetRequest method.
  3305. // req, resp := client.UpdateSizeConstraintSetRequest(params)
  3306. //
  3307. // err := req.Send()
  3308. // if err == nil { // resp is now filled
  3309. // fmt.Println(resp)
  3310. // }
  3311. //
  3312. func (c *WAF) UpdateSizeConstraintSetRequest(input *UpdateSizeConstraintSetInput) (req *request.Request, output *UpdateSizeConstraintSetOutput) {
  3313. op := &request.Operation{
  3314. Name: opUpdateSizeConstraintSet,
  3315. HTTPMethod: "POST",
  3316. HTTPPath: "/",
  3317. }
  3318. if input == nil {
  3319. input = &UpdateSizeConstraintSetInput{}
  3320. }
  3321. req = c.newRequest(op, input, output)
  3322. output = &UpdateSizeConstraintSetOutput{}
  3323. req.Data = output
  3324. return
  3325. }
  3326. // UpdateSizeConstraintSet API operation for AWS WAF.
  3327. //
  3328. // Inserts or deletes SizeConstraint objects (filters) in a SizeConstraintSet.
  3329. // For each SizeConstraint object, you specify the following values:
  3330. //
  3331. // * Whether to insert or delete the object from the array. If you want to
  3332. // change a SizeConstraintSetUpdate object, you delete the existing object
  3333. // and add a new one.
  3334. //
  3335. // * The part of a web request that you want AWS WAF to evaluate, such as
  3336. // the length of a query string or the length of the User-Agent header.
  3337. //
  3338. // * Whether to perform any transformations on the request, such as converting
  3339. // it to lowercase, before checking its length. Note that transformations
  3340. // of the request body are not supported because the AWS resource forwards
  3341. // only the first 8192 bytes of your request to AWS WAF.
  3342. //
  3343. // * A ComparisonOperator used for evaluating the selected part of the request
  3344. // against the specified Size, such as equals, greater than, less than, and
  3345. // so on.
  3346. //
  3347. // * The length, in bytes, that you want AWS WAF to watch for in selected
  3348. // part of the request. The length is computed after applying the transformation.
  3349. //
  3350. // For example, you can add a SizeConstraintSetUpdate object that matches web
  3351. // requests in which the length of the User-Agent header is greater than 100
  3352. // bytes. You can then configure AWS WAF to block those requests.
  3353. //
  3354. // To create and configure a SizeConstraintSet, perform the following steps:
  3355. //
  3356. // Create a SizeConstraintSet. For more information, see CreateSizeConstraintSet.
  3357. //
  3358. // Use GetChangeToken to get the change token that you provide in the ChangeToken
  3359. // parameter of an UpdateSizeConstraintSet request.
  3360. //
  3361. // Submit an UpdateSizeConstraintSet request to specify the part of the request
  3362. // that you want AWS WAF to inspect (for example, the header or the URI) and
  3363. // the value that you want AWS WAF to watch for.
  3364. //
  3365. // For more information about how to use the AWS WAF API to allow or block HTTP
  3366. // requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/).
  3367. //
  3368. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3369. // with awserr.Error's Code and Message methods to get detailed information about
  3370. // the error.
  3371. //
  3372. // See the AWS API reference guide for AWS WAF's
  3373. // API operation UpdateSizeConstraintSet for usage and error information.
  3374. //
  3375. // Returned Error Codes:
  3376. // * StaleDataException
  3377. // The operation failed because you tried to create, update, or delete an object
  3378. // by using a change token that has already been used.
  3379. //
  3380. // * InternalErrorException
  3381. // The operation failed because of a system problem, even though the request
  3382. // was valid. Retry your request.
  3383. //
  3384. // * InvalidAccountException
  3385. // The operation failed because you tried to create, update, or delete an object
  3386. // by using an invalid account identifier.
  3387. //
  3388. // * InvalidOperationException
  3389. // The operation failed because there was nothing to do. For example:
  3390. //
  3391. // * You tried to remove a Rule from a WebACL, but the Rule isn't in the
  3392. // specified WebACL.
  3393. //
  3394. // * You tried to remove an IP address from an IPSet, but the IP address
  3395. // isn't in the specified IPSet.
  3396. //
  3397. // * You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple
  3398. // isn't in the specified WebACL.
  3399. //
  3400. // * You tried to add a Rule to a WebACL, but the Rule already exists in
  3401. // the specified WebACL.
  3402. //
  3403. // * You tried to add an IP address to an IPSet, but the IP address already
  3404. // exists in the specified IPSet.
  3405. //
  3406. // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple
  3407. // already exists in the specified WebACL.
  3408. //
  3409. // * InvalidParameterException
  3410. // The operation failed because AWS WAF didn't recognize a parameter in the
  3411. // request. For example:
  3412. //
  3413. // * You specified an invalid parameter name.
  3414. //
  3415. // * You specified an invalid value.
  3416. //
  3417. // * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL)
  3418. // using an action other than INSERT or DELETE.
  3419. //
  3420. // * You tried to create a WebACL with a DefaultActionType other than ALLOW,
  3421. // BLOCK, or COUNT.
  3422. //
  3423. // * You tried to update a WebACL with a WafActionType other than ALLOW,
  3424. // BLOCK, or COUNT.
  3425. //
  3426. // * You tried to update a ByteMatchSet with a FieldToMatchType other than
  3427. // HEADER, QUERY_STRING, or URI.
  3428. //
  3429. // * You tried to update a ByteMatchSet with a Field of HEADER but no value
  3430. // for Data.
  3431. //
  3432. // * NonexistentContainerException
  3433. // The operation failed because you tried to add an object to or delete an object
  3434. // from another object that doesn't exist. For example:
  3435. //
  3436. // * You tried to add a Rule to or delete a Rule from a WebACL that doesn't
  3437. // exist.
  3438. //
  3439. // * You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule
  3440. // that doesn't exist.
  3441. //
  3442. // * You tried to add an IP address to or delete an IP address from an IPSet
  3443. // that doesn't exist.
  3444. //
  3445. // * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from
  3446. // a ByteMatchSet that doesn't exist.
  3447. //
  3448. // * NonexistentItemException
  3449. // The operation failed because the referenced object doesn't exist.
  3450. //
  3451. // * ReferencedItemException
  3452. // The operation failed because you tried to delete an object that is still
  3453. // in use. For example:
  3454. //
  3455. // * You tried to delete a ByteMatchSet that is still referenced by a Rule.
  3456. //
  3457. // * You tried to delete a Rule that is still referenced by a WebACL.
  3458. //
  3459. // * LimitsExceededException
  3460. // The operation exceeds a resource limit, for example, the maximum number of
  3461. // WebACL objects that you can create for an AWS account. For more information,
  3462. // see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
  3463. // in the AWS WAF Developer Guide.
  3464. //
  3465. func (c *WAF) UpdateSizeConstraintSet(input *UpdateSizeConstraintSetInput) (*UpdateSizeConstraintSetOutput, error) {
  3466. req, out := c.UpdateSizeConstraintSetRequest(input)
  3467. err := req.Send()
  3468. return out, err
  3469. }
  3470. const opUpdateSqlInjectionMatchSet = "UpdateSqlInjectionMatchSet"
  3471. // UpdateSqlInjectionMatchSetRequest generates a "aws/request.Request" representing the
  3472. // client's request for the UpdateSqlInjectionMatchSet operation. The "output" return
  3473. // value can be used to capture response data after the request's "Send" method
  3474. // is called.
  3475. //
  3476. // See UpdateSqlInjectionMatchSet for usage and error information.
  3477. //
  3478. // Creating a request object using this method should be used when you want to inject
  3479. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3480. // access properties on the request object before or after sending the request. If
  3481. // you just want the service response, call the UpdateSqlInjectionMatchSet method directly
  3482. // instead.
  3483. //
  3484. // Note: You must call the "Send" method on the returned request object in order
  3485. // to execute the request.
  3486. //
  3487. // // Example sending a request using the UpdateSqlInjectionMatchSetRequest method.
  3488. // req, resp := client.UpdateSqlInjectionMatchSetRequest(params)
  3489. //
  3490. // err := req.Send()
  3491. // if err == nil { // resp is now filled
  3492. // fmt.Println(resp)
  3493. // }
  3494. //
  3495. func (c *WAF) UpdateSqlInjectionMatchSetRequest(input *UpdateSqlInjectionMatchSetInput) (req *request.Request, output *UpdateSqlInjectionMatchSetOutput) {
  3496. op := &request.Operation{
  3497. Name: opUpdateSqlInjectionMatchSet,
  3498. HTTPMethod: "POST",
  3499. HTTPPath: "/",
  3500. }
  3501. if input == nil {
  3502. input = &UpdateSqlInjectionMatchSetInput{}
  3503. }
  3504. req = c.newRequest(op, input, output)
  3505. output = &UpdateSqlInjectionMatchSetOutput{}
  3506. req.Data = output
  3507. return
  3508. }
  3509. // UpdateSqlInjectionMatchSet API operation for AWS WAF.
  3510. //
  3511. // Inserts or deletes SqlInjectionMatchTuple objects (filters) in a SqlInjectionMatchSet.
  3512. // For each SqlInjectionMatchTuple object, you specify the following values:
  3513. //
  3514. // * Action: Whether to insert the object into or delete the object from
  3515. // the array. To change a SqlInjectionMatchTuple, you delete the existing
  3516. // object and add a new one.
  3517. //
  3518. // * FieldToMatch: The part of web requests that you want AWS WAF to inspect
  3519. // and, if you want AWS WAF to inspect a header, the name of the header.
  3520. //
  3521. // * TextTransformation: Which text transformation, if any, to perform on
  3522. // the web request before inspecting the request for snippets of malicious
  3523. // SQL code.
  3524. //
  3525. // You use SqlInjectionMatchSet objects to specify which CloudFront requests
  3526. // you want to allow, block, or count. For example, if you're receiving requests
  3527. // that contain snippets of SQL code in the query string and you want to block
  3528. // the requests, you can create a SqlInjectionMatchSet with the applicable settings,
  3529. // and then configure AWS WAF to block the requests.
  3530. //
  3531. // To create and configure a SqlInjectionMatchSet, perform the following steps:
  3532. //
  3533. // Submit a CreateSqlInjectionMatchSet request.
  3534. //
  3535. // Use GetChangeToken to get the change token that you provide in the ChangeToken
  3536. // parameter of an UpdateIPSet request.
  3537. //
  3538. // Submit an UpdateSqlInjectionMatchSet request to specify the parts of web
  3539. // requests that you want AWS WAF to inspect for snippets of SQL code.
  3540. //
  3541. // For more information about how to use the AWS WAF API to allow or block HTTP
  3542. // requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/).
  3543. //
  3544. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3545. // with awserr.Error's Code and Message methods to get detailed information about
  3546. // the error.
  3547. //
  3548. // See the AWS API reference guide for AWS WAF's
  3549. // API operation UpdateSqlInjectionMatchSet for usage and error information.
  3550. //
  3551. // Returned Error Codes:
  3552. // * InternalErrorException
  3553. // The operation failed because of a system problem, even though the request
  3554. // was valid. Retry your request.
  3555. //
  3556. // * InvalidAccountException
  3557. // The operation failed because you tried to create, update, or delete an object
  3558. // by using an invalid account identifier.
  3559. //
  3560. // * InvalidOperationException
  3561. // The operation failed because there was nothing to do. For example:
  3562. //
  3563. // * You tried to remove a Rule from a WebACL, but the Rule isn't in the
  3564. // specified WebACL.
  3565. //
  3566. // * You tried to remove an IP address from an IPSet, but the IP address
  3567. // isn't in the specified IPSet.
  3568. //
  3569. // * You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple
  3570. // isn't in the specified WebACL.
  3571. //
  3572. // * You tried to add a Rule to a WebACL, but the Rule already exists in
  3573. // the specified WebACL.
  3574. //
  3575. // * You tried to add an IP address to an IPSet, but the IP address already
  3576. // exists in the specified IPSet.
  3577. //
  3578. // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple
  3579. // already exists in the specified WebACL.
  3580. //
  3581. // * InvalidParameterException
  3582. // The operation failed because AWS WAF didn't recognize a parameter in the
  3583. // request. For example:
  3584. //
  3585. // * You specified an invalid parameter name.
  3586. //
  3587. // * You specified an invalid value.
  3588. //
  3589. // * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL)
  3590. // using an action other than INSERT or DELETE.
  3591. //
  3592. // * You tried to create a WebACL with a DefaultActionType other than ALLOW,
  3593. // BLOCK, or COUNT.
  3594. //
  3595. // * You tried to update a WebACL with a WafActionType other than ALLOW,
  3596. // BLOCK, or COUNT.
  3597. //
  3598. // * You tried to update a ByteMatchSet with a FieldToMatchType other than
  3599. // HEADER, QUERY_STRING, or URI.
  3600. //
  3601. // * You tried to update a ByteMatchSet with a Field of HEADER but no value
  3602. // for Data.
  3603. //
  3604. // * NonexistentContainerException
  3605. // The operation failed because you tried to add an object to or delete an object
  3606. // from another object that doesn't exist. For example:
  3607. //
  3608. // * You tried to add a Rule to or delete a Rule from a WebACL that doesn't
  3609. // exist.
  3610. //
  3611. // * You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule
  3612. // that doesn't exist.
  3613. //
  3614. // * You tried to add an IP address to or delete an IP address from an IPSet
  3615. // that doesn't exist.
  3616. //
  3617. // * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from
  3618. // a ByteMatchSet that doesn't exist.
  3619. //
  3620. // * NonexistentItemException
  3621. // The operation failed because the referenced object doesn't exist.
  3622. //
  3623. // * StaleDataException
  3624. // The operation failed because you tried to create, update, or delete an object
  3625. // by using a change token that has already been used.
  3626. //
  3627. // * LimitsExceededException
  3628. // The operation exceeds a resource limit, for example, the maximum number of
  3629. // WebACL objects that you can create for an AWS account. For more information,
  3630. // see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
  3631. // in the AWS WAF Developer Guide.
  3632. //
  3633. func (c *WAF) UpdateSqlInjectionMatchSet(input *UpdateSqlInjectionMatchSetInput) (*UpdateSqlInjectionMatchSetOutput, error) {
  3634. req, out := c.UpdateSqlInjectionMatchSetRequest(input)
  3635. err := req.Send()
  3636. return out, err
  3637. }
  3638. const opUpdateWebACL = "UpdateWebACL"
  3639. // UpdateWebACLRequest generates a "aws/request.Request" representing the
  3640. // client's request for the UpdateWebACL operation. The "output" return
  3641. // value can be used to capture response data after the request's "Send" method
  3642. // is called.
  3643. //
  3644. // See UpdateWebACL for usage and error information.
  3645. //
  3646. // Creating a request object using this method should be used when you want to inject
  3647. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3648. // access properties on the request object before or after sending the request. If
  3649. // you just want the service response, call the UpdateWebACL method directly
  3650. // instead.
  3651. //
  3652. // Note: You must call the "Send" method on the returned request object in order
  3653. // to execute the request.
  3654. //
  3655. // // Example sending a request using the UpdateWebACLRequest method.
  3656. // req, resp := client.UpdateWebACLRequest(params)
  3657. //
  3658. // err := req.Send()
  3659. // if err == nil { // resp is now filled
  3660. // fmt.Println(resp)
  3661. // }
  3662. //
  3663. func (c *WAF) UpdateWebACLRequest(input *UpdateWebACLInput) (req *request.Request, output *UpdateWebACLOutput) {
  3664. op := &request.Operation{
  3665. Name: opUpdateWebACL,
  3666. HTTPMethod: "POST",
  3667. HTTPPath: "/",
  3668. }
  3669. if input == nil {
  3670. input = &UpdateWebACLInput{}
  3671. }
  3672. req = c.newRequest(op, input, output)
  3673. output = &UpdateWebACLOutput{}
  3674. req.Data = output
  3675. return
  3676. }
  3677. // UpdateWebACL API operation for AWS WAF.
  3678. //
  3679. // Inserts or deletes ActivatedRule objects in a WebACL. Each Rule identifies
  3680. // web requests that you want to allow, block, or count. When you update a WebACL,
  3681. // you specify the following values:
  3682. //
  3683. // * A default action for the WebACL, either ALLOW or BLOCK. AWS WAF performs
  3684. // the default action if a request doesn't match the criteria in any of the
  3685. // Rules in a WebACL.
  3686. //
  3687. // * The Rules that you want to add and/or delete. If you want to replace
  3688. // one Rule with another, you delete the existing Rule and add the new one.
  3689. //
  3690. // * For each Rule, whether you want AWS WAF to allow requests, block requests,
  3691. // or count requests that match the conditions in the Rule.
  3692. //
  3693. // * The order in which you want AWS WAF to evaluate the Rules in a WebACL.
  3694. // If you add more than one Rule to a WebACL, AWS WAF evaluates each request
  3695. // against the Rules in order based on the value of Priority. (The Rule that
  3696. // has the lowest value for Priority is evaluated first.) When a web request
  3697. // matches all of the predicates (such as ByteMatchSets and IPSets) in a
  3698. // Rule, AWS WAF immediately takes the corresponding action, allow or block,
  3699. // and doesn't evaluate the request against the remaining Rules in the WebACL,
  3700. // if any.
  3701. //
  3702. // * The CloudFront distribution that you want to associate with the WebACL.
  3703. //
  3704. // To create and configure a WebACL, perform the following steps:
  3705. //
  3706. // Create and update the predicates that you want to include in Rules. For more
  3707. // information, see CreateByteMatchSet, UpdateByteMatchSet, CreateIPSet, UpdateIPSet,
  3708. // CreateSqlInjectionMatchSet, and UpdateSqlInjectionMatchSet.
  3709. //
  3710. // Create and update the Rules that you want to include in the WebACL. For more
  3711. // information, see CreateRule and UpdateRule.
  3712. //
  3713. // Create a WebACL. See CreateWebACL.
  3714. //
  3715. // Use GetChangeToken to get the change token that you provide in the ChangeToken
  3716. // parameter of an UpdateWebACL request.
  3717. //
  3718. // Submit an UpdateWebACL request to specify the Rules that you want to include
  3719. // in the WebACL, to specify the default action, and to associate the WebACL
  3720. // with a CloudFront distribution.
  3721. //
  3722. // For more information about how to use the AWS WAF API to allow or block HTTP
  3723. // requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/).
  3724. //
  3725. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3726. // with awserr.Error's Code and Message methods to get detailed information about
  3727. // the error.
  3728. //
  3729. // See the AWS API reference guide for AWS WAF's
  3730. // API operation UpdateWebACL for usage and error information.
  3731. //
  3732. // Returned Error Codes:
  3733. // * StaleDataException
  3734. // The operation failed because you tried to create, update, or delete an object
  3735. // by using a change token that has already been used.
  3736. //
  3737. // * InternalErrorException
  3738. // The operation failed because of a system problem, even though the request
  3739. // was valid. Retry your request.
  3740. //
  3741. // * InvalidAccountException
  3742. // The operation failed because you tried to create, update, or delete an object
  3743. // by using an invalid account identifier.
  3744. //
  3745. // * InvalidOperationException
  3746. // The operation failed because there was nothing to do. For example:
  3747. //
  3748. // * You tried to remove a Rule from a WebACL, but the Rule isn't in the
  3749. // specified WebACL.
  3750. //
  3751. // * You tried to remove an IP address from an IPSet, but the IP address
  3752. // isn't in the specified IPSet.
  3753. //
  3754. // * You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple
  3755. // isn't in the specified WebACL.
  3756. //
  3757. // * You tried to add a Rule to a WebACL, but the Rule already exists in
  3758. // the specified WebACL.
  3759. //
  3760. // * You tried to add an IP address to an IPSet, but the IP address already
  3761. // exists in the specified IPSet.
  3762. //
  3763. // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple
  3764. // already exists in the specified WebACL.
  3765. //
  3766. // * InvalidParameterException
  3767. // The operation failed because AWS WAF didn't recognize a parameter in the
  3768. // request. For example:
  3769. //
  3770. // * You specified an invalid parameter name.
  3771. //
  3772. // * You specified an invalid value.
  3773. //
  3774. // * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL)
  3775. // using an action other than INSERT or DELETE.
  3776. //
  3777. // * You tried to create a WebACL with a DefaultActionType other than ALLOW,
  3778. // BLOCK, or COUNT.
  3779. //
  3780. // * You tried to update a WebACL with a WafActionType other than ALLOW,
  3781. // BLOCK, or COUNT.
  3782. //
  3783. // * You tried to update a ByteMatchSet with a FieldToMatchType other than
  3784. // HEADER, QUERY_STRING, or URI.
  3785. //
  3786. // * You tried to update a ByteMatchSet with a Field of HEADER but no value
  3787. // for Data.
  3788. //
  3789. // * NonexistentContainerException
  3790. // The operation failed because you tried to add an object to or delete an object
  3791. // from another object that doesn't exist. For example:
  3792. //
  3793. // * You tried to add a Rule to or delete a Rule from a WebACL that doesn't
  3794. // exist.
  3795. //
  3796. // * You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule
  3797. // that doesn't exist.
  3798. //
  3799. // * You tried to add an IP address to or delete an IP address from an IPSet
  3800. // that doesn't exist.
  3801. //
  3802. // * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from
  3803. // a ByteMatchSet that doesn't exist.
  3804. //
  3805. // * NonexistentItemException
  3806. // The operation failed because the referenced object doesn't exist.
  3807. //
  3808. // * ReferencedItemException
  3809. // The operation failed because you tried to delete an object that is still
  3810. // in use. For example:
  3811. //
  3812. // * You tried to delete a ByteMatchSet that is still referenced by a Rule.
  3813. //
  3814. // * You tried to delete a Rule that is still referenced by a WebACL.
  3815. //
  3816. // * LimitsExceededException
  3817. // The operation exceeds a resource limit, for example, the maximum number of
  3818. // WebACL objects that you can create for an AWS account. For more information,
  3819. // see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
  3820. // in the AWS WAF Developer Guide.
  3821. //
  3822. func (c *WAF) UpdateWebACL(input *UpdateWebACLInput) (*UpdateWebACLOutput, error) {
  3823. req, out := c.UpdateWebACLRequest(input)
  3824. err := req.Send()
  3825. return out, err
  3826. }
  3827. const opUpdateXssMatchSet = "UpdateXssMatchSet"
  3828. // UpdateXssMatchSetRequest generates a "aws/request.Request" representing the
  3829. // client's request for the UpdateXssMatchSet operation. The "output" return
  3830. // value can be used to capture response data after the request's "Send" method
  3831. // is called.
  3832. //
  3833. // See UpdateXssMatchSet for usage and error information.
  3834. //
  3835. // Creating a request object using this method should be used when you want to inject
  3836. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3837. // access properties on the request object before or after sending the request. If
  3838. // you just want the service response, call the UpdateXssMatchSet method directly
  3839. // instead.
  3840. //
  3841. // Note: You must call the "Send" method on the returned request object in order
  3842. // to execute the request.
  3843. //
  3844. // // Example sending a request using the UpdateXssMatchSetRequest method.
  3845. // req, resp := client.UpdateXssMatchSetRequest(params)
  3846. //
  3847. // err := req.Send()
  3848. // if err == nil { // resp is now filled
  3849. // fmt.Println(resp)
  3850. // }
  3851. //
  3852. func (c *WAF) UpdateXssMatchSetRequest(input *UpdateXssMatchSetInput) (req *request.Request, output *UpdateXssMatchSetOutput) {
  3853. op := &request.Operation{
  3854. Name: opUpdateXssMatchSet,
  3855. HTTPMethod: "POST",
  3856. HTTPPath: "/",
  3857. }
  3858. if input == nil {
  3859. input = &UpdateXssMatchSetInput{}
  3860. }
  3861. req = c.newRequest(op, input, output)
  3862. output = &UpdateXssMatchSetOutput{}
  3863. req.Data = output
  3864. return
  3865. }
  3866. // UpdateXssMatchSet API operation for AWS WAF.
  3867. //
  3868. // Inserts or deletes XssMatchTuple objects (filters) in an XssMatchSet. For
  3869. // each XssMatchTuple object, you specify the following values:
  3870. //
  3871. // * Action: Whether to insert the object into or delete the object from
  3872. // the array. To change a XssMatchTuple, you delete the existing object and
  3873. // add a new one.
  3874. //
  3875. // * FieldToMatch: The part of web requests that you want AWS WAF to inspect
  3876. // and, if you want AWS WAF to inspect a header, the name of the header.
  3877. //
  3878. // * TextTransformation: Which text transformation, if any, to perform on
  3879. // the web request before inspecting the request for cross-site scripting
  3880. // attacks.
  3881. //
  3882. // You use XssMatchSet objects to specify which CloudFront requests you want
  3883. // to allow, block, or count. For example, if you're receiving requests that
  3884. // contain cross-site scripting attacks in the request body and you want to
  3885. // block the requests, you can create an XssMatchSet with the applicable settings,
  3886. // and then configure AWS WAF to block the requests.
  3887. //
  3888. // To create and configure an XssMatchSet, perform the following steps:
  3889. //
  3890. // Submit a CreateXssMatchSet request.
  3891. //
  3892. // Use GetChangeToken to get the change token that you provide in the ChangeToken
  3893. // parameter of an UpdateIPSet request.
  3894. //
  3895. // Submit an UpdateXssMatchSet request to specify the parts of web requests
  3896. // that you want AWS WAF to inspect for cross-site scripting attacks.
  3897. //
  3898. // For more information about how to use the AWS WAF API to allow or block HTTP
  3899. // requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/).
  3900. //
  3901. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3902. // with awserr.Error's Code and Message methods to get detailed information about
  3903. // the error.
  3904. //
  3905. // See the AWS API reference guide for AWS WAF's
  3906. // API operation UpdateXssMatchSet for usage and error information.
  3907. //
  3908. // Returned Error Codes:
  3909. // * InternalErrorException
  3910. // The operation failed because of a system problem, even though the request
  3911. // was valid. Retry your request.
  3912. //
  3913. // * InvalidAccountException
  3914. // The operation failed because you tried to create, update, or delete an object
  3915. // by using an invalid account identifier.
  3916. //
  3917. // * InvalidOperationException
  3918. // The operation failed because there was nothing to do. For example:
  3919. //
  3920. // * You tried to remove a Rule from a WebACL, but the Rule isn't in the
  3921. // specified WebACL.
  3922. //
  3923. // * You tried to remove an IP address from an IPSet, but the IP address
  3924. // isn't in the specified IPSet.
  3925. //
  3926. // * You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple
  3927. // isn't in the specified WebACL.
  3928. //
  3929. // * You tried to add a Rule to a WebACL, but the Rule already exists in
  3930. // the specified WebACL.
  3931. //
  3932. // * You tried to add an IP address to an IPSet, but the IP address already
  3933. // exists in the specified IPSet.
  3934. //
  3935. // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple
  3936. // already exists in the specified WebACL.
  3937. //
  3938. // * InvalidParameterException
  3939. // The operation failed because AWS WAF didn't recognize a parameter in the
  3940. // request. For example:
  3941. //
  3942. // * You specified an invalid parameter name.
  3943. //
  3944. // * You specified an invalid value.
  3945. //
  3946. // * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL)
  3947. // using an action other than INSERT or DELETE.
  3948. //
  3949. // * You tried to create a WebACL with a DefaultActionType other than ALLOW,
  3950. // BLOCK, or COUNT.
  3951. //
  3952. // * You tried to update a WebACL with a WafActionType other than ALLOW,
  3953. // BLOCK, or COUNT.
  3954. //
  3955. // * You tried to update a ByteMatchSet with a FieldToMatchType other than
  3956. // HEADER, QUERY_STRING, or URI.
  3957. //
  3958. // * You tried to update a ByteMatchSet with a Field of HEADER but no value
  3959. // for Data.
  3960. //
  3961. // * NonexistentContainerException
  3962. // The operation failed because you tried to add an object to or delete an object
  3963. // from another object that doesn't exist. For example:
  3964. //
  3965. // * You tried to add a Rule to or delete a Rule from a WebACL that doesn't
  3966. // exist.
  3967. //
  3968. // * You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule
  3969. // that doesn't exist.
  3970. //
  3971. // * You tried to add an IP address to or delete an IP address from an IPSet
  3972. // that doesn't exist.
  3973. //
  3974. // * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from
  3975. // a ByteMatchSet that doesn't exist.
  3976. //
  3977. // * NonexistentItemException
  3978. // The operation failed because the referenced object doesn't exist.
  3979. //
  3980. // * StaleDataException
  3981. // The operation failed because you tried to create, update, or delete an object
  3982. // by using a change token that has already been used.
  3983. //
  3984. // * LimitsExceededException
  3985. // The operation exceeds a resource limit, for example, the maximum number of
  3986. // WebACL objects that you can create for an AWS account. For more information,
  3987. // see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
  3988. // in the AWS WAF Developer Guide.
  3989. //
  3990. func (c *WAF) UpdateXssMatchSet(input *UpdateXssMatchSetInput) (*UpdateXssMatchSetOutput, error) {
  3991. req, out := c.UpdateXssMatchSetRequest(input)
  3992. err := req.Send()
  3993. return out, err
  3994. }
  3995. // The ActivatedRule object in an UpdateWebACL request specifies a Rule that
  3996. // you want to insert or delete, the priority of the Rule in the WebACL, and
  3997. // the action that you want AWS WAF to take when a web request matches the Rule
  3998. // (ALLOW, BLOCK, or COUNT).
  3999. //
  4000. // To specify whether to insert or delete a Rule, use the Action parameter in
  4001. // the WebACLUpdate data type.
  4002. type ActivatedRule struct {
  4003. _ struct{} `type:"structure"`
  4004. // Specifies the action that CloudFront or AWS WAF takes when a web request
  4005. // matches the conditions in the Rule. Valid values for Action include the following:
  4006. //
  4007. // * ALLOW: CloudFront responds with the requested object.
  4008. //
  4009. // * BLOCK: CloudFront responds with an HTTP 403 (Forbidden) status code.
  4010. //
  4011. // * COUNT: AWS WAF increments a counter of requests that match the conditions
  4012. // in the rule and then continues to inspect the web request based on the
  4013. // remaining rules in the web ACL.
  4014. //
  4015. // Action is a required field
  4016. Action *WafAction `type:"structure" required:"true"`
  4017. // Specifies the order in which the Rules in a WebACL are evaluated. Rules with
  4018. // a lower value for Priority are evaluated before Rules with a higher value.
  4019. // The value must be a unique integer. If you add multiple Rules to a WebACL,
  4020. // the values don't need to be consecutive.
  4021. //
  4022. // Priority is a required field
  4023. Priority *int64 `type:"integer" required:"true"`
  4024. // The RuleId for a Rule. You use RuleId to get more information about a Rule
  4025. // (see GetRule), update a Rule (see UpdateRule), insert a Rule into a WebACL
  4026. // or delete a one from a WebACL (see UpdateWebACL), or delete a Rule from AWS
  4027. // WAF (see DeleteRule).
  4028. //
  4029. // RuleId is returned by CreateRule and by ListRules.
  4030. //
  4031. // RuleId is a required field
  4032. RuleId *string `min:"1" type:"string" required:"true"`
  4033. }
  4034. // String returns the string representation
  4035. func (s ActivatedRule) String() string {
  4036. return awsutil.Prettify(s)
  4037. }
  4038. // GoString returns the string representation
  4039. func (s ActivatedRule) GoString() string {
  4040. return s.String()
  4041. }
  4042. // Validate inspects the fields of the type to determine if they are valid.
  4043. func (s *ActivatedRule) Validate() error {
  4044. invalidParams := request.ErrInvalidParams{Context: "ActivatedRule"}
  4045. if s.Action == nil {
  4046. invalidParams.Add(request.NewErrParamRequired("Action"))
  4047. }
  4048. if s.Priority == nil {
  4049. invalidParams.Add(request.NewErrParamRequired("Priority"))
  4050. }
  4051. if s.RuleId == nil {
  4052. invalidParams.Add(request.NewErrParamRequired("RuleId"))
  4053. }
  4054. if s.RuleId != nil && len(*s.RuleId) < 1 {
  4055. invalidParams.Add(request.NewErrParamMinLen("RuleId", 1))
  4056. }
  4057. if s.Action != nil {
  4058. if err := s.Action.Validate(); err != nil {
  4059. invalidParams.AddNested("Action", err.(request.ErrInvalidParams))
  4060. }
  4061. }
  4062. if invalidParams.Len() > 0 {
  4063. return invalidParams
  4064. }
  4065. return nil
  4066. }
  4067. // In a GetByteMatchSet request, ByteMatchSet is a complex type that contains
  4068. // the ByteMatchSetId and Name of a ByteMatchSet, and the values that you specified
  4069. // when you updated the ByteMatchSet.
  4070. //
  4071. // A complex type that contains ByteMatchTuple objects, which specify the parts
  4072. // of web requests that you want AWS WAF to inspect and the values that you
  4073. // want AWS WAF to search for. If a ByteMatchSet contains more than one ByteMatchTuple
  4074. // object, a request needs to match the settings in only one ByteMatchTuple
  4075. // to be considered a match.
  4076. type ByteMatchSet struct {
  4077. _ struct{} `type:"structure"`
  4078. // The ByteMatchSetId for a ByteMatchSet. You use ByteMatchSetId to get information
  4079. // about a ByteMatchSet (see GetByteMatchSet), update a ByteMatchSet (see UpdateByteMatchSet),
  4080. // insert a ByteMatchSet into a Rule or delete one from a Rule (see UpdateRule),
  4081. // and delete a ByteMatchSet from AWS WAF (see DeleteByteMatchSet).
  4082. //
  4083. // ByteMatchSetId is returned by CreateByteMatchSet and by ListByteMatchSets.
  4084. //
  4085. // ByteMatchSetId is a required field
  4086. ByteMatchSetId *string `min:"1" type:"string" required:"true"`
  4087. // Specifies the bytes (typically a string that corresponds with ASCII characters)
  4088. // that you want AWS WAF to search for in web requests, the location in requests
  4089. // that you want AWS WAF to search, and other settings.
  4090. //
  4091. // ByteMatchTuples is a required field
  4092. ByteMatchTuples []*ByteMatchTuple `type:"list" required:"true"`
  4093. // A friendly name or description of the ByteMatchSet. You can't change Name
  4094. // after you create a ByteMatchSet.
  4095. Name *string `min:"1" type:"string"`
  4096. }
  4097. // String returns the string representation
  4098. func (s ByteMatchSet) String() string {
  4099. return awsutil.Prettify(s)
  4100. }
  4101. // GoString returns the string representation
  4102. func (s ByteMatchSet) GoString() string {
  4103. return s.String()
  4104. }
  4105. // Returned by ListByteMatchSets. Each ByteMatchSetSummary object includes the
  4106. // Name and ByteMatchSetId for one ByteMatchSet.
  4107. type ByteMatchSetSummary struct {
  4108. _ struct{} `type:"structure"`
  4109. // The ByteMatchSetId for a ByteMatchSet. You use ByteMatchSetId to get information
  4110. // about a ByteMatchSet, update a ByteMatchSet, remove a ByteMatchSet from a
  4111. // Rule, and delete a ByteMatchSet from AWS WAF.
  4112. //
  4113. // ByteMatchSetId is returned by CreateByteMatchSet and by ListByteMatchSets.
  4114. //
  4115. // ByteMatchSetId is a required field
  4116. ByteMatchSetId *string `min:"1" type:"string" required:"true"`
  4117. // A friendly name or description of the ByteMatchSet. You can't change Name
  4118. // after you create a ByteMatchSet.
  4119. //
  4120. // Name is a required field
  4121. Name *string `min:"1" type:"string" required:"true"`
  4122. }
  4123. // String returns the string representation
  4124. func (s ByteMatchSetSummary) String() string {
  4125. return awsutil.Prettify(s)
  4126. }
  4127. // GoString returns the string representation
  4128. func (s ByteMatchSetSummary) GoString() string {
  4129. return s.String()
  4130. }
  4131. // In an UpdateByteMatchSet request, ByteMatchSetUpdate specifies whether to
  4132. // insert or delete a ByteMatchTuple and includes the settings for the ByteMatchTuple.
  4133. type ByteMatchSetUpdate struct {
  4134. _ struct{} `type:"structure"`
  4135. // Specifies whether to insert or delete a ByteMatchTuple.
  4136. //
  4137. // Action is a required field
  4138. Action *string `type:"string" required:"true" enum:"ChangeAction"`
  4139. // Information about the part of a web request that you want AWS WAF to inspect
  4140. // and the value that you want AWS WAF to search for. If you specify DELETE
  4141. // for the value of Action, the ByteMatchTuple values must exactly match the
  4142. // values in the ByteMatchTuple that you want to delete from the ByteMatchSet.
  4143. //
  4144. // ByteMatchTuple is a required field
  4145. ByteMatchTuple *ByteMatchTuple `type:"structure" required:"true"`
  4146. }
  4147. // String returns the string representation
  4148. func (s ByteMatchSetUpdate) String() string {
  4149. return awsutil.Prettify(s)
  4150. }
  4151. // GoString returns the string representation
  4152. func (s ByteMatchSetUpdate) GoString() string {
  4153. return s.String()
  4154. }
  4155. // Validate inspects the fields of the type to determine if they are valid.
  4156. func (s *ByteMatchSetUpdate) Validate() error {
  4157. invalidParams := request.ErrInvalidParams{Context: "ByteMatchSetUpdate"}
  4158. if s.Action == nil {
  4159. invalidParams.Add(request.NewErrParamRequired("Action"))
  4160. }
  4161. if s.ByteMatchTuple == nil {
  4162. invalidParams.Add(request.NewErrParamRequired("ByteMatchTuple"))
  4163. }
  4164. if s.ByteMatchTuple != nil {
  4165. if err := s.ByteMatchTuple.Validate(); err != nil {
  4166. invalidParams.AddNested("ByteMatchTuple", err.(request.ErrInvalidParams))
  4167. }
  4168. }
  4169. if invalidParams.Len() > 0 {
  4170. return invalidParams
  4171. }
  4172. return nil
  4173. }
  4174. // The bytes (typically a string that corresponds with ASCII characters) that
  4175. // you want AWS WAF to search for in web requests, the location in requests
  4176. // that you want AWS WAF to search, and other settings.
  4177. type ByteMatchTuple struct {
  4178. _ struct{} `type:"structure"`
  4179. // The part of a web request that you want AWS WAF to search, such as a specified
  4180. // header or a query string. For more information, see FieldToMatch.
  4181. //
  4182. // FieldToMatch is a required field
  4183. FieldToMatch *FieldToMatch `type:"structure" required:"true"`
  4184. // Within the portion of a web request that you want to search (for example,
  4185. // in the query string, if any), specify where you want AWS WAF to search. Valid
  4186. // values include the following:
  4187. //
  4188. // CONTAINS
  4189. //
  4190. // The specified part of the web request must include the value of TargetString,
  4191. // but the location doesn't matter.
  4192. //
  4193. // CONTAINS_WORD
  4194. //
  4195. // The specified part of the web request must include the value of TargetString,
  4196. // and TargetString must contain only alphanumeric characters or underscore
  4197. // (A-Z, a-z, 0-9, or _). In addition, TargetString must be a word, which means
  4198. // one of the following:
  4199. //
  4200. // * TargetString exactly matches the value of the specified part of the
  4201. // web request, such as the value of a header.
  4202. //
  4203. // * TargetString is at the beginning of the specified part of the web request
  4204. // and is followed by a character other than an alphanumeric character or
  4205. // underscore (_), for example, BadBot;.
  4206. //
  4207. // * TargetString is at the end of the specified part of the web request
  4208. // and is preceded by a character other than an alphanumeric character or
  4209. // underscore (_), for example, ;BadBot.
  4210. //
  4211. // * TargetString is in the middle of the specified part of the web request
  4212. // and is preceded and followed by characters other than alphanumeric characters
  4213. // or underscore (_), for example, -BadBot;.
  4214. //
  4215. // EXACTLY
  4216. //
  4217. // The value of the specified part of the web request must exactly match the
  4218. // value of TargetString.
  4219. //
  4220. // STARTS_WITH
  4221. //
  4222. // The value of TargetString must appear at the beginning of the specified part
  4223. // of the web request.
  4224. //
  4225. // ENDS_WITH
  4226. //
  4227. // The value of TargetString must appear at the end of the specified part of
  4228. // the web request.
  4229. //
  4230. // PositionalConstraint is a required field
  4231. PositionalConstraint *string `type:"string" required:"true" enum:"PositionalConstraint"`
  4232. // The value that you want AWS WAF to search for. AWS WAF searches for the specified
  4233. // string in the part of web requests that you specified in FieldToMatch. The
  4234. // maximum length of the value is 50 bytes.
  4235. //
  4236. // Valid values depend on the values that you specified for FieldToMatch:
  4237. //
  4238. // * HEADER: The value that you want AWS WAF to search for in the request
  4239. // header that you specified in FieldToMatch, for example, the value of the
  4240. // User-Agent or Referer header.
  4241. //
  4242. // * METHOD: The HTTP method, which indicates the type of operation specified
  4243. // in the request. CloudFront supports the following methods: DELETE, GET,
  4244. // HEAD, OPTIONS, PATCH, POST, and PUT.
  4245. //
  4246. // * QUERY_STRING: The value that you want AWS WAF to search for in the query
  4247. // string, which is the part of a URL that appears after a ? character.
  4248. //
  4249. // * URI: The value that you want AWS WAF to search for in the part of a
  4250. // URL that identifies a resource, for example, /images/daily-ad.jpg.
  4251. //
  4252. // * BODY: The part of a request that contains any additional data that you
  4253. // want to send to your web server as the HTTP request body, such as data
  4254. // from a form. The request body immediately follows the request headers.
  4255. // Note that only the first 8192 bytes of the request body are forwarded
  4256. // to AWS WAF for inspection. To allow or block requests based on the length
  4257. // of the body, you can create a size constraint set. For more information,
  4258. // see CreateSizeConstraintSet.
  4259. //
  4260. // If TargetString includes alphabetic characters A-Z and a-z, note that the
  4261. // value is case sensitive.
  4262. //
  4263. // If you're using the AWS WAF API
  4264. //
  4265. // Specify a base64-encoded version of the value. The maximum length of the
  4266. // value before you base64-encode it is 50 bytes.
  4267. //
  4268. // For example, suppose the value of Type is HEADER and the value of Data is
  4269. // User-Agent. If you want to search the User-Agent header for the value BadBot,
  4270. // you base64-encode BadBot using MIME base64 encoding and include the resulting
  4271. // value, QmFkQm90, in the value of TargetString.
  4272. //
  4273. // If you're using the AWS CLI or one of the AWS SDKs
  4274. //
  4275. // The value that you want AWS WAF to search for. The SDK automatically base64
  4276. // encodes the value.
  4277. //
  4278. // TargetString is automatically base64 encoded/decoded by the SDK.
  4279. //
  4280. // TargetString is a required field
  4281. TargetString []byte `type:"blob" required:"true"`
  4282. // Text transformations eliminate some of the unusual formatting that attackers
  4283. // use in web requests in an effort to bypass AWS WAF. If you specify a transformation,
  4284. // AWS WAF performs the transformation on TargetString before inspecting a request
  4285. // for a match.
  4286. //
  4287. // CMD_LINE
  4288. //
  4289. // When you're concerned that attackers are injecting an operating system commandline
  4290. // command and using unusual formatting to disguise some or all of the command,
  4291. // use this option to perform the following transformations:
  4292. //
  4293. // * Delete the following characters: \ " ' ^
  4294. //
  4295. // * Delete spaces before the following characters: / (
  4296. //
  4297. // * Replace the following characters with a space: , ;
  4298. //
  4299. // * Replace multiple spaces with one space
  4300. //
  4301. // * Convert uppercase letters (A-Z) to lowercase (a-z)
  4302. //
  4303. // COMPRESS_WHITE_SPACE
  4304. //
  4305. // Use this option to replace the following characters with a space character
  4306. // (decimal 32):
  4307. //
  4308. // * \f, formfeed, decimal 12
  4309. //
  4310. // * \t, tab, decimal 9
  4311. //
  4312. // * \n, newline, decimal 10
  4313. //
  4314. // * \r, carriage return, decimal 13
  4315. //
  4316. // * \v, vertical tab, decimal 11
  4317. //
  4318. // * non-breaking space, decimal 160
  4319. //
  4320. // COMPRESS_WHITE_SPACE also replaces multiple spaces with one space.
  4321. //
  4322. // HTML_ENTITY_DECODE
  4323. //
  4324. // Use this option to replace HTML-encoded characters with unencoded characters.
  4325. // HTML_ENTITY_DECODE performs the following operations:
  4326. //
  4327. // * Replaces (ampersand)quot; with "
  4328. //
  4329. // * Replaces (ampersand)nbsp; with a non-breaking space, decimal 160
  4330. //
  4331. // * Replaces (ampersand)lt; with a "less than" symbol
  4332. //
  4333. // * Replaces (ampersand)gt; with >
  4334. //
  4335. // * Replaces characters that are represented in hexadecimal format, (ampersand)#xhhhh;,
  4336. // with the corresponding characters
  4337. //
  4338. // * Replaces characters that are represented in decimal format, (ampersand)#nnnn;,
  4339. // with the corresponding characters
  4340. //
  4341. // LOWERCASE
  4342. //
  4343. // Use this option to convert uppercase letters (A-Z) to lowercase (a-z).
  4344. //
  4345. // URL_DECODE
  4346. //
  4347. // Use this option to decode a URL-encoded value.
  4348. //
  4349. // NONE
  4350. //
  4351. // Specify NONE if you don't want to perform any text transformations.
  4352. //
  4353. // TextTransformation is a required field
  4354. TextTransformation *string `type:"string" required:"true" enum:"TextTransformation"`
  4355. }
  4356. // String returns the string representation
  4357. func (s ByteMatchTuple) String() string {
  4358. return awsutil.Prettify(s)
  4359. }
  4360. // GoString returns the string representation
  4361. func (s ByteMatchTuple) GoString() string {
  4362. return s.String()
  4363. }
  4364. // Validate inspects the fields of the type to determine if they are valid.
  4365. func (s *ByteMatchTuple) Validate() error {
  4366. invalidParams := request.ErrInvalidParams{Context: "ByteMatchTuple"}
  4367. if s.FieldToMatch == nil {
  4368. invalidParams.Add(request.NewErrParamRequired("FieldToMatch"))
  4369. }
  4370. if s.PositionalConstraint == nil {
  4371. invalidParams.Add(request.NewErrParamRequired("PositionalConstraint"))
  4372. }
  4373. if s.TargetString == nil {
  4374. invalidParams.Add(request.NewErrParamRequired("TargetString"))
  4375. }
  4376. if s.TextTransformation == nil {
  4377. invalidParams.Add(request.NewErrParamRequired("TextTransformation"))
  4378. }
  4379. if s.FieldToMatch != nil {
  4380. if err := s.FieldToMatch.Validate(); err != nil {
  4381. invalidParams.AddNested("FieldToMatch", err.(request.ErrInvalidParams))
  4382. }
  4383. }
  4384. if invalidParams.Len() > 0 {
  4385. return invalidParams
  4386. }
  4387. return nil
  4388. }
  4389. type CreateByteMatchSetInput struct {
  4390. _ struct{} `type:"structure"`
  4391. // The value returned by the most recent call to GetChangeToken.
  4392. //
  4393. // ChangeToken is a required field
  4394. ChangeToken *string `min:"1" type:"string" required:"true"`
  4395. // A friendly name or description of the ByteMatchSet. You can't change Name
  4396. // after you create a ByteMatchSet.
  4397. //
  4398. // Name is a required field
  4399. Name *string `min:"1" type:"string" required:"true"`
  4400. }
  4401. // String returns the string representation
  4402. func (s CreateByteMatchSetInput) String() string {
  4403. return awsutil.Prettify(s)
  4404. }
  4405. // GoString returns the string representation
  4406. func (s CreateByteMatchSetInput) GoString() string {
  4407. return s.String()
  4408. }
  4409. // Validate inspects the fields of the type to determine if they are valid.
  4410. func (s *CreateByteMatchSetInput) Validate() error {
  4411. invalidParams := request.ErrInvalidParams{Context: "CreateByteMatchSetInput"}
  4412. if s.ChangeToken == nil {
  4413. invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
  4414. }
  4415. if s.ChangeToken != nil && len(*s.ChangeToken) < 1 {
  4416. invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1))
  4417. }
  4418. if s.Name == nil {
  4419. invalidParams.Add(request.NewErrParamRequired("Name"))
  4420. }
  4421. if s.Name != nil && len(*s.Name) < 1 {
  4422. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  4423. }
  4424. if invalidParams.Len() > 0 {
  4425. return invalidParams
  4426. }
  4427. return nil
  4428. }
  4429. type CreateByteMatchSetOutput struct {
  4430. _ struct{} `type:"structure"`
  4431. // A ByteMatchSet that contains no ByteMatchTuple objects.
  4432. ByteMatchSet *ByteMatchSet `type:"structure"`
  4433. // The ChangeToken that you used to submit the CreateByteMatchSet request. You
  4434. // can also use this value to query the status of the request. For more information,
  4435. // see GetChangeTokenStatus.
  4436. ChangeToken *string `min:"1" type:"string"`
  4437. }
  4438. // String returns the string representation
  4439. func (s CreateByteMatchSetOutput) String() string {
  4440. return awsutil.Prettify(s)
  4441. }
  4442. // GoString returns the string representation
  4443. func (s CreateByteMatchSetOutput) GoString() string {
  4444. return s.String()
  4445. }
  4446. type CreateIPSetInput struct {
  4447. _ struct{} `type:"structure"`
  4448. // The value returned by the most recent call to GetChangeToken.
  4449. //
  4450. // ChangeToken is a required field
  4451. ChangeToken *string `min:"1" type:"string" required:"true"`
  4452. // A friendly name or description of the IPSet. You can't change Name after
  4453. // you create the IPSet.
  4454. //
  4455. // Name is a required field
  4456. Name *string `min:"1" type:"string" required:"true"`
  4457. }
  4458. // String returns the string representation
  4459. func (s CreateIPSetInput) String() string {
  4460. return awsutil.Prettify(s)
  4461. }
  4462. // GoString returns the string representation
  4463. func (s CreateIPSetInput) GoString() string {
  4464. return s.String()
  4465. }
  4466. // Validate inspects the fields of the type to determine if they are valid.
  4467. func (s *CreateIPSetInput) Validate() error {
  4468. invalidParams := request.ErrInvalidParams{Context: "CreateIPSetInput"}
  4469. if s.ChangeToken == nil {
  4470. invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
  4471. }
  4472. if s.ChangeToken != nil && len(*s.ChangeToken) < 1 {
  4473. invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1))
  4474. }
  4475. if s.Name == nil {
  4476. invalidParams.Add(request.NewErrParamRequired("Name"))
  4477. }
  4478. if s.Name != nil && len(*s.Name) < 1 {
  4479. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  4480. }
  4481. if invalidParams.Len() > 0 {
  4482. return invalidParams
  4483. }
  4484. return nil
  4485. }
  4486. type CreateIPSetOutput struct {
  4487. _ struct{} `type:"structure"`
  4488. // The ChangeToken that you used to submit the CreateIPSet request. You can
  4489. // also use this value to query the status of the request. For more information,
  4490. // see GetChangeTokenStatus.
  4491. ChangeToken *string `min:"1" type:"string"`
  4492. // The IPSet returned in the CreateIPSet response.
  4493. IPSet *IPSet `type:"structure"`
  4494. }
  4495. // String returns the string representation
  4496. func (s CreateIPSetOutput) String() string {
  4497. return awsutil.Prettify(s)
  4498. }
  4499. // GoString returns the string representation
  4500. func (s CreateIPSetOutput) GoString() string {
  4501. return s.String()
  4502. }
  4503. type CreateRuleInput struct {
  4504. _ struct{} `type:"structure"`
  4505. // The value returned by the most recent call to GetChangeToken.
  4506. //
  4507. // ChangeToken is a required field
  4508. ChangeToken *string `min:"1" type:"string" required:"true"`
  4509. // A friendly name or description for the metrics for this Rule. The name can
  4510. // contain only alphanumeric characters (A-Z, a-z, 0-9); the name can't contain
  4511. // whitespace. You can't change the name of the metric after you create the
  4512. // Rule.
  4513. //
  4514. // MetricName is a required field
  4515. MetricName *string `type:"string" required:"true"`
  4516. // A friendly name or description of the Rule. You can't change the name of
  4517. // a Rule after you create it.
  4518. //
  4519. // Name is a required field
  4520. Name *string `min:"1" type:"string" required:"true"`
  4521. }
  4522. // String returns the string representation
  4523. func (s CreateRuleInput) String() string {
  4524. return awsutil.Prettify(s)
  4525. }
  4526. // GoString returns the string representation
  4527. func (s CreateRuleInput) GoString() string {
  4528. return s.String()
  4529. }
  4530. // Validate inspects the fields of the type to determine if they are valid.
  4531. func (s *CreateRuleInput) Validate() error {
  4532. invalidParams := request.ErrInvalidParams{Context: "CreateRuleInput"}
  4533. if s.ChangeToken == nil {
  4534. invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
  4535. }
  4536. if s.ChangeToken != nil && len(*s.ChangeToken) < 1 {
  4537. invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1))
  4538. }
  4539. if s.MetricName == nil {
  4540. invalidParams.Add(request.NewErrParamRequired("MetricName"))
  4541. }
  4542. if s.Name == nil {
  4543. invalidParams.Add(request.NewErrParamRequired("Name"))
  4544. }
  4545. if s.Name != nil && len(*s.Name) < 1 {
  4546. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  4547. }
  4548. if invalidParams.Len() > 0 {
  4549. return invalidParams
  4550. }
  4551. return nil
  4552. }
  4553. type CreateRuleOutput struct {
  4554. _ struct{} `type:"structure"`
  4555. // The ChangeToken that you used to submit the CreateRule request. You can also
  4556. // use this value to query the status of the request. For more information,
  4557. // see GetChangeTokenStatus.
  4558. ChangeToken *string `min:"1" type:"string"`
  4559. // The Rule returned in the CreateRule response.
  4560. Rule *Rule `type:"structure"`
  4561. }
  4562. // String returns the string representation
  4563. func (s CreateRuleOutput) String() string {
  4564. return awsutil.Prettify(s)
  4565. }
  4566. // GoString returns the string representation
  4567. func (s CreateRuleOutput) GoString() string {
  4568. return s.String()
  4569. }
  4570. type CreateSizeConstraintSetInput struct {
  4571. _ struct{} `type:"structure"`
  4572. // The value returned by the most recent call to GetChangeToken.
  4573. //
  4574. // ChangeToken is a required field
  4575. ChangeToken *string `min:"1" type:"string" required:"true"`
  4576. // A friendly name or description of the SizeConstraintSet. You can't change
  4577. // Name after you create a SizeConstraintSet.
  4578. //
  4579. // Name is a required field
  4580. Name *string `min:"1" type:"string" required:"true"`
  4581. }
  4582. // String returns the string representation
  4583. func (s CreateSizeConstraintSetInput) String() string {
  4584. return awsutil.Prettify(s)
  4585. }
  4586. // GoString returns the string representation
  4587. func (s CreateSizeConstraintSetInput) GoString() string {
  4588. return s.String()
  4589. }
  4590. // Validate inspects the fields of the type to determine if they are valid.
  4591. func (s *CreateSizeConstraintSetInput) Validate() error {
  4592. invalidParams := request.ErrInvalidParams{Context: "CreateSizeConstraintSetInput"}
  4593. if s.ChangeToken == nil {
  4594. invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
  4595. }
  4596. if s.ChangeToken != nil && len(*s.ChangeToken) < 1 {
  4597. invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1))
  4598. }
  4599. if s.Name == nil {
  4600. invalidParams.Add(request.NewErrParamRequired("Name"))
  4601. }
  4602. if s.Name != nil && len(*s.Name) < 1 {
  4603. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  4604. }
  4605. if invalidParams.Len() > 0 {
  4606. return invalidParams
  4607. }
  4608. return nil
  4609. }
  4610. type CreateSizeConstraintSetOutput struct {
  4611. _ struct{} `type:"structure"`
  4612. // The ChangeToken that you used to submit the CreateSizeConstraintSet request.
  4613. // You can also use this value to query the status of the request. For more
  4614. // information, see GetChangeTokenStatus.
  4615. ChangeToken *string `min:"1" type:"string"`
  4616. // A SizeConstraintSet that contains no SizeConstraint objects.
  4617. SizeConstraintSet *SizeConstraintSet `type:"structure"`
  4618. }
  4619. // String returns the string representation
  4620. func (s CreateSizeConstraintSetOutput) String() string {
  4621. return awsutil.Prettify(s)
  4622. }
  4623. // GoString returns the string representation
  4624. func (s CreateSizeConstraintSetOutput) GoString() string {
  4625. return s.String()
  4626. }
  4627. // A request to create a SqlInjectionMatchSet.
  4628. type CreateSqlInjectionMatchSetInput struct {
  4629. _ struct{} `type:"structure"`
  4630. // The value returned by the most recent call to GetChangeToken.
  4631. //
  4632. // ChangeToken is a required field
  4633. ChangeToken *string `min:"1" type:"string" required:"true"`
  4634. // A friendly name or description for the SqlInjectionMatchSet that you're creating.
  4635. // You can't change Name after you create the SqlInjectionMatchSet.
  4636. //
  4637. // Name is a required field
  4638. Name *string `min:"1" type:"string" required:"true"`
  4639. }
  4640. // String returns the string representation
  4641. func (s CreateSqlInjectionMatchSetInput) String() string {
  4642. return awsutil.Prettify(s)
  4643. }
  4644. // GoString returns the string representation
  4645. func (s CreateSqlInjectionMatchSetInput) GoString() string {
  4646. return s.String()
  4647. }
  4648. // Validate inspects the fields of the type to determine if they are valid.
  4649. func (s *CreateSqlInjectionMatchSetInput) Validate() error {
  4650. invalidParams := request.ErrInvalidParams{Context: "CreateSqlInjectionMatchSetInput"}
  4651. if s.ChangeToken == nil {
  4652. invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
  4653. }
  4654. if s.ChangeToken != nil && len(*s.ChangeToken) < 1 {
  4655. invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1))
  4656. }
  4657. if s.Name == nil {
  4658. invalidParams.Add(request.NewErrParamRequired("Name"))
  4659. }
  4660. if s.Name != nil && len(*s.Name) < 1 {
  4661. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  4662. }
  4663. if invalidParams.Len() > 0 {
  4664. return invalidParams
  4665. }
  4666. return nil
  4667. }
  4668. // The response to a CreateSqlInjectionMatchSet request.
  4669. type CreateSqlInjectionMatchSetOutput struct {
  4670. _ struct{} `type:"structure"`
  4671. // The ChangeToken that you used to submit the CreateSqlInjectionMatchSet request.
  4672. // You can also use this value to query the status of the request. For more
  4673. // information, see GetChangeTokenStatus.
  4674. ChangeToken *string `min:"1" type:"string"`
  4675. // A SqlInjectionMatchSet.
  4676. SqlInjectionMatchSet *SqlInjectionMatchSet `type:"structure"`
  4677. }
  4678. // String returns the string representation
  4679. func (s CreateSqlInjectionMatchSetOutput) String() string {
  4680. return awsutil.Prettify(s)
  4681. }
  4682. // GoString returns the string representation
  4683. func (s CreateSqlInjectionMatchSetOutput) GoString() string {
  4684. return s.String()
  4685. }
  4686. type CreateWebACLInput struct {
  4687. _ struct{} `type:"structure"`
  4688. // The value returned by the most recent call to GetChangeToken.
  4689. //
  4690. // ChangeToken is a required field
  4691. ChangeToken *string `min:"1" type:"string" required:"true"`
  4692. // The action that you want AWS WAF to take when a request doesn't match the
  4693. // criteria specified in any of the Rule objects that are associated with the
  4694. // WebACL.
  4695. //
  4696. // DefaultAction is a required field
  4697. DefaultAction *WafAction `type:"structure" required:"true"`
  4698. // A friendly name or description for the metrics for this WebACL. The name
  4699. // can contain only alphanumeric characters (A-Z, a-z, 0-9); the name can't
  4700. // contain whitespace. You can't change MetricName after you create the WebACL.
  4701. //
  4702. // MetricName is a required field
  4703. MetricName *string `type:"string" required:"true"`
  4704. // A friendly name or description of the WebACL. You can't change Name after
  4705. // you create the WebACL.
  4706. //
  4707. // Name is a required field
  4708. Name *string `min:"1" type:"string" required:"true"`
  4709. }
  4710. // String returns the string representation
  4711. func (s CreateWebACLInput) String() string {
  4712. return awsutil.Prettify(s)
  4713. }
  4714. // GoString returns the string representation
  4715. func (s CreateWebACLInput) GoString() string {
  4716. return s.String()
  4717. }
  4718. // Validate inspects the fields of the type to determine if they are valid.
  4719. func (s *CreateWebACLInput) Validate() error {
  4720. invalidParams := request.ErrInvalidParams{Context: "CreateWebACLInput"}
  4721. if s.ChangeToken == nil {
  4722. invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
  4723. }
  4724. if s.ChangeToken != nil && len(*s.ChangeToken) < 1 {
  4725. invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1))
  4726. }
  4727. if s.DefaultAction == nil {
  4728. invalidParams.Add(request.NewErrParamRequired("DefaultAction"))
  4729. }
  4730. if s.MetricName == nil {
  4731. invalidParams.Add(request.NewErrParamRequired("MetricName"))
  4732. }
  4733. if s.Name == nil {
  4734. invalidParams.Add(request.NewErrParamRequired("Name"))
  4735. }
  4736. if s.Name != nil && len(*s.Name) < 1 {
  4737. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  4738. }
  4739. if s.DefaultAction != nil {
  4740. if err := s.DefaultAction.Validate(); err != nil {
  4741. invalidParams.AddNested("DefaultAction", err.(request.ErrInvalidParams))
  4742. }
  4743. }
  4744. if invalidParams.Len() > 0 {
  4745. return invalidParams
  4746. }
  4747. return nil
  4748. }
  4749. type CreateWebACLOutput struct {
  4750. _ struct{} `type:"structure"`
  4751. // The ChangeToken that you used to submit the CreateWebACL request. You can
  4752. // also use this value to query the status of the request. For more information,
  4753. // see GetChangeTokenStatus.
  4754. ChangeToken *string `min:"1" type:"string"`
  4755. // The WebACL returned in the CreateWebACL response.
  4756. WebACL *WebACL `type:"structure"`
  4757. }
  4758. // String returns the string representation
  4759. func (s CreateWebACLOutput) String() string {
  4760. return awsutil.Prettify(s)
  4761. }
  4762. // GoString returns the string representation
  4763. func (s CreateWebACLOutput) GoString() string {
  4764. return s.String()
  4765. }
  4766. // A request to create an XssMatchSet.
  4767. type CreateXssMatchSetInput struct {
  4768. _ struct{} `type:"structure"`
  4769. // The value returned by the most recent call to GetChangeToken.
  4770. //
  4771. // ChangeToken is a required field
  4772. ChangeToken *string `min:"1" type:"string" required:"true"`
  4773. // A friendly name or description for the XssMatchSet that you're creating.
  4774. // You can't change Name after you create the XssMatchSet.
  4775. //
  4776. // Name is a required field
  4777. Name *string `min:"1" type:"string" required:"true"`
  4778. }
  4779. // String returns the string representation
  4780. func (s CreateXssMatchSetInput) String() string {
  4781. return awsutil.Prettify(s)
  4782. }
  4783. // GoString returns the string representation
  4784. func (s CreateXssMatchSetInput) GoString() string {
  4785. return s.String()
  4786. }
  4787. // Validate inspects the fields of the type to determine if they are valid.
  4788. func (s *CreateXssMatchSetInput) Validate() error {
  4789. invalidParams := request.ErrInvalidParams{Context: "CreateXssMatchSetInput"}
  4790. if s.ChangeToken == nil {
  4791. invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
  4792. }
  4793. if s.ChangeToken != nil && len(*s.ChangeToken) < 1 {
  4794. invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1))
  4795. }
  4796. if s.Name == nil {
  4797. invalidParams.Add(request.NewErrParamRequired("Name"))
  4798. }
  4799. if s.Name != nil && len(*s.Name) < 1 {
  4800. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  4801. }
  4802. if invalidParams.Len() > 0 {
  4803. return invalidParams
  4804. }
  4805. return nil
  4806. }
  4807. // The response to a CreateXssMatchSet request.
  4808. type CreateXssMatchSetOutput struct {
  4809. _ struct{} `type:"structure"`
  4810. // The ChangeToken that you used to submit the CreateXssMatchSet request. You
  4811. // can also use this value to query the status of the request. For more information,
  4812. // see GetChangeTokenStatus.
  4813. ChangeToken *string `min:"1" type:"string"`
  4814. // An XssMatchSet.
  4815. XssMatchSet *XssMatchSet `type:"structure"`
  4816. }
  4817. // String returns the string representation
  4818. func (s CreateXssMatchSetOutput) String() string {
  4819. return awsutil.Prettify(s)
  4820. }
  4821. // GoString returns the string representation
  4822. func (s CreateXssMatchSetOutput) GoString() string {
  4823. return s.String()
  4824. }
  4825. type DeleteByteMatchSetInput struct {
  4826. _ struct{} `type:"structure"`
  4827. // The ByteMatchSetId of the ByteMatchSet that you want to delete. ByteMatchSetId
  4828. // is returned by CreateByteMatchSet and by ListByteMatchSets.
  4829. //
  4830. // ByteMatchSetId is a required field
  4831. ByteMatchSetId *string `min:"1" type:"string" required:"true"`
  4832. // The value returned by the most recent call to GetChangeToken.
  4833. //
  4834. // ChangeToken is a required field
  4835. ChangeToken *string `min:"1" type:"string" required:"true"`
  4836. }
  4837. // String returns the string representation
  4838. func (s DeleteByteMatchSetInput) String() string {
  4839. return awsutil.Prettify(s)
  4840. }
  4841. // GoString returns the string representation
  4842. func (s DeleteByteMatchSetInput) GoString() string {
  4843. return s.String()
  4844. }
  4845. // Validate inspects the fields of the type to determine if they are valid.
  4846. func (s *DeleteByteMatchSetInput) Validate() error {
  4847. invalidParams := request.ErrInvalidParams{Context: "DeleteByteMatchSetInput"}
  4848. if s.ByteMatchSetId == nil {
  4849. invalidParams.Add(request.NewErrParamRequired("ByteMatchSetId"))
  4850. }
  4851. if s.ByteMatchSetId != nil && len(*s.ByteMatchSetId) < 1 {
  4852. invalidParams.Add(request.NewErrParamMinLen("ByteMatchSetId", 1))
  4853. }
  4854. if s.ChangeToken == nil {
  4855. invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
  4856. }
  4857. if s.ChangeToken != nil && len(*s.ChangeToken) < 1 {
  4858. invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1))
  4859. }
  4860. if invalidParams.Len() > 0 {
  4861. return invalidParams
  4862. }
  4863. return nil
  4864. }
  4865. type DeleteByteMatchSetOutput struct {
  4866. _ struct{} `type:"structure"`
  4867. // The ChangeToken that you used to submit the DeleteByteMatchSet request. You
  4868. // can also use this value to query the status of the request. For more information,
  4869. // see GetChangeTokenStatus.
  4870. ChangeToken *string `min:"1" type:"string"`
  4871. }
  4872. // String returns the string representation
  4873. func (s DeleteByteMatchSetOutput) String() string {
  4874. return awsutil.Prettify(s)
  4875. }
  4876. // GoString returns the string representation
  4877. func (s DeleteByteMatchSetOutput) GoString() string {
  4878. return s.String()
  4879. }
  4880. type DeleteIPSetInput struct {
  4881. _ struct{} `type:"structure"`
  4882. // The value returned by the most recent call to GetChangeToken.
  4883. //
  4884. // ChangeToken is a required field
  4885. ChangeToken *string `min:"1" type:"string" required:"true"`
  4886. // The IPSetId of the IPSet that you want to delete. IPSetId is returned by
  4887. // CreateIPSet and by ListIPSets.
  4888. //
  4889. // IPSetId is a required field
  4890. IPSetId *string `min:"1" type:"string" required:"true"`
  4891. }
  4892. // String returns the string representation
  4893. func (s DeleteIPSetInput) String() string {
  4894. return awsutil.Prettify(s)
  4895. }
  4896. // GoString returns the string representation
  4897. func (s DeleteIPSetInput) GoString() string {
  4898. return s.String()
  4899. }
  4900. // Validate inspects the fields of the type to determine if they are valid.
  4901. func (s *DeleteIPSetInput) Validate() error {
  4902. invalidParams := request.ErrInvalidParams{Context: "DeleteIPSetInput"}
  4903. if s.ChangeToken == nil {
  4904. invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
  4905. }
  4906. if s.ChangeToken != nil && len(*s.ChangeToken) < 1 {
  4907. invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1))
  4908. }
  4909. if s.IPSetId == nil {
  4910. invalidParams.Add(request.NewErrParamRequired("IPSetId"))
  4911. }
  4912. if s.IPSetId != nil && len(*s.IPSetId) < 1 {
  4913. invalidParams.Add(request.NewErrParamMinLen("IPSetId", 1))
  4914. }
  4915. if invalidParams.Len() > 0 {
  4916. return invalidParams
  4917. }
  4918. return nil
  4919. }
  4920. type DeleteIPSetOutput struct {
  4921. _ struct{} `type:"structure"`
  4922. // The ChangeToken that you used to submit the DeleteIPSet request. You can
  4923. // also use this value to query the status of the request. For more information,
  4924. // see GetChangeTokenStatus.
  4925. ChangeToken *string `min:"1" type:"string"`
  4926. }
  4927. // String returns the string representation
  4928. func (s DeleteIPSetOutput) String() string {
  4929. return awsutil.Prettify(s)
  4930. }
  4931. // GoString returns the string representation
  4932. func (s DeleteIPSetOutput) GoString() string {
  4933. return s.String()
  4934. }
  4935. type DeleteRuleInput struct {
  4936. _ struct{} `type:"structure"`
  4937. // The value returned by the most recent call to GetChangeToken.
  4938. //
  4939. // ChangeToken is a required field
  4940. ChangeToken *string `min:"1" type:"string" required:"true"`
  4941. // The RuleId of the Rule that you want to delete. RuleId is returned by CreateRule
  4942. // and by ListRules.
  4943. //
  4944. // RuleId is a required field
  4945. RuleId *string `min:"1" type:"string" required:"true"`
  4946. }
  4947. // String returns the string representation
  4948. func (s DeleteRuleInput) String() string {
  4949. return awsutil.Prettify(s)
  4950. }
  4951. // GoString returns the string representation
  4952. func (s DeleteRuleInput) GoString() string {
  4953. return s.String()
  4954. }
  4955. // Validate inspects the fields of the type to determine if they are valid.
  4956. func (s *DeleteRuleInput) Validate() error {
  4957. invalidParams := request.ErrInvalidParams{Context: "DeleteRuleInput"}
  4958. if s.ChangeToken == nil {
  4959. invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
  4960. }
  4961. if s.ChangeToken != nil && len(*s.ChangeToken) < 1 {
  4962. invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1))
  4963. }
  4964. if s.RuleId == nil {
  4965. invalidParams.Add(request.NewErrParamRequired("RuleId"))
  4966. }
  4967. if s.RuleId != nil && len(*s.RuleId) < 1 {
  4968. invalidParams.Add(request.NewErrParamMinLen("RuleId", 1))
  4969. }
  4970. if invalidParams.Len() > 0 {
  4971. return invalidParams
  4972. }
  4973. return nil
  4974. }
  4975. type DeleteRuleOutput struct {
  4976. _ struct{} `type:"structure"`
  4977. // The ChangeToken that you used to submit the DeleteRule request. You can also
  4978. // use this value to query the status of the request. For more information,
  4979. // see GetChangeTokenStatus.
  4980. ChangeToken *string `min:"1" type:"string"`
  4981. }
  4982. // String returns the string representation
  4983. func (s DeleteRuleOutput) String() string {
  4984. return awsutil.Prettify(s)
  4985. }
  4986. // GoString returns the string representation
  4987. func (s DeleteRuleOutput) GoString() string {
  4988. return s.String()
  4989. }
  4990. type DeleteSizeConstraintSetInput struct {
  4991. _ struct{} `type:"structure"`
  4992. // The value returned by the most recent call to GetChangeToken.
  4993. //
  4994. // ChangeToken is a required field
  4995. ChangeToken *string `min:"1" type:"string" required:"true"`
  4996. // The SizeConstraintSetId of the SizeConstraintSet that you want to delete.
  4997. // SizeConstraintSetId is returned by CreateSizeConstraintSet and by ListSizeConstraintSets.
  4998. //
  4999. // SizeConstraintSetId is a required field
  5000. SizeConstraintSetId *string `min:"1" type:"string" required:"true"`
  5001. }
  5002. // String returns the string representation
  5003. func (s DeleteSizeConstraintSetInput) String() string {
  5004. return awsutil.Prettify(s)
  5005. }
  5006. // GoString returns the string representation
  5007. func (s DeleteSizeConstraintSetInput) GoString() string {
  5008. return s.String()
  5009. }
  5010. // Validate inspects the fields of the type to determine if they are valid.
  5011. func (s *DeleteSizeConstraintSetInput) Validate() error {
  5012. invalidParams := request.ErrInvalidParams{Context: "DeleteSizeConstraintSetInput"}
  5013. if s.ChangeToken == nil {
  5014. invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
  5015. }
  5016. if s.ChangeToken != nil && len(*s.ChangeToken) < 1 {
  5017. invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1))
  5018. }
  5019. if s.SizeConstraintSetId == nil {
  5020. invalidParams.Add(request.NewErrParamRequired("SizeConstraintSetId"))
  5021. }
  5022. if s.SizeConstraintSetId != nil && len(*s.SizeConstraintSetId) < 1 {
  5023. invalidParams.Add(request.NewErrParamMinLen("SizeConstraintSetId", 1))
  5024. }
  5025. if invalidParams.Len() > 0 {
  5026. return invalidParams
  5027. }
  5028. return nil
  5029. }
  5030. type DeleteSizeConstraintSetOutput struct {
  5031. _ struct{} `type:"structure"`
  5032. // The ChangeToken that you used to submit the DeleteSizeConstraintSet request.
  5033. // You can also use this value to query the status of the request. For more
  5034. // information, see GetChangeTokenStatus.
  5035. ChangeToken *string `min:"1" type:"string"`
  5036. }
  5037. // String returns the string representation
  5038. func (s DeleteSizeConstraintSetOutput) String() string {
  5039. return awsutil.Prettify(s)
  5040. }
  5041. // GoString returns the string representation
  5042. func (s DeleteSizeConstraintSetOutput) GoString() string {
  5043. return s.String()
  5044. }
  5045. // A request to delete a SqlInjectionMatchSet from AWS WAF.
  5046. type DeleteSqlInjectionMatchSetInput struct {
  5047. _ struct{} `type:"structure"`
  5048. // The value returned by the most recent call to GetChangeToken.
  5049. //
  5050. // ChangeToken is a required field
  5051. ChangeToken *string `min:"1" type:"string" required:"true"`
  5052. // The SqlInjectionMatchSetId of the SqlInjectionMatchSet that you want to delete.
  5053. // SqlInjectionMatchSetId is returned by CreateSqlInjectionMatchSet and by ListSqlInjectionMatchSets.
  5054. //
  5055. // SqlInjectionMatchSetId is a required field
  5056. SqlInjectionMatchSetId *string `min:"1" type:"string" required:"true"`
  5057. }
  5058. // String returns the string representation
  5059. func (s DeleteSqlInjectionMatchSetInput) String() string {
  5060. return awsutil.Prettify(s)
  5061. }
  5062. // GoString returns the string representation
  5063. func (s DeleteSqlInjectionMatchSetInput) GoString() string {
  5064. return s.String()
  5065. }
  5066. // Validate inspects the fields of the type to determine if they are valid.
  5067. func (s *DeleteSqlInjectionMatchSetInput) Validate() error {
  5068. invalidParams := request.ErrInvalidParams{Context: "DeleteSqlInjectionMatchSetInput"}
  5069. if s.ChangeToken == nil {
  5070. invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
  5071. }
  5072. if s.ChangeToken != nil && len(*s.ChangeToken) < 1 {
  5073. invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1))
  5074. }
  5075. if s.SqlInjectionMatchSetId == nil {
  5076. invalidParams.Add(request.NewErrParamRequired("SqlInjectionMatchSetId"))
  5077. }
  5078. if s.SqlInjectionMatchSetId != nil && len(*s.SqlInjectionMatchSetId) < 1 {
  5079. invalidParams.Add(request.NewErrParamMinLen("SqlInjectionMatchSetId", 1))
  5080. }
  5081. if invalidParams.Len() > 0 {
  5082. return invalidParams
  5083. }
  5084. return nil
  5085. }
  5086. // The response to a request to delete a SqlInjectionMatchSet from AWS WAF.
  5087. type DeleteSqlInjectionMatchSetOutput struct {
  5088. _ struct{} `type:"structure"`
  5089. // The ChangeToken that you used to submit the DeleteSqlInjectionMatchSet request.
  5090. // You can also use this value to query the status of the request. For more
  5091. // information, see GetChangeTokenStatus.
  5092. ChangeToken *string `min:"1" type:"string"`
  5093. }
  5094. // String returns the string representation
  5095. func (s DeleteSqlInjectionMatchSetOutput) String() string {
  5096. return awsutil.Prettify(s)
  5097. }
  5098. // GoString returns the string representation
  5099. func (s DeleteSqlInjectionMatchSetOutput) GoString() string {
  5100. return s.String()
  5101. }
  5102. type DeleteWebACLInput struct {
  5103. _ struct{} `type:"structure"`
  5104. // The value returned by the most recent call to GetChangeToken.
  5105. //
  5106. // ChangeToken is a required field
  5107. ChangeToken *string `min:"1" type:"string" required:"true"`
  5108. // The WebACLId of the WebACL that you want to delete. WebACLId is returned
  5109. // by CreateWebACL and by ListWebACLs.
  5110. //
  5111. // WebACLId is a required field
  5112. WebACLId *string `min:"1" type:"string" required:"true"`
  5113. }
  5114. // String returns the string representation
  5115. func (s DeleteWebACLInput) String() string {
  5116. return awsutil.Prettify(s)
  5117. }
  5118. // GoString returns the string representation
  5119. func (s DeleteWebACLInput) GoString() string {
  5120. return s.String()
  5121. }
  5122. // Validate inspects the fields of the type to determine if they are valid.
  5123. func (s *DeleteWebACLInput) Validate() error {
  5124. invalidParams := request.ErrInvalidParams{Context: "DeleteWebACLInput"}
  5125. if s.ChangeToken == nil {
  5126. invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
  5127. }
  5128. if s.ChangeToken != nil && len(*s.ChangeToken) < 1 {
  5129. invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1))
  5130. }
  5131. if s.WebACLId == nil {
  5132. invalidParams.Add(request.NewErrParamRequired("WebACLId"))
  5133. }
  5134. if s.WebACLId != nil && len(*s.WebACLId) < 1 {
  5135. invalidParams.Add(request.NewErrParamMinLen("WebACLId", 1))
  5136. }
  5137. if invalidParams.Len() > 0 {
  5138. return invalidParams
  5139. }
  5140. return nil
  5141. }
  5142. type DeleteWebACLOutput struct {
  5143. _ struct{} `type:"structure"`
  5144. // The ChangeToken that you used to submit the DeleteWebACL request. You can
  5145. // also use this value to query the status of the request. For more information,
  5146. // see GetChangeTokenStatus.
  5147. ChangeToken *string `min:"1" type:"string"`
  5148. }
  5149. // String returns the string representation
  5150. func (s DeleteWebACLOutput) String() string {
  5151. return awsutil.Prettify(s)
  5152. }
  5153. // GoString returns the string representation
  5154. func (s DeleteWebACLOutput) GoString() string {
  5155. return s.String()
  5156. }
  5157. // A request to delete an XssMatchSet from AWS WAF.
  5158. type DeleteXssMatchSetInput struct {
  5159. _ struct{} `type:"structure"`
  5160. // The value returned by the most recent call to GetChangeToken.
  5161. //
  5162. // ChangeToken is a required field
  5163. ChangeToken *string `min:"1" type:"string" required:"true"`
  5164. // The XssMatchSetId of the XssMatchSet that you want to delete. XssMatchSetId
  5165. // is returned by CreateXssMatchSet and by ListXssMatchSets.
  5166. //
  5167. // XssMatchSetId is a required field
  5168. XssMatchSetId *string `min:"1" type:"string" required:"true"`
  5169. }
  5170. // String returns the string representation
  5171. func (s DeleteXssMatchSetInput) String() string {
  5172. return awsutil.Prettify(s)
  5173. }
  5174. // GoString returns the string representation
  5175. func (s DeleteXssMatchSetInput) GoString() string {
  5176. return s.String()
  5177. }
  5178. // Validate inspects the fields of the type to determine if they are valid.
  5179. func (s *DeleteXssMatchSetInput) Validate() error {
  5180. invalidParams := request.ErrInvalidParams{Context: "DeleteXssMatchSetInput"}
  5181. if s.ChangeToken == nil {
  5182. invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
  5183. }
  5184. if s.ChangeToken != nil && len(*s.ChangeToken) < 1 {
  5185. invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1))
  5186. }
  5187. if s.XssMatchSetId == nil {
  5188. invalidParams.Add(request.NewErrParamRequired("XssMatchSetId"))
  5189. }
  5190. if s.XssMatchSetId != nil && len(*s.XssMatchSetId) < 1 {
  5191. invalidParams.Add(request.NewErrParamMinLen("XssMatchSetId", 1))
  5192. }
  5193. if invalidParams.Len() > 0 {
  5194. return invalidParams
  5195. }
  5196. return nil
  5197. }
  5198. // The response to a request to delete an XssMatchSet from AWS WAF.
  5199. type DeleteXssMatchSetOutput struct {
  5200. _ struct{} `type:"structure"`
  5201. // The ChangeToken that you used to submit the DeleteXssMatchSet request. You
  5202. // can also use this value to query the status of the request. For more information,
  5203. // see GetChangeTokenStatus.
  5204. ChangeToken *string `min:"1" type:"string"`
  5205. }
  5206. // String returns the string representation
  5207. func (s DeleteXssMatchSetOutput) String() string {
  5208. return awsutil.Prettify(s)
  5209. }
  5210. // GoString returns the string representation
  5211. func (s DeleteXssMatchSetOutput) GoString() string {
  5212. return s.String()
  5213. }
  5214. // Specifies where in a web request to look for TargetString.
  5215. type FieldToMatch struct {
  5216. _ struct{} `type:"structure"`
  5217. // When the value of Type is HEADER, enter the name of the header that you want
  5218. // AWS WAF to search, for example, User-Agent or Referer. If the value of Type
  5219. // is any other value, omit Data.
  5220. //
  5221. // The name of the header is not case sensitive.
  5222. Data *string `type:"string"`
  5223. // The part of the web request that you want AWS WAF to search for a specified
  5224. // string. Parts of a request that you can search include the following:
  5225. //
  5226. // * HEADER: A specified request header, for example, the value of the User-Agent
  5227. // or Referer header. If you choose HEADER for the type, specify the name
  5228. // of the header in Data.
  5229. //
  5230. // * METHOD: The HTTP method, which indicated the type of operation that
  5231. // the request is asking the origin to perform. Amazon CloudFront supports
  5232. // the following methods: DELETE, GET, HEAD, OPTIONS, PATCH, POST, and PUT.
  5233. //
  5234. // * QUERY_STRING: A query string, which is the part of a URL that appears
  5235. // after a ? character, if any.
  5236. //
  5237. // * URI: The part of a web request that identifies a resource, for example,
  5238. // /images/daily-ad.jpg.
  5239. //
  5240. // * BODY: The part of a request that contains any additional data that you
  5241. // want to send to your web server as the HTTP request body, such as data
  5242. // from a form. The request body immediately follows the request headers.
  5243. // Note that only the first 8192 bytes of the request body are forwarded
  5244. // to AWS WAF for inspection. To allow or block requests based on the length
  5245. // of the body, you can create a size constraint set. For more information,
  5246. // see CreateSizeConstraintSet.
  5247. //
  5248. // Type is a required field
  5249. Type *string `type:"string" required:"true" enum:"MatchFieldType"`
  5250. }
  5251. // String returns the string representation
  5252. func (s FieldToMatch) String() string {
  5253. return awsutil.Prettify(s)
  5254. }
  5255. // GoString returns the string representation
  5256. func (s FieldToMatch) GoString() string {
  5257. return s.String()
  5258. }
  5259. // Validate inspects the fields of the type to determine if they are valid.
  5260. func (s *FieldToMatch) Validate() error {
  5261. invalidParams := request.ErrInvalidParams{Context: "FieldToMatch"}
  5262. if s.Type == nil {
  5263. invalidParams.Add(request.NewErrParamRequired("Type"))
  5264. }
  5265. if invalidParams.Len() > 0 {
  5266. return invalidParams
  5267. }
  5268. return nil
  5269. }
  5270. type GetByteMatchSetInput struct {
  5271. _ struct{} `type:"structure"`
  5272. // The ByteMatchSetId of the ByteMatchSet that you want to get. ByteMatchSetId
  5273. // is returned by CreateByteMatchSet and by ListByteMatchSets.
  5274. //
  5275. // ByteMatchSetId is a required field
  5276. ByteMatchSetId *string `min:"1" type:"string" required:"true"`
  5277. }
  5278. // String returns the string representation
  5279. func (s GetByteMatchSetInput) String() string {
  5280. return awsutil.Prettify(s)
  5281. }
  5282. // GoString returns the string representation
  5283. func (s GetByteMatchSetInput) GoString() string {
  5284. return s.String()
  5285. }
  5286. // Validate inspects the fields of the type to determine if they are valid.
  5287. func (s *GetByteMatchSetInput) Validate() error {
  5288. invalidParams := request.ErrInvalidParams{Context: "GetByteMatchSetInput"}
  5289. if s.ByteMatchSetId == nil {
  5290. invalidParams.Add(request.NewErrParamRequired("ByteMatchSetId"))
  5291. }
  5292. if s.ByteMatchSetId != nil && len(*s.ByteMatchSetId) < 1 {
  5293. invalidParams.Add(request.NewErrParamMinLen("ByteMatchSetId", 1))
  5294. }
  5295. if invalidParams.Len() > 0 {
  5296. return invalidParams
  5297. }
  5298. return nil
  5299. }
  5300. type GetByteMatchSetOutput struct {
  5301. _ struct{} `type:"structure"`
  5302. // Information about the ByteMatchSet that you specified in the GetByteMatchSet
  5303. // request. For more information, see the following topics:
  5304. //
  5305. // * ByteMatchSet: Contains ByteMatchSetId, ByteMatchTuples, and Name
  5306. //
  5307. // * ByteMatchTuples: Contains an array of ByteMatchTuple objects. Each ByteMatchTuple
  5308. // object contains FieldToMatch, PositionalConstraint, TargetString, and
  5309. // TextTransformation
  5310. //
  5311. // * FieldToMatch: Contains Data and Type
  5312. ByteMatchSet *ByteMatchSet `type:"structure"`
  5313. }
  5314. // String returns the string representation
  5315. func (s GetByteMatchSetOutput) String() string {
  5316. return awsutil.Prettify(s)
  5317. }
  5318. // GoString returns the string representation
  5319. func (s GetByteMatchSetOutput) GoString() string {
  5320. return s.String()
  5321. }
  5322. type GetChangeTokenInput struct {
  5323. _ struct{} `type:"structure"`
  5324. }
  5325. // String returns the string representation
  5326. func (s GetChangeTokenInput) String() string {
  5327. return awsutil.Prettify(s)
  5328. }
  5329. // GoString returns the string representation
  5330. func (s GetChangeTokenInput) GoString() string {
  5331. return s.String()
  5332. }
  5333. type GetChangeTokenOutput struct {
  5334. _ struct{} `type:"structure"`
  5335. // The ChangeToken that you used in the request. Use this value in a GetChangeTokenStatus
  5336. // request to get the current status of the request.
  5337. ChangeToken *string `min:"1" type:"string"`
  5338. }
  5339. // String returns the string representation
  5340. func (s GetChangeTokenOutput) String() string {
  5341. return awsutil.Prettify(s)
  5342. }
  5343. // GoString returns the string representation
  5344. func (s GetChangeTokenOutput) GoString() string {
  5345. return s.String()
  5346. }
  5347. type GetChangeTokenStatusInput struct {
  5348. _ struct{} `type:"structure"`
  5349. // The change token for which you want to get the status. This change token
  5350. // was previously returned in the GetChangeToken response.
  5351. //
  5352. // ChangeToken is a required field
  5353. ChangeToken *string `min:"1" type:"string" required:"true"`
  5354. }
  5355. // String returns the string representation
  5356. func (s GetChangeTokenStatusInput) String() string {
  5357. return awsutil.Prettify(s)
  5358. }
  5359. // GoString returns the string representation
  5360. func (s GetChangeTokenStatusInput) GoString() string {
  5361. return s.String()
  5362. }
  5363. // Validate inspects the fields of the type to determine if they are valid.
  5364. func (s *GetChangeTokenStatusInput) Validate() error {
  5365. invalidParams := request.ErrInvalidParams{Context: "GetChangeTokenStatusInput"}
  5366. if s.ChangeToken == nil {
  5367. invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
  5368. }
  5369. if s.ChangeToken != nil && len(*s.ChangeToken) < 1 {
  5370. invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1))
  5371. }
  5372. if invalidParams.Len() > 0 {
  5373. return invalidParams
  5374. }
  5375. return nil
  5376. }
  5377. type GetChangeTokenStatusOutput struct {
  5378. _ struct{} `type:"structure"`
  5379. // The status of the change token.
  5380. ChangeTokenStatus *string `type:"string" enum:"ChangeTokenStatus"`
  5381. }
  5382. // String returns the string representation
  5383. func (s GetChangeTokenStatusOutput) String() string {
  5384. return awsutil.Prettify(s)
  5385. }
  5386. // GoString returns the string representation
  5387. func (s GetChangeTokenStatusOutput) GoString() string {
  5388. return s.String()
  5389. }
  5390. type GetIPSetInput struct {
  5391. _ struct{} `type:"structure"`
  5392. // The IPSetId of the IPSet that you want to get. IPSetId is returned by CreateIPSet
  5393. // and by ListIPSets.
  5394. //
  5395. // IPSetId is a required field
  5396. IPSetId *string `min:"1" type:"string" required:"true"`
  5397. }
  5398. // String returns the string representation
  5399. func (s GetIPSetInput) String() string {
  5400. return awsutil.Prettify(s)
  5401. }
  5402. // GoString returns the string representation
  5403. func (s GetIPSetInput) GoString() string {
  5404. return s.String()
  5405. }
  5406. // Validate inspects the fields of the type to determine if they are valid.
  5407. func (s *GetIPSetInput) Validate() error {
  5408. invalidParams := request.ErrInvalidParams{Context: "GetIPSetInput"}
  5409. if s.IPSetId == nil {
  5410. invalidParams.Add(request.NewErrParamRequired("IPSetId"))
  5411. }
  5412. if s.IPSetId != nil && len(*s.IPSetId) < 1 {
  5413. invalidParams.Add(request.NewErrParamMinLen("IPSetId", 1))
  5414. }
  5415. if invalidParams.Len() > 0 {
  5416. return invalidParams
  5417. }
  5418. return nil
  5419. }
  5420. type GetIPSetOutput struct {
  5421. _ struct{} `type:"structure"`
  5422. // Information about the IPSet that you specified in the GetIPSet request. For
  5423. // more information, see the following topics:
  5424. //
  5425. // * IPSet: Contains IPSetDescriptors, IPSetId, and Name
  5426. //
  5427. // * IPSetDescriptors: Contains an array of IPSetDescriptor objects. Each
  5428. // IPSetDescriptor object contains Type and Value
  5429. IPSet *IPSet `type:"structure"`
  5430. }
  5431. // String returns the string representation
  5432. func (s GetIPSetOutput) String() string {
  5433. return awsutil.Prettify(s)
  5434. }
  5435. // GoString returns the string representation
  5436. func (s GetIPSetOutput) GoString() string {
  5437. return s.String()
  5438. }
  5439. type GetRuleInput struct {
  5440. _ struct{} `type:"structure"`
  5441. // The RuleId of the Rule that you want to get. RuleId is returned by CreateRule
  5442. // and by ListRules.
  5443. //
  5444. // RuleId is a required field
  5445. RuleId *string `min:"1" type:"string" required:"true"`
  5446. }
  5447. // String returns the string representation
  5448. func (s GetRuleInput) String() string {
  5449. return awsutil.Prettify(s)
  5450. }
  5451. // GoString returns the string representation
  5452. func (s GetRuleInput) GoString() string {
  5453. return s.String()
  5454. }
  5455. // Validate inspects the fields of the type to determine if they are valid.
  5456. func (s *GetRuleInput) Validate() error {
  5457. invalidParams := request.ErrInvalidParams{Context: "GetRuleInput"}
  5458. if s.RuleId == nil {
  5459. invalidParams.Add(request.NewErrParamRequired("RuleId"))
  5460. }
  5461. if s.RuleId != nil && len(*s.RuleId) < 1 {
  5462. invalidParams.Add(request.NewErrParamMinLen("RuleId", 1))
  5463. }
  5464. if invalidParams.Len() > 0 {
  5465. return invalidParams
  5466. }
  5467. return nil
  5468. }
  5469. type GetRuleOutput struct {
  5470. _ struct{} `type:"structure"`
  5471. // Information about the Rule that you specified in the GetRule request. For
  5472. // more information, see the following topics:
  5473. //
  5474. // * Rule: Contains MetricName, Name, an array of Predicate objects, and
  5475. // RuleId
  5476. //
  5477. // * Predicate: Each Predicate object contains DataId, Negated, and Type
  5478. Rule *Rule `type:"structure"`
  5479. }
  5480. // String returns the string representation
  5481. func (s GetRuleOutput) String() string {
  5482. return awsutil.Prettify(s)
  5483. }
  5484. // GoString returns the string representation
  5485. func (s GetRuleOutput) GoString() string {
  5486. return s.String()
  5487. }
  5488. type GetSampledRequestsInput struct {
  5489. _ struct{} `type:"structure"`
  5490. // The number of requests that you want AWS WAF to return from among the first
  5491. // 5,000 requests that your AWS resource received during the time range. If
  5492. // your resource received fewer requests than the value of MaxItems, GetSampledRequests
  5493. // returns information about all of them.
  5494. //
  5495. // MaxItems is a required field
  5496. MaxItems *int64 `min:"1" type:"long" required:"true"`
  5497. // RuleId is one of two values:
  5498. //
  5499. // * The RuleId of the Rule for which you want GetSampledRequests to return
  5500. // a sample of requests.
  5501. //
  5502. // * Default_Action, which causes GetSampledRequests to return a sample of
  5503. // the requests that didn't match any of the rules in the specified WebACL.
  5504. //
  5505. // RuleId is a required field
  5506. RuleId *string `min:"1" type:"string" required:"true"`
  5507. // The start date and time and the end date and time of the range for which
  5508. // you want GetSampledRequests to return a sample of requests. Specify the date
  5509. // and time in Unix time format (in seconds). You can specify any time range
  5510. // in the previous three hours.
  5511. //
  5512. // TimeWindow is a required field
  5513. TimeWindow *TimeWindow `type:"structure" required:"true"`
  5514. // The WebACLId of the WebACL for which you want GetSampledRequests to return
  5515. // a sample of requests.
  5516. //
  5517. // WebAclId is a required field
  5518. WebAclId *string `min:"1" type:"string" required:"true"`
  5519. }
  5520. // String returns the string representation
  5521. func (s GetSampledRequestsInput) String() string {
  5522. return awsutil.Prettify(s)
  5523. }
  5524. // GoString returns the string representation
  5525. func (s GetSampledRequestsInput) GoString() string {
  5526. return s.String()
  5527. }
  5528. // Validate inspects the fields of the type to determine if they are valid.
  5529. func (s *GetSampledRequestsInput) Validate() error {
  5530. invalidParams := request.ErrInvalidParams{Context: "GetSampledRequestsInput"}
  5531. if s.MaxItems == nil {
  5532. invalidParams.Add(request.NewErrParamRequired("MaxItems"))
  5533. }
  5534. if s.MaxItems != nil && *s.MaxItems < 1 {
  5535. invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1))
  5536. }
  5537. if s.RuleId == nil {
  5538. invalidParams.Add(request.NewErrParamRequired("RuleId"))
  5539. }
  5540. if s.RuleId != nil && len(*s.RuleId) < 1 {
  5541. invalidParams.Add(request.NewErrParamMinLen("RuleId", 1))
  5542. }
  5543. if s.TimeWindow == nil {
  5544. invalidParams.Add(request.NewErrParamRequired("TimeWindow"))
  5545. }
  5546. if s.WebAclId == nil {
  5547. invalidParams.Add(request.NewErrParamRequired("WebAclId"))
  5548. }
  5549. if s.WebAclId != nil && len(*s.WebAclId) < 1 {
  5550. invalidParams.Add(request.NewErrParamMinLen("WebAclId", 1))
  5551. }
  5552. if s.TimeWindow != nil {
  5553. if err := s.TimeWindow.Validate(); err != nil {
  5554. invalidParams.AddNested("TimeWindow", err.(request.ErrInvalidParams))
  5555. }
  5556. }
  5557. if invalidParams.Len() > 0 {
  5558. return invalidParams
  5559. }
  5560. return nil
  5561. }
  5562. type GetSampledRequestsOutput struct {
  5563. _ struct{} `type:"structure"`
  5564. // The total number of requests from which GetSampledRequests got a sample of
  5565. // MaxItems requests. If PopulationSize is less than MaxItems, the sample includes
  5566. // every request that your AWS resource received during the specified time range.
  5567. PopulationSize *int64 `type:"long"`
  5568. // A complex type that contains detailed information about each of the requests
  5569. // in the sample.
  5570. SampledRequests []*SampledHTTPRequest `type:"list"`
  5571. // Usually, TimeWindow is the time range that you specified in the GetSampledRequests
  5572. // request. However, if your AWS resource received more than 5,000 requests
  5573. // during the time range that you specified in the request, GetSampledRequests
  5574. // returns the time range for the first 5,000 requests.
  5575. TimeWindow *TimeWindow `type:"structure"`
  5576. }
  5577. // String returns the string representation
  5578. func (s GetSampledRequestsOutput) String() string {
  5579. return awsutil.Prettify(s)
  5580. }
  5581. // GoString returns the string representation
  5582. func (s GetSampledRequestsOutput) GoString() string {
  5583. return s.String()
  5584. }
  5585. type GetSizeConstraintSetInput struct {
  5586. _ struct{} `type:"structure"`
  5587. // The SizeConstraintSetId of the SizeConstraintSet that you want to get. SizeConstraintSetId
  5588. // is returned by CreateSizeConstraintSet and by ListSizeConstraintSets.
  5589. //
  5590. // SizeConstraintSetId is a required field
  5591. SizeConstraintSetId *string `min:"1" type:"string" required:"true"`
  5592. }
  5593. // String returns the string representation
  5594. func (s GetSizeConstraintSetInput) String() string {
  5595. return awsutil.Prettify(s)
  5596. }
  5597. // GoString returns the string representation
  5598. func (s GetSizeConstraintSetInput) GoString() string {
  5599. return s.String()
  5600. }
  5601. // Validate inspects the fields of the type to determine if they are valid.
  5602. func (s *GetSizeConstraintSetInput) Validate() error {
  5603. invalidParams := request.ErrInvalidParams{Context: "GetSizeConstraintSetInput"}
  5604. if s.SizeConstraintSetId == nil {
  5605. invalidParams.Add(request.NewErrParamRequired("SizeConstraintSetId"))
  5606. }
  5607. if s.SizeConstraintSetId != nil && len(*s.SizeConstraintSetId) < 1 {
  5608. invalidParams.Add(request.NewErrParamMinLen("SizeConstraintSetId", 1))
  5609. }
  5610. if invalidParams.Len() > 0 {
  5611. return invalidParams
  5612. }
  5613. return nil
  5614. }
  5615. type GetSizeConstraintSetOutput struct {
  5616. _ struct{} `type:"structure"`
  5617. // Information about the SizeConstraintSet that you specified in the GetSizeConstraintSet
  5618. // request. For more information, see the following topics:
  5619. //
  5620. // * SizeConstraintSet: Contains SizeConstraintSetId, SizeConstraints, and
  5621. // Name
  5622. //
  5623. // * SizeConstraints: Contains an array of SizeConstraint objects. Each SizeConstraint
  5624. // object contains FieldToMatch, TextTransformation, ComparisonOperator,
  5625. // and Size
  5626. //
  5627. // * FieldToMatch: Contains Data and Type
  5628. SizeConstraintSet *SizeConstraintSet `type:"structure"`
  5629. }
  5630. // String returns the string representation
  5631. func (s GetSizeConstraintSetOutput) String() string {
  5632. return awsutil.Prettify(s)
  5633. }
  5634. // GoString returns the string representation
  5635. func (s GetSizeConstraintSetOutput) GoString() string {
  5636. return s.String()
  5637. }
  5638. // A request to get a SqlInjectionMatchSet.
  5639. type GetSqlInjectionMatchSetInput struct {
  5640. _ struct{} `type:"structure"`
  5641. // The SqlInjectionMatchSetId of the SqlInjectionMatchSet that you want to get.
  5642. // SqlInjectionMatchSetId is returned by CreateSqlInjectionMatchSet and by ListSqlInjectionMatchSets.
  5643. //
  5644. // SqlInjectionMatchSetId is a required field
  5645. SqlInjectionMatchSetId *string `min:"1" type:"string" required:"true"`
  5646. }
  5647. // String returns the string representation
  5648. func (s GetSqlInjectionMatchSetInput) String() string {
  5649. return awsutil.Prettify(s)
  5650. }
  5651. // GoString returns the string representation
  5652. func (s GetSqlInjectionMatchSetInput) GoString() string {
  5653. return s.String()
  5654. }
  5655. // Validate inspects the fields of the type to determine if they are valid.
  5656. func (s *GetSqlInjectionMatchSetInput) Validate() error {
  5657. invalidParams := request.ErrInvalidParams{Context: "GetSqlInjectionMatchSetInput"}
  5658. if s.SqlInjectionMatchSetId == nil {
  5659. invalidParams.Add(request.NewErrParamRequired("SqlInjectionMatchSetId"))
  5660. }
  5661. if s.SqlInjectionMatchSetId != nil && len(*s.SqlInjectionMatchSetId) < 1 {
  5662. invalidParams.Add(request.NewErrParamMinLen("SqlInjectionMatchSetId", 1))
  5663. }
  5664. if invalidParams.Len() > 0 {
  5665. return invalidParams
  5666. }
  5667. return nil
  5668. }
  5669. // The response to a GetSqlInjectionMatchSet request.
  5670. type GetSqlInjectionMatchSetOutput struct {
  5671. _ struct{} `type:"structure"`
  5672. // Information about the SqlInjectionMatchSet that you specified in the GetSqlInjectionMatchSet
  5673. // request. For more information, see the following topics:
  5674. //
  5675. // * SqlInjectionMatchSet: Contains Name, SqlInjectionMatchSetId, and an
  5676. // array of SqlInjectionMatchTuple objects
  5677. //
  5678. // * SqlInjectionMatchTuple: Each SqlInjectionMatchTuple object contains
  5679. // FieldToMatch and TextTransformation
  5680. //
  5681. // * FieldToMatch: Contains Data and Type
  5682. SqlInjectionMatchSet *SqlInjectionMatchSet `type:"structure"`
  5683. }
  5684. // String returns the string representation
  5685. func (s GetSqlInjectionMatchSetOutput) String() string {
  5686. return awsutil.Prettify(s)
  5687. }
  5688. // GoString returns the string representation
  5689. func (s GetSqlInjectionMatchSetOutput) GoString() string {
  5690. return s.String()
  5691. }
  5692. type GetWebACLInput struct {
  5693. _ struct{} `type:"structure"`
  5694. // The WebACLId of the WebACL that you want to get. WebACLId is returned by
  5695. // CreateWebACL and by ListWebACLs.
  5696. //
  5697. // WebACLId is a required field
  5698. WebACLId *string `min:"1" type:"string" required:"true"`
  5699. }
  5700. // String returns the string representation
  5701. func (s GetWebACLInput) String() string {
  5702. return awsutil.Prettify(s)
  5703. }
  5704. // GoString returns the string representation
  5705. func (s GetWebACLInput) GoString() string {
  5706. return s.String()
  5707. }
  5708. // Validate inspects the fields of the type to determine if they are valid.
  5709. func (s *GetWebACLInput) Validate() error {
  5710. invalidParams := request.ErrInvalidParams{Context: "GetWebACLInput"}
  5711. if s.WebACLId == nil {
  5712. invalidParams.Add(request.NewErrParamRequired("WebACLId"))
  5713. }
  5714. if s.WebACLId != nil && len(*s.WebACLId) < 1 {
  5715. invalidParams.Add(request.NewErrParamMinLen("WebACLId", 1))
  5716. }
  5717. if invalidParams.Len() > 0 {
  5718. return invalidParams
  5719. }
  5720. return nil
  5721. }
  5722. type GetWebACLOutput struct {
  5723. _ struct{} `type:"structure"`
  5724. // Information about the WebACL that you specified in the GetWebACL request.
  5725. // For more information, see the following topics:
  5726. //
  5727. // * WebACL: Contains DefaultAction, MetricName, Name, an array of Rule objects,
  5728. // and WebACLId
  5729. //
  5730. // * DefaultAction (Data type is WafAction): Contains Type
  5731. //
  5732. // * Rules: Contains an array of ActivatedRule objects, which contain Action,
  5733. // Priority, and RuleId
  5734. //
  5735. // * Action: Contains Type
  5736. WebACL *WebACL `type:"structure"`
  5737. }
  5738. // String returns the string representation
  5739. func (s GetWebACLOutput) String() string {
  5740. return awsutil.Prettify(s)
  5741. }
  5742. // GoString returns the string representation
  5743. func (s GetWebACLOutput) GoString() string {
  5744. return s.String()
  5745. }
  5746. // A request to get an XssMatchSet.
  5747. type GetXssMatchSetInput struct {
  5748. _ struct{} `type:"structure"`
  5749. // The XssMatchSetId of the XssMatchSet that you want to get. XssMatchSetId
  5750. // is returned by CreateXssMatchSet and by ListXssMatchSets.
  5751. //
  5752. // XssMatchSetId is a required field
  5753. XssMatchSetId *string `min:"1" type:"string" required:"true"`
  5754. }
  5755. // String returns the string representation
  5756. func (s GetXssMatchSetInput) String() string {
  5757. return awsutil.Prettify(s)
  5758. }
  5759. // GoString returns the string representation
  5760. func (s GetXssMatchSetInput) GoString() string {
  5761. return s.String()
  5762. }
  5763. // Validate inspects the fields of the type to determine if they are valid.
  5764. func (s *GetXssMatchSetInput) Validate() error {
  5765. invalidParams := request.ErrInvalidParams{Context: "GetXssMatchSetInput"}
  5766. if s.XssMatchSetId == nil {
  5767. invalidParams.Add(request.NewErrParamRequired("XssMatchSetId"))
  5768. }
  5769. if s.XssMatchSetId != nil && len(*s.XssMatchSetId) < 1 {
  5770. invalidParams.Add(request.NewErrParamMinLen("XssMatchSetId", 1))
  5771. }
  5772. if invalidParams.Len() > 0 {
  5773. return invalidParams
  5774. }
  5775. return nil
  5776. }
  5777. // The response to a GetXssMatchSet request.
  5778. type GetXssMatchSetOutput struct {
  5779. _ struct{} `type:"structure"`
  5780. // Information about the XssMatchSet that you specified in the GetXssMatchSet
  5781. // request. For more information, see the following topics:
  5782. //
  5783. // * XssMatchSet: Contains Name, XssMatchSetId, and an array of XssMatchTuple
  5784. // objects
  5785. //
  5786. // * XssMatchTuple: Each XssMatchTuple object contains FieldToMatch and TextTransformation
  5787. //
  5788. // * FieldToMatch: Contains Data and Type
  5789. XssMatchSet *XssMatchSet `type:"structure"`
  5790. }
  5791. // String returns the string representation
  5792. func (s GetXssMatchSetOutput) String() string {
  5793. return awsutil.Prettify(s)
  5794. }
  5795. // GoString returns the string representation
  5796. func (s GetXssMatchSetOutput) GoString() string {
  5797. return s.String()
  5798. }
  5799. // The response from a GetSampledRequests request includes an HTTPHeader complex
  5800. // type that appears as Headers in the response syntax. HTTPHeader contains
  5801. // the names and values of all of the headers that appear in one of the web
  5802. // requests that were returned by GetSampledRequests.
  5803. type HTTPHeader struct {
  5804. _ struct{} `type:"structure"`
  5805. // The name of one of the headers in the sampled web request.
  5806. Name *string `type:"string"`
  5807. // The value of one of the headers in the sampled web request.
  5808. Value *string `type:"string"`
  5809. }
  5810. // String returns the string representation
  5811. func (s HTTPHeader) String() string {
  5812. return awsutil.Prettify(s)
  5813. }
  5814. // GoString returns the string representation
  5815. func (s HTTPHeader) GoString() string {
  5816. return s.String()
  5817. }
  5818. // The response from a GetSampledRequests request includes an HTTPRequest complex
  5819. // type that appears as Request in the response syntax. HTTPRequest contains
  5820. // information about one of the web requests that were returned by GetSampledRequests.
  5821. type HTTPRequest struct {
  5822. _ struct{} `type:"structure"`
  5823. // The IP address that the request originated from. If the WebACL is associated
  5824. // with a CloudFront distribution, this is the value of one of the following
  5825. // fields in CloudFront access logs:
  5826. //
  5827. // * c-ip, if the viewer did not use an HTTP proxy or a load balancer to
  5828. // send the request
  5829. //
  5830. // * x-forwarded-for, if the viewer did use an HTTP proxy or a load balancer
  5831. // to send the request
  5832. ClientIP *string `type:"string"`
  5833. // The two-letter country code for the country that the request originated from.
  5834. // For a current list of country codes, see the Wikipedia entry ISO 3166-1 alpha-2
  5835. // (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
  5836. Country *string `type:"string"`
  5837. // The HTTP version specified in the sampled web request, for example, HTTP/1.1.
  5838. HTTPVersion *string `type:"string"`
  5839. // A complex type that contains two values for each header in the sampled web
  5840. // request: the name of the header and the value of the header.
  5841. Headers []*HTTPHeader `type:"list"`
  5842. // The HTTP method specified in the sampled web request. CloudFront supports
  5843. // the following methods: DELETE, GET, HEAD, OPTIONS, PATCH, POST, and PUT.
  5844. Method *string `type:"string"`
  5845. // The part of a web request that identifies the resource, for example, /images/daily-ad.jpg.
  5846. URI *string `type:"string"`
  5847. }
  5848. // String returns the string representation
  5849. func (s HTTPRequest) String() string {
  5850. return awsutil.Prettify(s)
  5851. }
  5852. // GoString returns the string representation
  5853. func (s HTTPRequest) GoString() string {
  5854. return s.String()
  5855. }
  5856. // Contains one or more IP addresses or blocks of IP addresses specified in
  5857. // Classless Inter-Domain Routing (CIDR) notation. To specify an individual
  5858. // IP address, you specify the four-part IP address followed by a /32, for example,
  5859. // 192.0.2.0/31. To block a range of IP addresses, you can specify a /24, a
  5860. // /16, or a /8 CIDR. For more information about CIDR notation, perform an Internet
  5861. // search on cidr notation.
  5862. type IPSet struct {
  5863. _ struct{} `type:"structure"`
  5864. // The IP address type (IPV4) and the IP address range (in CIDR notation) that
  5865. // web requests originate from. If the WebACL is associated with a CloudFront
  5866. // distribution, this is the value of one of the following fields in CloudFront
  5867. // access logs:
  5868. //
  5869. // * c-ip, if the viewer did not use an HTTP proxy or a load balancer to
  5870. // send the request
  5871. //
  5872. // * x-forwarded-for, if the viewer did use an HTTP proxy or a load balancer
  5873. // to send the request
  5874. //
  5875. // IPSetDescriptors is a required field
  5876. IPSetDescriptors []*IPSetDescriptor `type:"list" required:"true"`
  5877. // The IPSetId for an IPSet. You use IPSetId to get information about an IPSet
  5878. // (see GetIPSet), update an IPSet (see UpdateIPSet), insert an IPSet into a
  5879. // Rule or delete one from a Rule (see UpdateRule), and delete an IPSet from
  5880. // AWS WAF (see DeleteIPSet).
  5881. //
  5882. // IPSetId is returned by CreateIPSet and by ListIPSets.
  5883. //
  5884. // IPSetId is a required field
  5885. IPSetId *string `min:"1" type:"string" required:"true"`
  5886. // A friendly name or description of the IPSet. You can't change the name of
  5887. // an IPSet after you create it.
  5888. Name *string `min:"1" type:"string"`
  5889. }
  5890. // String returns the string representation
  5891. func (s IPSet) String() string {
  5892. return awsutil.Prettify(s)
  5893. }
  5894. // GoString returns the string representation
  5895. func (s IPSet) GoString() string {
  5896. return s.String()
  5897. }
  5898. // Specifies the IP address type (IPV4) and the IP address range (in CIDR format)
  5899. // that web requests originate from.
  5900. type IPSetDescriptor struct {
  5901. _ struct{} `type:"structure"`
  5902. // Specify IPV4.
  5903. //
  5904. // Type is a required field
  5905. Type *string `type:"string" required:"true" enum:"IPSetDescriptorType"`
  5906. // Specify an IPv4 address by using CIDR notation. For example:
  5907. //
  5908. // * To configure AWS WAF to allow, block, or count requests that originated
  5909. // from the IP address 192.0.2.44, specify 192.0.2.44/32.
  5910. //
  5911. // * To configure AWS WAF to allow, block, or count requests that originated
  5912. // from IP addresses from 192.0.2.0 to 192.0.2.255, specify 192.0.2.0/24.
  5913. //
  5914. // AWS WAF supports only /8, /16, /24, and /32 IP addresses.
  5915. //
  5916. // For more information about CIDR notation, see the Wikipedia entry Classless
  5917. // Inter-Domain Routing (https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing).
  5918. //
  5919. // Value is a required field
  5920. Value *string `type:"string" required:"true"`
  5921. }
  5922. // String returns the string representation
  5923. func (s IPSetDescriptor) String() string {
  5924. return awsutil.Prettify(s)
  5925. }
  5926. // GoString returns the string representation
  5927. func (s IPSetDescriptor) GoString() string {
  5928. return s.String()
  5929. }
  5930. // Validate inspects the fields of the type to determine if they are valid.
  5931. func (s *IPSetDescriptor) Validate() error {
  5932. invalidParams := request.ErrInvalidParams{Context: "IPSetDescriptor"}
  5933. if s.Type == nil {
  5934. invalidParams.Add(request.NewErrParamRequired("Type"))
  5935. }
  5936. if s.Value == nil {
  5937. invalidParams.Add(request.NewErrParamRequired("Value"))
  5938. }
  5939. if invalidParams.Len() > 0 {
  5940. return invalidParams
  5941. }
  5942. return nil
  5943. }
  5944. // Contains the identifier and the name of the IPSet.
  5945. type IPSetSummary struct {
  5946. _ struct{} `type:"structure"`
  5947. // The IPSetId for an IPSet. You can use IPSetId in a GetIPSet request to get
  5948. // detailed information about an IPSet.
  5949. //
  5950. // IPSetId is a required field
  5951. IPSetId *string `min:"1" type:"string" required:"true"`
  5952. // A friendly name or description of the IPSet. You can't change the name of
  5953. // an IPSet after you create it.
  5954. //
  5955. // Name is a required field
  5956. Name *string `min:"1" type:"string" required:"true"`
  5957. }
  5958. // String returns the string representation
  5959. func (s IPSetSummary) String() string {
  5960. return awsutil.Prettify(s)
  5961. }
  5962. // GoString returns the string representation
  5963. func (s IPSetSummary) GoString() string {
  5964. return s.String()
  5965. }
  5966. // Specifies the type of update to perform to an IPSet with UpdateIPSet.
  5967. type IPSetUpdate struct {
  5968. _ struct{} `type:"structure"`
  5969. // Specifies whether to insert or delete an IP address with UpdateIPSet.
  5970. //
  5971. // Action is a required field
  5972. Action *string `type:"string" required:"true" enum:"ChangeAction"`
  5973. // The IP address type (IPV4) and the IP address range (in CIDR notation) that
  5974. // web requests originate from.
  5975. //
  5976. // IPSetDescriptor is a required field
  5977. IPSetDescriptor *IPSetDescriptor `type:"structure" required:"true"`
  5978. }
  5979. // String returns the string representation
  5980. func (s IPSetUpdate) String() string {
  5981. return awsutil.Prettify(s)
  5982. }
  5983. // GoString returns the string representation
  5984. func (s IPSetUpdate) GoString() string {
  5985. return s.String()
  5986. }
  5987. // Validate inspects the fields of the type to determine if they are valid.
  5988. func (s *IPSetUpdate) Validate() error {
  5989. invalidParams := request.ErrInvalidParams{Context: "IPSetUpdate"}
  5990. if s.Action == nil {
  5991. invalidParams.Add(request.NewErrParamRequired("Action"))
  5992. }
  5993. if s.IPSetDescriptor == nil {
  5994. invalidParams.Add(request.NewErrParamRequired("IPSetDescriptor"))
  5995. }
  5996. if s.IPSetDescriptor != nil {
  5997. if err := s.IPSetDescriptor.Validate(); err != nil {
  5998. invalidParams.AddNested("IPSetDescriptor", err.(request.ErrInvalidParams))
  5999. }
  6000. }
  6001. if invalidParams.Len() > 0 {
  6002. return invalidParams
  6003. }
  6004. return nil
  6005. }
  6006. type ListByteMatchSetsInput struct {
  6007. _ struct{} `type:"structure"`
  6008. // Specifies the number of ByteMatchSet objects that you want AWS WAF to return
  6009. // for this request. If you have more ByteMatchSets objects than the number
  6010. // you specify for Limit, the response includes a NextMarker value that you
  6011. // can use to get another batch of ByteMatchSet objects.
  6012. Limit *int64 `type:"integer"`
  6013. // If you specify a value for Limit and you have more ByteMatchSets than the
  6014. // value of Limit, AWS WAF returns a NextMarker value in the response that allows
  6015. // you to list another group of ByteMatchSets. For the second and subsequent
  6016. // ListByteMatchSets requests, specify the value of NextMarker from the previous
  6017. // response to get information about another batch of ByteMatchSets.
  6018. NextMarker *string `min:"1" type:"string"`
  6019. }
  6020. // String returns the string representation
  6021. func (s ListByteMatchSetsInput) String() string {
  6022. return awsutil.Prettify(s)
  6023. }
  6024. // GoString returns the string representation
  6025. func (s ListByteMatchSetsInput) GoString() string {
  6026. return s.String()
  6027. }
  6028. // Validate inspects the fields of the type to determine if they are valid.
  6029. func (s *ListByteMatchSetsInput) Validate() error {
  6030. invalidParams := request.ErrInvalidParams{Context: "ListByteMatchSetsInput"}
  6031. if s.NextMarker != nil && len(*s.NextMarker) < 1 {
  6032. invalidParams.Add(request.NewErrParamMinLen("NextMarker", 1))
  6033. }
  6034. if invalidParams.Len() > 0 {
  6035. return invalidParams
  6036. }
  6037. return nil
  6038. }
  6039. type ListByteMatchSetsOutput struct {
  6040. _ struct{} `type:"structure"`
  6041. // An array of ByteMatchSetSummary objects.
  6042. ByteMatchSets []*ByteMatchSetSummary `type:"list"`
  6043. // If you have more ByteMatchSet objects than the number that you specified
  6044. // for Limit in the request, the response includes a NextMarker value. To list
  6045. // more ByteMatchSet objects, submit another ListByteMatchSets request, and
  6046. // specify the NextMarker value from the response in the NextMarker value in
  6047. // the next request.
  6048. NextMarker *string `min:"1" type:"string"`
  6049. }
  6050. // String returns the string representation
  6051. func (s ListByteMatchSetsOutput) String() string {
  6052. return awsutil.Prettify(s)
  6053. }
  6054. // GoString returns the string representation
  6055. func (s ListByteMatchSetsOutput) GoString() string {
  6056. return s.String()
  6057. }
  6058. type ListIPSetsInput struct {
  6059. _ struct{} `type:"structure"`
  6060. // Specifies the number of IPSet objects that you want AWS WAF to return for
  6061. // this request. If you have more IPSet objects than the number you specify
  6062. // for Limit, the response includes a NextMarker value that you can use to get
  6063. // another batch of IPSet objects.
  6064. Limit *int64 `type:"integer"`
  6065. // If you specify a value for Limit and you have more IPSets than the value
  6066. // of Limit, AWS WAF returns a NextMarker value in the response that allows
  6067. // you to list another group of IPSets. For the second and subsequent ListIPSets
  6068. // requests, specify the value of NextMarker from the previous response to get
  6069. // information about another batch of ByteMatchSets.
  6070. NextMarker *string `min:"1" type:"string"`
  6071. }
  6072. // String returns the string representation
  6073. func (s ListIPSetsInput) String() string {
  6074. return awsutil.Prettify(s)
  6075. }
  6076. // GoString returns the string representation
  6077. func (s ListIPSetsInput) GoString() string {
  6078. return s.String()
  6079. }
  6080. // Validate inspects the fields of the type to determine if they are valid.
  6081. func (s *ListIPSetsInput) Validate() error {
  6082. invalidParams := request.ErrInvalidParams{Context: "ListIPSetsInput"}
  6083. if s.NextMarker != nil && len(*s.NextMarker) < 1 {
  6084. invalidParams.Add(request.NewErrParamMinLen("NextMarker", 1))
  6085. }
  6086. if invalidParams.Len() > 0 {
  6087. return invalidParams
  6088. }
  6089. return nil
  6090. }
  6091. type ListIPSetsOutput struct {
  6092. _ struct{} `type:"structure"`
  6093. // An array of IPSetSummary objects.
  6094. IPSets []*IPSetSummary `type:"list"`
  6095. // If you have more IPSet objects than the number that you specified for Limit
  6096. // in the request, the response includes a NextMarker value. To list more IPSet
  6097. // objects, submit another ListIPSets request, and specify the NextMarker value
  6098. // from the response in the NextMarker value in the next request.
  6099. NextMarker *string `min:"1" type:"string"`
  6100. }
  6101. // String returns the string representation
  6102. func (s ListIPSetsOutput) String() string {
  6103. return awsutil.Prettify(s)
  6104. }
  6105. // GoString returns the string representation
  6106. func (s ListIPSetsOutput) GoString() string {
  6107. return s.String()
  6108. }
  6109. type ListRulesInput struct {
  6110. _ struct{} `type:"structure"`
  6111. // Specifies the number of Rules that you want AWS WAF to return for this request.
  6112. // If you have more Rules than the number that you specify for Limit, the response
  6113. // includes a NextMarker value that you can use to get another batch of Rules.
  6114. Limit *int64 `type:"integer"`
  6115. // If you specify a value for Limit and you have more Rules than the value of
  6116. // Limit, AWS WAF returns a NextMarker value in the response that allows you
  6117. // to list another group of Rules. For the second and subsequent ListRules requests,
  6118. // specify the value of NextMarker from the previous response to get information
  6119. // about another batch of Rules.
  6120. NextMarker *string `min:"1" type:"string"`
  6121. }
  6122. // String returns the string representation
  6123. func (s ListRulesInput) String() string {
  6124. return awsutil.Prettify(s)
  6125. }
  6126. // GoString returns the string representation
  6127. func (s ListRulesInput) GoString() string {
  6128. return s.String()
  6129. }
  6130. // Validate inspects the fields of the type to determine if they are valid.
  6131. func (s *ListRulesInput) Validate() error {
  6132. invalidParams := request.ErrInvalidParams{Context: "ListRulesInput"}
  6133. if s.NextMarker != nil && len(*s.NextMarker) < 1 {
  6134. invalidParams.Add(request.NewErrParamMinLen("NextMarker", 1))
  6135. }
  6136. if invalidParams.Len() > 0 {
  6137. return invalidParams
  6138. }
  6139. return nil
  6140. }
  6141. type ListRulesOutput struct {
  6142. _ struct{} `type:"structure"`
  6143. // If you have more Rules than the number that you specified for Limit in the
  6144. // request, the response includes a NextMarker value. To list more Rules, submit
  6145. // another ListRules request, and specify the NextMarker value from the response
  6146. // in the NextMarker value in the next request.
  6147. NextMarker *string `min:"1" type:"string"`
  6148. // An array of RuleSummary objects.
  6149. Rules []*RuleSummary `type:"list"`
  6150. }
  6151. // String returns the string representation
  6152. func (s ListRulesOutput) String() string {
  6153. return awsutil.Prettify(s)
  6154. }
  6155. // GoString returns the string representation
  6156. func (s ListRulesOutput) GoString() string {
  6157. return s.String()
  6158. }
  6159. type ListSizeConstraintSetsInput struct {
  6160. _ struct{} `type:"structure"`
  6161. // Specifies the number of SizeConstraintSet objects that you want AWS WAF to
  6162. // return for this request. If you have more SizeConstraintSets objects than
  6163. // the number you specify for Limit, the response includes a NextMarker value
  6164. // that you can use to get another batch of SizeConstraintSet objects.
  6165. Limit *int64 `type:"integer"`
  6166. // If you specify a value for Limit and you have more SizeConstraintSets than
  6167. // the value of Limit, AWS WAF returns a NextMarker value in the response that
  6168. // allows you to list another group of SizeConstraintSets. For the second and
  6169. // subsequent ListSizeConstraintSets requests, specify the value of NextMarker
  6170. // from the previous response to get information about another batch of SizeConstraintSets.
  6171. NextMarker *string `min:"1" type:"string"`
  6172. }
  6173. // String returns the string representation
  6174. func (s ListSizeConstraintSetsInput) String() string {
  6175. return awsutil.Prettify(s)
  6176. }
  6177. // GoString returns the string representation
  6178. func (s ListSizeConstraintSetsInput) GoString() string {
  6179. return s.String()
  6180. }
  6181. // Validate inspects the fields of the type to determine if they are valid.
  6182. func (s *ListSizeConstraintSetsInput) Validate() error {
  6183. invalidParams := request.ErrInvalidParams{Context: "ListSizeConstraintSetsInput"}
  6184. if s.NextMarker != nil && len(*s.NextMarker) < 1 {
  6185. invalidParams.Add(request.NewErrParamMinLen("NextMarker", 1))
  6186. }
  6187. if invalidParams.Len() > 0 {
  6188. return invalidParams
  6189. }
  6190. return nil
  6191. }
  6192. type ListSizeConstraintSetsOutput struct {
  6193. _ struct{} `type:"structure"`
  6194. // If you have more SizeConstraintSet objects than the number that you specified
  6195. // for Limit in the request, the response includes a NextMarker value. To list
  6196. // more SizeConstraintSet objects, submit another ListSizeConstraintSets request,
  6197. // and specify the NextMarker value from the response in the NextMarker value
  6198. // in the next request.
  6199. NextMarker *string `min:"1" type:"string"`
  6200. // An array of SizeConstraintSetSummary objects.
  6201. SizeConstraintSets []*SizeConstraintSetSummary `type:"list"`
  6202. }
  6203. // String returns the string representation
  6204. func (s ListSizeConstraintSetsOutput) String() string {
  6205. return awsutil.Prettify(s)
  6206. }
  6207. // GoString returns the string representation
  6208. func (s ListSizeConstraintSetsOutput) GoString() string {
  6209. return s.String()
  6210. }
  6211. // A request to list the SqlInjectionMatchSet objects created by the current
  6212. // AWS account.
  6213. type ListSqlInjectionMatchSetsInput struct {
  6214. _ struct{} `type:"structure"`
  6215. // Specifies the number of SqlInjectionMatchSet objects that you want AWS WAF
  6216. // to return for this request. If you have more SqlInjectionMatchSet objects
  6217. // than the number you specify for Limit, the response includes a NextMarker
  6218. // value that you can use to get another batch of Rules.
  6219. Limit *int64 `type:"integer"`
  6220. // If you specify a value for Limit and you have more SqlInjectionMatchSet objects
  6221. // than the value of Limit, AWS WAF returns a NextMarker value in the response
  6222. // that allows you to list another group of SqlInjectionMatchSets. For the second
  6223. // and subsequent ListSqlInjectionMatchSets requests, specify the value of NextMarker
  6224. // from the previous response to get information about another batch of SqlInjectionMatchSets.
  6225. NextMarker *string `min:"1" type:"string"`
  6226. }
  6227. // String returns the string representation
  6228. func (s ListSqlInjectionMatchSetsInput) String() string {
  6229. return awsutil.Prettify(s)
  6230. }
  6231. // GoString returns the string representation
  6232. func (s ListSqlInjectionMatchSetsInput) GoString() string {
  6233. return s.String()
  6234. }
  6235. // Validate inspects the fields of the type to determine if they are valid.
  6236. func (s *ListSqlInjectionMatchSetsInput) Validate() error {
  6237. invalidParams := request.ErrInvalidParams{Context: "ListSqlInjectionMatchSetsInput"}
  6238. if s.NextMarker != nil && len(*s.NextMarker) < 1 {
  6239. invalidParams.Add(request.NewErrParamMinLen("NextMarker", 1))
  6240. }
  6241. if invalidParams.Len() > 0 {
  6242. return invalidParams
  6243. }
  6244. return nil
  6245. }
  6246. // The response to a ListSqlInjectionMatchSets request.
  6247. type ListSqlInjectionMatchSetsOutput struct {
  6248. _ struct{} `type:"structure"`
  6249. // If you have more SqlInjectionMatchSet objects than the number that you specified
  6250. // for Limit in the request, the response includes a NextMarker value. To list
  6251. // more SqlInjectionMatchSet objects, submit another ListSqlInjectionMatchSets
  6252. // request, and specify the NextMarker value from the response in the NextMarker
  6253. // value in the next request.
  6254. NextMarker *string `min:"1" type:"string"`
  6255. // An array of SqlInjectionMatchSetSummary objects.
  6256. SqlInjectionMatchSets []*SqlInjectionMatchSetSummary `type:"list"`
  6257. }
  6258. // String returns the string representation
  6259. func (s ListSqlInjectionMatchSetsOutput) String() string {
  6260. return awsutil.Prettify(s)
  6261. }
  6262. // GoString returns the string representation
  6263. func (s ListSqlInjectionMatchSetsOutput) GoString() string {
  6264. return s.String()
  6265. }
  6266. type ListWebACLsInput struct {
  6267. _ struct{} `type:"structure"`
  6268. // Specifies the number of WebACL objects that you want AWS WAF to return for
  6269. // this request. If you have more WebACL objects than the number that you specify
  6270. // for Limit, the response includes a NextMarker value that you can use to get
  6271. // another batch of WebACL objects.
  6272. Limit *int64 `type:"integer"`
  6273. // If you specify a value for Limit and you have more WebACL objects than the
  6274. // number that you specify for Limit, AWS WAF returns a NextMarker value in
  6275. // the response that allows you to list another group of WebACL objects. For
  6276. // the second and subsequent ListWebACLs requests, specify the value of NextMarker
  6277. // from the previous response to get information about another batch of WebACL
  6278. // objects.
  6279. NextMarker *string `min:"1" type:"string"`
  6280. }
  6281. // String returns the string representation
  6282. func (s ListWebACLsInput) String() string {
  6283. return awsutil.Prettify(s)
  6284. }
  6285. // GoString returns the string representation
  6286. func (s ListWebACLsInput) GoString() string {
  6287. return s.String()
  6288. }
  6289. // Validate inspects the fields of the type to determine if they are valid.
  6290. func (s *ListWebACLsInput) Validate() error {
  6291. invalidParams := request.ErrInvalidParams{Context: "ListWebACLsInput"}
  6292. if s.NextMarker != nil && len(*s.NextMarker) < 1 {
  6293. invalidParams.Add(request.NewErrParamMinLen("NextMarker", 1))
  6294. }
  6295. if invalidParams.Len() > 0 {
  6296. return invalidParams
  6297. }
  6298. return nil
  6299. }
  6300. type ListWebACLsOutput struct {
  6301. _ struct{} `type:"structure"`
  6302. // If you have more WebACL objects than the number that you specified for Limit
  6303. // in the request, the response includes a NextMarker value. To list more WebACL
  6304. // objects, submit another ListWebACLs request, and specify the NextMarker value
  6305. // from the response in the NextMarker value in the next request.
  6306. NextMarker *string `min:"1" type:"string"`
  6307. // An array of WebACLSummary objects.
  6308. WebACLs []*WebACLSummary `type:"list"`
  6309. }
  6310. // String returns the string representation
  6311. func (s ListWebACLsOutput) String() string {
  6312. return awsutil.Prettify(s)
  6313. }
  6314. // GoString returns the string representation
  6315. func (s ListWebACLsOutput) GoString() string {
  6316. return s.String()
  6317. }
  6318. // A request to list the XssMatchSet objects created by the current AWS account.
  6319. type ListXssMatchSetsInput struct {
  6320. _ struct{} `type:"structure"`
  6321. // Specifies the number of XssMatchSet objects that you want AWS WAF to return
  6322. // for this request. If you have more XssMatchSet objects than the number you
  6323. // specify for Limit, the response includes a NextMarker value that you can
  6324. // use to get another batch of Rules.
  6325. Limit *int64 `type:"integer"`
  6326. // If you specify a value for Limit and you have more XssMatchSet objects than
  6327. // the value of Limit, AWS WAF returns a NextMarker value in the response that
  6328. // allows you to list another group of XssMatchSets. For the second and subsequent
  6329. // ListXssMatchSets requests, specify the value of NextMarker from the previous
  6330. // response to get information about another batch of XssMatchSets.
  6331. NextMarker *string `min:"1" type:"string"`
  6332. }
  6333. // String returns the string representation
  6334. func (s ListXssMatchSetsInput) String() string {
  6335. return awsutil.Prettify(s)
  6336. }
  6337. // GoString returns the string representation
  6338. func (s ListXssMatchSetsInput) GoString() string {
  6339. return s.String()
  6340. }
  6341. // Validate inspects the fields of the type to determine if they are valid.
  6342. func (s *ListXssMatchSetsInput) Validate() error {
  6343. invalidParams := request.ErrInvalidParams{Context: "ListXssMatchSetsInput"}
  6344. if s.NextMarker != nil && len(*s.NextMarker) < 1 {
  6345. invalidParams.Add(request.NewErrParamMinLen("NextMarker", 1))
  6346. }
  6347. if invalidParams.Len() > 0 {
  6348. return invalidParams
  6349. }
  6350. return nil
  6351. }
  6352. // The response to a ListXssMatchSets request.
  6353. type ListXssMatchSetsOutput struct {
  6354. _ struct{} `type:"structure"`
  6355. // If you have more XssMatchSet objects than the number that you specified for
  6356. // Limit in the request, the response includes a NextMarker value. To list more
  6357. // XssMatchSet objects, submit another ListXssMatchSets request, and specify
  6358. // the NextMarker value from the response in the NextMarker value in the next
  6359. // request.
  6360. NextMarker *string `min:"1" type:"string"`
  6361. // An array of XssMatchSetSummary objects.
  6362. XssMatchSets []*XssMatchSetSummary `type:"list"`
  6363. }
  6364. // String returns the string representation
  6365. func (s ListXssMatchSetsOutput) String() string {
  6366. return awsutil.Prettify(s)
  6367. }
  6368. // GoString returns the string representation
  6369. func (s ListXssMatchSetsOutput) GoString() string {
  6370. return s.String()
  6371. }
  6372. // Specifies the ByteMatchSet, IPSet, SqlInjectionMatchSet, XssMatchSet, and
  6373. // SizeConstraintSet objects that you want to add to a Rule and, for each object,
  6374. // indicates whether you want to negate the settings, for example, requests
  6375. // that do NOT originate from the IP address 192.0.2.44.
  6376. type Predicate struct {
  6377. _ struct{} `type:"structure"`
  6378. // A unique identifier for a predicate in a Rule, such as ByteMatchSetId or
  6379. // IPSetId. The ID is returned by the corresponding Create or List command.
  6380. //
  6381. // DataId is a required field
  6382. DataId *string `min:"1" type:"string" required:"true"`
  6383. // Set Negated to False if you want AWS WAF to allow, block, or count requests
  6384. // based on the settings in the specified ByteMatchSet, IPSet, SqlInjectionMatchSet,
  6385. // XssMatchSet, or SizeConstraintSet. For example, if an IPSet includes the
  6386. // IP address 192.0.2.44, AWS WAF will allow or block requests based on that
  6387. // IP address.
  6388. //
  6389. // Set Negated to True if you want AWS WAF to allow or block a request based
  6390. // on the negation of the settings in the ByteMatchSet, IPSet, SqlInjectionMatchSet,
  6391. // XssMatchSet, or SizeConstraintSet. For example, if an IPSet includes the
  6392. // IP address 192.0.2.44, AWS WAF will allow, block, or count requests based
  6393. // on all IP addresses except192.0.2.44.
  6394. //
  6395. // Negated is a required field
  6396. Negated *bool `type:"boolean" required:"true"`
  6397. // The type of predicate in a Rule, such as ByteMatchSet or IPSet.
  6398. //
  6399. // Type is a required field
  6400. Type *string `type:"string" required:"true" enum:"PredicateType"`
  6401. }
  6402. // String returns the string representation
  6403. func (s Predicate) String() string {
  6404. return awsutil.Prettify(s)
  6405. }
  6406. // GoString returns the string representation
  6407. func (s Predicate) GoString() string {
  6408. return s.String()
  6409. }
  6410. // Validate inspects the fields of the type to determine if they are valid.
  6411. func (s *Predicate) Validate() error {
  6412. invalidParams := request.ErrInvalidParams{Context: "Predicate"}
  6413. if s.DataId == nil {
  6414. invalidParams.Add(request.NewErrParamRequired("DataId"))
  6415. }
  6416. if s.DataId != nil && len(*s.DataId) < 1 {
  6417. invalidParams.Add(request.NewErrParamMinLen("DataId", 1))
  6418. }
  6419. if s.Negated == nil {
  6420. invalidParams.Add(request.NewErrParamRequired("Negated"))
  6421. }
  6422. if s.Type == nil {
  6423. invalidParams.Add(request.NewErrParamRequired("Type"))
  6424. }
  6425. if invalidParams.Len() > 0 {
  6426. return invalidParams
  6427. }
  6428. return nil
  6429. }
  6430. // A combination of ByteMatchSet, IPSet, and/or SqlInjectionMatchSet objects
  6431. // that identify the web requests that you want to allow, block, or count. For
  6432. // example, you might create a Rule that includes the following predicates:
  6433. //
  6434. // * An IPSet that causes AWS WAF to search for web requests that originate
  6435. // from the IP address 192.0.2.44
  6436. //
  6437. // * A ByteMatchSet that causes AWS WAF to search for web requests for which
  6438. // the value of the User-Agent header is BadBot.
  6439. //
  6440. // To match the settings in this Rule, a request must originate from 192.0.2.44
  6441. // AND include a User-Agent header for which the value is BadBot.
  6442. type Rule struct {
  6443. _ struct{} `type:"structure"`
  6444. MetricName *string `type:"string"`
  6445. // The friendly name or description for the Rule. You can't change the name
  6446. // of a Rule after you create it.
  6447. Name *string `min:"1" type:"string"`
  6448. // The Predicates object contains one Predicate element for each ByteMatchSet,
  6449. // IPSet, or SqlInjectionMatchSet object that you want to include in a Rule.
  6450. //
  6451. // Predicates is a required field
  6452. Predicates []*Predicate `type:"list" required:"true"`
  6453. // A unique identifier for a Rule. You use RuleId to get more information about
  6454. // a Rule (see GetRule), update a Rule (see UpdateRule), insert a Rule into
  6455. // a WebACL or delete a one from a WebACL (see UpdateWebACL), or delete a Rule
  6456. // from AWS WAF (see DeleteRule).
  6457. //
  6458. // RuleId is returned by CreateRule and by ListRules.
  6459. //
  6460. // RuleId is a required field
  6461. RuleId *string `min:"1" type:"string" required:"true"`
  6462. }
  6463. // String returns the string representation
  6464. func (s Rule) String() string {
  6465. return awsutil.Prettify(s)
  6466. }
  6467. // GoString returns the string representation
  6468. func (s Rule) GoString() string {
  6469. return s.String()
  6470. }
  6471. // Contains the identifier and the friendly name or description of the Rule.
  6472. type RuleSummary struct {
  6473. _ struct{} `type:"structure"`
  6474. // A friendly name or description of the Rule. You can't change the name of
  6475. // a Rule after you create it.
  6476. //
  6477. // Name is a required field
  6478. Name *string `min:"1" type:"string" required:"true"`
  6479. // A unique identifier for a Rule. You use RuleId to get more information about
  6480. // a Rule (see GetRule), update a Rule (see UpdateRule), insert a Rule into
  6481. // a WebACL or delete one from a WebACL (see UpdateWebACL), or delete a Rule
  6482. // from AWS WAF (see DeleteRule).
  6483. //
  6484. // RuleId is returned by CreateRule and by ListRules.
  6485. //
  6486. // RuleId is a required field
  6487. RuleId *string `min:"1" type:"string" required:"true"`
  6488. }
  6489. // String returns the string representation
  6490. func (s RuleSummary) String() string {
  6491. return awsutil.Prettify(s)
  6492. }
  6493. // GoString returns the string representation
  6494. func (s RuleSummary) GoString() string {
  6495. return s.String()
  6496. }
  6497. // Specifies a Predicate (such as an IPSet) and indicates whether you want to
  6498. // add it to a Rule or delete it from a Rule.
  6499. type RuleUpdate struct {
  6500. _ struct{} `type:"structure"`
  6501. // Specify INSERT to add a Predicate to a Rule. Use DELETE to remove a Predicate
  6502. // from a Rule.
  6503. //
  6504. // Action is a required field
  6505. Action *string `type:"string" required:"true" enum:"ChangeAction"`
  6506. // The ID of the Predicate (such as an IPSet) that you want to add to a Rule.
  6507. //
  6508. // Predicate is a required field
  6509. Predicate *Predicate `type:"structure" required:"true"`
  6510. }
  6511. // String returns the string representation
  6512. func (s RuleUpdate) String() string {
  6513. return awsutil.Prettify(s)
  6514. }
  6515. // GoString returns the string representation
  6516. func (s RuleUpdate) GoString() string {
  6517. return s.String()
  6518. }
  6519. // Validate inspects the fields of the type to determine if they are valid.
  6520. func (s *RuleUpdate) Validate() error {
  6521. invalidParams := request.ErrInvalidParams{Context: "RuleUpdate"}
  6522. if s.Action == nil {
  6523. invalidParams.Add(request.NewErrParamRequired("Action"))
  6524. }
  6525. if s.Predicate == nil {
  6526. invalidParams.Add(request.NewErrParamRequired("Predicate"))
  6527. }
  6528. if s.Predicate != nil {
  6529. if err := s.Predicate.Validate(); err != nil {
  6530. invalidParams.AddNested("Predicate", err.(request.ErrInvalidParams))
  6531. }
  6532. }
  6533. if invalidParams.Len() > 0 {
  6534. return invalidParams
  6535. }
  6536. return nil
  6537. }
  6538. // The response from a GetSampledRequests request includes a SampledHTTPRequests
  6539. // complex type that appears as SampledRequests in the response syntax. SampledHTTPRequests
  6540. // contains one SampledHTTPRequest object for each web request that is returned
  6541. // by GetSampledRequests.
  6542. type SampledHTTPRequest struct {
  6543. _ struct{} `type:"structure"`
  6544. // The action for the Rule that the request matched: ALLOW, BLOCK, or COUNT.
  6545. Action *string `type:"string"`
  6546. // A complex type that contains detailed information about the request.
  6547. //
  6548. // Request is a required field
  6549. Request *HTTPRequest `type:"structure" required:"true"`
  6550. // The time at which AWS WAF received the request from your AWS resource, in
  6551. // Unix time format (in seconds).
  6552. Timestamp *time.Time `type:"timestamp" timestampFormat:"unix"`
  6553. // A value that indicates how one result in the response relates proportionally
  6554. // to other results in the response. A result that has a weight of 2 represents
  6555. // roughly twice as many CloudFront web requests as a result that has a weight
  6556. // of 1.
  6557. //
  6558. // Weight is a required field
  6559. Weight *int64 `type:"long" required:"true"`
  6560. }
  6561. // String returns the string representation
  6562. func (s SampledHTTPRequest) String() string {
  6563. return awsutil.Prettify(s)
  6564. }
  6565. // GoString returns the string representation
  6566. func (s SampledHTTPRequest) GoString() string {
  6567. return s.String()
  6568. }
  6569. // Specifies a constraint on the size of a part of the web request. AWS WAF
  6570. // uses the Size, ComparisonOperator, and FieldToMatch to build an expression
  6571. // in the form of "SizeComparisonOperator size in bytes of FieldToMatch". If
  6572. // that expression is true, the SizeConstraint is considered to match.
  6573. type SizeConstraint struct {
  6574. _ struct{} `type:"structure"`
  6575. // The type of comparison you want AWS WAF to perform. AWS WAF uses this in
  6576. // combination with the provided Size and FieldToMatch to build an expression
  6577. // in the form of "SizeComparisonOperator size in bytes of FieldToMatch". If
  6578. // that expression is true, the SizeConstraint is considered to match.
  6579. //
  6580. // EQ: Used to test if the Size is equal to the size of the FieldToMatch
  6581. //
  6582. // NE: Used to test if the Size is not equal to the size of the FieldToMatch
  6583. //
  6584. // LE: Used to test if the Size is less than or equal to the size of the FieldToMatch
  6585. //
  6586. // LT: Used to test if the Size is strictly less than the size of the FieldToMatch
  6587. //
  6588. // GE: Used to test if the Size is greater than or equal to the size of the
  6589. // FieldToMatch
  6590. //
  6591. // GT: Used to test if the Size is strictly greater than the size of the FieldToMatch
  6592. //
  6593. // ComparisonOperator is a required field
  6594. ComparisonOperator *string `type:"string" required:"true" enum:"ComparisonOperator"`
  6595. // Specifies where in a web request to look for TargetString.
  6596. //
  6597. // FieldToMatch is a required field
  6598. FieldToMatch *FieldToMatch `type:"structure" required:"true"`
  6599. // The size in bytes that you want AWS WAF to compare against the size of the
  6600. // specified FieldToMatch. AWS WAF uses this in combination with ComparisonOperator
  6601. // and FieldToMatch to build an expression in the form of "SizeComparisonOperator
  6602. // size in bytes of FieldToMatch". If that expression is true, the SizeConstraint
  6603. // is considered to match.
  6604. //
  6605. // Valid values for size are 0 - 21474836480 bytes (0 - 20 GB).
  6606. //
  6607. // If you specify URI for the value of Type, the / in the URI counts as one
  6608. // character. For example, the URI /logo.jpg is nine characters long.
  6609. //
  6610. // Size is a required field
  6611. Size *int64 `type:"long" required:"true"`
  6612. // Text transformations eliminate some of the unusual formatting that attackers
  6613. // use in web requests in an effort to bypass AWS WAF. If you specify a transformation,
  6614. // AWS WAF performs the transformation on FieldToMatch before inspecting a request
  6615. // for a match.
  6616. //
  6617. // Note that if you choose BODY for the value of Type, you must choose NONE
  6618. // for TextTransformation because CloudFront forwards only the first 8192 bytes
  6619. // for inspection.
  6620. //
  6621. // NONE
  6622. //
  6623. // Specify NONE if you don't want to perform any text transformations.
  6624. //
  6625. // CMD_LINE
  6626. //
  6627. // When you're concerned that attackers are injecting an operating system command
  6628. // line command and using unusual formatting to disguise some or all of the
  6629. // command, use this option to perform the following transformations:
  6630. //
  6631. // * Delete the following characters: \ " ' ^
  6632. //
  6633. // * Delete spaces before the following characters: / (
  6634. //
  6635. // * Replace the following characters with a space: , ;
  6636. //
  6637. // * Replace multiple spaces with one space
  6638. //
  6639. // * Convert uppercase letters (A-Z) to lowercase (a-z)
  6640. //
  6641. // COMPRESS_WHITE_SPACE
  6642. //
  6643. // Use this option to replace the following characters with a space character
  6644. // (decimal 32):
  6645. //
  6646. // * \f, formfeed, decimal 12
  6647. //
  6648. // * \t, tab, decimal 9
  6649. //
  6650. // * \n, newline, decimal 10
  6651. //
  6652. // * \r, carriage return, decimal 13
  6653. //
  6654. // * \v, vertical tab, decimal 11
  6655. //
  6656. // * non-breaking space, decimal 160
  6657. //
  6658. // COMPRESS_WHITE_SPACE also replaces multiple spaces with one space.
  6659. //
  6660. // HTML_ENTITY_DECODE
  6661. //
  6662. // Use this option to replace HTML-encoded characters with unencoded characters.
  6663. // HTML_ENTITY_DECODE performs the following operations:
  6664. //
  6665. // * Replaces (ampersand)quot; with "
  6666. //
  6667. // * Replaces (ampersand)nbsp; with a non-breaking space, decimal 160
  6668. //
  6669. // * Replaces (ampersand)lt; with a "less than" symbol
  6670. //
  6671. // * Replaces (ampersand)gt; with >
  6672. //
  6673. // * Replaces characters that are represented in hexadecimal format, (ampersand)#xhhhh;,
  6674. // with the corresponding characters
  6675. //
  6676. // * Replaces characters that are represented in decimal format, (ampersand)#nnnn;,
  6677. // with the corresponding characters
  6678. //
  6679. // LOWERCASE
  6680. //
  6681. // Use this option to convert uppercase letters (A-Z) to lowercase (a-z).
  6682. //
  6683. // URL_DECODE
  6684. //
  6685. // Use this option to decode a URL-encoded value.
  6686. //
  6687. // TextTransformation is a required field
  6688. TextTransformation *string `type:"string" required:"true" enum:"TextTransformation"`
  6689. }
  6690. // String returns the string representation
  6691. func (s SizeConstraint) String() string {
  6692. return awsutil.Prettify(s)
  6693. }
  6694. // GoString returns the string representation
  6695. func (s SizeConstraint) GoString() string {
  6696. return s.String()
  6697. }
  6698. // Validate inspects the fields of the type to determine if they are valid.
  6699. func (s *SizeConstraint) Validate() error {
  6700. invalidParams := request.ErrInvalidParams{Context: "SizeConstraint"}
  6701. if s.ComparisonOperator == nil {
  6702. invalidParams.Add(request.NewErrParamRequired("ComparisonOperator"))
  6703. }
  6704. if s.FieldToMatch == nil {
  6705. invalidParams.Add(request.NewErrParamRequired("FieldToMatch"))
  6706. }
  6707. if s.Size == nil {
  6708. invalidParams.Add(request.NewErrParamRequired("Size"))
  6709. }
  6710. if s.TextTransformation == nil {
  6711. invalidParams.Add(request.NewErrParamRequired("TextTransformation"))
  6712. }
  6713. if s.FieldToMatch != nil {
  6714. if err := s.FieldToMatch.Validate(); err != nil {
  6715. invalidParams.AddNested("FieldToMatch", err.(request.ErrInvalidParams))
  6716. }
  6717. }
  6718. if invalidParams.Len() > 0 {
  6719. return invalidParams
  6720. }
  6721. return nil
  6722. }
  6723. // A complex type that contains SizeConstraint objects, which specify the parts
  6724. // of web requests that you want AWS WAF to inspect the size of. If a SizeConstraintSet
  6725. // contains more than one SizeConstraint object, a request only needs to match
  6726. // one constraint to be considered a match.
  6727. type SizeConstraintSet struct {
  6728. _ struct{} `type:"structure"`
  6729. // The name, if any, of the SizeConstraintSet.
  6730. Name *string `min:"1" type:"string"`
  6731. // A unique identifier for a SizeConstraintSet. You use SizeConstraintSetId
  6732. // to get information about a SizeConstraintSet (see GetSizeConstraintSet),
  6733. // update a SizeConstraintSet (see UpdateSizeConstraintSet), insert a SizeConstraintSet
  6734. // into a Rule or delete one from a Rule (see UpdateRule), and delete a SizeConstraintSet
  6735. // from AWS WAF (see DeleteSizeConstraintSet).
  6736. //
  6737. // SizeConstraintSetId is returned by CreateSizeConstraintSet and by ListSizeConstraintSets.
  6738. //
  6739. // SizeConstraintSetId is a required field
  6740. SizeConstraintSetId *string `min:"1" type:"string" required:"true"`
  6741. // Specifies the parts of web requests that you want to inspect the size of.
  6742. //
  6743. // SizeConstraints is a required field
  6744. SizeConstraints []*SizeConstraint `type:"list" required:"true"`
  6745. }
  6746. // String returns the string representation
  6747. func (s SizeConstraintSet) String() string {
  6748. return awsutil.Prettify(s)
  6749. }
  6750. // GoString returns the string representation
  6751. func (s SizeConstraintSet) GoString() string {
  6752. return s.String()
  6753. }
  6754. // The Id and Name of a SizeConstraintSet.
  6755. type SizeConstraintSetSummary struct {
  6756. _ struct{} `type:"structure"`
  6757. // The name of the SizeConstraintSet, if any.
  6758. //
  6759. // Name is a required field
  6760. Name *string `min:"1" type:"string" required:"true"`
  6761. // A unique identifier for a SizeConstraintSet. You use SizeConstraintSetId
  6762. // to get information about a SizeConstraintSet (see GetSizeConstraintSet),
  6763. // update a SizeConstraintSet (see UpdateSizeConstraintSet), insert a SizeConstraintSet
  6764. // into a Rule or delete one from a Rule (see UpdateRule), and delete a SizeConstraintSet
  6765. // from AWS WAF (see DeleteSizeConstraintSet).
  6766. //
  6767. // SizeConstraintSetId is returned by CreateSizeConstraintSet and by ListSizeConstraintSets.
  6768. //
  6769. // SizeConstraintSetId is a required field
  6770. SizeConstraintSetId *string `min:"1" type:"string" required:"true"`
  6771. }
  6772. // String returns the string representation
  6773. func (s SizeConstraintSetSummary) String() string {
  6774. return awsutil.Prettify(s)
  6775. }
  6776. // GoString returns the string representation
  6777. func (s SizeConstraintSetSummary) GoString() string {
  6778. return s.String()
  6779. }
  6780. // Specifies the part of a web request that you want to inspect the size of
  6781. // and indicates whether you want to add the specification to a SizeConstraintSet
  6782. // or delete it from a SizeConstraintSet.
  6783. type SizeConstraintSetUpdate struct {
  6784. _ struct{} `type:"structure"`
  6785. // Specify INSERT to add a SizeConstraintSetUpdate to a SizeConstraintSet. Use
  6786. // DELETE to remove a SizeConstraintSetUpdate from a SizeConstraintSet.
  6787. //
  6788. // Action is a required field
  6789. Action *string `type:"string" required:"true" enum:"ChangeAction"`
  6790. // Specifies a constraint on the size of a part of the web request. AWS WAF
  6791. // uses the Size, ComparisonOperator, and FieldToMatch to build an expression
  6792. // in the form of "SizeComparisonOperator size in bytes of FieldToMatch". If
  6793. // that expression is true, the SizeConstraint is considered to match.
  6794. //
  6795. // SizeConstraint is a required field
  6796. SizeConstraint *SizeConstraint `type:"structure" required:"true"`
  6797. }
  6798. // String returns the string representation
  6799. func (s SizeConstraintSetUpdate) String() string {
  6800. return awsutil.Prettify(s)
  6801. }
  6802. // GoString returns the string representation
  6803. func (s SizeConstraintSetUpdate) GoString() string {
  6804. return s.String()
  6805. }
  6806. // Validate inspects the fields of the type to determine if they are valid.
  6807. func (s *SizeConstraintSetUpdate) Validate() error {
  6808. invalidParams := request.ErrInvalidParams{Context: "SizeConstraintSetUpdate"}
  6809. if s.Action == nil {
  6810. invalidParams.Add(request.NewErrParamRequired("Action"))
  6811. }
  6812. if s.SizeConstraint == nil {
  6813. invalidParams.Add(request.NewErrParamRequired("SizeConstraint"))
  6814. }
  6815. if s.SizeConstraint != nil {
  6816. if err := s.SizeConstraint.Validate(); err != nil {
  6817. invalidParams.AddNested("SizeConstraint", err.(request.ErrInvalidParams))
  6818. }
  6819. }
  6820. if invalidParams.Len() > 0 {
  6821. return invalidParams
  6822. }
  6823. return nil
  6824. }
  6825. // A complex type that contains SqlInjectionMatchTuple objects, which specify
  6826. // the parts of web requests that you want AWS WAF to inspect for snippets of
  6827. // malicious SQL code and, if you want AWS WAF to inspect a header, the name
  6828. // of the header. If a SqlInjectionMatchSet contains more than one SqlInjectionMatchTuple
  6829. // object, a request needs to include snippets of SQL code in only one of the
  6830. // specified parts of the request to be considered a match.
  6831. type SqlInjectionMatchSet struct {
  6832. _ struct{} `type:"structure"`
  6833. // The name, if any, of the SqlInjectionMatchSet.
  6834. Name *string `min:"1" type:"string"`
  6835. // A unique identifier for a SqlInjectionMatchSet. You use SqlInjectionMatchSetId
  6836. // to get information about a SqlInjectionMatchSet (see GetSqlInjectionMatchSet),
  6837. // update a SqlInjectionMatchSet (see UpdateSqlInjectionMatchSet), insert a
  6838. // SqlInjectionMatchSet into a Rule or delete one from a Rule (see UpdateRule),
  6839. // and delete a SqlInjectionMatchSet from AWS WAF (see DeleteSqlInjectionMatchSet).
  6840. //
  6841. // SqlInjectionMatchSetId is returned by CreateSqlInjectionMatchSet and by ListSqlInjectionMatchSets.
  6842. //
  6843. // SqlInjectionMatchSetId is a required field
  6844. SqlInjectionMatchSetId *string `min:"1" type:"string" required:"true"`
  6845. // Specifies the parts of web requests that you want to inspect for snippets
  6846. // of malicious SQL code.
  6847. //
  6848. // SqlInjectionMatchTuples is a required field
  6849. SqlInjectionMatchTuples []*SqlInjectionMatchTuple `type:"list" required:"true"`
  6850. }
  6851. // String returns the string representation
  6852. func (s SqlInjectionMatchSet) String() string {
  6853. return awsutil.Prettify(s)
  6854. }
  6855. // GoString returns the string representation
  6856. func (s SqlInjectionMatchSet) GoString() string {
  6857. return s.String()
  6858. }
  6859. // The Id and Name of a SqlInjectionMatchSet.
  6860. type SqlInjectionMatchSetSummary struct {
  6861. _ struct{} `type:"structure"`
  6862. // The name of the SqlInjectionMatchSet, if any, specified by Id.
  6863. //
  6864. // Name is a required field
  6865. Name *string `min:"1" type:"string" required:"true"`
  6866. // A unique identifier for a SqlInjectionMatchSet. You use SqlInjectionMatchSetId
  6867. // to get information about a SqlInjectionMatchSet (see GetSqlInjectionMatchSet),
  6868. // update a SqlInjectionMatchSet (see UpdateSqlInjectionMatchSet), insert a
  6869. // SqlInjectionMatchSet into a Rule or delete one from a Rule (see UpdateRule),
  6870. // and delete a SqlInjectionMatchSet from AWS WAF (see DeleteSqlInjectionMatchSet).
  6871. //
  6872. // SqlInjectionMatchSetId is returned by CreateSqlInjectionMatchSet and by ListSqlInjectionMatchSets.
  6873. //
  6874. // SqlInjectionMatchSetId is a required field
  6875. SqlInjectionMatchSetId *string `min:"1" type:"string" required:"true"`
  6876. }
  6877. // String returns the string representation
  6878. func (s SqlInjectionMatchSetSummary) String() string {
  6879. return awsutil.Prettify(s)
  6880. }
  6881. // GoString returns the string representation
  6882. func (s SqlInjectionMatchSetSummary) GoString() string {
  6883. return s.String()
  6884. }
  6885. // Specifies the part of a web request that you want to inspect for snippets
  6886. // of malicious SQL code and indicates whether you want to add the specification
  6887. // to a SqlInjectionMatchSet or delete it from a SqlInjectionMatchSet.
  6888. type SqlInjectionMatchSetUpdate struct {
  6889. _ struct{} `type:"structure"`
  6890. // Specify INSERT to add a SqlInjectionMatchSetUpdate to a SqlInjectionMatchSet.
  6891. // Use DELETE to remove a SqlInjectionMatchSetUpdate from a SqlInjectionMatchSet.
  6892. //
  6893. // Action is a required field
  6894. Action *string `type:"string" required:"true" enum:"ChangeAction"`
  6895. // Specifies the part of a web request that you want AWS WAF to inspect for
  6896. // snippets of malicious SQL code and, if you want AWS WAF to inspect a header,
  6897. // the name of the header.
  6898. //
  6899. // SqlInjectionMatchTuple is a required field
  6900. SqlInjectionMatchTuple *SqlInjectionMatchTuple `type:"structure" required:"true"`
  6901. }
  6902. // String returns the string representation
  6903. func (s SqlInjectionMatchSetUpdate) String() string {
  6904. return awsutil.Prettify(s)
  6905. }
  6906. // GoString returns the string representation
  6907. func (s SqlInjectionMatchSetUpdate) GoString() string {
  6908. return s.String()
  6909. }
  6910. // Validate inspects the fields of the type to determine if they are valid.
  6911. func (s *SqlInjectionMatchSetUpdate) Validate() error {
  6912. invalidParams := request.ErrInvalidParams{Context: "SqlInjectionMatchSetUpdate"}
  6913. if s.Action == nil {
  6914. invalidParams.Add(request.NewErrParamRequired("Action"))
  6915. }
  6916. if s.SqlInjectionMatchTuple == nil {
  6917. invalidParams.Add(request.NewErrParamRequired("SqlInjectionMatchTuple"))
  6918. }
  6919. if s.SqlInjectionMatchTuple != nil {
  6920. if err := s.SqlInjectionMatchTuple.Validate(); err != nil {
  6921. invalidParams.AddNested("SqlInjectionMatchTuple", err.(request.ErrInvalidParams))
  6922. }
  6923. }
  6924. if invalidParams.Len() > 0 {
  6925. return invalidParams
  6926. }
  6927. return nil
  6928. }
  6929. // Specifies the part of a web request that you want AWS WAF to inspect for
  6930. // snippets of malicious SQL code and, if you want AWS WAF to inspect a header,
  6931. // the name of the header.
  6932. type SqlInjectionMatchTuple struct {
  6933. _ struct{} `type:"structure"`
  6934. // Specifies where in a web request to look for TargetString.
  6935. //
  6936. // FieldToMatch is a required field
  6937. FieldToMatch *FieldToMatch `type:"structure" required:"true"`
  6938. // Text transformations eliminate some of the unusual formatting that attackers
  6939. // use in web requests in an effort to bypass AWS WAF. If you specify a transformation,
  6940. // AWS WAF performs the transformation on FieldToMatch before inspecting a request
  6941. // for a match.
  6942. //
  6943. // CMD_LINE
  6944. //
  6945. // When you're concerned that attackers are injecting an operating system commandline
  6946. // command and using unusual formatting to disguise some or all of the command,
  6947. // use this option to perform the following transformations:
  6948. //
  6949. // * Delete the following characters: \ " ' ^
  6950. //
  6951. // * Delete spaces before the following characters: / (
  6952. //
  6953. // * Replace the following characters with a space: , ;
  6954. //
  6955. // * Replace multiple spaces with one space
  6956. //
  6957. // * Convert uppercase letters (A-Z) to lowercase (a-z)
  6958. //
  6959. // COMPRESS_WHITE_SPACE
  6960. //
  6961. // Use this option to replace the following characters with a space character
  6962. // (decimal 32):
  6963. //
  6964. // * \f, formfeed, decimal 12
  6965. //
  6966. // * \t, tab, decimal 9
  6967. //
  6968. // * \n, newline, decimal 10
  6969. //
  6970. // * \r, carriage return, decimal 13
  6971. //
  6972. // * \v, vertical tab, decimal 11
  6973. //
  6974. // * non-breaking space, decimal 160
  6975. //
  6976. // COMPRESS_WHITE_SPACE also replaces multiple spaces with one space.
  6977. //
  6978. // HTML_ENTITY_DECODE
  6979. //
  6980. // Use this option to replace HTML-encoded characters with unencoded characters.
  6981. // HTML_ENTITY_DECODE performs the following operations:
  6982. //
  6983. // * Replaces (ampersand)quot; with "
  6984. //
  6985. // * Replaces (ampersand)nbsp; with a non-breaking space, decimal 160
  6986. //
  6987. // * Replaces (ampersand)lt; with a "less than" symbol
  6988. //
  6989. // * Replaces (ampersand)gt; with >
  6990. //
  6991. // * Replaces characters that are represented in hexadecimal format, (ampersand)#xhhhh;,
  6992. // with the corresponding characters
  6993. //
  6994. // * Replaces characters that are represented in decimal format, (ampersand)#nnnn;,
  6995. // with the corresponding characters
  6996. //
  6997. // LOWERCASE
  6998. //
  6999. // Use this option to convert uppercase letters (A-Z) to lowercase (a-z).
  7000. //
  7001. // URL_DECODE
  7002. //
  7003. // Use this option to decode a URL-encoded value.
  7004. //
  7005. // NONE
  7006. //
  7007. // Specify NONE if you don't want to perform any text transformations.
  7008. //
  7009. // TextTransformation is a required field
  7010. TextTransformation *string `type:"string" required:"true" enum:"TextTransformation"`
  7011. }
  7012. // String returns the string representation
  7013. func (s SqlInjectionMatchTuple) String() string {
  7014. return awsutil.Prettify(s)
  7015. }
  7016. // GoString returns the string representation
  7017. func (s SqlInjectionMatchTuple) GoString() string {
  7018. return s.String()
  7019. }
  7020. // Validate inspects the fields of the type to determine if they are valid.
  7021. func (s *SqlInjectionMatchTuple) Validate() error {
  7022. invalidParams := request.ErrInvalidParams{Context: "SqlInjectionMatchTuple"}
  7023. if s.FieldToMatch == nil {
  7024. invalidParams.Add(request.NewErrParamRequired("FieldToMatch"))
  7025. }
  7026. if s.TextTransformation == nil {
  7027. invalidParams.Add(request.NewErrParamRequired("TextTransformation"))
  7028. }
  7029. if s.FieldToMatch != nil {
  7030. if err := s.FieldToMatch.Validate(); err != nil {
  7031. invalidParams.AddNested("FieldToMatch", err.(request.ErrInvalidParams))
  7032. }
  7033. }
  7034. if invalidParams.Len() > 0 {
  7035. return invalidParams
  7036. }
  7037. return nil
  7038. }
  7039. // In a GetSampledRequests request, the StartTime and EndTime objects specify
  7040. // the time range for which you want AWS WAF to return a sample of web requests.
  7041. //
  7042. // In a GetSampledRequests response, the StartTime and EndTime objects specify
  7043. // the time range for which AWS WAF actually returned a sample of web requests.
  7044. // AWS WAF gets the specified number of requests from among the first 5,000
  7045. // requests that your AWS resource receives during the specified time period.
  7046. // If your resource receives more than 5,000 requests during that period, AWS
  7047. // WAF stops sampling after the 5,000th request. In that case, EndTime is the
  7048. // time that AWS WAF received the 5,000th request.
  7049. type TimeWindow struct {
  7050. _ struct{} `type:"structure"`
  7051. // The end of the time range from which you want GetSampledRequests to return
  7052. // a sample of the requests that your AWS resource received. You can specify
  7053. // any time range in the previous three hours.
  7054. //
  7055. // EndTime is a required field
  7056. EndTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"`
  7057. // The beginning of the time range from which you want GetSampledRequests to
  7058. // return a sample of the requests that your AWS resource received. You can
  7059. // specify any time range in the previous three hours.
  7060. //
  7061. // StartTime is a required field
  7062. StartTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"`
  7063. }
  7064. // String returns the string representation
  7065. func (s TimeWindow) String() string {
  7066. return awsutil.Prettify(s)
  7067. }
  7068. // GoString returns the string representation
  7069. func (s TimeWindow) GoString() string {
  7070. return s.String()
  7071. }
  7072. // Validate inspects the fields of the type to determine if they are valid.
  7073. func (s *TimeWindow) Validate() error {
  7074. invalidParams := request.ErrInvalidParams{Context: "TimeWindow"}
  7075. if s.EndTime == nil {
  7076. invalidParams.Add(request.NewErrParamRequired("EndTime"))
  7077. }
  7078. if s.StartTime == nil {
  7079. invalidParams.Add(request.NewErrParamRequired("StartTime"))
  7080. }
  7081. if invalidParams.Len() > 0 {
  7082. return invalidParams
  7083. }
  7084. return nil
  7085. }
  7086. type UpdateByteMatchSetInput struct {
  7087. _ struct{} `type:"structure"`
  7088. // The ByteMatchSetId of the ByteMatchSet that you want to update. ByteMatchSetId
  7089. // is returned by CreateByteMatchSet and by ListByteMatchSets.
  7090. //
  7091. // ByteMatchSetId is a required field
  7092. ByteMatchSetId *string `min:"1" type:"string" required:"true"`
  7093. // The value returned by the most recent call to GetChangeToken.
  7094. //
  7095. // ChangeToken is a required field
  7096. ChangeToken *string `min:"1" type:"string" required:"true"`
  7097. // An array of ByteMatchSetUpdate objects that you want to insert into or delete
  7098. // from a ByteMatchSet. For more information, see the applicable data types:
  7099. //
  7100. // * ByteMatchSetUpdate: Contains Action and ByteMatchTuple
  7101. //
  7102. // * ByteMatchTuple: Contains FieldToMatch, PositionalConstraint, TargetString,
  7103. // and TextTransformation
  7104. //
  7105. // * FieldToMatch: Contains Data and Type
  7106. //
  7107. // Updates is a required field
  7108. Updates []*ByteMatchSetUpdate `type:"list" required:"true"`
  7109. }
  7110. // String returns the string representation
  7111. func (s UpdateByteMatchSetInput) String() string {
  7112. return awsutil.Prettify(s)
  7113. }
  7114. // GoString returns the string representation
  7115. func (s UpdateByteMatchSetInput) GoString() string {
  7116. return s.String()
  7117. }
  7118. // Validate inspects the fields of the type to determine if they are valid.
  7119. func (s *UpdateByteMatchSetInput) Validate() error {
  7120. invalidParams := request.ErrInvalidParams{Context: "UpdateByteMatchSetInput"}
  7121. if s.ByteMatchSetId == nil {
  7122. invalidParams.Add(request.NewErrParamRequired("ByteMatchSetId"))
  7123. }
  7124. if s.ByteMatchSetId != nil && len(*s.ByteMatchSetId) < 1 {
  7125. invalidParams.Add(request.NewErrParamMinLen("ByteMatchSetId", 1))
  7126. }
  7127. if s.ChangeToken == nil {
  7128. invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
  7129. }
  7130. if s.ChangeToken != nil && len(*s.ChangeToken) < 1 {
  7131. invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1))
  7132. }
  7133. if s.Updates == nil {
  7134. invalidParams.Add(request.NewErrParamRequired("Updates"))
  7135. }
  7136. if s.Updates != nil {
  7137. for i, v := range s.Updates {
  7138. if v == nil {
  7139. continue
  7140. }
  7141. if err := v.Validate(); err != nil {
  7142. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Updates", i), err.(request.ErrInvalidParams))
  7143. }
  7144. }
  7145. }
  7146. if invalidParams.Len() > 0 {
  7147. return invalidParams
  7148. }
  7149. return nil
  7150. }
  7151. type UpdateByteMatchSetOutput struct {
  7152. _ struct{} `type:"structure"`
  7153. // The ChangeToken that you used to submit the UpdateByteMatchSet request. You
  7154. // can also use this value to query the status of the request. For more information,
  7155. // see GetChangeTokenStatus.
  7156. ChangeToken *string `min:"1" type:"string"`
  7157. }
  7158. // String returns the string representation
  7159. func (s UpdateByteMatchSetOutput) String() string {
  7160. return awsutil.Prettify(s)
  7161. }
  7162. // GoString returns the string representation
  7163. func (s UpdateByteMatchSetOutput) GoString() string {
  7164. return s.String()
  7165. }
  7166. type UpdateIPSetInput struct {
  7167. _ struct{} `type:"structure"`
  7168. // The value returned by the most recent call to GetChangeToken.
  7169. //
  7170. // ChangeToken is a required field
  7171. ChangeToken *string `min:"1" type:"string" required:"true"`
  7172. // The IPSetId of the IPSet that you want to update. IPSetId is returned by
  7173. // CreateIPSet and by ListIPSets.
  7174. //
  7175. // IPSetId is a required field
  7176. IPSetId *string `min:"1" type:"string" required:"true"`
  7177. // An array of IPSetUpdate objects that you want to insert into or delete from
  7178. // an IPSet. For more information, see the applicable data types:
  7179. //
  7180. // * IPSetUpdate: Contains Action and IPSetDescriptor
  7181. //
  7182. // * IPSetDescriptor: Contains Type and Value
  7183. //
  7184. // Updates is a required field
  7185. Updates []*IPSetUpdate `type:"list" required:"true"`
  7186. }
  7187. // String returns the string representation
  7188. func (s UpdateIPSetInput) String() string {
  7189. return awsutil.Prettify(s)
  7190. }
  7191. // GoString returns the string representation
  7192. func (s UpdateIPSetInput) GoString() string {
  7193. return s.String()
  7194. }
  7195. // Validate inspects the fields of the type to determine if they are valid.
  7196. func (s *UpdateIPSetInput) Validate() error {
  7197. invalidParams := request.ErrInvalidParams{Context: "UpdateIPSetInput"}
  7198. if s.ChangeToken == nil {
  7199. invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
  7200. }
  7201. if s.ChangeToken != nil && len(*s.ChangeToken) < 1 {
  7202. invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1))
  7203. }
  7204. if s.IPSetId == nil {
  7205. invalidParams.Add(request.NewErrParamRequired("IPSetId"))
  7206. }
  7207. if s.IPSetId != nil && len(*s.IPSetId) < 1 {
  7208. invalidParams.Add(request.NewErrParamMinLen("IPSetId", 1))
  7209. }
  7210. if s.Updates == nil {
  7211. invalidParams.Add(request.NewErrParamRequired("Updates"))
  7212. }
  7213. if s.Updates != nil {
  7214. for i, v := range s.Updates {
  7215. if v == nil {
  7216. continue
  7217. }
  7218. if err := v.Validate(); err != nil {
  7219. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Updates", i), err.(request.ErrInvalidParams))
  7220. }
  7221. }
  7222. }
  7223. if invalidParams.Len() > 0 {
  7224. return invalidParams
  7225. }
  7226. return nil
  7227. }
  7228. type UpdateIPSetOutput struct {
  7229. _ struct{} `type:"structure"`
  7230. // The ChangeToken that you used to submit the UpdateIPSet request. You can
  7231. // also use this value to query the status of the request. For more information,
  7232. // see GetChangeTokenStatus.
  7233. ChangeToken *string `min:"1" type:"string"`
  7234. }
  7235. // String returns the string representation
  7236. func (s UpdateIPSetOutput) String() string {
  7237. return awsutil.Prettify(s)
  7238. }
  7239. // GoString returns the string representation
  7240. func (s UpdateIPSetOutput) GoString() string {
  7241. return s.String()
  7242. }
  7243. type UpdateRuleInput struct {
  7244. _ struct{} `type:"structure"`
  7245. // The value returned by the most recent call to GetChangeToken.
  7246. //
  7247. // ChangeToken is a required field
  7248. ChangeToken *string `min:"1" type:"string" required:"true"`
  7249. // The RuleId of the Rule that you want to update. RuleId is returned by CreateRule
  7250. // and by ListRules.
  7251. //
  7252. // RuleId is a required field
  7253. RuleId *string `min:"1" type:"string" required:"true"`
  7254. // An array of RuleUpdate objects that you want to insert into or delete from
  7255. // a Rule. For more information, see the applicable data types:
  7256. //
  7257. // * RuleUpdate: Contains Action and Predicate
  7258. //
  7259. // * Predicate: Contains DataId, Negated, and Type
  7260. //
  7261. // * FieldToMatch: Contains Data and Type
  7262. //
  7263. // Updates is a required field
  7264. Updates []*RuleUpdate `type:"list" required:"true"`
  7265. }
  7266. // String returns the string representation
  7267. func (s UpdateRuleInput) String() string {
  7268. return awsutil.Prettify(s)
  7269. }
  7270. // GoString returns the string representation
  7271. func (s UpdateRuleInput) GoString() string {
  7272. return s.String()
  7273. }
  7274. // Validate inspects the fields of the type to determine if they are valid.
  7275. func (s *UpdateRuleInput) Validate() error {
  7276. invalidParams := request.ErrInvalidParams{Context: "UpdateRuleInput"}
  7277. if s.ChangeToken == nil {
  7278. invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
  7279. }
  7280. if s.ChangeToken != nil && len(*s.ChangeToken) < 1 {
  7281. invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1))
  7282. }
  7283. if s.RuleId == nil {
  7284. invalidParams.Add(request.NewErrParamRequired("RuleId"))
  7285. }
  7286. if s.RuleId != nil && len(*s.RuleId) < 1 {
  7287. invalidParams.Add(request.NewErrParamMinLen("RuleId", 1))
  7288. }
  7289. if s.Updates == nil {
  7290. invalidParams.Add(request.NewErrParamRequired("Updates"))
  7291. }
  7292. if s.Updates != nil {
  7293. for i, v := range s.Updates {
  7294. if v == nil {
  7295. continue
  7296. }
  7297. if err := v.Validate(); err != nil {
  7298. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Updates", i), err.(request.ErrInvalidParams))
  7299. }
  7300. }
  7301. }
  7302. if invalidParams.Len() > 0 {
  7303. return invalidParams
  7304. }
  7305. return nil
  7306. }
  7307. type UpdateRuleOutput struct {
  7308. _ struct{} `type:"structure"`
  7309. // The ChangeToken that you used to submit the UpdateRule request. You can also
  7310. // use this value to query the status of the request. For more information,
  7311. // see GetChangeTokenStatus.
  7312. ChangeToken *string `min:"1" type:"string"`
  7313. }
  7314. // String returns the string representation
  7315. func (s UpdateRuleOutput) String() string {
  7316. return awsutil.Prettify(s)
  7317. }
  7318. // GoString returns the string representation
  7319. func (s UpdateRuleOutput) GoString() string {
  7320. return s.String()
  7321. }
  7322. type UpdateSizeConstraintSetInput struct {
  7323. _ struct{} `type:"structure"`
  7324. // The value returned by the most recent call to GetChangeToken.
  7325. //
  7326. // ChangeToken is a required field
  7327. ChangeToken *string `min:"1" type:"string" required:"true"`
  7328. // The SizeConstraintSetId of the SizeConstraintSet that you want to update.
  7329. // SizeConstraintSetId is returned by CreateSizeConstraintSet and by ListSizeConstraintSets.
  7330. //
  7331. // SizeConstraintSetId is a required field
  7332. SizeConstraintSetId *string `min:"1" type:"string" required:"true"`
  7333. // An array of SizeConstraintSetUpdate objects that you want to insert into
  7334. // or delete from a SizeConstraintSet. For more information, see the applicable
  7335. // data types:
  7336. //
  7337. // * SizeConstraintSetUpdate: Contains Action and SizeConstraint
  7338. //
  7339. // * SizeConstraint: Contains FieldToMatch, TextTransformation, ComparisonOperator,
  7340. // and Size
  7341. //
  7342. // * FieldToMatch: Contains Data and Type
  7343. //
  7344. // Updates is a required field
  7345. Updates []*SizeConstraintSetUpdate `type:"list" required:"true"`
  7346. }
  7347. // String returns the string representation
  7348. func (s UpdateSizeConstraintSetInput) String() string {
  7349. return awsutil.Prettify(s)
  7350. }
  7351. // GoString returns the string representation
  7352. func (s UpdateSizeConstraintSetInput) GoString() string {
  7353. return s.String()
  7354. }
  7355. // Validate inspects the fields of the type to determine if they are valid.
  7356. func (s *UpdateSizeConstraintSetInput) Validate() error {
  7357. invalidParams := request.ErrInvalidParams{Context: "UpdateSizeConstraintSetInput"}
  7358. if s.ChangeToken == nil {
  7359. invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
  7360. }
  7361. if s.ChangeToken != nil && len(*s.ChangeToken) < 1 {
  7362. invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1))
  7363. }
  7364. if s.SizeConstraintSetId == nil {
  7365. invalidParams.Add(request.NewErrParamRequired("SizeConstraintSetId"))
  7366. }
  7367. if s.SizeConstraintSetId != nil && len(*s.SizeConstraintSetId) < 1 {
  7368. invalidParams.Add(request.NewErrParamMinLen("SizeConstraintSetId", 1))
  7369. }
  7370. if s.Updates == nil {
  7371. invalidParams.Add(request.NewErrParamRequired("Updates"))
  7372. }
  7373. if s.Updates != nil {
  7374. for i, v := range s.Updates {
  7375. if v == nil {
  7376. continue
  7377. }
  7378. if err := v.Validate(); err != nil {
  7379. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Updates", i), err.(request.ErrInvalidParams))
  7380. }
  7381. }
  7382. }
  7383. if invalidParams.Len() > 0 {
  7384. return invalidParams
  7385. }
  7386. return nil
  7387. }
  7388. type UpdateSizeConstraintSetOutput struct {
  7389. _ struct{} `type:"structure"`
  7390. // The ChangeToken that you used to submit the UpdateSizeConstraintSet request.
  7391. // You can also use this value to query the status of the request. For more
  7392. // information, see GetChangeTokenStatus.
  7393. ChangeToken *string `min:"1" type:"string"`
  7394. }
  7395. // String returns the string representation
  7396. func (s UpdateSizeConstraintSetOutput) String() string {
  7397. return awsutil.Prettify(s)
  7398. }
  7399. // GoString returns the string representation
  7400. func (s UpdateSizeConstraintSetOutput) GoString() string {
  7401. return s.String()
  7402. }
  7403. // A request to update a SqlInjectionMatchSet.
  7404. type UpdateSqlInjectionMatchSetInput struct {
  7405. _ struct{} `type:"structure"`
  7406. // The value returned by the most recent call to GetChangeToken.
  7407. //
  7408. // ChangeToken is a required field
  7409. ChangeToken *string `min:"1" type:"string" required:"true"`
  7410. // The SqlInjectionMatchSetId of the SqlInjectionMatchSet that you want to update.
  7411. // SqlInjectionMatchSetId is returned by CreateSqlInjectionMatchSet and by ListSqlInjectionMatchSets.
  7412. //
  7413. // SqlInjectionMatchSetId is a required field
  7414. SqlInjectionMatchSetId *string `min:"1" type:"string" required:"true"`
  7415. // An array of SqlInjectionMatchSetUpdate objects that you want to insert into
  7416. // or delete from a SqlInjectionMatchSet. For more information, see the applicable
  7417. // data types:
  7418. //
  7419. // * SqlInjectionMatchSetUpdate: Contains Action and SqlInjectionMatchTuple
  7420. //
  7421. // * SqlInjectionMatchTuple: Contains FieldToMatch and TextTransformation
  7422. //
  7423. // * FieldToMatch: Contains Data and Type
  7424. //
  7425. // Updates is a required field
  7426. Updates []*SqlInjectionMatchSetUpdate `type:"list" required:"true"`
  7427. }
  7428. // String returns the string representation
  7429. func (s UpdateSqlInjectionMatchSetInput) String() string {
  7430. return awsutil.Prettify(s)
  7431. }
  7432. // GoString returns the string representation
  7433. func (s UpdateSqlInjectionMatchSetInput) GoString() string {
  7434. return s.String()
  7435. }
  7436. // Validate inspects the fields of the type to determine if they are valid.
  7437. func (s *UpdateSqlInjectionMatchSetInput) Validate() error {
  7438. invalidParams := request.ErrInvalidParams{Context: "UpdateSqlInjectionMatchSetInput"}
  7439. if s.ChangeToken == nil {
  7440. invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
  7441. }
  7442. if s.ChangeToken != nil && len(*s.ChangeToken) < 1 {
  7443. invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1))
  7444. }
  7445. if s.SqlInjectionMatchSetId == nil {
  7446. invalidParams.Add(request.NewErrParamRequired("SqlInjectionMatchSetId"))
  7447. }
  7448. if s.SqlInjectionMatchSetId != nil && len(*s.SqlInjectionMatchSetId) < 1 {
  7449. invalidParams.Add(request.NewErrParamMinLen("SqlInjectionMatchSetId", 1))
  7450. }
  7451. if s.Updates == nil {
  7452. invalidParams.Add(request.NewErrParamRequired("Updates"))
  7453. }
  7454. if s.Updates != nil {
  7455. for i, v := range s.Updates {
  7456. if v == nil {
  7457. continue
  7458. }
  7459. if err := v.Validate(); err != nil {
  7460. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Updates", i), err.(request.ErrInvalidParams))
  7461. }
  7462. }
  7463. }
  7464. if invalidParams.Len() > 0 {
  7465. return invalidParams
  7466. }
  7467. return nil
  7468. }
  7469. // The response to an UpdateSqlInjectionMatchSets request.
  7470. type UpdateSqlInjectionMatchSetOutput struct {
  7471. _ struct{} `type:"structure"`
  7472. // The ChangeToken that you used to submit the UpdateSqlInjectionMatchSet request.
  7473. // You can also use this value to query the status of the request. For more
  7474. // information, see GetChangeTokenStatus.
  7475. ChangeToken *string `min:"1" type:"string"`
  7476. }
  7477. // String returns the string representation
  7478. func (s UpdateSqlInjectionMatchSetOutput) String() string {
  7479. return awsutil.Prettify(s)
  7480. }
  7481. // GoString returns the string representation
  7482. func (s UpdateSqlInjectionMatchSetOutput) GoString() string {
  7483. return s.String()
  7484. }
  7485. type UpdateWebACLInput struct {
  7486. _ struct{} `type:"structure"`
  7487. // The value returned by the most recent call to GetChangeToken.
  7488. //
  7489. // ChangeToken is a required field
  7490. ChangeToken *string `min:"1" type:"string" required:"true"`
  7491. // For the action that is associated with a rule in a WebACL, specifies the
  7492. // action that you want AWS WAF to perform when a web request matches all of
  7493. // the conditions in a rule. For the default action in a WebACL, specifies the
  7494. // action that you want AWS WAF to take when a web request doesn't match all
  7495. // of the conditions in any of the rules in a WebACL.
  7496. DefaultAction *WafAction `type:"structure"`
  7497. // An array of updates to make to the WebACL.
  7498. //
  7499. // An array of WebACLUpdate objects that you want to insert into or delete from
  7500. // a WebACL. For more information, see the applicable data types:
  7501. //
  7502. // * WebACLUpdate: Contains Action and ActivatedRule
  7503. //
  7504. // * ActivatedRule: Contains Action, Priority, and RuleId
  7505. //
  7506. // * WafAction: Contains Type
  7507. Updates []*WebACLUpdate `type:"list"`
  7508. // The WebACLId of the WebACL that you want to update. WebACLId is returned
  7509. // by CreateWebACL and by ListWebACLs.
  7510. //
  7511. // WebACLId is a required field
  7512. WebACLId *string `min:"1" type:"string" required:"true"`
  7513. }
  7514. // String returns the string representation
  7515. func (s UpdateWebACLInput) String() string {
  7516. return awsutil.Prettify(s)
  7517. }
  7518. // GoString returns the string representation
  7519. func (s UpdateWebACLInput) GoString() string {
  7520. return s.String()
  7521. }
  7522. // Validate inspects the fields of the type to determine if they are valid.
  7523. func (s *UpdateWebACLInput) Validate() error {
  7524. invalidParams := request.ErrInvalidParams{Context: "UpdateWebACLInput"}
  7525. if s.ChangeToken == nil {
  7526. invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
  7527. }
  7528. if s.ChangeToken != nil && len(*s.ChangeToken) < 1 {
  7529. invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1))
  7530. }
  7531. if s.WebACLId == nil {
  7532. invalidParams.Add(request.NewErrParamRequired("WebACLId"))
  7533. }
  7534. if s.WebACLId != nil && len(*s.WebACLId) < 1 {
  7535. invalidParams.Add(request.NewErrParamMinLen("WebACLId", 1))
  7536. }
  7537. if s.DefaultAction != nil {
  7538. if err := s.DefaultAction.Validate(); err != nil {
  7539. invalidParams.AddNested("DefaultAction", err.(request.ErrInvalidParams))
  7540. }
  7541. }
  7542. if s.Updates != nil {
  7543. for i, v := range s.Updates {
  7544. if v == nil {
  7545. continue
  7546. }
  7547. if err := v.Validate(); err != nil {
  7548. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Updates", i), err.(request.ErrInvalidParams))
  7549. }
  7550. }
  7551. }
  7552. if invalidParams.Len() > 0 {
  7553. return invalidParams
  7554. }
  7555. return nil
  7556. }
  7557. type UpdateWebACLOutput struct {
  7558. _ struct{} `type:"structure"`
  7559. // The ChangeToken that you used to submit the UpdateWebACL request. You can
  7560. // also use this value to query the status of the request. For more information,
  7561. // see GetChangeTokenStatus.
  7562. ChangeToken *string `min:"1" type:"string"`
  7563. }
  7564. // String returns the string representation
  7565. func (s UpdateWebACLOutput) String() string {
  7566. return awsutil.Prettify(s)
  7567. }
  7568. // GoString returns the string representation
  7569. func (s UpdateWebACLOutput) GoString() string {
  7570. return s.String()
  7571. }
  7572. // A request to update an XssMatchSet.
  7573. type UpdateXssMatchSetInput struct {
  7574. _ struct{} `type:"structure"`
  7575. // The value returned by the most recent call to GetChangeToken.
  7576. //
  7577. // ChangeToken is a required field
  7578. ChangeToken *string `min:"1" type:"string" required:"true"`
  7579. // An array of XssMatchSetUpdate objects that you want to insert into or delete
  7580. // from a XssMatchSet. For more information, see the applicable data types:
  7581. //
  7582. // * XssMatchSetUpdate: Contains Action and XssMatchTuple
  7583. //
  7584. // * XssMatchTuple: Contains FieldToMatch and TextTransformation
  7585. //
  7586. // * FieldToMatch: Contains Data and Type
  7587. //
  7588. // Updates is a required field
  7589. Updates []*XssMatchSetUpdate `type:"list" required:"true"`
  7590. // The XssMatchSetId of the XssMatchSet that you want to update. XssMatchSetId
  7591. // is returned by CreateXssMatchSet and by ListXssMatchSets.
  7592. //
  7593. // XssMatchSetId is a required field
  7594. XssMatchSetId *string `min:"1" type:"string" required:"true"`
  7595. }
  7596. // String returns the string representation
  7597. func (s UpdateXssMatchSetInput) String() string {
  7598. return awsutil.Prettify(s)
  7599. }
  7600. // GoString returns the string representation
  7601. func (s UpdateXssMatchSetInput) GoString() string {
  7602. return s.String()
  7603. }
  7604. // Validate inspects the fields of the type to determine if they are valid.
  7605. func (s *UpdateXssMatchSetInput) Validate() error {
  7606. invalidParams := request.ErrInvalidParams{Context: "UpdateXssMatchSetInput"}
  7607. if s.ChangeToken == nil {
  7608. invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
  7609. }
  7610. if s.ChangeToken != nil && len(*s.ChangeToken) < 1 {
  7611. invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1))
  7612. }
  7613. if s.Updates == nil {
  7614. invalidParams.Add(request.NewErrParamRequired("Updates"))
  7615. }
  7616. if s.XssMatchSetId == nil {
  7617. invalidParams.Add(request.NewErrParamRequired("XssMatchSetId"))
  7618. }
  7619. if s.XssMatchSetId != nil && len(*s.XssMatchSetId) < 1 {
  7620. invalidParams.Add(request.NewErrParamMinLen("XssMatchSetId", 1))
  7621. }
  7622. if s.Updates != nil {
  7623. for i, v := range s.Updates {
  7624. if v == nil {
  7625. continue
  7626. }
  7627. if err := v.Validate(); err != nil {
  7628. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Updates", i), err.(request.ErrInvalidParams))
  7629. }
  7630. }
  7631. }
  7632. if invalidParams.Len() > 0 {
  7633. return invalidParams
  7634. }
  7635. return nil
  7636. }
  7637. // The response to an UpdateXssMatchSets request.
  7638. type UpdateXssMatchSetOutput struct {
  7639. _ struct{} `type:"structure"`
  7640. // The ChangeToken that you used to submit the UpdateXssMatchSet request. You
  7641. // can also use this value to query the status of the request. For more information,
  7642. // see GetChangeTokenStatus.
  7643. ChangeToken *string `min:"1" type:"string"`
  7644. }
  7645. // String returns the string representation
  7646. func (s UpdateXssMatchSetOutput) String() string {
  7647. return awsutil.Prettify(s)
  7648. }
  7649. // GoString returns the string representation
  7650. func (s UpdateXssMatchSetOutput) GoString() string {
  7651. return s.String()
  7652. }
  7653. // For the action that is associated with a rule in a WebACL, specifies the
  7654. // action that you want AWS WAF to perform when a web request matches all of
  7655. // the conditions in a rule. For the default action in a WebACL, specifies the
  7656. // action that you want AWS WAF to take when a web request doesn't match all
  7657. // of the conditions in any of the rules in a WebACL.
  7658. type WafAction struct {
  7659. _ struct{} `type:"structure"`
  7660. // Specifies how you want AWS WAF to respond to requests that match the settings
  7661. // in a Rule. Valid settings include the following:
  7662. //
  7663. // * ALLOW: AWS WAF allows requests
  7664. //
  7665. // * BLOCK: AWS WAF blocks requests
  7666. //
  7667. // * COUNT: AWS WAF increments a counter of the requests that match all of
  7668. // the conditions in the rule. AWS WAF then continues to inspect the web
  7669. // request based on the remaining rules in the web ACL. You can't specify
  7670. // COUNT for the default action for a WebACL.
  7671. //
  7672. // Type is a required field
  7673. Type *string `type:"string" required:"true" enum:"WafActionType"`
  7674. }
  7675. // String returns the string representation
  7676. func (s WafAction) String() string {
  7677. return awsutil.Prettify(s)
  7678. }
  7679. // GoString returns the string representation
  7680. func (s WafAction) GoString() string {
  7681. return s.String()
  7682. }
  7683. // Validate inspects the fields of the type to determine if they are valid.
  7684. func (s *WafAction) Validate() error {
  7685. invalidParams := request.ErrInvalidParams{Context: "WafAction"}
  7686. if s.Type == nil {
  7687. invalidParams.Add(request.NewErrParamRequired("Type"))
  7688. }
  7689. if invalidParams.Len() > 0 {
  7690. return invalidParams
  7691. }
  7692. return nil
  7693. }
  7694. // Contains the Rules that identify the requests that you want to allow, block,
  7695. // or count. In a WebACL, you also specify a default action (ALLOW or BLOCK),
  7696. // and the action for each Rule that you add to a WebACL, for example, block
  7697. // requests from specified IP addresses or block requests from specified referrers.
  7698. // You also associate the WebACL with a CloudFront distribution to identify
  7699. // the requests that you want AWS WAF to filter. If you add more than one Rule
  7700. // to a WebACL, a request needs to match only one of the specifications to be
  7701. // allowed, blocked, or counted. For more information, see UpdateWebACL.
  7702. type WebACL struct {
  7703. _ struct{} `type:"structure"`
  7704. // The action to perform if none of the Rules contained in the WebACL match.
  7705. // The action is specified by the WafAction object.
  7706. //
  7707. // DefaultAction is a required field
  7708. DefaultAction *WafAction `type:"structure" required:"true"`
  7709. MetricName *string `type:"string"`
  7710. // A friendly name or description of the WebACL. You can't change the name of
  7711. // a WebACL after you create it.
  7712. Name *string `min:"1" type:"string"`
  7713. // An array that contains the action for each Rule in a WebACL, the priority
  7714. // of the Rule, and the ID of the Rule.
  7715. //
  7716. // Rules is a required field
  7717. Rules []*ActivatedRule `type:"list" required:"true"`
  7718. // A unique identifier for a WebACL. You use WebACLId to get information about
  7719. // a WebACL (see GetWebACL), update a WebACL (see UpdateWebACL), and delete
  7720. // a WebACL from AWS WAF (see DeleteWebACL).
  7721. //
  7722. // WebACLId is returned by CreateWebACL and by ListWebACLs.
  7723. //
  7724. // WebACLId is a required field
  7725. WebACLId *string `min:"1" type:"string" required:"true"`
  7726. }
  7727. // String returns the string representation
  7728. func (s WebACL) String() string {
  7729. return awsutil.Prettify(s)
  7730. }
  7731. // GoString returns the string representation
  7732. func (s WebACL) GoString() string {
  7733. return s.String()
  7734. }
  7735. // Contains the identifier and the name or description of the WebACL.
  7736. type WebACLSummary struct {
  7737. _ struct{} `type:"structure"`
  7738. // A friendly name or description of the WebACL. You can't change the name of
  7739. // a WebACL after you create it.
  7740. //
  7741. // Name is a required field
  7742. Name *string `min:"1" type:"string" required:"true"`
  7743. // A unique identifier for a WebACL. You use WebACLId to get information about
  7744. // a WebACL (see GetWebACL), update a WebACL (see UpdateWebACL), and delete
  7745. // a WebACL from AWS WAF (see DeleteWebACL).
  7746. //
  7747. // WebACLId is returned by CreateWebACL and by ListWebACLs.
  7748. //
  7749. // WebACLId is a required field
  7750. WebACLId *string `min:"1" type:"string" required:"true"`
  7751. }
  7752. // String returns the string representation
  7753. func (s WebACLSummary) String() string {
  7754. return awsutil.Prettify(s)
  7755. }
  7756. // GoString returns the string representation
  7757. func (s WebACLSummary) GoString() string {
  7758. return s.String()
  7759. }
  7760. // Specifies whether to insert a Rule into or delete a Rule from a WebACL.
  7761. type WebACLUpdate struct {
  7762. _ struct{} `type:"structure"`
  7763. // Specifies whether to insert a Rule into or delete a Rule from a WebACL.
  7764. //
  7765. // Action is a required field
  7766. Action *string `type:"string" required:"true" enum:"ChangeAction"`
  7767. // The ActivatedRule object in an UpdateWebACL request specifies a Rule that
  7768. // you want to insert or delete, the priority of the Rule in the WebACL, and
  7769. // the action that you want AWS WAF to take when a web request matches the Rule
  7770. // (ALLOW, BLOCK, or COUNT).
  7771. //
  7772. // To specify whether to insert or delete a Rule, use the Action parameter in
  7773. // the WebACLUpdate data type.
  7774. //
  7775. // ActivatedRule is a required field
  7776. ActivatedRule *ActivatedRule `type:"structure" required:"true"`
  7777. }
  7778. // String returns the string representation
  7779. func (s WebACLUpdate) String() string {
  7780. return awsutil.Prettify(s)
  7781. }
  7782. // GoString returns the string representation
  7783. func (s WebACLUpdate) GoString() string {
  7784. return s.String()
  7785. }
  7786. // Validate inspects the fields of the type to determine if they are valid.
  7787. func (s *WebACLUpdate) Validate() error {
  7788. invalidParams := request.ErrInvalidParams{Context: "WebACLUpdate"}
  7789. if s.Action == nil {
  7790. invalidParams.Add(request.NewErrParamRequired("Action"))
  7791. }
  7792. if s.ActivatedRule == nil {
  7793. invalidParams.Add(request.NewErrParamRequired("ActivatedRule"))
  7794. }
  7795. if s.ActivatedRule != nil {
  7796. if err := s.ActivatedRule.Validate(); err != nil {
  7797. invalidParams.AddNested("ActivatedRule", err.(request.ErrInvalidParams))
  7798. }
  7799. }
  7800. if invalidParams.Len() > 0 {
  7801. return invalidParams
  7802. }
  7803. return nil
  7804. }
  7805. // A complex type that contains XssMatchTuple objects, which specify the parts
  7806. // of web requests that you want AWS WAF to inspect for cross-site scripting
  7807. // attacks and, if you want AWS WAF to inspect a header, the name of the header.
  7808. // If a XssMatchSet contains more than one XssMatchTuple object, a request needs
  7809. // to include cross-site scripting attacks in only one of the specified parts
  7810. // of the request to be considered a match.
  7811. type XssMatchSet struct {
  7812. _ struct{} `type:"structure"`
  7813. // The name, if any, of the XssMatchSet.
  7814. Name *string `min:"1" type:"string"`
  7815. // A unique identifier for an XssMatchSet. You use XssMatchSetId to get information
  7816. // about an XssMatchSet (see GetXssMatchSet), update an XssMatchSet (see UpdateXssMatchSet),
  7817. // insert an XssMatchSet into a Rule or delete one from a Rule (see UpdateRule),
  7818. // and delete an XssMatchSet from AWS WAF (see DeleteXssMatchSet).
  7819. //
  7820. // XssMatchSetId is returned by CreateXssMatchSet and by ListXssMatchSets.
  7821. //
  7822. // XssMatchSetId is a required field
  7823. XssMatchSetId *string `min:"1" type:"string" required:"true"`
  7824. // Specifies the parts of web requests that you want to inspect for cross-site
  7825. // scripting attacks.
  7826. //
  7827. // XssMatchTuples is a required field
  7828. XssMatchTuples []*XssMatchTuple `type:"list" required:"true"`
  7829. }
  7830. // String returns the string representation
  7831. func (s XssMatchSet) String() string {
  7832. return awsutil.Prettify(s)
  7833. }
  7834. // GoString returns the string representation
  7835. func (s XssMatchSet) GoString() string {
  7836. return s.String()
  7837. }
  7838. // The Id and Name of an XssMatchSet.
  7839. type XssMatchSetSummary struct {
  7840. _ struct{} `type:"structure"`
  7841. // The name of the XssMatchSet, if any, specified by Id.
  7842. //
  7843. // Name is a required field
  7844. Name *string `min:"1" type:"string" required:"true"`
  7845. // A unique identifier for an XssMatchSet. You use XssMatchSetId to get information
  7846. // about a XssMatchSet (see GetXssMatchSet), update an XssMatchSet (see UpdateXssMatchSet),
  7847. // insert an XssMatchSet into a Rule or delete one from a Rule (see UpdateRule),
  7848. // and delete an XssMatchSet from AWS WAF (see DeleteXssMatchSet).
  7849. //
  7850. // XssMatchSetId is returned by CreateXssMatchSet and by ListXssMatchSets.
  7851. //
  7852. // XssMatchSetId is a required field
  7853. XssMatchSetId *string `min:"1" type:"string" required:"true"`
  7854. }
  7855. // String returns the string representation
  7856. func (s XssMatchSetSummary) String() string {
  7857. return awsutil.Prettify(s)
  7858. }
  7859. // GoString returns the string representation
  7860. func (s XssMatchSetSummary) GoString() string {
  7861. return s.String()
  7862. }
  7863. // Specifies the part of a web request that you want to inspect for cross-site
  7864. // scripting attacks and indicates whether you want to add the specification
  7865. // to an XssMatchSet or delete it from an XssMatchSet.
  7866. type XssMatchSetUpdate struct {
  7867. _ struct{} `type:"structure"`
  7868. // Specify INSERT to add a XssMatchSetUpdate to an XssMatchSet. Use DELETE to
  7869. // remove a XssMatchSetUpdate from an XssMatchSet.
  7870. //
  7871. // Action is a required field
  7872. Action *string `type:"string" required:"true" enum:"ChangeAction"`
  7873. // Specifies the part of a web request that you want AWS WAF to inspect for
  7874. // cross-site scripting attacks and, if you want AWS WAF to inspect a header,
  7875. // the name of the header.
  7876. //
  7877. // XssMatchTuple is a required field
  7878. XssMatchTuple *XssMatchTuple `type:"structure" required:"true"`
  7879. }
  7880. // String returns the string representation
  7881. func (s XssMatchSetUpdate) String() string {
  7882. return awsutil.Prettify(s)
  7883. }
  7884. // GoString returns the string representation
  7885. func (s XssMatchSetUpdate) GoString() string {
  7886. return s.String()
  7887. }
  7888. // Validate inspects the fields of the type to determine if they are valid.
  7889. func (s *XssMatchSetUpdate) Validate() error {
  7890. invalidParams := request.ErrInvalidParams{Context: "XssMatchSetUpdate"}
  7891. if s.Action == nil {
  7892. invalidParams.Add(request.NewErrParamRequired("Action"))
  7893. }
  7894. if s.XssMatchTuple == nil {
  7895. invalidParams.Add(request.NewErrParamRequired("XssMatchTuple"))
  7896. }
  7897. if s.XssMatchTuple != nil {
  7898. if err := s.XssMatchTuple.Validate(); err != nil {
  7899. invalidParams.AddNested("XssMatchTuple", err.(request.ErrInvalidParams))
  7900. }
  7901. }
  7902. if invalidParams.Len() > 0 {
  7903. return invalidParams
  7904. }
  7905. return nil
  7906. }
  7907. // Specifies the part of a web request that you want AWS WAF to inspect for
  7908. // cross-site scripting attacks and, if you want AWS WAF to inspect a header,
  7909. // the name of the header.
  7910. type XssMatchTuple struct {
  7911. _ struct{} `type:"structure"`
  7912. // Specifies where in a web request to look for TargetString.
  7913. //
  7914. // FieldToMatch is a required field
  7915. FieldToMatch *FieldToMatch `type:"structure" required:"true"`
  7916. // Text transformations eliminate some of the unusual formatting that attackers
  7917. // use in web requests in an effort to bypass AWS WAF. If you specify a transformation,
  7918. // AWS WAF performs the transformation on FieldToMatch before inspecting a request
  7919. // for a match.
  7920. //
  7921. // CMD_LINE
  7922. //
  7923. // When you're concerned that attackers are injecting an operating system commandline
  7924. // command and using unusual formatting to disguise some or all of the command,
  7925. // use this option to perform the following transformations:
  7926. //
  7927. // * Delete the following characters: \ " ' ^
  7928. //
  7929. // * Delete spaces before the following characters: / (
  7930. //
  7931. // * Replace the following characters with a space: , ;
  7932. //
  7933. // * Replace multiple spaces with one space
  7934. //
  7935. // * Convert uppercase letters (A-Z) to lowercase (a-z)
  7936. //
  7937. // COMPRESS_WHITE_SPACE
  7938. //
  7939. // Use this option to replace the following characters with a space character
  7940. // (decimal 32):
  7941. //
  7942. // * \f, formfeed, decimal 12
  7943. //
  7944. // * \t, tab, decimal 9
  7945. //
  7946. // * \n, newline, decimal 10
  7947. //
  7948. // * \r, carriage return, decimal 13
  7949. //
  7950. // * \v, vertical tab, decimal 11
  7951. //
  7952. // * non-breaking space, decimal 160
  7953. //
  7954. // COMPRESS_WHITE_SPACE also replaces multiple spaces with one space.
  7955. //
  7956. // HTML_ENTITY_DECODE
  7957. //
  7958. // Use this option to replace HTML-encoded characters with unencoded characters.
  7959. // HTML_ENTITY_DECODE performs the following operations:
  7960. //
  7961. // * Replaces (ampersand)quot; with "
  7962. //
  7963. // * Replaces (ampersand)nbsp; with a non-breaking space, decimal 160
  7964. //
  7965. // * Replaces (ampersand)lt; with a "less than" symbol
  7966. //
  7967. // * Replaces (ampersand)gt; with >
  7968. //
  7969. // * Replaces characters that are represented in hexadecimal format, (ampersand)#xhhhh;,
  7970. // with the corresponding characters
  7971. //
  7972. // * Replaces characters that are represented in decimal format, (ampersand)#nnnn;,
  7973. // with the corresponding characters
  7974. //
  7975. // LOWERCASE
  7976. //
  7977. // Use this option to convert uppercase letters (A-Z) to lowercase (a-z).
  7978. //
  7979. // URL_DECODE
  7980. //
  7981. // Use this option to decode a URL-encoded value.
  7982. //
  7983. // NONE
  7984. //
  7985. // Specify NONE if you don't want to perform any text transformations.
  7986. //
  7987. // TextTransformation is a required field
  7988. TextTransformation *string `type:"string" required:"true" enum:"TextTransformation"`
  7989. }
  7990. // String returns the string representation
  7991. func (s XssMatchTuple) String() string {
  7992. return awsutil.Prettify(s)
  7993. }
  7994. // GoString returns the string representation
  7995. func (s XssMatchTuple) GoString() string {
  7996. return s.String()
  7997. }
  7998. // Validate inspects the fields of the type to determine if they are valid.
  7999. func (s *XssMatchTuple) Validate() error {
  8000. invalidParams := request.ErrInvalidParams{Context: "XssMatchTuple"}
  8001. if s.FieldToMatch == nil {
  8002. invalidParams.Add(request.NewErrParamRequired("FieldToMatch"))
  8003. }
  8004. if s.TextTransformation == nil {
  8005. invalidParams.Add(request.NewErrParamRequired("TextTransformation"))
  8006. }
  8007. if s.FieldToMatch != nil {
  8008. if err := s.FieldToMatch.Validate(); err != nil {
  8009. invalidParams.AddNested("FieldToMatch", err.(request.ErrInvalidParams))
  8010. }
  8011. }
  8012. if invalidParams.Len() > 0 {
  8013. return invalidParams
  8014. }
  8015. return nil
  8016. }
  8017. const (
  8018. // ChangeActionInsert is a ChangeAction enum value
  8019. ChangeActionInsert = "INSERT"
  8020. // ChangeActionDelete is a ChangeAction enum value
  8021. ChangeActionDelete = "DELETE"
  8022. )
  8023. const (
  8024. // ChangeTokenStatusProvisioned is a ChangeTokenStatus enum value
  8025. ChangeTokenStatusProvisioned = "PROVISIONED"
  8026. // ChangeTokenStatusPending is a ChangeTokenStatus enum value
  8027. ChangeTokenStatusPending = "PENDING"
  8028. // ChangeTokenStatusInsync is a ChangeTokenStatus enum value
  8029. ChangeTokenStatusInsync = "INSYNC"
  8030. )
  8031. const (
  8032. // ComparisonOperatorEq is a ComparisonOperator enum value
  8033. ComparisonOperatorEq = "EQ"
  8034. // ComparisonOperatorNe is a ComparisonOperator enum value
  8035. ComparisonOperatorNe = "NE"
  8036. // ComparisonOperatorLe is a ComparisonOperator enum value
  8037. ComparisonOperatorLe = "LE"
  8038. // ComparisonOperatorLt is a ComparisonOperator enum value
  8039. ComparisonOperatorLt = "LT"
  8040. // ComparisonOperatorGe is a ComparisonOperator enum value
  8041. ComparisonOperatorGe = "GE"
  8042. // ComparisonOperatorGt is a ComparisonOperator enum value
  8043. ComparisonOperatorGt = "GT"
  8044. )
  8045. const (
  8046. // IPSetDescriptorTypeIpv4 is a IPSetDescriptorType enum value
  8047. IPSetDescriptorTypeIpv4 = "IPV4"
  8048. // IPSetDescriptorTypeIpv6 is a IPSetDescriptorType enum value
  8049. IPSetDescriptorTypeIpv6 = "IPV6"
  8050. )
  8051. const (
  8052. // MatchFieldTypeUri is a MatchFieldType enum value
  8053. MatchFieldTypeUri = "URI"
  8054. // MatchFieldTypeQueryString is a MatchFieldType enum value
  8055. MatchFieldTypeQueryString = "QUERY_STRING"
  8056. // MatchFieldTypeHeader is a MatchFieldType enum value
  8057. MatchFieldTypeHeader = "HEADER"
  8058. // MatchFieldTypeMethod is a MatchFieldType enum value
  8059. MatchFieldTypeMethod = "METHOD"
  8060. // MatchFieldTypeBody is a MatchFieldType enum value
  8061. MatchFieldTypeBody = "BODY"
  8062. )
  8063. const (
  8064. // ParameterExceptionFieldChangeAction is a ParameterExceptionField enum value
  8065. ParameterExceptionFieldChangeAction = "CHANGE_ACTION"
  8066. // ParameterExceptionFieldWafAction is a ParameterExceptionField enum value
  8067. ParameterExceptionFieldWafAction = "WAF_ACTION"
  8068. // ParameterExceptionFieldPredicateType is a ParameterExceptionField enum value
  8069. ParameterExceptionFieldPredicateType = "PREDICATE_TYPE"
  8070. // ParameterExceptionFieldIpsetType is a ParameterExceptionField enum value
  8071. ParameterExceptionFieldIpsetType = "IPSET_TYPE"
  8072. // ParameterExceptionFieldByteMatchFieldType is a ParameterExceptionField enum value
  8073. ParameterExceptionFieldByteMatchFieldType = "BYTE_MATCH_FIELD_TYPE"
  8074. // ParameterExceptionFieldSqlInjectionMatchFieldType is a ParameterExceptionField enum value
  8075. ParameterExceptionFieldSqlInjectionMatchFieldType = "SQL_INJECTION_MATCH_FIELD_TYPE"
  8076. // ParameterExceptionFieldByteMatchTextTransformation is a ParameterExceptionField enum value
  8077. ParameterExceptionFieldByteMatchTextTransformation = "BYTE_MATCH_TEXT_TRANSFORMATION"
  8078. // ParameterExceptionFieldByteMatchPositionalConstraint is a ParameterExceptionField enum value
  8079. ParameterExceptionFieldByteMatchPositionalConstraint = "BYTE_MATCH_POSITIONAL_CONSTRAINT"
  8080. // ParameterExceptionFieldSizeConstraintComparisonOperator is a ParameterExceptionField enum value
  8081. ParameterExceptionFieldSizeConstraintComparisonOperator = "SIZE_CONSTRAINT_COMPARISON_OPERATOR"
  8082. )
  8083. const (
  8084. // ParameterExceptionReasonInvalidOption is a ParameterExceptionReason enum value
  8085. ParameterExceptionReasonInvalidOption = "INVALID_OPTION"
  8086. // ParameterExceptionReasonIllegalCombination is a ParameterExceptionReason enum value
  8087. ParameterExceptionReasonIllegalCombination = "ILLEGAL_COMBINATION"
  8088. )
  8089. const (
  8090. // PositionalConstraintExactly is a PositionalConstraint enum value
  8091. PositionalConstraintExactly = "EXACTLY"
  8092. // PositionalConstraintStartsWith is a PositionalConstraint enum value
  8093. PositionalConstraintStartsWith = "STARTS_WITH"
  8094. // PositionalConstraintEndsWith is a PositionalConstraint enum value
  8095. PositionalConstraintEndsWith = "ENDS_WITH"
  8096. // PositionalConstraintContains is a PositionalConstraint enum value
  8097. PositionalConstraintContains = "CONTAINS"
  8098. // PositionalConstraintContainsWord is a PositionalConstraint enum value
  8099. PositionalConstraintContainsWord = "CONTAINS_WORD"
  8100. )
  8101. const (
  8102. // PredicateTypeIpmatch is a PredicateType enum value
  8103. PredicateTypeIpmatch = "IPMatch"
  8104. // PredicateTypeByteMatch is a PredicateType enum value
  8105. PredicateTypeByteMatch = "ByteMatch"
  8106. // PredicateTypeSqlInjectionMatch is a PredicateType enum value
  8107. PredicateTypeSqlInjectionMatch = "SqlInjectionMatch"
  8108. // PredicateTypeSizeConstraint is a PredicateType enum value
  8109. PredicateTypeSizeConstraint = "SizeConstraint"
  8110. // PredicateTypeXssMatch is a PredicateType enum value
  8111. PredicateTypeXssMatch = "XssMatch"
  8112. )
  8113. const (
  8114. // TextTransformationNone is a TextTransformation enum value
  8115. TextTransformationNone = "NONE"
  8116. // TextTransformationCompressWhiteSpace is a TextTransformation enum value
  8117. TextTransformationCompressWhiteSpace = "COMPRESS_WHITE_SPACE"
  8118. // TextTransformationHtmlEntityDecode is a TextTransformation enum value
  8119. TextTransformationHtmlEntityDecode = "HTML_ENTITY_DECODE"
  8120. // TextTransformationLowercase is a TextTransformation enum value
  8121. TextTransformationLowercase = "LOWERCASE"
  8122. // TextTransformationCmdLine is a TextTransformation enum value
  8123. TextTransformationCmdLine = "CMD_LINE"
  8124. // TextTransformationUrlDecode is a TextTransformation enum value
  8125. TextTransformationUrlDecode = "URL_DECODE"
  8126. )
  8127. const (
  8128. // WafActionTypeBlock is a WafActionType enum value
  8129. WafActionTypeBlock = "BLOCK"
  8130. // WafActionTypeAllow is a WafActionType enum value
  8131. WafActionTypeAllow = "ALLOW"
  8132. // WafActionTypeCount is a WafActionType enum value
  8133. WafActionTypeCount = "COUNT"
  8134. )