api.go 232 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579
  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. // Creating a request object using this method should be used when you want to inject
  17. // custom logic into the request's lifecycle using a custom handler, or if you want to
  18. // access properties on the request object before or after sending the request. If
  19. // you just want the service response, call the CreateByteMatchSet method directly
  20. // instead.
  21. //
  22. // Note: You must call the "Send" method on the returned request object in order
  23. // to execute the request.
  24. //
  25. // // Example sending a request using the CreateByteMatchSetRequest method.
  26. // req, resp := client.CreateByteMatchSetRequest(params)
  27. //
  28. // err := req.Send()
  29. // if err == nil { // resp is now filled
  30. // fmt.Println(resp)
  31. // }
  32. //
  33. func (c *WAF) CreateByteMatchSetRequest(input *CreateByteMatchSetInput) (req *request.Request, output *CreateByteMatchSetOutput) {
  34. op := &request.Operation{
  35. Name: opCreateByteMatchSet,
  36. HTTPMethod: "POST",
  37. HTTPPath: "/",
  38. }
  39. if input == nil {
  40. input = &CreateByteMatchSetInput{}
  41. }
  42. req = c.newRequest(op, input, output)
  43. output = &CreateByteMatchSetOutput{}
  44. req.Data = output
  45. return
  46. }
  47. // Creates a ByteMatchSet. You then use UpdateByteMatchSet to identify the part
  48. // of a web request that you want AWS WAF to inspect, such as the values of
  49. // the User-Agent header or the query string. For example, you can create a
  50. // ByteMatchSet that matches any requests with User-Agent headers that contain
  51. // the string BadBot. You can then configure AWS WAF to reject those requests.
  52. //
  53. // To create and configure a ByteMatchSet, perform the following steps:
  54. //
  55. // Use GetChangeToken to get the change token that you provide in the ChangeToken
  56. // parameter of a CreateByteMatchSet request. Submit a CreateByteMatchSet request.
  57. // Use GetChangeToken to get the change token that you provide in the ChangeToken
  58. // parameter of an UpdateByteMatchSet request. Submit an UpdateByteMatchSet
  59. // request to specify the part of the request that you want AWS WAF to inspect
  60. // (for example, the header or the URI) and the value that you want AWS WAF
  61. // to watch for. For more information about how to use the AWS WAF API to allow
  62. // or block HTTP requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/).
  63. func (c *WAF) CreateByteMatchSet(input *CreateByteMatchSetInput) (*CreateByteMatchSetOutput, error) {
  64. req, out := c.CreateByteMatchSetRequest(input)
  65. err := req.Send()
  66. return out, err
  67. }
  68. const opCreateIPSet = "CreateIPSet"
  69. // CreateIPSetRequest generates a "aws/request.Request" representing the
  70. // client's request for the CreateIPSet operation. The "output" return
  71. // value can be used to capture response data after the request's "Send" method
  72. // is called.
  73. //
  74. // Creating a request object using this method should be used when you want to inject
  75. // custom logic into the request's lifecycle using a custom handler, or if you want to
  76. // access properties on the request object before or after sending the request. If
  77. // you just want the service response, call the CreateIPSet method directly
  78. // instead.
  79. //
  80. // Note: You must call the "Send" method on the returned request object in order
  81. // to execute the request.
  82. //
  83. // // Example sending a request using the CreateIPSetRequest method.
  84. // req, resp := client.CreateIPSetRequest(params)
  85. //
  86. // err := req.Send()
  87. // if err == nil { // resp is now filled
  88. // fmt.Println(resp)
  89. // }
  90. //
  91. func (c *WAF) CreateIPSetRequest(input *CreateIPSetInput) (req *request.Request, output *CreateIPSetOutput) {
  92. op := &request.Operation{
  93. Name: opCreateIPSet,
  94. HTTPMethod: "POST",
  95. HTTPPath: "/",
  96. }
  97. if input == nil {
  98. input = &CreateIPSetInput{}
  99. }
  100. req = c.newRequest(op, input, output)
  101. output = &CreateIPSetOutput{}
  102. req.Data = output
  103. return
  104. }
  105. // Creates an IPSet, which you use to specify which web requests you want to
  106. // allow or block based on the IP addresses that the requests originate from.
  107. // For example, if you're receiving a lot of requests from one or more individual
  108. // IP addresses or one or more ranges of IP addresses and you want to block
  109. // the requests, you can create an IPSet that contains those IP addresses and
  110. // then configure AWS WAF to block the requests.
  111. //
  112. // To create and configure an IPSet, perform the following steps:
  113. //
  114. // Use GetChangeToken to get the change token that you provide in the ChangeToken
  115. // parameter of a CreateIPSet request. Submit a CreateIPSet request. Use GetChangeToken
  116. // to get the change token that you provide in the ChangeToken parameter of
  117. // an UpdateIPSet request. Submit an UpdateIPSet request to specify the IP addresses
  118. // that you want AWS WAF to watch for. For more information about how to use
  119. // the AWS WAF API to allow or block HTTP requests, see the AWS WAF Developer
  120. // Guide (http://docs.aws.amazon.com/waf/latest/developerguide/).
  121. func (c *WAF) CreateIPSet(input *CreateIPSetInput) (*CreateIPSetOutput, error) {
  122. req, out := c.CreateIPSetRequest(input)
  123. err := req.Send()
  124. return out, err
  125. }
  126. const opCreateRule = "CreateRule"
  127. // CreateRuleRequest generates a "aws/request.Request" representing the
  128. // client's request for the CreateRule operation. The "output" return
  129. // value can be used to capture response data after the request's "Send" method
  130. // is called.
  131. //
  132. // Creating a request object using this method should be used when you want to inject
  133. // custom logic into the request's lifecycle using a custom handler, or if you want to
  134. // access properties on the request object before or after sending the request. If
  135. // you just want the service response, call the CreateRule method directly
  136. // instead.
  137. //
  138. // Note: You must call the "Send" method on the returned request object in order
  139. // to execute the request.
  140. //
  141. // // Example sending a request using the CreateRuleRequest method.
  142. // req, resp := client.CreateRuleRequest(params)
  143. //
  144. // err := req.Send()
  145. // if err == nil { // resp is now filled
  146. // fmt.Println(resp)
  147. // }
  148. //
  149. func (c *WAF) CreateRuleRequest(input *CreateRuleInput) (req *request.Request, output *CreateRuleOutput) {
  150. op := &request.Operation{
  151. Name: opCreateRule,
  152. HTTPMethod: "POST",
  153. HTTPPath: "/",
  154. }
  155. if input == nil {
  156. input = &CreateRuleInput{}
  157. }
  158. req = c.newRequest(op, input, output)
  159. output = &CreateRuleOutput{}
  160. req.Data = output
  161. return
  162. }
  163. // Creates a Rule, which contains the IPSet objects, ByteMatchSet objects, and
  164. // other predicates that identify the requests that you want to block. If you
  165. // add more than one predicate to a Rule, a request must match all of the specifications
  166. // to be allowed or blocked. For example, suppose you add the following to a
  167. // Rule:
  168. //
  169. // An IPSet that matches the IP address 192.0.2.44/32 A ByteMatchSet that
  170. // matches BadBot in the User-Agent header You then add the Rule to a WebACL
  171. // and specify that you want to blocks requests that satisfy the Rule. For a
  172. // request to be blocked, it must come from the IP address 192.0.2.44 and the
  173. // User-Agent header in the request must contain the value BadBot.
  174. //
  175. // To create and configure a Rule, perform the following steps:
  176. //
  177. // Create and update the predicates that you want to include in the Rule.
  178. // For more information, see CreateByteMatchSet, CreateIPSet, and CreateSqlInjectionMatchSet.
  179. // Use GetChangeToken to get the change token that you provide in the ChangeToken
  180. // parameter of a CreateRule request. Submit a CreateRule request. Use GetChangeToken
  181. // to get the change token that you provide in the ChangeToken parameter of
  182. // an UpdateRule request. Submit an UpdateRule request to specify the predicates
  183. // that you want to include in the Rule. Create and update a WebACL that contains
  184. // the Rule. For more information, see CreateWebACL. For more information about
  185. // how to use the AWS WAF API to allow or block HTTP requests, see the AWS WAF
  186. // Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/).
  187. func (c *WAF) CreateRule(input *CreateRuleInput) (*CreateRuleOutput, error) {
  188. req, out := c.CreateRuleRequest(input)
  189. err := req.Send()
  190. return out, err
  191. }
  192. const opCreateSizeConstraintSet = "CreateSizeConstraintSet"
  193. // CreateSizeConstraintSetRequest generates a "aws/request.Request" representing the
  194. // client's request for the CreateSizeConstraintSet operation. The "output" return
  195. // value can be used to capture response data after the request's "Send" method
  196. // is called.
  197. //
  198. // Creating a request object using this method should be used when you want to inject
  199. // custom logic into the request's lifecycle using a custom handler, or if you want to
  200. // access properties on the request object before or after sending the request. If
  201. // you just want the service response, call the CreateSizeConstraintSet method directly
  202. // instead.
  203. //
  204. // Note: You must call the "Send" method on the returned request object in order
  205. // to execute the request.
  206. //
  207. // // Example sending a request using the CreateSizeConstraintSetRequest method.
  208. // req, resp := client.CreateSizeConstraintSetRequest(params)
  209. //
  210. // err := req.Send()
  211. // if err == nil { // resp is now filled
  212. // fmt.Println(resp)
  213. // }
  214. //
  215. func (c *WAF) CreateSizeConstraintSetRequest(input *CreateSizeConstraintSetInput) (req *request.Request, output *CreateSizeConstraintSetOutput) {
  216. op := &request.Operation{
  217. Name: opCreateSizeConstraintSet,
  218. HTTPMethod: "POST",
  219. HTTPPath: "/",
  220. }
  221. if input == nil {
  222. input = &CreateSizeConstraintSetInput{}
  223. }
  224. req = c.newRequest(op, input, output)
  225. output = &CreateSizeConstraintSetOutput{}
  226. req.Data = output
  227. return
  228. }
  229. // Creates a SizeConstraintSet. You then use UpdateSizeConstraintSet to identify
  230. // the part of a web request that you want AWS WAF to check for length, such
  231. // as the length of the User-Agent header or the length of the query string.
  232. // For example, you can create a SizeConstraintSet that matches any requests
  233. // that have a query string that is longer than 100 bytes. You can then configure
  234. // AWS WAF to reject those requests.
  235. //
  236. // To create and configure a SizeConstraintSet, perform the following steps:
  237. //
  238. // Use GetChangeToken to get the change token that you provide in the ChangeToken
  239. // parameter of a CreateSizeConstraintSet request. Submit a CreateSizeConstraintSet
  240. // request. Use GetChangeToken to get the change token that you provide in the
  241. // ChangeToken parameter of an UpdateSizeConstraintSet request. Submit an UpdateSizeConstraintSet
  242. // request to specify the part of the request that you want AWS WAF to inspect
  243. // (for example, the header or the URI) and the value that you want AWS WAF
  244. // to watch for. For more information about how to use the AWS WAF API to allow
  245. // or block HTTP requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/).
  246. func (c *WAF) CreateSizeConstraintSet(input *CreateSizeConstraintSetInput) (*CreateSizeConstraintSetOutput, error) {
  247. req, out := c.CreateSizeConstraintSetRequest(input)
  248. err := req.Send()
  249. return out, err
  250. }
  251. const opCreateSqlInjectionMatchSet = "CreateSqlInjectionMatchSet"
  252. // CreateSqlInjectionMatchSetRequest generates a "aws/request.Request" representing the
  253. // client's request for the CreateSqlInjectionMatchSet operation. The "output" return
  254. // value can be used to capture response data after the request's "Send" method
  255. // is called.
  256. //
  257. // Creating a request object using this method should be used when you want to inject
  258. // custom logic into the request's lifecycle using a custom handler, or if you want to
  259. // access properties on the request object before or after sending the request. If
  260. // you just want the service response, call the CreateSqlInjectionMatchSet method directly
  261. // instead.
  262. //
  263. // Note: You must call the "Send" method on the returned request object in order
  264. // to execute the request.
  265. //
  266. // // Example sending a request using the CreateSqlInjectionMatchSetRequest method.
  267. // req, resp := client.CreateSqlInjectionMatchSetRequest(params)
  268. //
  269. // err := req.Send()
  270. // if err == nil { // resp is now filled
  271. // fmt.Println(resp)
  272. // }
  273. //
  274. func (c *WAF) CreateSqlInjectionMatchSetRequest(input *CreateSqlInjectionMatchSetInput) (req *request.Request, output *CreateSqlInjectionMatchSetOutput) {
  275. op := &request.Operation{
  276. Name: opCreateSqlInjectionMatchSet,
  277. HTTPMethod: "POST",
  278. HTTPPath: "/",
  279. }
  280. if input == nil {
  281. input = &CreateSqlInjectionMatchSetInput{}
  282. }
  283. req = c.newRequest(op, input, output)
  284. output = &CreateSqlInjectionMatchSetOutput{}
  285. req.Data = output
  286. return
  287. }
  288. // Creates a SqlInjectionMatchSet, which you use to allow, block, or count requests
  289. // that contain snippets of SQL code in a specified part of web requests. AWS
  290. // WAF searches for character sequences that are likely to be malicious strings.
  291. //
  292. // To create and configure a SqlInjectionMatchSet, perform the following steps:
  293. //
  294. // Use GetChangeToken to get the change token that you provide in the ChangeToken
  295. // parameter of a CreateSqlInjectionMatchSet request. Submit a CreateSqlInjectionMatchSet
  296. // request. Use GetChangeToken to get the change token that you provide in the
  297. // ChangeToken parameter of an UpdateSqlInjectionMatchSet request. Submit an
  298. // UpdateSqlInjectionMatchSet request to specify the parts of web requests in
  299. // which you want to allow, block, or count malicious SQL code. For more information
  300. // about how to use the AWS WAF API to allow or block HTTP requests, see the
  301. // AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/).
  302. func (c *WAF) CreateSqlInjectionMatchSet(input *CreateSqlInjectionMatchSetInput) (*CreateSqlInjectionMatchSetOutput, error) {
  303. req, out := c.CreateSqlInjectionMatchSetRequest(input)
  304. err := req.Send()
  305. return out, err
  306. }
  307. const opCreateWebACL = "CreateWebACL"
  308. // CreateWebACLRequest generates a "aws/request.Request" representing the
  309. // client's request for the CreateWebACL operation. The "output" return
  310. // value can be used to capture response data after the request's "Send" method
  311. // is called.
  312. //
  313. // Creating a request object using this method should be used when you want to inject
  314. // custom logic into the request's lifecycle using a custom handler, or if you want to
  315. // access properties on the request object before or after sending the request. If
  316. // you just want the service response, call the CreateWebACL method directly
  317. // instead.
  318. //
  319. // Note: You must call the "Send" method on the returned request object in order
  320. // to execute the request.
  321. //
  322. // // Example sending a request using the CreateWebACLRequest method.
  323. // req, resp := client.CreateWebACLRequest(params)
  324. //
  325. // err := req.Send()
  326. // if err == nil { // resp is now filled
  327. // fmt.Println(resp)
  328. // }
  329. //
  330. func (c *WAF) CreateWebACLRequest(input *CreateWebACLInput) (req *request.Request, output *CreateWebACLOutput) {
  331. op := &request.Operation{
  332. Name: opCreateWebACL,
  333. HTTPMethod: "POST",
  334. HTTPPath: "/",
  335. }
  336. if input == nil {
  337. input = &CreateWebACLInput{}
  338. }
  339. req = c.newRequest(op, input, output)
  340. output = &CreateWebACLOutput{}
  341. req.Data = output
  342. return
  343. }
  344. // Creates a WebACL, which contains the Rules that identify the CloudFront web
  345. // requests that you want to allow, block, or count. AWS WAF evaluates Rules
  346. // in order based on the value of Priority for each Rule.
  347. //
  348. // You also specify a default action, either ALLOW or BLOCK. If a web request
  349. // doesn't match any of the Rules in a WebACL, AWS WAF responds to the request
  350. // with the default action.
  351. //
  352. // To create and configure a WebACL, perform the following steps:
  353. //
  354. // Create and update the ByteMatchSet objects and other predicates that you
  355. // want to include in Rules. For more information, see CreateByteMatchSet, UpdateByteMatchSet,
  356. // CreateIPSet, UpdateIPSet, CreateSqlInjectionMatchSet, and UpdateSqlInjectionMatchSet.
  357. // Create and update the Rules that you want to include in the WebACL. For more
  358. // information, see CreateRule and UpdateRule. Use GetChangeToken to get the
  359. // change token that you provide in the ChangeToken parameter of a CreateWebACL
  360. // request. Submit a CreateWebACL request. Use GetChangeToken to get the change
  361. // token that you provide in the ChangeToken parameter of an UpdateWebACL request.
  362. // Submit an UpdateWebACL request to specify the Rules that you want to include
  363. // in the WebACL, to specify the default action, and to associate the WebACL
  364. // with a CloudFront distribution. For more information about how to use the
  365. // AWS WAF API, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/).
  366. func (c *WAF) CreateWebACL(input *CreateWebACLInput) (*CreateWebACLOutput, error) {
  367. req, out := c.CreateWebACLRequest(input)
  368. err := req.Send()
  369. return out, err
  370. }
  371. const opCreateXssMatchSet = "CreateXssMatchSet"
  372. // CreateXssMatchSetRequest generates a "aws/request.Request" representing the
  373. // client's request for the CreateXssMatchSet operation. The "output" return
  374. // value can be used to capture response data after the request's "Send" method
  375. // is called.
  376. //
  377. // Creating a request object using this method should be used when you want to inject
  378. // custom logic into the request's lifecycle using a custom handler, or if you want to
  379. // access properties on the request object before or after sending the request. If
  380. // you just want the service response, call the CreateXssMatchSet method directly
  381. // instead.
  382. //
  383. // Note: You must call the "Send" method on the returned request object in order
  384. // to execute the request.
  385. //
  386. // // Example sending a request using the CreateXssMatchSetRequest method.
  387. // req, resp := client.CreateXssMatchSetRequest(params)
  388. //
  389. // err := req.Send()
  390. // if err == nil { // resp is now filled
  391. // fmt.Println(resp)
  392. // }
  393. //
  394. func (c *WAF) CreateXssMatchSetRequest(input *CreateXssMatchSetInput) (req *request.Request, output *CreateXssMatchSetOutput) {
  395. op := &request.Operation{
  396. Name: opCreateXssMatchSet,
  397. HTTPMethod: "POST",
  398. HTTPPath: "/",
  399. }
  400. if input == nil {
  401. input = &CreateXssMatchSetInput{}
  402. }
  403. req = c.newRequest(op, input, output)
  404. output = &CreateXssMatchSetOutput{}
  405. req.Data = output
  406. return
  407. }
  408. // Creates an XssMatchSet, which you use to allow, block, or count requests
  409. // that contain cross-site scripting attacks in the specified part of web requests.
  410. // AWS WAF searches for character sequences that are likely to be malicious
  411. // strings.
  412. //
  413. // To create and configure an XssMatchSet, perform the following steps:
  414. //
  415. // Use GetChangeToken to get the change token that you provide in the ChangeToken
  416. // parameter of a CreateXssMatchSet request. Submit a CreateXssMatchSet request.
  417. // Use GetChangeToken to get the change token that you provide in the ChangeToken
  418. // parameter of an UpdateXssMatchSet request. Submit an UpdateXssMatchSet request
  419. // to specify the parts of web requests in which you want to allow, block, or
  420. // count cross-site scripting attacks. For more information about how to use
  421. // the AWS WAF API to allow or block HTTP requests, see the AWS WAF Developer
  422. // Guide (http://docs.aws.amazon.com/waf/latest/developerguide/).
  423. func (c *WAF) CreateXssMatchSet(input *CreateXssMatchSetInput) (*CreateXssMatchSetOutput, error) {
  424. req, out := c.CreateXssMatchSetRequest(input)
  425. err := req.Send()
  426. return out, err
  427. }
  428. const opDeleteByteMatchSet = "DeleteByteMatchSet"
  429. // DeleteByteMatchSetRequest generates a "aws/request.Request" representing the
  430. // client's request for the DeleteByteMatchSet operation. The "output" return
  431. // value can be used to capture response data after the request's "Send" method
  432. // is called.
  433. //
  434. // Creating a request object using this method should be used when you want to inject
  435. // custom logic into the request's lifecycle using a custom handler, or if you want to
  436. // access properties on the request object before or after sending the request. If
  437. // you just want the service response, call the DeleteByteMatchSet method directly
  438. // instead.
  439. //
  440. // Note: You must call the "Send" method on the returned request object in order
  441. // to execute the request.
  442. //
  443. // // Example sending a request using the DeleteByteMatchSetRequest method.
  444. // req, resp := client.DeleteByteMatchSetRequest(params)
  445. //
  446. // err := req.Send()
  447. // if err == nil { // resp is now filled
  448. // fmt.Println(resp)
  449. // }
  450. //
  451. func (c *WAF) DeleteByteMatchSetRequest(input *DeleteByteMatchSetInput) (req *request.Request, output *DeleteByteMatchSetOutput) {
  452. op := &request.Operation{
  453. Name: opDeleteByteMatchSet,
  454. HTTPMethod: "POST",
  455. HTTPPath: "/",
  456. }
  457. if input == nil {
  458. input = &DeleteByteMatchSetInput{}
  459. }
  460. req = c.newRequest(op, input, output)
  461. output = &DeleteByteMatchSetOutput{}
  462. req.Data = output
  463. return
  464. }
  465. // Permanently deletes a ByteMatchSet. You can't delete a ByteMatchSet if it's
  466. // still used in any Rules or if it still includes any ByteMatchTuple objects
  467. // (any filters).
  468. //
  469. // If you just want to remove a ByteMatchSet from a Rule, use UpdateRule.
  470. //
  471. // To permanently delete a ByteMatchSet, perform the following steps:
  472. //
  473. // Update the ByteMatchSet to remove filters, if any. For more information,
  474. // see UpdateByteMatchSet. Use GetChangeToken to get the change token that you
  475. // provide in the ChangeToken parameter of a DeleteByteMatchSet request. Submit
  476. // a DeleteByteMatchSet request.
  477. func (c *WAF) DeleteByteMatchSet(input *DeleteByteMatchSetInput) (*DeleteByteMatchSetOutput, error) {
  478. req, out := c.DeleteByteMatchSetRequest(input)
  479. err := req.Send()
  480. return out, err
  481. }
  482. const opDeleteIPSet = "DeleteIPSet"
  483. // DeleteIPSetRequest generates a "aws/request.Request" representing the
  484. // client's request for the DeleteIPSet operation. The "output" return
  485. // value can be used to capture response data after the request's "Send" method
  486. // is called.
  487. //
  488. // Creating a request object using this method should be used when you want to inject
  489. // custom logic into the request's lifecycle using a custom handler, or if you want to
  490. // access properties on the request object before or after sending the request. If
  491. // you just want the service response, call the DeleteIPSet method directly
  492. // instead.
  493. //
  494. // Note: You must call the "Send" method on the returned request object in order
  495. // to execute the request.
  496. //
  497. // // Example sending a request using the DeleteIPSetRequest method.
  498. // req, resp := client.DeleteIPSetRequest(params)
  499. //
  500. // err := req.Send()
  501. // if err == nil { // resp is now filled
  502. // fmt.Println(resp)
  503. // }
  504. //
  505. func (c *WAF) DeleteIPSetRequest(input *DeleteIPSetInput) (req *request.Request, output *DeleteIPSetOutput) {
  506. op := &request.Operation{
  507. Name: opDeleteIPSet,
  508. HTTPMethod: "POST",
  509. HTTPPath: "/",
  510. }
  511. if input == nil {
  512. input = &DeleteIPSetInput{}
  513. }
  514. req = c.newRequest(op, input, output)
  515. output = &DeleteIPSetOutput{}
  516. req.Data = output
  517. return
  518. }
  519. // Permanently deletes an IPSet. You can't delete an IPSet if it's still used
  520. // in any Rules or if it still includes any IP addresses.
  521. //
  522. // If you just want to remove an IPSet from a Rule, use UpdateRule.
  523. //
  524. // To permanently delete an IPSet from AWS WAF, perform the following steps:
  525. //
  526. // Update the IPSet to remove IP address ranges, if any. For more information,
  527. // see UpdateIPSet. Use GetChangeToken to get the change token that you provide
  528. // in the ChangeToken parameter of a DeleteIPSet request. Submit a DeleteIPSet
  529. // request.
  530. func (c *WAF) DeleteIPSet(input *DeleteIPSetInput) (*DeleteIPSetOutput, error) {
  531. req, out := c.DeleteIPSetRequest(input)
  532. err := req.Send()
  533. return out, err
  534. }
  535. const opDeleteRule = "DeleteRule"
  536. // DeleteRuleRequest generates a "aws/request.Request" representing the
  537. // client's request for the DeleteRule operation. The "output" return
  538. // value can be used to capture response data after the request's "Send" method
  539. // is called.
  540. //
  541. // Creating a request object using this method should be used when you want to inject
  542. // custom logic into the request's lifecycle using a custom handler, or if you want to
  543. // access properties on the request object before or after sending the request. If
  544. // you just want the service response, call the DeleteRule method directly
  545. // instead.
  546. //
  547. // Note: You must call the "Send" method on the returned request object in order
  548. // to execute the request.
  549. //
  550. // // Example sending a request using the DeleteRuleRequest method.
  551. // req, resp := client.DeleteRuleRequest(params)
  552. //
  553. // err := req.Send()
  554. // if err == nil { // resp is now filled
  555. // fmt.Println(resp)
  556. // }
  557. //
  558. func (c *WAF) DeleteRuleRequest(input *DeleteRuleInput) (req *request.Request, output *DeleteRuleOutput) {
  559. op := &request.Operation{
  560. Name: opDeleteRule,
  561. HTTPMethod: "POST",
  562. HTTPPath: "/",
  563. }
  564. if input == nil {
  565. input = &DeleteRuleInput{}
  566. }
  567. req = c.newRequest(op, input, output)
  568. output = &DeleteRuleOutput{}
  569. req.Data = output
  570. return
  571. }
  572. // Permanently deletes a Rule. You can't delete a Rule if it's still used in
  573. // any WebACL objects or if it still includes any predicates, such as ByteMatchSet
  574. // objects.
  575. //
  576. // If you just want to remove a Rule from a WebACL, use UpdateWebACL.
  577. //
  578. // To permanently delete a Rule from AWS WAF, perform the following steps:
  579. //
  580. // Update the Rule to remove predicates, if any. For more information, see
  581. // UpdateRule. Use GetChangeToken to get the change token that you provide in
  582. // the ChangeToken parameter of a DeleteRule request. Submit a DeleteRule request.
  583. func (c *WAF) DeleteRule(input *DeleteRuleInput) (*DeleteRuleOutput, error) {
  584. req, out := c.DeleteRuleRequest(input)
  585. err := req.Send()
  586. return out, err
  587. }
  588. const opDeleteSizeConstraintSet = "DeleteSizeConstraintSet"
  589. // DeleteSizeConstraintSetRequest generates a "aws/request.Request" representing the
  590. // client's request for the DeleteSizeConstraintSet operation. The "output" return
  591. // value can be used to capture response data after the request's "Send" method
  592. // is called.
  593. //
  594. // Creating a request object using this method should be used when you want to inject
  595. // custom logic into the request's lifecycle using a custom handler, or if you want to
  596. // access properties on the request object before or after sending the request. If
  597. // you just want the service response, call the DeleteSizeConstraintSet method directly
  598. // instead.
  599. //
  600. // Note: You must call the "Send" method on the returned request object in order
  601. // to execute the request.
  602. //
  603. // // Example sending a request using the DeleteSizeConstraintSetRequest method.
  604. // req, resp := client.DeleteSizeConstraintSetRequest(params)
  605. //
  606. // err := req.Send()
  607. // if err == nil { // resp is now filled
  608. // fmt.Println(resp)
  609. // }
  610. //
  611. func (c *WAF) DeleteSizeConstraintSetRequest(input *DeleteSizeConstraintSetInput) (req *request.Request, output *DeleteSizeConstraintSetOutput) {
  612. op := &request.Operation{
  613. Name: opDeleteSizeConstraintSet,
  614. HTTPMethod: "POST",
  615. HTTPPath: "/",
  616. }
  617. if input == nil {
  618. input = &DeleteSizeConstraintSetInput{}
  619. }
  620. req = c.newRequest(op, input, output)
  621. output = &DeleteSizeConstraintSetOutput{}
  622. req.Data = output
  623. return
  624. }
  625. // Permanently deletes a SizeConstraintSet. You can't delete a SizeConstraintSet
  626. // if it's still used in any Rules or if it still includes any SizeConstraint
  627. // objects (any filters).
  628. //
  629. // If you just want to remove a SizeConstraintSet from a Rule, use UpdateRule.
  630. //
  631. // To permanently delete a SizeConstraintSet, perform the following steps:
  632. //
  633. // Update the SizeConstraintSet to remove filters, if any. For more information,
  634. // see UpdateSizeConstraintSet. Use GetChangeToken to get the change token that
  635. // you provide in the ChangeToken parameter of a DeleteSizeConstraintSet request.
  636. // Submit a DeleteSizeConstraintSet request.
  637. func (c *WAF) DeleteSizeConstraintSet(input *DeleteSizeConstraintSetInput) (*DeleteSizeConstraintSetOutput, error) {
  638. req, out := c.DeleteSizeConstraintSetRequest(input)
  639. err := req.Send()
  640. return out, err
  641. }
  642. const opDeleteSqlInjectionMatchSet = "DeleteSqlInjectionMatchSet"
  643. // DeleteSqlInjectionMatchSetRequest generates a "aws/request.Request" representing the
  644. // client's request for the DeleteSqlInjectionMatchSet operation. The "output" return
  645. // value can be used to capture response data after the request's "Send" method
  646. // is called.
  647. //
  648. // Creating a request object using this method should be used when you want to inject
  649. // custom logic into the request's lifecycle using a custom handler, or if you want to
  650. // access properties on the request object before or after sending the request. If
  651. // you just want the service response, call the DeleteSqlInjectionMatchSet method directly
  652. // instead.
  653. //
  654. // Note: You must call the "Send" method on the returned request object in order
  655. // to execute the request.
  656. //
  657. // // Example sending a request using the DeleteSqlInjectionMatchSetRequest method.
  658. // req, resp := client.DeleteSqlInjectionMatchSetRequest(params)
  659. //
  660. // err := req.Send()
  661. // if err == nil { // resp is now filled
  662. // fmt.Println(resp)
  663. // }
  664. //
  665. func (c *WAF) DeleteSqlInjectionMatchSetRequest(input *DeleteSqlInjectionMatchSetInput) (req *request.Request, output *DeleteSqlInjectionMatchSetOutput) {
  666. op := &request.Operation{
  667. Name: opDeleteSqlInjectionMatchSet,
  668. HTTPMethod: "POST",
  669. HTTPPath: "/",
  670. }
  671. if input == nil {
  672. input = &DeleteSqlInjectionMatchSetInput{}
  673. }
  674. req = c.newRequest(op, input, output)
  675. output = &DeleteSqlInjectionMatchSetOutput{}
  676. req.Data = output
  677. return
  678. }
  679. // Permanently deletes a SqlInjectionMatchSet. You can't delete a SqlInjectionMatchSet
  680. // if it's still used in any Rules or if it still contains any SqlInjectionMatchTuple
  681. // objects.
  682. //
  683. // If you just want to remove a SqlInjectionMatchSet from a Rule, use UpdateRule.
  684. //
  685. // To permanently delete a SqlInjectionMatchSet from AWS WAF, perform the following
  686. // steps:
  687. //
  688. // Update the SqlInjectionMatchSet to remove filters, if any. For more information,
  689. // see UpdateSqlInjectionMatchSet. Use GetChangeToken to get the change token
  690. // that you provide in the ChangeToken parameter of a DeleteSqlInjectionMatchSet
  691. // request. Submit a DeleteSqlInjectionMatchSet request.
  692. func (c *WAF) DeleteSqlInjectionMatchSet(input *DeleteSqlInjectionMatchSetInput) (*DeleteSqlInjectionMatchSetOutput, error) {
  693. req, out := c.DeleteSqlInjectionMatchSetRequest(input)
  694. err := req.Send()
  695. return out, err
  696. }
  697. const opDeleteWebACL = "DeleteWebACL"
  698. // DeleteWebACLRequest generates a "aws/request.Request" representing the
  699. // client's request for the DeleteWebACL operation. The "output" return
  700. // value can be used to capture response data after the request's "Send" method
  701. // is called.
  702. //
  703. // Creating a request object using this method should be used when you want to inject
  704. // custom logic into the request's lifecycle using a custom handler, or if you want to
  705. // access properties on the request object before or after sending the request. If
  706. // you just want the service response, call the DeleteWebACL method directly
  707. // instead.
  708. //
  709. // Note: You must call the "Send" method on the returned request object in order
  710. // to execute the request.
  711. //
  712. // // Example sending a request using the DeleteWebACLRequest method.
  713. // req, resp := client.DeleteWebACLRequest(params)
  714. //
  715. // err := req.Send()
  716. // if err == nil { // resp is now filled
  717. // fmt.Println(resp)
  718. // }
  719. //
  720. func (c *WAF) DeleteWebACLRequest(input *DeleteWebACLInput) (req *request.Request, output *DeleteWebACLOutput) {
  721. op := &request.Operation{
  722. Name: opDeleteWebACL,
  723. HTTPMethod: "POST",
  724. HTTPPath: "/",
  725. }
  726. if input == nil {
  727. input = &DeleteWebACLInput{}
  728. }
  729. req = c.newRequest(op, input, output)
  730. output = &DeleteWebACLOutput{}
  731. req.Data = output
  732. return
  733. }
  734. // Permanently deletes a WebACL. You can't delete a WebACL if it still contains
  735. // any Rules.
  736. //
  737. // To delete a WebACL, perform the following steps:
  738. //
  739. // Update the WebACL to remove Rules, if any. For more information, see UpdateWebACL.
  740. // Use GetChangeToken to get the change token that you provide in the ChangeToken
  741. // parameter of a DeleteWebACL request. Submit a DeleteWebACL request.
  742. func (c *WAF) DeleteWebACL(input *DeleteWebACLInput) (*DeleteWebACLOutput, error) {
  743. req, out := c.DeleteWebACLRequest(input)
  744. err := req.Send()
  745. return out, err
  746. }
  747. const opDeleteXssMatchSet = "DeleteXssMatchSet"
  748. // DeleteXssMatchSetRequest generates a "aws/request.Request" representing the
  749. // client's request for the DeleteXssMatchSet operation. The "output" return
  750. // value can be used to capture response data after the request's "Send" method
  751. // is called.
  752. //
  753. // Creating a request object using this method should be used when you want to inject
  754. // custom logic into the request's lifecycle using a custom handler, or if you want to
  755. // access properties on the request object before or after sending the request. If
  756. // you just want the service response, call the DeleteXssMatchSet method directly
  757. // instead.
  758. //
  759. // Note: You must call the "Send" method on the returned request object in order
  760. // to execute the request.
  761. //
  762. // // Example sending a request using the DeleteXssMatchSetRequest method.
  763. // req, resp := client.DeleteXssMatchSetRequest(params)
  764. //
  765. // err := req.Send()
  766. // if err == nil { // resp is now filled
  767. // fmt.Println(resp)
  768. // }
  769. //
  770. func (c *WAF) DeleteXssMatchSetRequest(input *DeleteXssMatchSetInput) (req *request.Request, output *DeleteXssMatchSetOutput) {
  771. op := &request.Operation{
  772. Name: opDeleteXssMatchSet,
  773. HTTPMethod: "POST",
  774. HTTPPath: "/",
  775. }
  776. if input == nil {
  777. input = &DeleteXssMatchSetInput{}
  778. }
  779. req = c.newRequest(op, input, output)
  780. output = &DeleteXssMatchSetOutput{}
  781. req.Data = output
  782. return
  783. }
  784. // Permanently deletes an XssMatchSet. You can't delete an XssMatchSet if it's
  785. // still used in any Rules or if it still contains any XssMatchTuple objects.
  786. //
  787. // If you just want to remove an XssMatchSet from a Rule, use UpdateRule.
  788. //
  789. // To permanently delete an XssMatchSet from AWS WAF, perform the following
  790. // steps:
  791. //
  792. // Update the XssMatchSet to remove filters, if any. For more information,
  793. // see UpdateXssMatchSet. Use GetChangeToken to get the change token that you
  794. // provide in the ChangeToken parameter of a DeleteXssMatchSet request. Submit
  795. // a DeleteXssMatchSet request.
  796. func (c *WAF) DeleteXssMatchSet(input *DeleteXssMatchSetInput) (*DeleteXssMatchSetOutput, error) {
  797. req, out := c.DeleteXssMatchSetRequest(input)
  798. err := req.Send()
  799. return out, err
  800. }
  801. const opGetByteMatchSet = "GetByteMatchSet"
  802. // GetByteMatchSetRequest generates a "aws/request.Request" representing the
  803. // client's request for the GetByteMatchSet operation. The "output" return
  804. // value can be used to capture response data after the request's "Send" method
  805. // is called.
  806. //
  807. // Creating a request object using this method should be used when you want to inject
  808. // custom logic into the request's lifecycle using a custom handler, or if you want to
  809. // access properties on the request object before or after sending the request. If
  810. // you just want the service response, call the GetByteMatchSet method directly
  811. // instead.
  812. //
  813. // Note: You must call the "Send" method on the returned request object in order
  814. // to execute the request.
  815. //
  816. // // Example sending a request using the GetByteMatchSetRequest method.
  817. // req, resp := client.GetByteMatchSetRequest(params)
  818. //
  819. // err := req.Send()
  820. // if err == nil { // resp is now filled
  821. // fmt.Println(resp)
  822. // }
  823. //
  824. func (c *WAF) GetByteMatchSetRequest(input *GetByteMatchSetInput) (req *request.Request, output *GetByteMatchSetOutput) {
  825. op := &request.Operation{
  826. Name: opGetByteMatchSet,
  827. HTTPMethod: "POST",
  828. HTTPPath: "/",
  829. }
  830. if input == nil {
  831. input = &GetByteMatchSetInput{}
  832. }
  833. req = c.newRequest(op, input, output)
  834. output = &GetByteMatchSetOutput{}
  835. req.Data = output
  836. return
  837. }
  838. // Returns the ByteMatchSet specified by ByteMatchSetId.
  839. func (c *WAF) GetByteMatchSet(input *GetByteMatchSetInput) (*GetByteMatchSetOutput, error) {
  840. req, out := c.GetByteMatchSetRequest(input)
  841. err := req.Send()
  842. return out, err
  843. }
  844. const opGetChangeToken = "GetChangeToken"
  845. // GetChangeTokenRequest generates a "aws/request.Request" representing the
  846. // client's request for the GetChangeToken operation. The "output" return
  847. // value can be used to capture response data after the request's "Send" method
  848. // is called.
  849. //
  850. // Creating a request object using this method should be used when you want to inject
  851. // custom logic into the request's lifecycle using a custom handler, or if you want to
  852. // access properties on the request object before or after sending the request. If
  853. // you just want the service response, call the GetChangeToken method directly
  854. // instead.
  855. //
  856. // Note: You must call the "Send" method on the returned request object in order
  857. // to execute the request.
  858. //
  859. // // Example sending a request using the GetChangeTokenRequest method.
  860. // req, resp := client.GetChangeTokenRequest(params)
  861. //
  862. // err := req.Send()
  863. // if err == nil { // resp is now filled
  864. // fmt.Println(resp)
  865. // }
  866. //
  867. func (c *WAF) GetChangeTokenRequest(input *GetChangeTokenInput) (req *request.Request, output *GetChangeTokenOutput) {
  868. op := &request.Operation{
  869. Name: opGetChangeToken,
  870. HTTPMethod: "POST",
  871. HTTPPath: "/",
  872. }
  873. if input == nil {
  874. input = &GetChangeTokenInput{}
  875. }
  876. req = c.newRequest(op, input, output)
  877. output = &GetChangeTokenOutput{}
  878. req.Data = output
  879. return
  880. }
  881. // When you want to create, update, or delete AWS WAF objects, get a change
  882. // token and include the change token in the create, update, or delete request.
  883. // Change tokens ensure that your application doesn't submit conflicting requests
  884. // to AWS WAF.
  885. //
  886. // Each create, update, or delete request must use a unique change token. If
  887. // your application submits a GetChangeToken request and then submits a second
  888. // GetChangeToken request before submitting a create, update, or delete request,
  889. // the second GetChangeToken request returns the same value as the first GetChangeToken
  890. // request.
  891. //
  892. // When you use a change token in a create, update, or delete request, the
  893. // status of the change token changes to PENDING, which indicates that AWS WAF
  894. // is propagating the change to all AWS WAF servers. Use GetChangeTokenStatus
  895. // to determine the status of your change token.
  896. func (c *WAF) GetChangeToken(input *GetChangeTokenInput) (*GetChangeTokenOutput, error) {
  897. req, out := c.GetChangeTokenRequest(input)
  898. err := req.Send()
  899. return out, err
  900. }
  901. const opGetChangeTokenStatus = "GetChangeTokenStatus"
  902. // GetChangeTokenStatusRequest generates a "aws/request.Request" representing the
  903. // client's request for the GetChangeTokenStatus operation. The "output" return
  904. // value can be used to capture response data after the request's "Send" method
  905. // is called.
  906. //
  907. // Creating a request object using this method should be used when you want to inject
  908. // custom logic into the request's lifecycle using a custom handler, or if you want to
  909. // access properties on the request object before or after sending the request. If
  910. // you just want the service response, call the GetChangeTokenStatus method directly
  911. // instead.
  912. //
  913. // Note: You must call the "Send" method on the returned request object in order
  914. // to execute the request.
  915. //
  916. // // Example sending a request using the GetChangeTokenStatusRequest method.
  917. // req, resp := client.GetChangeTokenStatusRequest(params)
  918. //
  919. // err := req.Send()
  920. // if err == nil { // resp is now filled
  921. // fmt.Println(resp)
  922. // }
  923. //
  924. func (c *WAF) GetChangeTokenStatusRequest(input *GetChangeTokenStatusInput) (req *request.Request, output *GetChangeTokenStatusOutput) {
  925. op := &request.Operation{
  926. Name: opGetChangeTokenStatus,
  927. HTTPMethod: "POST",
  928. HTTPPath: "/",
  929. }
  930. if input == nil {
  931. input = &GetChangeTokenStatusInput{}
  932. }
  933. req = c.newRequest(op, input, output)
  934. output = &GetChangeTokenStatusOutput{}
  935. req.Data = output
  936. return
  937. }
  938. // Returns the status of a ChangeToken that you got by calling GetChangeToken.
  939. // ChangeTokenStatus is one of the following values:
  940. //
  941. // PROVISIONED: You requested the change token by calling GetChangeToken,
  942. // but you haven't used it yet in a call to create, update, or delete an AWS
  943. // WAF object. PENDING: AWS WAF is propagating the create, update, or delete
  944. // request to all AWS WAF servers. IN_SYNC: Propagation is complete.
  945. func (c *WAF) GetChangeTokenStatus(input *GetChangeTokenStatusInput) (*GetChangeTokenStatusOutput, error) {
  946. req, out := c.GetChangeTokenStatusRequest(input)
  947. err := req.Send()
  948. return out, err
  949. }
  950. const opGetIPSet = "GetIPSet"
  951. // GetIPSetRequest generates a "aws/request.Request" representing the
  952. // client's request for the GetIPSet operation. The "output" return
  953. // value can be used to capture response data after the request's "Send" method
  954. // is called.
  955. //
  956. // Creating a request object using this method should be used when you want to inject
  957. // custom logic into the request's lifecycle using a custom handler, or if you want to
  958. // access properties on the request object before or after sending the request. If
  959. // you just want the service response, call the GetIPSet method directly
  960. // instead.
  961. //
  962. // Note: You must call the "Send" method on the returned request object in order
  963. // to execute the request.
  964. //
  965. // // Example sending a request using the GetIPSetRequest method.
  966. // req, resp := client.GetIPSetRequest(params)
  967. //
  968. // err := req.Send()
  969. // if err == nil { // resp is now filled
  970. // fmt.Println(resp)
  971. // }
  972. //
  973. func (c *WAF) GetIPSetRequest(input *GetIPSetInput) (req *request.Request, output *GetIPSetOutput) {
  974. op := &request.Operation{
  975. Name: opGetIPSet,
  976. HTTPMethod: "POST",
  977. HTTPPath: "/",
  978. }
  979. if input == nil {
  980. input = &GetIPSetInput{}
  981. }
  982. req = c.newRequest(op, input, output)
  983. output = &GetIPSetOutput{}
  984. req.Data = output
  985. return
  986. }
  987. // Returns the IPSet that is specified by IPSetId.
  988. func (c *WAF) GetIPSet(input *GetIPSetInput) (*GetIPSetOutput, error) {
  989. req, out := c.GetIPSetRequest(input)
  990. err := req.Send()
  991. return out, err
  992. }
  993. const opGetRule = "GetRule"
  994. // GetRuleRequest generates a "aws/request.Request" representing the
  995. // client's request for the GetRule operation. The "output" return
  996. // value can be used to capture response data after the request's "Send" method
  997. // is called.
  998. //
  999. // Creating a request object using this method should be used when you want to inject
  1000. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1001. // access properties on the request object before or after sending the request. If
  1002. // you just want the service response, call the GetRule method directly
  1003. // instead.
  1004. //
  1005. // Note: You must call the "Send" method on the returned request object in order
  1006. // to execute the request.
  1007. //
  1008. // // Example sending a request using the GetRuleRequest method.
  1009. // req, resp := client.GetRuleRequest(params)
  1010. //
  1011. // err := req.Send()
  1012. // if err == nil { // resp is now filled
  1013. // fmt.Println(resp)
  1014. // }
  1015. //
  1016. func (c *WAF) GetRuleRequest(input *GetRuleInput) (req *request.Request, output *GetRuleOutput) {
  1017. op := &request.Operation{
  1018. Name: opGetRule,
  1019. HTTPMethod: "POST",
  1020. HTTPPath: "/",
  1021. }
  1022. if input == nil {
  1023. input = &GetRuleInput{}
  1024. }
  1025. req = c.newRequest(op, input, output)
  1026. output = &GetRuleOutput{}
  1027. req.Data = output
  1028. return
  1029. }
  1030. // Returns the Rule that is specified by the RuleId that you included in the
  1031. // GetRule request.
  1032. func (c *WAF) GetRule(input *GetRuleInput) (*GetRuleOutput, error) {
  1033. req, out := c.GetRuleRequest(input)
  1034. err := req.Send()
  1035. return out, err
  1036. }
  1037. const opGetSampledRequests = "GetSampledRequests"
  1038. // GetSampledRequestsRequest generates a "aws/request.Request" representing the
  1039. // client's request for the GetSampledRequests operation. The "output" return
  1040. // value can be used to capture response data after the request's "Send" method
  1041. // is called.
  1042. //
  1043. // Creating a request object using this method should be used when you want to inject
  1044. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1045. // access properties on the request object before or after sending the request. If
  1046. // you just want the service response, call the GetSampledRequests method directly
  1047. // instead.
  1048. //
  1049. // Note: You must call the "Send" method on the returned request object in order
  1050. // to execute the request.
  1051. //
  1052. // // Example sending a request using the GetSampledRequestsRequest method.
  1053. // req, resp := client.GetSampledRequestsRequest(params)
  1054. //
  1055. // err := req.Send()
  1056. // if err == nil { // resp is now filled
  1057. // fmt.Println(resp)
  1058. // }
  1059. //
  1060. func (c *WAF) GetSampledRequestsRequest(input *GetSampledRequestsInput) (req *request.Request, output *GetSampledRequestsOutput) {
  1061. op := &request.Operation{
  1062. Name: opGetSampledRequests,
  1063. HTTPMethod: "POST",
  1064. HTTPPath: "/",
  1065. }
  1066. if input == nil {
  1067. input = &GetSampledRequestsInput{}
  1068. }
  1069. req = c.newRequest(op, input, output)
  1070. output = &GetSampledRequestsOutput{}
  1071. req.Data = output
  1072. return
  1073. }
  1074. // Gets detailed information about a specified number of requests--a sample--that
  1075. // AWS WAF randomly selects from among the first 5,000 requests that your AWS
  1076. // resource received during a time range that you choose. You can specify a
  1077. // sample size of up to 100 requests, and you can specify any time range in
  1078. // the previous three hours.
  1079. //
  1080. // GetSampledRequests returns a time range, which is usually the time range
  1081. // that you specified. However, if your resource (such as a CloudFront distribution)
  1082. // received 5,000 requests before the specified time range elapsed, GetSampledRequests
  1083. // returns an updated time range. This new time range indicates the actual period
  1084. // during which AWS WAF selected the requests in the sample.
  1085. func (c *WAF) GetSampledRequests(input *GetSampledRequestsInput) (*GetSampledRequestsOutput, error) {
  1086. req, out := c.GetSampledRequestsRequest(input)
  1087. err := req.Send()
  1088. return out, err
  1089. }
  1090. const opGetSizeConstraintSet = "GetSizeConstraintSet"
  1091. // GetSizeConstraintSetRequest generates a "aws/request.Request" representing the
  1092. // client's request for the GetSizeConstraintSet operation. The "output" return
  1093. // value can be used to capture response data after the request's "Send" method
  1094. // is called.
  1095. //
  1096. // Creating a request object using this method should be used when you want to inject
  1097. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1098. // access properties on the request object before or after sending the request. If
  1099. // you just want the service response, call the GetSizeConstraintSet method directly
  1100. // instead.
  1101. //
  1102. // Note: You must call the "Send" method on the returned request object in order
  1103. // to execute the request.
  1104. //
  1105. // // Example sending a request using the GetSizeConstraintSetRequest method.
  1106. // req, resp := client.GetSizeConstraintSetRequest(params)
  1107. //
  1108. // err := req.Send()
  1109. // if err == nil { // resp is now filled
  1110. // fmt.Println(resp)
  1111. // }
  1112. //
  1113. func (c *WAF) GetSizeConstraintSetRequest(input *GetSizeConstraintSetInput) (req *request.Request, output *GetSizeConstraintSetOutput) {
  1114. op := &request.Operation{
  1115. Name: opGetSizeConstraintSet,
  1116. HTTPMethod: "POST",
  1117. HTTPPath: "/",
  1118. }
  1119. if input == nil {
  1120. input = &GetSizeConstraintSetInput{}
  1121. }
  1122. req = c.newRequest(op, input, output)
  1123. output = &GetSizeConstraintSetOutput{}
  1124. req.Data = output
  1125. return
  1126. }
  1127. // Returns the SizeConstraintSet specified by SizeConstraintSetId.
  1128. func (c *WAF) GetSizeConstraintSet(input *GetSizeConstraintSetInput) (*GetSizeConstraintSetOutput, error) {
  1129. req, out := c.GetSizeConstraintSetRequest(input)
  1130. err := req.Send()
  1131. return out, err
  1132. }
  1133. const opGetSqlInjectionMatchSet = "GetSqlInjectionMatchSet"
  1134. // GetSqlInjectionMatchSetRequest generates a "aws/request.Request" representing the
  1135. // client's request for the GetSqlInjectionMatchSet operation. The "output" return
  1136. // value can be used to capture response data after the request's "Send" method
  1137. // is called.
  1138. //
  1139. // Creating a request object using this method should be used when you want to inject
  1140. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1141. // access properties on the request object before or after sending the request. If
  1142. // you just want the service response, call the GetSqlInjectionMatchSet method directly
  1143. // instead.
  1144. //
  1145. // Note: You must call the "Send" method on the returned request object in order
  1146. // to execute the request.
  1147. //
  1148. // // Example sending a request using the GetSqlInjectionMatchSetRequest method.
  1149. // req, resp := client.GetSqlInjectionMatchSetRequest(params)
  1150. //
  1151. // err := req.Send()
  1152. // if err == nil { // resp is now filled
  1153. // fmt.Println(resp)
  1154. // }
  1155. //
  1156. func (c *WAF) GetSqlInjectionMatchSetRequest(input *GetSqlInjectionMatchSetInput) (req *request.Request, output *GetSqlInjectionMatchSetOutput) {
  1157. op := &request.Operation{
  1158. Name: opGetSqlInjectionMatchSet,
  1159. HTTPMethod: "POST",
  1160. HTTPPath: "/",
  1161. }
  1162. if input == nil {
  1163. input = &GetSqlInjectionMatchSetInput{}
  1164. }
  1165. req = c.newRequest(op, input, output)
  1166. output = &GetSqlInjectionMatchSetOutput{}
  1167. req.Data = output
  1168. return
  1169. }
  1170. // Returns the SqlInjectionMatchSet that is specified by SqlInjectionMatchSetId.
  1171. func (c *WAF) GetSqlInjectionMatchSet(input *GetSqlInjectionMatchSetInput) (*GetSqlInjectionMatchSetOutput, error) {
  1172. req, out := c.GetSqlInjectionMatchSetRequest(input)
  1173. err := req.Send()
  1174. return out, err
  1175. }
  1176. const opGetWebACL = "GetWebACL"
  1177. // GetWebACLRequest generates a "aws/request.Request" representing the
  1178. // client's request for the GetWebACL operation. The "output" return
  1179. // value can be used to capture response data after the request's "Send" method
  1180. // is called.
  1181. //
  1182. // Creating a request object using this method should be used when you want to inject
  1183. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1184. // access properties on the request object before or after sending the request. If
  1185. // you just want the service response, call the GetWebACL method directly
  1186. // instead.
  1187. //
  1188. // Note: You must call the "Send" method on the returned request object in order
  1189. // to execute the request.
  1190. //
  1191. // // Example sending a request using the GetWebACLRequest method.
  1192. // req, resp := client.GetWebACLRequest(params)
  1193. //
  1194. // err := req.Send()
  1195. // if err == nil { // resp is now filled
  1196. // fmt.Println(resp)
  1197. // }
  1198. //
  1199. func (c *WAF) GetWebACLRequest(input *GetWebACLInput) (req *request.Request, output *GetWebACLOutput) {
  1200. op := &request.Operation{
  1201. Name: opGetWebACL,
  1202. HTTPMethod: "POST",
  1203. HTTPPath: "/",
  1204. }
  1205. if input == nil {
  1206. input = &GetWebACLInput{}
  1207. }
  1208. req = c.newRequest(op, input, output)
  1209. output = &GetWebACLOutput{}
  1210. req.Data = output
  1211. return
  1212. }
  1213. // Returns the WebACL that is specified by WebACLId.
  1214. func (c *WAF) GetWebACL(input *GetWebACLInput) (*GetWebACLOutput, error) {
  1215. req, out := c.GetWebACLRequest(input)
  1216. err := req.Send()
  1217. return out, err
  1218. }
  1219. const opGetXssMatchSet = "GetXssMatchSet"
  1220. // GetXssMatchSetRequest generates a "aws/request.Request" representing the
  1221. // client's request for the GetXssMatchSet operation. The "output" return
  1222. // value can be used to capture response data after the request's "Send" method
  1223. // is called.
  1224. //
  1225. // Creating a request object using this method should be used when you want to inject
  1226. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1227. // access properties on the request object before or after sending the request. If
  1228. // you just want the service response, call the GetXssMatchSet method directly
  1229. // instead.
  1230. //
  1231. // Note: You must call the "Send" method on the returned request object in order
  1232. // to execute the request.
  1233. //
  1234. // // Example sending a request using the GetXssMatchSetRequest method.
  1235. // req, resp := client.GetXssMatchSetRequest(params)
  1236. //
  1237. // err := req.Send()
  1238. // if err == nil { // resp is now filled
  1239. // fmt.Println(resp)
  1240. // }
  1241. //
  1242. func (c *WAF) GetXssMatchSetRequest(input *GetXssMatchSetInput) (req *request.Request, output *GetXssMatchSetOutput) {
  1243. op := &request.Operation{
  1244. Name: opGetXssMatchSet,
  1245. HTTPMethod: "POST",
  1246. HTTPPath: "/",
  1247. }
  1248. if input == nil {
  1249. input = &GetXssMatchSetInput{}
  1250. }
  1251. req = c.newRequest(op, input, output)
  1252. output = &GetXssMatchSetOutput{}
  1253. req.Data = output
  1254. return
  1255. }
  1256. // Returns the XssMatchSet that is specified by XssMatchSetId.
  1257. func (c *WAF) GetXssMatchSet(input *GetXssMatchSetInput) (*GetXssMatchSetOutput, error) {
  1258. req, out := c.GetXssMatchSetRequest(input)
  1259. err := req.Send()
  1260. return out, err
  1261. }
  1262. const opListByteMatchSets = "ListByteMatchSets"
  1263. // ListByteMatchSetsRequest generates a "aws/request.Request" representing the
  1264. // client's request for the ListByteMatchSets operation. The "output" return
  1265. // value can be used to capture response data after the request's "Send" method
  1266. // is called.
  1267. //
  1268. // Creating a request object using this method should be used when you want to inject
  1269. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1270. // access properties on the request object before or after sending the request. If
  1271. // you just want the service response, call the ListByteMatchSets method directly
  1272. // instead.
  1273. //
  1274. // Note: You must call the "Send" method on the returned request object in order
  1275. // to execute the request.
  1276. //
  1277. // // Example sending a request using the ListByteMatchSetsRequest method.
  1278. // req, resp := client.ListByteMatchSetsRequest(params)
  1279. //
  1280. // err := req.Send()
  1281. // if err == nil { // resp is now filled
  1282. // fmt.Println(resp)
  1283. // }
  1284. //
  1285. func (c *WAF) ListByteMatchSetsRequest(input *ListByteMatchSetsInput) (req *request.Request, output *ListByteMatchSetsOutput) {
  1286. op := &request.Operation{
  1287. Name: opListByteMatchSets,
  1288. HTTPMethod: "POST",
  1289. HTTPPath: "/",
  1290. }
  1291. if input == nil {
  1292. input = &ListByteMatchSetsInput{}
  1293. }
  1294. req = c.newRequest(op, input, output)
  1295. output = &ListByteMatchSetsOutput{}
  1296. req.Data = output
  1297. return
  1298. }
  1299. // Returns an array of ByteMatchSetSummary objects.
  1300. func (c *WAF) ListByteMatchSets(input *ListByteMatchSetsInput) (*ListByteMatchSetsOutput, error) {
  1301. req, out := c.ListByteMatchSetsRequest(input)
  1302. err := req.Send()
  1303. return out, err
  1304. }
  1305. const opListIPSets = "ListIPSets"
  1306. // ListIPSetsRequest generates a "aws/request.Request" representing the
  1307. // client's request for the ListIPSets operation. The "output" return
  1308. // value can be used to capture response data after the request's "Send" method
  1309. // is called.
  1310. //
  1311. // Creating a request object using this method should be used when you want to inject
  1312. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1313. // access properties on the request object before or after sending the request. If
  1314. // you just want the service response, call the ListIPSets method directly
  1315. // instead.
  1316. //
  1317. // Note: You must call the "Send" method on the returned request object in order
  1318. // to execute the request.
  1319. //
  1320. // // Example sending a request using the ListIPSetsRequest method.
  1321. // req, resp := client.ListIPSetsRequest(params)
  1322. //
  1323. // err := req.Send()
  1324. // if err == nil { // resp is now filled
  1325. // fmt.Println(resp)
  1326. // }
  1327. //
  1328. func (c *WAF) ListIPSetsRequest(input *ListIPSetsInput) (req *request.Request, output *ListIPSetsOutput) {
  1329. op := &request.Operation{
  1330. Name: opListIPSets,
  1331. HTTPMethod: "POST",
  1332. HTTPPath: "/",
  1333. }
  1334. if input == nil {
  1335. input = &ListIPSetsInput{}
  1336. }
  1337. req = c.newRequest(op, input, output)
  1338. output = &ListIPSetsOutput{}
  1339. req.Data = output
  1340. return
  1341. }
  1342. // Returns an array of IPSetSummary objects in the response.
  1343. func (c *WAF) ListIPSets(input *ListIPSetsInput) (*ListIPSetsOutput, error) {
  1344. req, out := c.ListIPSetsRequest(input)
  1345. err := req.Send()
  1346. return out, err
  1347. }
  1348. const opListRules = "ListRules"
  1349. // ListRulesRequest generates a "aws/request.Request" representing the
  1350. // client's request for the ListRules operation. The "output" return
  1351. // value can be used to capture response data after the request's "Send" method
  1352. // is called.
  1353. //
  1354. // Creating a request object using this method should be used when you want to inject
  1355. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1356. // access properties on the request object before or after sending the request. If
  1357. // you just want the service response, call the ListRules method directly
  1358. // instead.
  1359. //
  1360. // Note: You must call the "Send" method on the returned request object in order
  1361. // to execute the request.
  1362. //
  1363. // // Example sending a request using the ListRulesRequest method.
  1364. // req, resp := client.ListRulesRequest(params)
  1365. //
  1366. // err := req.Send()
  1367. // if err == nil { // resp is now filled
  1368. // fmt.Println(resp)
  1369. // }
  1370. //
  1371. func (c *WAF) ListRulesRequest(input *ListRulesInput) (req *request.Request, output *ListRulesOutput) {
  1372. op := &request.Operation{
  1373. Name: opListRules,
  1374. HTTPMethod: "POST",
  1375. HTTPPath: "/",
  1376. }
  1377. if input == nil {
  1378. input = &ListRulesInput{}
  1379. }
  1380. req = c.newRequest(op, input, output)
  1381. output = &ListRulesOutput{}
  1382. req.Data = output
  1383. return
  1384. }
  1385. // Returns an array of RuleSummary objects.
  1386. func (c *WAF) ListRules(input *ListRulesInput) (*ListRulesOutput, error) {
  1387. req, out := c.ListRulesRequest(input)
  1388. err := req.Send()
  1389. return out, err
  1390. }
  1391. const opListSizeConstraintSets = "ListSizeConstraintSets"
  1392. // ListSizeConstraintSetsRequest generates a "aws/request.Request" representing the
  1393. // client's request for the ListSizeConstraintSets operation. The "output" return
  1394. // value can be used to capture response data after the request's "Send" method
  1395. // is called.
  1396. //
  1397. // Creating a request object using this method should be used when you want to inject
  1398. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1399. // access properties on the request object before or after sending the request. If
  1400. // you just want the service response, call the ListSizeConstraintSets method directly
  1401. // instead.
  1402. //
  1403. // Note: You must call the "Send" method on the returned request object in order
  1404. // to execute the request.
  1405. //
  1406. // // Example sending a request using the ListSizeConstraintSetsRequest method.
  1407. // req, resp := client.ListSizeConstraintSetsRequest(params)
  1408. //
  1409. // err := req.Send()
  1410. // if err == nil { // resp is now filled
  1411. // fmt.Println(resp)
  1412. // }
  1413. //
  1414. func (c *WAF) ListSizeConstraintSetsRequest(input *ListSizeConstraintSetsInput) (req *request.Request, output *ListSizeConstraintSetsOutput) {
  1415. op := &request.Operation{
  1416. Name: opListSizeConstraintSets,
  1417. HTTPMethod: "POST",
  1418. HTTPPath: "/",
  1419. }
  1420. if input == nil {
  1421. input = &ListSizeConstraintSetsInput{}
  1422. }
  1423. req = c.newRequest(op, input, output)
  1424. output = &ListSizeConstraintSetsOutput{}
  1425. req.Data = output
  1426. return
  1427. }
  1428. // Returns an array of SizeConstraintSetSummary objects.
  1429. func (c *WAF) ListSizeConstraintSets(input *ListSizeConstraintSetsInput) (*ListSizeConstraintSetsOutput, error) {
  1430. req, out := c.ListSizeConstraintSetsRequest(input)
  1431. err := req.Send()
  1432. return out, err
  1433. }
  1434. const opListSqlInjectionMatchSets = "ListSqlInjectionMatchSets"
  1435. // ListSqlInjectionMatchSetsRequest generates a "aws/request.Request" representing the
  1436. // client's request for the ListSqlInjectionMatchSets operation. The "output" return
  1437. // value can be used to capture response data after the request's "Send" method
  1438. // is called.
  1439. //
  1440. // Creating a request object using this method should be used when you want to inject
  1441. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1442. // access properties on the request object before or after sending the request. If
  1443. // you just want the service response, call the ListSqlInjectionMatchSets method directly
  1444. // instead.
  1445. //
  1446. // Note: You must call the "Send" method on the returned request object in order
  1447. // to execute the request.
  1448. //
  1449. // // Example sending a request using the ListSqlInjectionMatchSetsRequest method.
  1450. // req, resp := client.ListSqlInjectionMatchSetsRequest(params)
  1451. //
  1452. // err := req.Send()
  1453. // if err == nil { // resp is now filled
  1454. // fmt.Println(resp)
  1455. // }
  1456. //
  1457. func (c *WAF) ListSqlInjectionMatchSetsRequest(input *ListSqlInjectionMatchSetsInput) (req *request.Request, output *ListSqlInjectionMatchSetsOutput) {
  1458. op := &request.Operation{
  1459. Name: opListSqlInjectionMatchSets,
  1460. HTTPMethod: "POST",
  1461. HTTPPath: "/",
  1462. }
  1463. if input == nil {
  1464. input = &ListSqlInjectionMatchSetsInput{}
  1465. }
  1466. req = c.newRequest(op, input, output)
  1467. output = &ListSqlInjectionMatchSetsOutput{}
  1468. req.Data = output
  1469. return
  1470. }
  1471. // Returns an array of SqlInjectionMatchSet objects.
  1472. func (c *WAF) ListSqlInjectionMatchSets(input *ListSqlInjectionMatchSetsInput) (*ListSqlInjectionMatchSetsOutput, error) {
  1473. req, out := c.ListSqlInjectionMatchSetsRequest(input)
  1474. err := req.Send()
  1475. return out, err
  1476. }
  1477. const opListWebACLs = "ListWebACLs"
  1478. // ListWebACLsRequest generates a "aws/request.Request" representing the
  1479. // client's request for the ListWebACLs operation. The "output" return
  1480. // value can be used to capture response data after the request's "Send" method
  1481. // is called.
  1482. //
  1483. // Creating a request object using this method should be used when you want to inject
  1484. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1485. // access properties on the request object before or after sending the request. If
  1486. // you just want the service response, call the ListWebACLs method directly
  1487. // instead.
  1488. //
  1489. // Note: You must call the "Send" method on the returned request object in order
  1490. // to execute the request.
  1491. //
  1492. // // Example sending a request using the ListWebACLsRequest method.
  1493. // req, resp := client.ListWebACLsRequest(params)
  1494. //
  1495. // err := req.Send()
  1496. // if err == nil { // resp is now filled
  1497. // fmt.Println(resp)
  1498. // }
  1499. //
  1500. func (c *WAF) ListWebACLsRequest(input *ListWebACLsInput) (req *request.Request, output *ListWebACLsOutput) {
  1501. op := &request.Operation{
  1502. Name: opListWebACLs,
  1503. HTTPMethod: "POST",
  1504. HTTPPath: "/",
  1505. }
  1506. if input == nil {
  1507. input = &ListWebACLsInput{}
  1508. }
  1509. req = c.newRequest(op, input, output)
  1510. output = &ListWebACLsOutput{}
  1511. req.Data = output
  1512. return
  1513. }
  1514. // Returns an array of WebACLSummary objects in the response.
  1515. func (c *WAF) ListWebACLs(input *ListWebACLsInput) (*ListWebACLsOutput, error) {
  1516. req, out := c.ListWebACLsRequest(input)
  1517. err := req.Send()
  1518. return out, err
  1519. }
  1520. const opListXssMatchSets = "ListXssMatchSets"
  1521. // ListXssMatchSetsRequest generates a "aws/request.Request" representing the
  1522. // client's request for the ListXssMatchSets operation. The "output" return
  1523. // value can be used to capture response data after the request's "Send" method
  1524. // is called.
  1525. //
  1526. // Creating a request object using this method should be used when you want to inject
  1527. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1528. // access properties on the request object before or after sending the request. If
  1529. // you just want the service response, call the ListXssMatchSets method directly
  1530. // instead.
  1531. //
  1532. // Note: You must call the "Send" method on the returned request object in order
  1533. // to execute the request.
  1534. //
  1535. // // Example sending a request using the ListXssMatchSetsRequest method.
  1536. // req, resp := client.ListXssMatchSetsRequest(params)
  1537. //
  1538. // err := req.Send()
  1539. // if err == nil { // resp is now filled
  1540. // fmt.Println(resp)
  1541. // }
  1542. //
  1543. func (c *WAF) ListXssMatchSetsRequest(input *ListXssMatchSetsInput) (req *request.Request, output *ListXssMatchSetsOutput) {
  1544. op := &request.Operation{
  1545. Name: opListXssMatchSets,
  1546. HTTPMethod: "POST",
  1547. HTTPPath: "/",
  1548. }
  1549. if input == nil {
  1550. input = &ListXssMatchSetsInput{}
  1551. }
  1552. req = c.newRequest(op, input, output)
  1553. output = &ListXssMatchSetsOutput{}
  1554. req.Data = output
  1555. return
  1556. }
  1557. // Returns an array of XssMatchSet objects.
  1558. func (c *WAF) ListXssMatchSets(input *ListXssMatchSetsInput) (*ListXssMatchSetsOutput, error) {
  1559. req, out := c.ListXssMatchSetsRequest(input)
  1560. err := req.Send()
  1561. return out, err
  1562. }
  1563. const opUpdateByteMatchSet = "UpdateByteMatchSet"
  1564. // UpdateByteMatchSetRequest generates a "aws/request.Request" representing the
  1565. // client's request for the UpdateByteMatchSet operation. The "output" return
  1566. // value can be used to capture response data after the request's "Send" method
  1567. // is called.
  1568. //
  1569. // Creating a request object using this method should be used when you want to inject
  1570. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1571. // access properties on the request object before or after sending the request. If
  1572. // you just want the service response, call the UpdateByteMatchSet method directly
  1573. // instead.
  1574. //
  1575. // Note: You must call the "Send" method on the returned request object in order
  1576. // to execute the request.
  1577. //
  1578. // // Example sending a request using the UpdateByteMatchSetRequest method.
  1579. // req, resp := client.UpdateByteMatchSetRequest(params)
  1580. //
  1581. // err := req.Send()
  1582. // if err == nil { // resp is now filled
  1583. // fmt.Println(resp)
  1584. // }
  1585. //
  1586. func (c *WAF) UpdateByteMatchSetRequest(input *UpdateByteMatchSetInput) (req *request.Request, output *UpdateByteMatchSetOutput) {
  1587. op := &request.Operation{
  1588. Name: opUpdateByteMatchSet,
  1589. HTTPMethod: "POST",
  1590. HTTPPath: "/",
  1591. }
  1592. if input == nil {
  1593. input = &UpdateByteMatchSetInput{}
  1594. }
  1595. req = c.newRequest(op, input, output)
  1596. output = &UpdateByteMatchSetOutput{}
  1597. req.Data = output
  1598. return
  1599. }
  1600. // Inserts or deletes ByteMatchTuple objects (filters) in a ByteMatchSet. For
  1601. // each ByteMatchTuple object, you specify the following values:
  1602. //
  1603. // Whether to insert or delete the object from the array. If you want to change
  1604. // a ByteMatchSetUpdate object, you delete the existing object and add a new
  1605. // one. The part of a web request that you want AWS WAF to inspect, such as
  1606. // a query string or the value of the User-Agent header. The bytes (typically
  1607. // a string that corresponds with ASCII characters) that you want AWS WAF to
  1608. // look for. For more information, including how you specify the values for
  1609. // the AWS WAF API and the AWS CLI or SDKs, see TargetString in the ByteMatchTuple
  1610. // data type. Where to look, such as at the beginning or the end of a query
  1611. // string. Whether to perform any conversions on the request, such as converting
  1612. // it to lowercase, before inspecting it for the specified string. For example,
  1613. // you can add a ByteMatchSetUpdate object that matches web requests in which
  1614. // User-Agent headers contain the string BadBot. You can then configure AWS
  1615. // WAF to block those requests.
  1616. //
  1617. // To create and configure a ByteMatchSet, perform the following steps:
  1618. //
  1619. // Create a ByteMatchSet. For more information, see CreateByteMatchSet. Use
  1620. // GetChangeToken to get the change token that you provide in the ChangeToken
  1621. // parameter of an UpdateByteMatchSet request. Submit an UpdateByteMatchSet
  1622. // request to specify the part of the request that you want AWS WAF to inspect
  1623. // (for example, the header or the URI) and the value that you want AWS WAF
  1624. // to watch for. For more information about how to use the AWS WAF API to allow
  1625. // or block HTTP requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/).
  1626. func (c *WAF) UpdateByteMatchSet(input *UpdateByteMatchSetInput) (*UpdateByteMatchSetOutput, error) {
  1627. req, out := c.UpdateByteMatchSetRequest(input)
  1628. err := req.Send()
  1629. return out, err
  1630. }
  1631. const opUpdateIPSet = "UpdateIPSet"
  1632. // UpdateIPSetRequest generates a "aws/request.Request" representing the
  1633. // client's request for the UpdateIPSet operation. The "output" return
  1634. // value can be used to capture response data after the request's "Send" method
  1635. // is called.
  1636. //
  1637. // Creating a request object using this method should be used when you want to inject
  1638. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1639. // access properties on the request object before or after sending the request. If
  1640. // you just want the service response, call the UpdateIPSet method directly
  1641. // instead.
  1642. //
  1643. // Note: You must call the "Send" method on the returned request object in order
  1644. // to execute the request.
  1645. //
  1646. // // Example sending a request using the UpdateIPSetRequest method.
  1647. // req, resp := client.UpdateIPSetRequest(params)
  1648. //
  1649. // err := req.Send()
  1650. // if err == nil { // resp is now filled
  1651. // fmt.Println(resp)
  1652. // }
  1653. //
  1654. func (c *WAF) UpdateIPSetRequest(input *UpdateIPSetInput) (req *request.Request, output *UpdateIPSetOutput) {
  1655. op := &request.Operation{
  1656. Name: opUpdateIPSet,
  1657. HTTPMethod: "POST",
  1658. HTTPPath: "/",
  1659. }
  1660. if input == nil {
  1661. input = &UpdateIPSetInput{}
  1662. }
  1663. req = c.newRequest(op, input, output)
  1664. output = &UpdateIPSetOutput{}
  1665. req.Data = output
  1666. return
  1667. }
  1668. // Inserts or deletes IPSetDescriptor objects in an IPSet. For each IPSetDescriptor
  1669. // object, you specify the following values:
  1670. //
  1671. // Whether to insert or delete the object from the array. If you want to change
  1672. // an IPSetDescriptor object, you delete the existing object and add a new one.
  1673. // The IP address version, IPv4. The IP address in CIDR notation, for example,
  1674. // 192.0.2.0/24 (for the range of IP addresses from 192.0.2.0 to 192.0.2.255)
  1675. // or 192.0.2.44/32 (for the individual IP address 192.0.2.44). AWS WAF supports
  1676. // /8, /16, /24, and /32 IP address ranges. For more information about CIDR
  1677. // notation, see the Wikipedia entry Classless Inter-Domain Routing (https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing).
  1678. //
  1679. // You use an IPSet to specify which web requests you want to allow or block
  1680. // based on the IP addresses that the requests originated from. For example,
  1681. // if you're receiving a lot of requests from one or a small number of IP addresses
  1682. // and you want to block the requests, you can create an IPSet that specifies
  1683. // those IP addresses, and then configure AWS WAF to block the requests.
  1684. //
  1685. // To create and configure an IPSet, perform the following steps:
  1686. //
  1687. // Submit a CreateIPSet request. Use GetChangeToken to get the change token
  1688. // that you provide in the ChangeToken parameter of an UpdateIPSet request.
  1689. // Submit an UpdateIPSet request to specify the IP addresses that you want AWS
  1690. // WAF to watch for. When you update an IPSet, you specify the IP addresses
  1691. // that you want to add and/or the IP addresses that you want to delete. If
  1692. // you want to change an IP address, you delete the existing IP address and
  1693. // add the new one.
  1694. //
  1695. // For more information about how to use the AWS WAF API to allow or block
  1696. // HTTP requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/).
  1697. func (c *WAF) UpdateIPSet(input *UpdateIPSetInput) (*UpdateIPSetOutput, error) {
  1698. req, out := c.UpdateIPSetRequest(input)
  1699. err := req.Send()
  1700. return out, err
  1701. }
  1702. const opUpdateRule = "UpdateRule"
  1703. // UpdateRuleRequest generates a "aws/request.Request" representing the
  1704. // client's request for the UpdateRule operation. The "output" return
  1705. // value can be used to capture response data after the request's "Send" method
  1706. // is called.
  1707. //
  1708. // Creating a request object using this method should be used when you want to inject
  1709. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1710. // access properties on the request object before or after sending the request. If
  1711. // you just want the service response, call the UpdateRule method directly
  1712. // instead.
  1713. //
  1714. // Note: You must call the "Send" method on the returned request object in order
  1715. // to execute the request.
  1716. //
  1717. // // Example sending a request using the UpdateRuleRequest method.
  1718. // req, resp := client.UpdateRuleRequest(params)
  1719. //
  1720. // err := req.Send()
  1721. // if err == nil { // resp is now filled
  1722. // fmt.Println(resp)
  1723. // }
  1724. //
  1725. func (c *WAF) UpdateRuleRequest(input *UpdateRuleInput) (req *request.Request, output *UpdateRuleOutput) {
  1726. op := &request.Operation{
  1727. Name: opUpdateRule,
  1728. HTTPMethod: "POST",
  1729. HTTPPath: "/",
  1730. }
  1731. if input == nil {
  1732. input = &UpdateRuleInput{}
  1733. }
  1734. req = c.newRequest(op, input, output)
  1735. output = &UpdateRuleOutput{}
  1736. req.Data = output
  1737. return
  1738. }
  1739. // Inserts or deletes Predicate objects in a Rule. Each Predicate object identifies
  1740. // a predicate, such as a ByteMatchSet or an IPSet, that specifies the web requests
  1741. // that you want to allow, block, or count. If you add more than one predicate
  1742. // to a Rule, a request must match all of the specifications to be allowed,
  1743. // blocked, or counted. For example, suppose you add the following to a Rule:
  1744. //
  1745. // A ByteMatchSet that matches the value BadBot in the User-Agent header An
  1746. // IPSet that matches the IP address 192.0.2.44 You then add the Rule to a
  1747. // WebACL and specify that you want to block requests that satisfy the Rule.
  1748. // For a request to be blocked, the User-Agent header in the request must contain
  1749. // the value BadBot and the request must originate from the IP address 192.0.2.44.
  1750. //
  1751. // To create and configure a Rule, perform the following steps:
  1752. //
  1753. // Create and update the predicates that you want to include in the Rule.
  1754. // Create the Rule. See CreateRule. Use GetChangeToken to get the change token
  1755. // that you provide in the ChangeToken parameter of an UpdateRule request. Submit
  1756. // an UpdateRule request to add predicates to the Rule. Create and update a
  1757. // WebACL that contains the Rule. See CreateWebACL. If you want to replace
  1758. // one ByteMatchSet or IPSet with another, you delete the existing one and add
  1759. // the new one.
  1760. //
  1761. // For more information about how to use the AWS WAF API to allow or block
  1762. // HTTP requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/).
  1763. func (c *WAF) UpdateRule(input *UpdateRuleInput) (*UpdateRuleOutput, error) {
  1764. req, out := c.UpdateRuleRequest(input)
  1765. err := req.Send()
  1766. return out, err
  1767. }
  1768. const opUpdateSizeConstraintSet = "UpdateSizeConstraintSet"
  1769. // UpdateSizeConstraintSetRequest generates a "aws/request.Request" representing the
  1770. // client's request for the UpdateSizeConstraintSet operation. The "output" return
  1771. // value can be used to capture response data after the request's "Send" method
  1772. // is called.
  1773. //
  1774. // Creating a request object using this method should be used when you want to inject
  1775. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1776. // access properties on the request object before or after sending the request. If
  1777. // you just want the service response, call the UpdateSizeConstraintSet method directly
  1778. // instead.
  1779. //
  1780. // Note: You must call the "Send" method on the returned request object in order
  1781. // to execute the request.
  1782. //
  1783. // // Example sending a request using the UpdateSizeConstraintSetRequest method.
  1784. // req, resp := client.UpdateSizeConstraintSetRequest(params)
  1785. //
  1786. // err := req.Send()
  1787. // if err == nil { // resp is now filled
  1788. // fmt.Println(resp)
  1789. // }
  1790. //
  1791. func (c *WAF) UpdateSizeConstraintSetRequest(input *UpdateSizeConstraintSetInput) (req *request.Request, output *UpdateSizeConstraintSetOutput) {
  1792. op := &request.Operation{
  1793. Name: opUpdateSizeConstraintSet,
  1794. HTTPMethod: "POST",
  1795. HTTPPath: "/",
  1796. }
  1797. if input == nil {
  1798. input = &UpdateSizeConstraintSetInput{}
  1799. }
  1800. req = c.newRequest(op, input, output)
  1801. output = &UpdateSizeConstraintSetOutput{}
  1802. req.Data = output
  1803. return
  1804. }
  1805. // Inserts or deletes SizeConstraint objects (filters) in a SizeConstraintSet.
  1806. // For each SizeConstraint object, you specify the following values:
  1807. //
  1808. // Whether to insert or delete the object from the array. If you want to change
  1809. // a SizeConstraintSetUpdate object, you delete the existing object and add
  1810. // a new one. The part of a web request that you want AWS WAF to evaluate, such
  1811. // as the length of a query string or the length of the User-Agent header. Whether
  1812. // to perform any transformations on the request, such as converting it to lowercase,
  1813. // before checking its length. Note that transformations of the request body
  1814. // are not supported because the AWS resource forwards only the first 8192 bytes
  1815. // of your request to AWS WAF. A ComparisonOperator used for evaluating the
  1816. // selected part of the request against the specified Size, such as equals,
  1817. // greater than, less than, and so on. The length, in bytes, that you want AWS
  1818. // WAF to watch for in selected part of the request. The length is computed
  1819. // after applying the transformation. For example, you can add a SizeConstraintSetUpdate
  1820. // object that matches web requests in which the length of the User-Agent header
  1821. // is greater than 100 bytes. You can then configure AWS WAF to block those
  1822. // requests.
  1823. //
  1824. // To create and configure a SizeConstraintSet, perform the following steps:
  1825. //
  1826. // Create a SizeConstraintSet. For more information, see CreateSizeConstraintSet.
  1827. // Use GetChangeToken to get the change token that you provide in the ChangeToken
  1828. // parameter of an UpdateSizeConstraintSet request. Submit an UpdateSizeConstraintSet
  1829. // request to specify the part of the request that you want AWS WAF to inspect
  1830. // (for example, the header or the URI) and the value that you want AWS WAF
  1831. // to watch for. For more information about how to use the AWS WAF API to allow
  1832. // or block HTTP requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/).
  1833. func (c *WAF) UpdateSizeConstraintSet(input *UpdateSizeConstraintSetInput) (*UpdateSizeConstraintSetOutput, error) {
  1834. req, out := c.UpdateSizeConstraintSetRequest(input)
  1835. err := req.Send()
  1836. return out, err
  1837. }
  1838. const opUpdateSqlInjectionMatchSet = "UpdateSqlInjectionMatchSet"
  1839. // UpdateSqlInjectionMatchSetRequest generates a "aws/request.Request" representing the
  1840. // client's request for the UpdateSqlInjectionMatchSet operation. The "output" return
  1841. // value can be used to capture response data after the request's "Send" method
  1842. // is called.
  1843. //
  1844. // Creating a request object using this method should be used when you want to inject
  1845. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1846. // access properties on the request object before or after sending the request. If
  1847. // you just want the service response, call the UpdateSqlInjectionMatchSet method directly
  1848. // instead.
  1849. //
  1850. // Note: You must call the "Send" method on the returned request object in order
  1851. // to execute the request.
  1852. //
  1853. // // Example sending a request using the UpdateSqlInjectionMatchSetRequest method.
  1854. // req, resp := client.UpdateSqlInjectionMatchSetRequest(params)
  1855. //
  1856. // err := req.Send()
  1857. // if err == nil { // resp is now filled
  1858. // fmt.Println(resp)
  1859. // }
  1860. //
  1861. func (c *WAF) UpdateSqlInjectionMatchSetRequest(input *UpdateSqlInjectionMatchSetInput) (req *request.Request, output *UpdateSqlInjectionMatchSetOutput) {
  1862. op := &request.Operation{
  1863. Name: opUpdateSqlInjectionMatchSet,
  1864. HTTPMethod: "POST",
  1865. HTTPPath: "/",
  1866. }
  1867. if input == nil {
  1868. input = &UpdateSqlInjectionMatchSetInput{}
  1869. }
  1870. req = c.newRequest(op, input, output)
  1871. output = &UpdateSqlInjectionMatchSetOutput{}
  1872. req.Data = output
  1873. return
  1874. }
  1875. // Inserts or deletes SqlInjectionMatchTuple objects (filters) in a SqlInjectionMatchSet.
  1876. // For each SqlInjectionMatchTuple object, you specify the following values:
  1877. //
  1878. // Action: Whether to insert the object into or delete the object from the
  1879. // array. To change a SqlInjectionMatchTuple, you delete the existing object
  1880. // and add a new one. FieldToMatch: The part of web requests that you want AWS
  1881. // WAF to inspect and, if you want AWS WAF to inspect a header, the name of
  1882. // the header. TextTransformation: Which text transformation, if any, to perform
  1883. // on the web request before inspecting the request for snippets of malicious
  1884. // SQL code. You use SqlInjectionMatchSet objects to specify which CloudFront
  1885. // requests you want to allow, block, or count. For example, if you're receiving
  1886. // requests that contain snippets of SQL code in the query string and you want
  1887. // to block the requests, you can create a SqlInjectionMatchSet with the applicable
  1888. // settings, and then configure AWS WAF to block the requests.
  1889. //
  1890. // To create and configure a SqlInjectionMatchSet, perform the following steps:
  1891. //
  1892. // Submit a CreateSqlInjectionMatchSet request. Use GetChangeToken to get
  1893. // the change token that you provide in the ChangeToken parameter of an UpdateIPSet
  1894. // request. Submit an UpdateSqlInjectionMatchSet request to specify the parts
  1895. // of web requests that you want AWS WAF to inspect for snippets of SQL code.
  1896. // For more information about how to use the AWS WAF API to allow or block
  1897. // HTTP requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/).
  1898. func (c *WAF) UpdateSqlInjectionMatchSet(input *UpdateSqlInjectionMatchSetInput) (*UpdateSqlInjectionMatchSetOutput, error) {
  1899. req, out := c.UpdateSqlInjectionMatchSetRequest(input)
  1900. err := req.Send()
  1901. return out, err
  1902. }
  1903. const opUpdateWebACL = "UpdateWebACL"
  1904. // UpdateWebACLRequest generates a "aws/request.Request" representing the
  1905. // client's request for the UpdateWebACL operation. The "output" return
  1906. // value can be used to capture response data after the request's "Send" method
  1907. // is called.
  1908. //
  1909. // Creating a request object using this method should be used when you want to inject
  1910. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1911. // access properties on the request object before or after sending the request. If
  1912. // you just want the service response, call the UpdateWebACL method directly
  1913. // instead.
  1914. //
  1915. // Note: You must call the "Send" method on the returned request object in order
  1916. // to execute the request.
  1917. //
  1918. // // Example sending a request using the UpdateWebACLRequest method.
  1919. // req, resp := client.UpdateWebACLRequest(params)
  1920. //
  1921. // err := req.Send()
  1922. // if err == nil { // resp is now filled
  1923. // fmt.Println(resp)
  1924. // }
  1925. //
  1926. func (c *WAF) UpdateWebACLRequest(input *UpdateWebACLInput) (req *request.Request, output *UpdateWebACLOutput) {
  1927. op := &request.Operation{
  1928. Name: opUpdateWebACL,
  1929. HTTPMethod: "POST",
  1930. HTTPPath: "/",
  1931. }
  1932. if input == nil {
  1933. input = &UpdateWebACLInput{}
  1934. }
  1935. req = c.newRequest(op, input, output)
  1936. output = &UpdateWebACLOutput{}
  1937. req.Data = output
  1938. return
  1939. }
  1940. // Inserts or deletes ActivatedRule objects in a WebACL. Each Rule identifies
  1941. // web requests that you want to allow, block, or count. When you update a WebACL,
  1942. // you specify the following values:
  1943. //
  1944. // A default action for the WebACL, either ALLOW or BLOCK. AWS WAF performs
  1945. // the default action if a request doesn't match the criteria in any of the
  1946. // Rules in a WebACL. The Rules that you want to add and/or delete. If you want
  1947. // to replace one Rule with another, you delete the existing Rule and add the
  1948. // new one. For each Rule, whether you want AWS WAF to allow requests, block
  1949. // requests, or count requests that match the conditions in the Rule. The order
  1950. // in which you want AWS WAF to evaluate the Rules in a WebACL. If you add more
  1951. // than one Rule to a WebACL, AWS WAF evaluates each request against the Rules
  1952. // in order based on the value of Priority. (The Rule that has the lowest value
  1953. // for Priority is evaluated first.) When a web request matches all of the predicates
  1954. // (such as ByteMatchSets and IPSets) in a Rule, AWS WAF immediately takes the
  1955. // corresponding action, allow or block, and doesn't evaluate the request against
  1956. // the remaining Rules in the WebACL, if any. The CloudFront distribution that
  1957. // you want to associate with the WebACL. To create and configure a WebACL,
  1958. // perform the following steps:
  1959. //
  1960. // Create and update the predicates that you want to include in Rules. For
  1961. // more information, see CreateByteMatchSet, UpdateByteMatchSet, CreateIPSet,
  1962. // UpdateIPSet, CreateSqlInjectionMatchSet, and UpdateSqlInjectionMatchSet.
  1963. // Create and update the Rules that you want to include in the WebACL. For more
  1964. // information, see CreateRule and UpdateRule. Create a WebACL. See CreateWebACL.
  1965. // Use GetChangeToken to get the change token that you provide in the ChangeToken
  1966. // parameter of an UpdateWebACL request. Submit an UpdateWebACL request to specify
  1967. // the Rules that you want to include in the WebACL, to specify the default
  1968. // action, and to associate the WebACL with a CloudFront distribution. For
  1969. // more information about how to use the AWS WAF API to allow or block HTTP
  1970. // requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/).
  1971. func (c *WAF) UpdateWebACL(input *UpdateWebACLInput) (*UpdateWebACLOutput, error) {
  1972. req, out := c.UpdateWebACLRequest(input)
  1973. err := req.Send()
  1974. return out, err
  1975. }
  1976. const opUpdateXssMatchSet = "UpdateXssMatchSet"
  1977. // UpdateXssMatchSetRequest generates a "aws/request.Request" representing the
  1978. // client's request for the UpdateXssMatchSet operation. The "output" return
  1979. // value can be used to capture response data after the request's "Send" method
  1980. // is called.
  1981. //
  1982. // Creating a request object using this method should be used when you want to inject
  1983. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1984. // access properties on the request object before or after sending the request. If
  1985. // you just want the service response, call the UpdateXssMatchSet method directly
  1986. // instead.
  1987. //
  1988. // Note: You must call the "Send" method on the returned request object in order
  1989. // to execute the request.
  1990. //
  1991. // // Example sending a request using the UpdateXssMatchSetRequest method.
  1992. // req, resp := client.UpdateXssMatchSetRequest(params)
  1993. //
  1994. // err := req.Send()
  1995. // if err == nil { // resp is now filled
  1996. // fmt.Println(resp)
  1997. // }
  1998. //
  1999. func (c *WAF) UpdateXssMatchSetRequest(input *UpdateXssMatchSetInput) (req *request.Request, output *UpdateXssMatchSetOutput) {
  2000. op := &request.Operation{
  2001. Name: opUpdateXssMatchSet,
  2002. HTTPMethod: "POST",
  2003. HTTPPath: "/",
  2004. }
  2005. if input == nil {
  2006. input = &UpdateXssMatchSetInput{}
  2007. }
  2008. req = c.newRequest(op, input, output)
  2009. output = &UpdateXssMatchSetOutput{}
  2010. req.Data = output
  2011. return
  2012. }
  2013. // Inserts or deletes XssMatchTuple objects (filters) in an XssMatchSet. For
  2014. // each XssMatchTuple object, you specify the following values:
  2015. //
  2016. // Action: Whether to insert the object into or delete the object from the
  2017. // array. To change a XssMatchTuple, you delete the existing object and add
  2018. // a new one. FieldToMatch: The part of web requests that you want AWS WAF to
  2019. // inspect and, if you want AWS WAF to inspect a header, the name of the header.
  2020. // TextTransformation: Which text transformation, if any, to perform on the
  2021. // web request before inspecting the request for cross-site scripting attacks.
  2022. // You use XssMatchSet objects to specify which CloudFront requests you want
  2023. // to allow, block, or count. For example, if you're receiving requests that
  2024. // contain cross-site scripting attacks in the request body and you want to
  2025. // block the requests, you can create an XssMatchSet with the applicable settings,
  2026. // and then configure AWS WAF to block the requests.
  2027. //
  2028. // To create and configure an XssMatchSet, perform the following steps:
  2029. //
  2030. // Submit a CreateXssMatchSet request. Use GetChangeToken to get the change
  2031. // token that you provide in the ChangeToken parameter of an UpdateIPSet request.
  2032. // Submit an UpdateXssMatchSet request to specify the parts of web requests
  2033. // that you want AWS WAF to inspect for cross-site scripting attacks. For more
  2034. // information about how to use the AWS WAF API to allow or block HTTP requests,
  2035. // see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/).
  2036. func (c *WAF) UpdateXssMatchSet(input *UpdateXssMatchSetInput) (*UpdateXssMatchSetOutput, error) {
  2037. req, out := c.UpdateXssMatchSetRequest(input)
  2038. err := req.Send()
  2039. return out, err
  2040. }
  2041. // The ActivatedRule object in an UpdateWebACL request specifies a Rule that
  2042. // you want to insert or delete, the priority of the Rule in the WebACL, and
  2043. // the action that you want AWS WAF to take when a web request matches the Rule
  2044. // (ALLOW, BLOCK, or COUNT).
  2045. //
  2046. // To specify whether to insert or delete a Rule, use the Action parameter
  2047. // in the WebACLUpdate data type.
  2048. type ActivatedRule struct {
  2049. _ struct{} `type:"structure"`
  2050. // Specifies the action that CloudFront or AWS WAF takes when a web request
  2051. // matches the conditions in the Rule. Valid values for Action include the following:
  2052. //
  2053. // ALLOW: CloudFront responds with the requested object. BLOCK: CloudFront
  2054. // responds with an HTTP 403 (Forbidden) status code. COUNT: AWS WAF increments
  2055. // a counter of requests that match the conditions in the rule and then continues
  2056. // to inspect the web request based on the remaining rules in the web ACL.
  2057. Action *WafAction `type:"structure" required:"true"`
  2058. // Specifies the order in which the Rules in a WebACL are evaluated. Rules with
  2059. // a lower value for Priority are evaluated before Rules with a higher value.
  2060. // The value must be a unique integer. If you add multiple Rules to a WebACL,
  2061. // the values don't need to be consecutive.
  2062. Priority *int64 `type:"integer" required:"true"`
  2063. // The RuleId for a Rule. You use RuleId to get more information about a Rule
  2064. // (see GetRule), update a Rule (see UpdateRule), insert a Rule into a WebACL
  2065. // or delete a one from a WebACL (see UpdateWebACL), or delete a Rule from AWS
  2066. // WAF (see DeleteRule).
  2067. //
  2068. // RuleId is returned by CreateRule and by ListRules.
  2069. RuleId *string `min:"1" type:"string" required:"true"`
  2070. }
  2071. // String returns the string representation
  2072. func (s ActivatedRule) String() string {
  2073. return awsutil.Prettify(s)
  2074. }
  2075. // GoString returns the string representation
  2076. func (s ActivatedRule) GoString() string {
  2077. return s.String()
  2078. }
  2079. // Validate inspects the fields of the type to determine if they are valid.
  2080. func (s *ActivatedRule) Validate() error {
  2081. invalidParams := request.ErrInvalidParams{Context: "ActivatedRule"}
  2082. if s.Action == nil {
  2083. invalidParams.Add(request.NewErrParamRequired("Action"))
  2084. }
  2085. if s.Priority == nil {
  2086. invalidParams.Add(request.NewErrParamRequired("Priority"))
  2087. }
  2088. if s.RuleId == nil {
  2089. invalidParams.Add(request.NewErrParamRequired("RuleId"))
  2090. }
  2091. if s.RuleId != nil && len(*s.RuleId) < 1 {
  2092. invalidParams.Add(request.NewErrParamMinLen("RuleId", 1))
  2093. }
  2094. if s.Action != nil {
  2095. if err := s.Action.Validate(); err != nil {
  2096. invalidParams.AddNested("Action", err.(request.ErrInvalidParams))
  2097. }
  2098. }
  2099. if invalidParams.Len() > 0 {
  2100. return invalidParams
  2101. }
  2102. return nil
  2103. }
  2104. // In a GetByteMatchSet request, ByteMatchSet is a complex type that contains
  2105. // the ByteMatchSetId and Name of a ByteMatchSet, and the values that you specified
  2106. // when you updated the ByteMatchSet.
  2107. //
  2108. // A complex type that contains ByteMatchTuple objects, which specify the parts
  2109. // of web requests that you want AWS WAF to inspect and the values that you
  2110. // want AWS WAF to search for. If a ByteMatchSet contains more than one ByteMatchTuple
  2111. // object, a request needs to match the settings in only one ByteMatchTuple
  2112. // to be considered a match.
  2113. type ByteMatchSet struct {
  2114. _ struct{} `type:"structure"`
  2115. // The ByteMatchSetId for a ByteMatchSet. You use ByteMatchSetId to get information
  2116. // about a ByteMatchSet (see GetByteMatchSet), update a ByteMatchSet (see UpdateByteMatchSet),
  2117. // insert a ByteMatchSet into a Rule or delete one from a Rule (see UpdateRule),
  2118. // and delete a ByteMatchSet from AWS WAF (see DeleteByteMatchSet).
  2119. //
  2120. // ByteMatchSetId is returned by CreateByteMatchSet and by ListByteMatchSets.
  2121. ByteMatchSetId *string `min:"1" type:"string" required:"true"`
  2122. // Specifies the bytes (typically a string that corresponds with ASCII characters)
  2123. // that you want AWS WAF to search for in web requests, the location in requests
  2124. // that you want AWS WAF to search, and other settings.
  2125. ByteMatchTuples []*ByteMatchTuple `type:"list" required:"true"`
  2126. // A friendly name or description of the ByteMatchSet. You can't change Name
  2127. // after you create a ByteMatchSet.
  2128. Name *string `min:"1" type:"string"`
  2129. }
  2130. // String returns the string representation
  2131. func (s ByteMatchSet) String() string {
  2132. return awsutil.Prettify(s)
  2133. }
  2134. // GoString returns the string representation
  2135. func (s ByteMatchSet) GoString() string {
  2136. return s.String()
  2137. }
  2138. // Returned by ListByteMatchSets. Each ByteMatchSetSummary object includes the
  2139. // Name and ByteMatchSetId for one ByteMatchSet.
  2140. type ByteMatchSetSummary struct {
  2141. _ struct{} `type:"structure"`
  2142. // The ByteMatchSetId for a ByteMatchSet. You use ByteMatchSetId to get information
  2143. // about a ByteMatchSet, update a ByteMatchSet, remove a ByteMatchSet from a
  2144. // Rule, and delete a ByteMatchSet from AWS WAF.
  2145. //
  2146. // ByteMatchSetId is returned by CreateByteMatchSet and by ListByteMatchSets.
  2147. ByteMatchSetId *string `min:"1" type:"string" required:"true"`
  2148. // A friendly name or description of the ByteMatchSet. You can't change Name
  2149. // after you create a ByteMatchSet.
  2150. Name *string `min:"1" type:"string" required:"true"`
  2151. }
  2152. // String returns the string representation
  2153. func (s ByteMatchSetSummary) String() string {
  2154. return awsutil.Prettify(s)
  2155. }
  2156. // GoString returns the string representation
  2157. func (s ByteMatchSetSummary) GoString() string {
  2158. return s.String()
  2159. }
  2160. // In an UpdateByteMatchSet request, ByteMatchSetUpdate specifies whether to
  2161. // insert or delete a ByteMatchTuple and includes the settings for the ByteMatchTuple.
  2162. type ByteMatchSetUpdate struct {
  2163. _ struct{} `type:"structure"`
  2164. // Specifies whether to insert or delete a ByteMatchTuple.
  2165. Action *string `type:"string" required:"true" enum:"ChangeAction"`
  2166. // Information about the part of a web request that you want AWS WAF to inspect
  2167. // and the value that you want AWS WAF to search for. If you specify DELETE
  2168. // for the value of Action, the ByteMatchTuple values must exactly match the
  2169. // values in the ByteMatchTuple that you want to delete from the ByteMatchSet.
  2170. ByteMatchTuple *ByteMatchTuple `type:"structure" required:"true"`
  2171. }
  2172. // String returns the string representation
  2173. func (s ByteMatchSetUpdate) String() string {
  2174. return awsutil.Prettify(s)
  2175. }
  2176. // GoString returns the string representation
  2177. func (s ByteMatchSetUpdate) GoString() string {
  2178. return s.String()
  2179. }
  2180. // Validate inspects the fields of the type to determine if they are valid.
  2181. func (s *ByteMatchSetUpdate) Validate() error {
  2182. invalidParams := request.ErrInvalidParams{Context: "ByteMatchSetUpdate"}
  2183. if s.Action == nil {
  2184. invalidParams.Add(request.NewErrParamRequired("Action"))
  2185. }
  2186. if s.ByteMatchTuple == nil {
  2187. invalidParams.Add(request.NewErrParamRequired("ByteMatchTuple"))
  2188. }
  2189. if s.ByteMatchTuple != nil {
  2190. if err := s.ByteMatchTuple.Validate(); err != nil {
  2191. invalidParams.AddNested("ByteMatchTuple", err.(request.ErrInvalidParams))
  2192. }
  2193. }
  2194. if invalidParams.Len() > 0 {
  2195. return invalidParams
  2196. }
  2197. return nil
  2198. }
  2199. // The bytes (typically a string that corresponds with ASCII characters) that
  2200. // you want AWS WAF to search for in web requests, the location in requests
  2201. // that you want AWS WAF to search, and other settings.
  2202. type ByteMatchTuple struct {
  2203. _ struct{} `type:"structure"`
  2204. // The part of a web request that you want AWS WAF to search, such as a specified
  2205. // header or a query string. For more information, see FieldToMatch.
  2206. FieldToMatch *FieldToMatch `type:"structure" required:"true"`
  2207. // Within the portion of a web request that you want to search (for example,
  2208. // in the query string, if any), specify where you want AWS WAF to search. Valid
  2209. // values include the following:
  2210. //
  2211. // CONTAINS
  2212. //
  2213. // The specified part of the web request must include the value of TargetString,
  2214. // but the location doesn't matter.
  2215. //
  2216. // CONTAINS_WORD
  2217. //
  2218. // The specified part of the web request must include the value of TargetString,
  2219. // and TargetString must contain only alphanumeric characters or underscore
  2220. // (A-Z, a-z, 0-9, or _). In addition, TargetString must be a word, which means
  2221. // one of the following:
  2222. //
  2223. // TargetString exactly matches the value of the specified part of the web
  2224. // request, such as the value of a header. TargetString is at the beginning
  2225. // of the specified part of the web request and is followed by a character other
  2226. // than an alphanumeric character or underscore (_), for example, BadBot;. TargetString
  2227. // is at the end of the specified part of the web request and is preceded by
  2228. // a character other than an alphanumeric character or underscore (_), for example,
  2229. // ;BadBot. TargetString is in the middle of the specified part of the web request
  2230. // and is preceded and followed by characters other than alphanumeric characters
  2231. // or underscore (_), for example, -BadBot;. EXACTLY
  2232. //
  2233. // The value of the specified part of the web request must exactly match the
  2234. // value of TargetString.
  2235. //
  2236. // STARTS_WITH
  2237. //
  2238. // The value of TargetString must appear at the beginning of the specified
  2239. // part of the web request.
  2240. //
  2241. // ENDS_WITH
  2242. //
  2243. // The value of TargetString must appear at the end of the specified part of
  2244. // the web request.
  2245. PositionalConstraint *string `type:"string" required:"true" enum:"PositionalConstraint"`
  2246. // The value that you want AWS WAF to search for. AWS WAF searches for the specified
  2247. // string in the part of web requests that you specified in FieldToMatch. The
  2248. // maximum length of the value is 50 bytes.
  2249. //
  2250. // Valid values depend on the values that you specified for FieldToMatch:
  2251. //
  2252. // HEADER: The value that you want AWS WAF to search for in the request header
  2253. // that you specified in FieldToMatch, for example, the value of the User-Agent
  2254. // or Referer header. METHOD: The HTTP method, which indicates the type of operation
  2255. // specified in the request. CloudFront supports the following methods: DELETE,
  2256. // GET, HEAD, OPTIONS, PATCH, POST, and PUT. QUERY_STRING: The value that you
  2257. // want AWS WAF to search for in the query string, which is the part of a URL
  2258. // that appears after a ? character. URI: The value that you want AWS WAF to
  2259. // search for in the part of a URL that identifies a resource, for example,
  2260. // /images/daily-ad.jpg. BODY: The part of a request that contains any additional
  2261. // data that you want to send to your web server as the HTTP request body, such
  2262. // as data from a form. The request body immediately follows the request headers.
  2263. // Note that only the first 8192 bytes of the request body are forwarded to
  2264. // AWS WAF for inspection. To allow or block requests based on the length of
  2265. // the body, you can create a size constraint set. For more information, see
  2266. // CreateSizeConstraintSet. If TargetString includes alphabetic characters
  2267. // A-Z and a-z, note that the value is case sensitive.
  2268. //
  2269. // If you're using the AWS WAF API
  2270. //
  2271. // Specify a base64-encoded version of the value. The maximum length of the
  2272. // value before you base64-encode it is 50 bytes.
  2273. //
  2274. // For example, suppose the value of Type is HEADER and the value of Data is
  2275. // User-Agent. If you want to search the User-Agent header for the value BadBot,
  2276. // you base64-encode BadBot using MIME base64 encoding and include the resulting
  2277. // value, QmFkQm90, in the value of TargetString.
  2278. //
  2279. // If you're using the AWS CLI or one of the AWS SDKs
  2280. //
  2281. // The value that you want AWS WAF to search for. The SDK automatically base64
  2282. // encodes the value.
  2283. //
  2284. // TargetString is automatically base64 encoded/decoded by the SDK.
  2285. TargetString []byte `type:"blob" required:"true"`
  2286. // Text transformations eliminate some of the unusual formatting that attackers
  2287. // use in web requests in an effort to bypass AWS WAF. If you specify a transformation,
  2288. // AWS WAF performs the transformation on TargetString before inspecting a request
  2289. // for a match.
  2290. //
  2291. // CMD_LINE
  2292. //
  2293. // When you're concerned that attackers are injecting an operating system commandline
  2294. // command and using unusual formatting to disguise some or all of the command,
  2295. // use this option to perform the following transformations:
  2296. //
  2297. // Delete the following characters: \ " ' ^ Delete spaces before the following
  2298. // characters: / ( Replace the following characters with a space: , ; Replace
  2299. // multiple spaces with one space Convert uppercase letters (A-Z) to lowercase
  2300. // (a-z) COMPRESS_WHITE_SPACE
  2301. //
  2302. // Use this option to replace the following characters with a space character
  2303. // (decimal 32):
  2304. //
  2305. // \f, formfeed, decimal 12 \t, tab, decimal 9 \n, newline, decimal 10 \r,
  2306. // carriage return, decimal 13 \v, vertical tab, decimal 11 non-breaking space,
  2307. // decimal 160 COMPRESS_WHITE_SPACE also replaces multiple spaces with one
  2308. // space.
  2309. //
  2310. // HTML_ENTITY_DECODE
  2311. //
  2312. // Use this option to replace HTML-encoded characters with unencoded characters.
  2313. // HTML_ENTITY_DECODE performs the following operations:
  2314. //
  2315. // Replaces (ampersand)quot; with " Replaces (ampersand)nbsp; with a non-breaking
  2316. // space, decimal 160 Replaces (ampersand)lt; with a "less than" symbol Replaces
  2317. // (ampersand)gt; with > Replaces characters that are represented in hexadecimal
  2318. // format, (ampersand)#xhhhh;, with the corresponding characters Replaces characters
  2319. // that are represented in decimal format, (ampersand)#nnnn;, with the corresponding
  2320. // characters LOWERCASE
  2321. //
  2322. // Use this option to convert uppercase letters (A-Z) to lowercase (a-z).
  2323. //
  2324. // URL_DECODE
  2325. //
  2326. // Use this option to decode a URL-encoded value.
  2327. //
  2328. // NONE
  2329. //
  2330. // Specify NONE if you don't want to perform any text transformations.
  2331. TextTransformation *string `type:"string" required:"true" enum:"TextTransformation"`
  2332. }
  2333. // String returns the string representation
  2334. func (s ByteMatchTuple) String() string {
  2335. return awsutil.Prettify(s)
  2336. }
  2337. // GoString returns the string representation
  2338. func (s ByteMatchTuple) GoString() string {
  2339. return s.String()
  2340. }
  2341. // Validate inspects the fields of the type to determine if they are valid.
  2342. func (s *ByteMatchTuple) Validate() error {
  2343. invalidParams := request.ErrInvalidParams{Context: "ByteMatchTuple"}
  2344. if s.FieldToMatch == nil {
  2345. invalidParams.Add(request.NewErrParamRequired("FieldToMatch"))
  2346. }
  2347. if s.PositionalConstraint == nil {
  2348. invalidParams.Add(request.NewErrParamRequired("PositionalConstraint"))
  2349. }
  2350. if s.TargetString == nil {
  2351. invalidParams.Add(request.NewErrParamRequired("TargetString"))
  2352. }
  2353. if s.TextTransformation == nil {
  2354. invalidParams.Add(request.NewErrParamRequired("TextTransformation"))
  2355. }
  2356. if s.FieldToMatch != nil {
  2357. if err := s.FieldToMatch.Validate(); err != nil {
  2358. invalidParams.AddNested("FieldToMatch", err.(request.ErrInvalidParams))
  2359. }
  2360. }
  2361. if invalidParams.Len() > 0 {
  2362. return invalidParams
  2363. }
  2364. return nil
  2365. }
  2366. type CreateByteMatchSetInput struct {
  2367. _ struct{} `type:"structure"`
  2368. // The value returned by the most recent call to GetChangeToken.
  2369. ChangeToken *string `type:"string" required:"true"`
  2370. // A friendly name or description of the ByteMatchSet. You can't change Name
  2371. // after you create a ByteMatchSet.
  2372. Name *string `min:"1" type:"string" required:"true"`
  2373. }
  2374. // String returns the string representation
  2375. func (s CreateByteMatchSetInput) String() string {
  2376. return awsutil.Prettify(s)
  2377. }
  2378. // GoString returns the string representation
  2379. func (s CreateByteMatchSetInput) GoString() string {
  2380. return s.String()
  2381. }
  2382. // Validate inspects the fields of the type to determine if they are valid.
  2383. func (s *CreateByteMatchSetInput) Validate() error {
  2384. invalidParams := request.ErrInvalidParams{Context: "CreateByteMatchSetInput"}
  2385. if s.ChangeToken == nil {
  2386. invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
  2387. }
  2388. if s.Name == nil {
  2389. invalidParams.Add(request.NewErrParamRequired("Name"))
  2390. }
  2391. if s.Name != nil && len(*s.Name) < 1 {
  2392. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  2393. }
  2394. if invalidParams.Len() > 0 {
  2395. return invalidParams
  2396. }
  2397. return nil
  2398. }
  2399. type CreateByteMatchSetOutput struct {
  2400. _ struct{} `type:"structure"`
  2401. // A ByteMatchSet that contains no ByteMatchTuple objects.
  2402. ByteMatchSet *ByteMatchSet `type:"structure"`
  2403. // The ChangeToken that you used to submit the CreateByteMatchSet request. You
  2404. // can also use this value to query the status of the request. For more information,
  2405. // see GetChangeTokenStatus.
  2406. ChangeToken *string `type:"string"`
  2407. }
  2408. // String returns the string representation
  2409. func (s CreateByteMatchSetOutput) String() string {
  2410. return awsutil.Prettify(s)
  2411. }
  2412. // GoString returns the string representation
  2413. func (s CreateByteMatchSetOutput) GoString() string {
  2414. return s.String()
  2415. }
  2416. type CreateIPSetInput struct {
  2417. _ struct{} `type:"structure"`
  2418. // The value returned by the most recent call to GetChangeToken.
  2419. ChangeToken *string `type:"string" required:"true"`
  2420. // A friendly name or description of the IPSet. You can't change Name after
  2421. // you create the IPSet.
  2422. Name *string `min:"1" type:"string" required:"true"`
  2423. }
  2424. // String returns the string representation
  2425. func (s CreateIPSetInput) String() string {
  2426. return awsutil.Prettify(s)
  2427. }
  2428. // GoString returns the string representation
  2429. func (s CreateIPSetInput) GoString() string {
  2430. return s.String()
  2431. }
  2432. // Validate inspects the fields of the type to determine if they are valid.
  2433. func (s *CreateIPSetInput) Validate() error {
  2434. invalidParams := request.ErrInvalidParams{Context: "CreateIPSetInput"}
  2435. if s.ChangeToken == nil {
  2436. invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
  2437. }
  2438. if s.Name == nil {
  2439. invalidParams.Add(request.NewErrParamRequired("Name"))
  2440. }
  2441. if s.Name != nil && len(*s.Name) < 1 {
  2442. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  2443. }
  2444. if invalidParams.Len() > 0 {
  2445. return invalidParams
  2446. }
  2447. return nil
  2448. }
  2449. type CreateIPSetOutput struct {
  2450. _ struct{} `type:"structure"`
  2451. // The ChangeToken that you used to submit the CreateIPSet request. You can
  2452. // also use this value to query the status of the request. For more information,
  2453. // see GetChangeTokenStatus.
  2454. ChangeToken *string `type:"string"`
  2455. // The IPSet returned in the CreateIPSet response.
  2456. IPSet *IPSet `type:"structure"`
  2457. }
  2458. // String returns the string representation
  2459. func (s CreateIPSetOutput) String() string {
  2460. return awsutil.Prettify(s)
  2461. }
  2462. // GoString returns the string representation
  2463. func (s CreateIPSetOutput) GoString() string {
  2464. return s.String()
  2465. }
  2466. type CreateRuleInput struct {
  2467. _ struct{} `type:"structure"`
  2468. // The value returned by the most recent call to GetChangeToken.
  2469. ChangeToken *string `type:"string" required:"true"`
  2470. // A friendly name or description for the metrics for this Rule. The name can
  2471. // contain only alphanumeric characters (A-Z, a-z, 0-9); the name can't contain
  2472. // whitespace. You can't change the name of the metric after you create the
  2473. // Rule.
  2474. MetricName *string `type:"string" required:"true"`
  2475. // A friendly name or description of the Rule. You can't change the name of
  2476. // a Rule after you create it.
  2477. Name *string `min:"1" type:"string" required:"true"`
  2478. }
  2479. // String returns the string representation
  2480. func (s CreateRuleInput) String() string {
  2481. return awsutil.Prettify(s)
  2482. }
  2483. // GoString returns the string representation
  2484. func (s CreateRuleInput) GoString() string {
  2485. return s.String()
  2486. }
  2487. // Validate inspects the fields of the type to determine if they are valid.
  2488. func (s *CreateRuleInput) Validate() error {
  2489. invalidParams := request.ErrInvalidParams{Context: "CreateRuleInput"}
  2490. if s.ChangeToken == nil {
  2491. invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
  2492. }
  2493. if s.MetricName == nil {
  2494. invalidParams.Add(request.NewErrParamRequired("MetricName"))
  2495. }
  2496. if s.Name == nil {
  2497. invalidParams.Add(request.NewErrParamRequired("Name"))
  2498. }
  2499. if s.Name != nil && len(*s.Name) < 1 {
  2500. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  2501. }
  2502. if invalidParams.Len() > 0 {
  2503. return invalidParams
  2504. }
  2505. return nil
  2506. }
  2507. type CreateRuleOutput struct {
  2508. _ struct{} `type:"structure"`
  2509. // The ChangeToken that you used to submit the CreateRule request. You can also
  2510. // use this value to query the status of the request. For more information,
  2511. // see GetChangeTokenStatus.
  2512. ChangeToken *string `type:"string"`
  2513. // The Rule returned in the CreateRule response.
  2514. Rule *Rule `type:"structure"`
  2515. }
  2516. // String returns the string representation
  2517. func (s CreateRuleOutput) String() string {
  2518. return awsutil.Prettify(s)
  2519. }
  2520. // GoString returns the string representation
  2521. func (s CreateRuleOutput) GoString() string {
  2522. return s.String()
  2523. }
  2524. type CreateSizeConstraintSetInput struct {
  2525. _ struct{} `type:"structure"`
  2526. // The value returned by the most recent call to GetChangeToken.
  2527. ChangeToken *string `type:"string" required:"true"`
  2528. // A friendly name or description of the SizeConstraintSet. You can't change
  2529. // Name after you create a SizeConstraintSet.
  2530. Name *string `min:"1" type:"string" required:"true"`
  2531. }
  2532. // String returns the string representation
  2533. func (s CreateSizeConstraintSetInput) String() string {
  2534. return awsutil.Prettify(s)
  2535. }
  2536. // GoString returns the string representation
  2537. func (s CreateSizeConstraintSetInput) GoString() string {
  2538. return s.String()
  2539. }
  2540. // Validate inspects the fields of the type to determine if they are valid.
  2541. func (s *CreateSizeConstraintSetInput) Validate() error {
  2542. invalidParams := request.ErrInvalidParams{Context: "CreateSizeConstraintSetInput"}
  2543. if s.ChangeToken == nil {
  2544. invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
  2545. }
  2546. if s.Name == nil {
  2547. invalidParams.Add(request.NewErrParamRequired("Name"))
  2548. }
  2549. if s.Name != nil && len(*s.Name) < 1 {
  2550. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  2551. }
  2552. if invalidParams.Len() > 0 {
  2553. return invalidParams
  2554. }
  2555. return nil
  2556. }
  2557. type CreateSizeConstraintSetOutput struct {
  2558. _ struct{} `type:"structure"`
  2559. // The ChangeToken that you used to submit the CreateSizeConstraintSet request.
  2560. // You can also use this value to query the status of the request. For more
  2561. // information, see GetChangeTokenStatus.
  2562. ChangeToken *string `type:"string"`
  2563. // A SizeConstraintSet that contains no SizeConstraint objects.
  2564. SizeConstraintSet *SizeConstraintSet `type:"structure"`
  2565. }
  2566. // String returns the string representation
  2567. func (s CreateSizeConstraintSetOutput) String() string {
  2568. return awsutil.Prettify(s)
  2569. }
  2570. // GoString returns the string representation
  2571. func (s CreateSizeConstraintSetOutput) GoString() string {
  2572. return s.String()
  2573. }
  2574. // A request to create a SqlInjectionMatchSet.
  2575. type CreateSqlInjectionMatchSetInput struct {
  2576. _ struct{} `type:"structure"`
  2577. // The value returned by the most recent call to GetChangeToken.
  2578. ChangeToken *string `type:"string" required:"true"`
  2579. // A friendly name or description for the SqlInjectionMatchSet that you're creating.
  2580. // You can't change Name after you create the SqlInjectionMatchSet.
  2581. Name *string `min:"1" type:"string" required:"true"`
  2582. }
  2583. // String returns the string representation
  2584. func (s CreateSqlInjectionMatchSetInput) String() string {
  2585. return awsutil.Prettify(s)
  2586. }
  2587. // GoString returns the string representation
  2588. func (s CreateSqlInjectionMatchSetInput) GoString() string {
  2589. return s.String()
  2590. }
  2591. // Validate inspects the fields of the type to determine if they are valid.
  2592. func (s *CreateSqlInjectionMatchSetInput) Validate() error {
  2593. invalidParams := request.ErrInvalidParams{Context: "CreateSqlInjectionMatchSetInput"}
  2594. if s.ChangeToken == nil {
  2595. invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
  2596. }
  2597. if s.Name == nil {
  2598. invalidParams.Add(request.NewErrParamRequired("Name"))
  2599. }
  2600. if s.Name != nil && len(*s.Name) < 1 {
  2601. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  2602. }
  2603. if invalidParams.Len() > 0 {
  2604. return invalidParams
  2605. }
  2606. return nil
  2607. }
  2608. // The response to a CreateSqlInjectionMatchSet request.
  2609. type CreateSqlInjectionMatchSetOutput struct {
  2610. _ struct{} `type:"structure"`
  2611. // The ChangeToken that you used to submit the CreateSqlInjectionMatchSet request.
  2612. // You can also use this value to query the status of the request. For more
  2613. // information, see GetChangeTokenStatus.
  2614. ChangeToken *string `type:"string"`
  2615. // A SqlInjectionMatchSet.
  2616. SqlInjectionMatchSet *SqlInjectionMatchSet `type:"structure"`
  2617. }
  2618. // String returns the string representation
  2619. func (s CreateSqlInjectionMatchSetOutput) String() string {
  2620. return awsutil.Prettify(s)
  2621. }
  2622. // GoString returns the string representation
  2623. func (s CreateSqlInjectionMatchSetOutput) GoString() string {
  2624. return s.String()
  2625. }
  2626. type CreateWebACLInput struct {
  2627. _ struct{} `type:"structure"`
  2628. // The value returned by the most recent call to GetChangeToken.
  2629. ChangeToken *string `type:"string" required:"true"`
  2630. // The action that you want AWS WAF to take when a request doesn't match the
  2631. // criteria specified in any of the Rule objects that are associated with the
  2632. // WebACL.
  2633. DefaultAction *WafAction `type:"structure" required:"true"`
  2634. // A friendly name or description for the metrics for this WebACL. The name
  2635. // can contain only alphanumeric characters (A-Z, a-z, 0-9); the name can't
  2636. // contain whitespace. You can't change MetricName after you create the WebACL.
  2637. MetricName *string `type:"string" required:"true"`
  2638. // A friendly name or description of the WebACL. You can't change Name after
  2639. // you create the WebACL.
  2640. Name *string `min:"1" type:"string" required:"true"`
  2641. }
  2642. // String returns the string representation
  2643. func (s CreateWebACLInput) String() string {
  2644. return awsutil.Prettify(s)
  2645. }
  2646. // GoString returns the string representation
  2647. func (s CreateWebACLInput) GoString() string {
  2648. return s.String()
  2649. }
  2650. // Validate inspects the fields of the type to determine if they are valid.
  2651. func (s *CreateWebACLInput) Validate() error {
  2652. invalidParams := request.ErrInvalidParams{Context: "CreateWebACLInput"}
  2653. if s.ChangeToken == nil {
  2654. invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
  2655. }
  2656. if s.DefaultAction == nil {
  2657. invalidParams.Add(request.NewErrParamRequired("DefaultAction"))
  2658. }
  2659. if s.MetricName == nil {
  2660. invalidParams.Add(request.NewErrParamRequired("MetricName"))
  2661. }
  2662. if s.Name == nil {
  2663. invalidParams.Add(request.NewErrParamRequired("Name"))
  2664. }
  2665. if s.Name != nil && len(*s.Name) < 1 {
  2666. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  2667. }
  2668. if s.DefaultAction != nil {
  2669. if err := s.DefaultAction.Validate(); err != nil {
  2670. invalidParams.AddNested("DefaultAction", err.(request.ErrInvalidParams))
  2671. }
  2672. }
  2673. if invalidParams.Len() > 0 {
  2674. return invalidParams
  2675. }
  2676. return nil
  2677. }
  2678. type CreateWebACLOutput struct {
  2679. _ struct{} `type:"structure"`
  2680. // The ChangeToken that you used to submit the CreateWebACL request. You can
  2681. // also use this value to query the status of the request. For more information,
  2682. // see GetChangeTokenStatus.
  2683. ChangeToken *string `type:"string"`
  2684. // The WebACL returned in the CreateWebACL response.
  2685. WebACL *WebACL `type:"structure"`
  2686. }
  2687. // String returns the string representation
  2688. func (s CreateWebACLOutput) String() string {
  2689. return awsutil.Prettify(s)
  2690. }
  2691. // GoString returns the string representation
  2692. func (s CreateWebACLOutput) GoString() string {
  2693. return s.String()
  2694. }
  2695. // A request to create an XssMatchSet.
  2696. type CreateXssMatchSetInput struct {
  2697. _ struct{} `type:"structure"`
  2698. // The value returned by the most recent call to GetChangeToken.
  2699. ChangeToken *string `type:"string" required:"true"`
  2700. // A friendly name or description for the XssMatchSet that you're creating.
  2701. // You can't change Name after you create the XssMatchSet.
  2702. Name *string `min:"1" type:"string" required:"true"`
  2703. }
  2704. // String returns the string representation
  2705. func (s CreateXssMatchSetInput) String() string {
  2706. return awsutil.Prettify(s)
  2707. }
  2708. // GoString returns the string representation
  2709. func (s CreateXssMatchSetInput) GoString() string {
  2710. return s.String()
  2711. }
  2712. // Validate inspects the fields of the type to determine if they are valid.
  2713. func (s *CreateXssMatchSetInput) Validate() error {
  2714. invalidParams := request.ErrInvalidParams{Context: "CreateXssMatchSetInput"}
  2715. if s.ChangeToken == nil {
  2716. invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
  2717. }
  2718. if s.Name == nil {
  2719. invalidParams.Add(request.NewErrParamRequired("Name"))
  2720. }
  2721. if s.Name != nil && len(*s.Name) < 1 {
  2722. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  2723. }
  2724. if invalidParams.Len() > 0 {
  2725. return invalidParams
  2726. }
  2727. return nil
  2728. }
  2729. // The response to a CreateXssMatchSet request.
  2730. type CreateXssMatchSetOutput struct {
  2731. _ struct{} `type:"structure"`
  2732. // The ChangeToken that you used to submit the CreateXssMatchSet request. You
  2733. // can also use this value to query the status of the request. For more information,
  2734. // see GetChangeTokenStatus.
  2735. ChangeToken *string `type:"string"`
  2736. // An XssMatchSet.
  2737. XssMatchSet *XssMatchSet `type:"structure"`
  2738. }
  2739. // String returns the string representation
  2740. func (s CreateXssMatchSetOutput) String() string {
  2741. return awsutil.Prettify(s)
  2742. }
  2743. // GoString returns the string representation
  2744. func (s CreateXssMatchSetOutput) GoString() string {
  2745. return s.String()
  2746. }
  2747. type DeleteByteMatchSetInput struct {
  2748. _ struct{} `type:"structure"`
  2749. // The ByteMatchSetId of the ByteMatchSet that you want to delete. ByteMatchSetId
  2750. // is returned by CreateByteMatchSet and by ListByteMatchSets.
  2751. ByteMatchSetId *string `min:"1" type:"string" required:"true"`
  2752. // The value returned by the most recent call to GetChangeToken.
  2753. ChangeToken *string `type:"string" required:"true"`
  2754. }
  2755. // String returns the string representation
  2756. func (s DeleteByteMatchSetInput) String() string {
  2757. return awsutil.Prettify(s)
  2758. }
  2759. // GoString returns the string representation
  2760. func (s DeleteByteMatchSetInput) GoString() string {
  2761. return s.String()
  2762. }
  2763. // Validate inspects the fields of the type to determine if they are valid.
  2764. func (s *DeleteByteMatchSetInput) Validate() error {
  2765. invalidParams := request.ErrInvalidParams{Context: "DeleteByteMatchSetInput"}
  2766. if s.ByteMatchSetId == nil {
  2767. invalidParams.Add(request.NewErrParamRequired("ByteMatchSetId"))
  2768. }
  2769. if s.ByteMatchSetId != nil && len(*s.ByteMatchSetId) < 1 {
  2770. invalidParams.Add(request.NewErrParamMinLen("ByteMatchSetId", 1))
  2771. }
  2772. if s.ChangeToken == nil {
  2773. invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
  2774. }
  2775. if invalidParams.Len() > 0 {
  2776. return invalidParams
  2777. }
  2778. return nil
  2779. }
  2780. type DeleteByteMatchSetOutput struct {
  2781. _ struct{} `type:"structure"`
  2782. // The ChangeToken that you used to submit the DeleteByteMatchSet request. You
  2783. // can also use this value to query the status of the request. For more information,
  2784. // see GetChangeTokenStatus.
  2785. ChangeToken *string `type:"string"`
  2786. }
  2787. // String returns the string representation
  2788. func (s DeleteByteMatchSetOutput) String() string {
  2789. return awsutil.Prettify(s)
  2790. }
  2791. // GoString returns the string representation
  2792. func (s DeleteByteMatchSetOutput) GoString() string {
  2793. return s.String()
  2794. }
  2795. type DeleteIPSetInput struct {
  2796. _ struct{} `type:"structure"`
  2797. // The value returned by the most recent call to GetChangeToken.
  2798. ChangeToken *string `type:"string" required:"true"`
  2799. // The IPSetId of the IPSet that you want to delete. IPSetId is returned by
  2800. // CreateIPSet and by ListIPSets.
  2801. IPSetId *string `min:"1" type:"string" required:"true"`
  2802. }
  2803. // String returns the string representation
  2804. func (s DeleteIPSetInput) String() string {
  2805. return awsutil.Prettify(s)
  2806. }
  2807. // GoString returns the string representation
  2808. func (s DeleteIPSetInput) GoString() string {
  2809. return s.String()
  2810. }
  2811. // Validate inspects the fields of the type to determine if they are valid.
  2812. func (s *DeleteIPSetInput) Validate() error {
  2813. invalidParams := request.ErrInvalidParams{Context: "DeleteIPSetInput"}
  2814. if s.ChangeToken == nil {
  2815. invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
  2816. }
  2817. if s.IPSetId == nil {
  2818. invalidParams.Add(request.NewErrParamRequired("IPSetId"))
  2819. }
  2820. if s.IPSetId != nil && len(*s.IPSetId) < 1 {
  2821. invalidParams.Add(request.NewErrParamMinLen("IPSetId", 1))
  2822. }
  2823. if invalidParams.Len() > 0 {
  2824. return invalidParams
  2825. }
  2826. return nil
  2827. }
  2828. type DeleteIPSetOutput struct {
  2829. _ struct{} `type:"structure"`
  2830. // The ChangeToken that you used to submit the DeleteIPSet request. You can
  2831. // also use this value to query the status of the request. For more information,
  2832. // see GetChangeTokenStatus.
  2833. ChangeToken *string `type:"string"`
  2834. }
  2835. // String returns the string representation
  2836. func (s DeleteIPSetOutput) String() string {
  2837. return awsutil.Prettify(s)
  2838. }
  2839. // GoString returns the string representation
  2840. func (s DeleteIPSetOutput) GoString() string {
  2841. return s.String()
  2842. }
  2843. type DeleteRuleInput struct {
  2844. _ struct{} `type:"structure"`
  2845. // The value returned by the most recent call to GetChangeToken.
  2846. ChangeToken *string `type:"string" required:"true"`
  2847. // The RuleId of the Rule that you want to delete. RuleId is returned by CreateRule
  2848. // and by ListRules.
  2849. RuleId *string `min:"1" type:"string" required:"true"`
  2850. }
  2851. // String returns the string representation
  2852. func (s DeleteRuleInput) String() string {
  2853. return awsutil.Prettify(s)
  2854. }
  2855. // GoString returns the string representation
  2856. func (s DeleteRuleInput) GoString() string {
  2857. return s.String()
  2858. }
  2859. // Validate inspects the fields of the type to determine if they are valid.
  2860. func (s *DeleteRuleInput) Validate() error {
  2861. invalidParams := request.ErrInvalidParams{Context: "DeleteRuleInput"}
  2862. if s.ChangeToken == nil {
  2863. invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
  2864. }
  2865. if s.RuleId == nil {
  2866. invalidParams.Add(request.NewErrParamRequired("RuleId"))
  2867. }
  2868. if s.RuleId != nil && len(*s.RuleId) < 1 {
  2869. invalidParams.Add(request.NewErrParamMinLen("RuleId", 1))
  2870. }
  2871. if invalidParams.Len() > 0 {
  2872. return invalidParams
  2873. }
  2874. return nil
  2875. }
  2876. type DeleteRuleOutput struct {
  2877. _ struct{} `type:"structure"`
  2878. // The ChangeToken that you used to submit the DeleteRule request. You can also
  2879. // use this value to query the status of the request. For more information,
  2880. // see GetChangeTokenStatus.
  2881. ChangeToken *string `type:"string"`
  2882. }
  2883. // String returns the string representation
  2884. func (s DeleteRuleOutput) String() string {
  2885. return awsutil.Prettify(s)
  2886. }
  2887. // GoString returns the string representation
  2888. func (s DeleteRuleOutput) GoString() string {
  2889. return s.String()
  2890. }
  2891. type DeleteSizeConstraintSetInput struct {
  2892. _ struct{} `type:"structure"`
  2893. // The value returned by the most recent call to GetChangeToken.
  2894. ChangeToken *string `type:"string" required:"true"`
  2895. // The SizeConstraintSetId of the SizeConstraintSet that you want to delete.
  2896. // SizeConstraintSetId is returned by CreateSizeConstraintSet and by ListSizeConstraintSets.
  2897. SizeConstraintSetId *string `min:"1" type:"string" required:"true"`
  2898. }
  2899. // String returns the string representation
  2900. func (s DeleteSizeConstraintSetInput) String() string {
  2901. return awsutil.Prettify(s)
  2902. }
  2903. // GoString returns the string representation
  2904. func (s DeleteSizeConstraintSetInput) GoString() string {
  2905. return s.String()
  2906. }
  2907. // Validate inspects the fields of the type to determine if they are valid.
  2908. func (s *DeleteSizeConstraintSetInput) Validate() error {
  2909. invalidParams := request.ErrInvalidParams{Context: "DeleteSizeConstraintSetInput"}
  2910. if s.ChangeToken == nil {
  2911. invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
  2912. }
  2913. if s.SizeConstraintSetId == nil {
  2914. invalidParams.Add(request.NewErrParamRequired("SizeConstraintSetId"))
  2915. }
  2916. if s.SizeConstraintSetId != nil && len(*s.SizeConstraintSetId) < 1 {
  2917. invalidParams.Add(request.NewErrParamMinLen("SizeConstraintSetId", 1))
  2918. }
  2919. if invalidParams.Len() > 0 {
  2920. return invalidParams
  2921. }
  2922. return nil
  2923. }
  2924. type DeleteSizeConstraintSetOutput struct {
  2925. _ struct{} `type:"structure"`
  2926. // The ChangeToken that you used to submit the DeleteSizeConstraintSet request.
  2927. // You can also use this value to query the status of the request. For more
  2928. // information, see GetChangeTokenStatus.
  2929. ChangeToken *string `type:"string"`
  2930. }
  2931. // String returns the string representation
  2932. func (s DeleteSizeConstraintSetOutput) String() string {
  2933. return awsutil.Prettify(s)
  2934. }
  2935. // GoString returns the string representation
  2936. func (s DeleteSizeConstraintSetOutput) GoString() string {
  2937. return s.String()
  2938. }
  2939. // A request to delete a SqlInjectionMatchSet from AWS WAF.
  2940. type DeleteSqlInjectionMatchSetInput struct {
  2941. _ struct{} `type:"structure"`
  2942. // The value returned by the most recent call to GetChangeToken.
  2943. ChangeToken *string `type:"string" required:"true"`
  2944. // The SqlInjectionMatchSetId of the SqlInjectionMatchSet that you want to delete.
  2945. // SqlInjectionMatchSetId is returned by CreateSqlInjectionMatchSet and by ListSqlInjectionMatchSets.
  2946. SqlInjectionMatchSetId *string `min:"1" type:"string" required:"true"`
  2947. }
  2948. // String returns the string representation
  2949. func (s DeleteSqlInjectionMatchSetInput) String() string {
  2950. return awsutil.Prettify(s)
  2951. }
  2952. // GoString returns the string representation
  2953. func (s DeleteSqlInjectionMatchSetInput) GoString() string {
  2954. return s.String()
  2955. }
  2956. // Validate inspects the fields of the type to determine if they are valid.
  2957. func (s *DeleteSqlInjectionMatchSetInput) Validate() error {
  2958. invalidParams := request.ErrInvalidParams{Context: "DeleteSqlInjectionMatchSetInput"}
  2959. if s.ChangeToken == nil {
  2960. invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
  2961. }
  2962. if s.SqlInjectionMatchSetId == nil {
  2963. invalidParams.Add(request.NewErrParamRequired("SqlInjectionMatchSetId"))
  2964. }
  2965. if s.SqlInjectionMatchSetId != nil && len(*s.SqlInjectionMatchSetId) < 1 {
  2966. invalidParams.Add(request.NewErrParamMinLen("SqlInjectionMatchSetId", 1))
  2967. }
  2968. if invalidParams.Len() > 0 {
  2969. return invalidParams
  2970. }
  2971. return nil
  2972. }
  2973. // The response to a request to delete a SqlInjectionMatchSet from AWS WAF.
  2974. type DeleteSqlInjectionMatchSetOutput struct {
  2975. _ struct{} `type:"structure"`
  2976. // The ChangeToken that you used to submit the DeleteSqlInjectionMatchSet request.
  2977. // You can also use this value to query the status of the request. For more
  2978. // information, see GetChangeTokenStatus.
  2979. ChangeToken *string `type:"string"`
  2980. }
  2981. // String returns the string representation
  2982. func (s DeleteSqlInjectionMatchSetOutput) String() string {
  2983. return awsutil.Prettify(s)
  2984. }
  2985. // GoString returns the string representation
  2986. func (s DeleteSqlInjectionMatchSetOutput) GoString() string {
  2987. return s.String()
  2988. }
  2989. type DeleteWebACLInput struct {
  2990. _ struct{} `type:"structure"`
  2991. // The value returned by the most recent call to GetChangeToken.
  2992. ChangeToken *string `type:"string" required:"true"`
  2993. // The WebACLId of the WebACL that you want to delete. WebACLId is returned
  2994. // by CreateWebACL and by ListWebACLs.
  2995. WebACLId *string `min:"1" type:"string" required:"true"`
  2996. }
  2997. // String returns the string representation
  2998. func (s DeleteWebACLInput) String() string {
  2999. return awsutil.Prettify(s)
  3000. }
  3001. // GoString returns the string representation
  3002. func (s DeleteWebACLInput) GoString() string {
  3003. return s.String()
  3004. }
  3005. // Validate inspects the fields of the type to determine if they are valid.
  3006. func (s *DeleteWebACLInput) Validate() error {
  3007. invalidParams := request.ErrInvalidParams{Context: "DeleteWebACLInput"}
  3008. if s.ChangeToken == nil {
  3009. invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
  3010. }
  3011. if s.WebACLId == nil {
  3012. invalidParams.Add(request.NewErrParamRequired("WebACLId"))
  3013. }
  3014. if s.WebACLId != nil && len(*s.WebACLId) < 1 {
  3015. invalidParams.Add(request.NewErrParamMinLen("WebACLId", 1))
  3016. }
  3017. if invalidParams.Len() > 0 {
  3018. return invalidParams
  3019. }
  3020. return nil
  3021. }
  3022. type DeleteWebACLOutput struct {
  3023. _ struct{} `type:"structure"`
  3024. // The ChangeToken that you used to submit the DeleteWebACL request. You can
  3025. // also use this value to query the status of the request. For more information,
  3026. // see GetChangeTokenStatus.
  3027. ChangeToken *string `type:"string"`
  3028. }
  3029. // String returns the string representation
  3030. func (s DeleteWebACLOutput) String() string {
  3031. return awsutil.Prettify(s)
  3032. }
  3033. // GoString returns the string representation
  3034. func (s DeleteWebACLOutput) GoString() string {
  3035. return s.String()
  3036. }
  3037. // A request to delete an XssMatchSet from AWS WAF.
  3038. type DeleteXssMatchSetInput struct {
  3039. _ struct{} `type:"structure"`
  3040. // The value returned by the most recent call to GetChangeToken.
  3041. ChangeToken *string `type:"string" required:"true"`
  3042. // The XssMatchSetId of the XssMatchSet that you want to delete. XssMatchSetId
  3043. // is returned by CreateXssMatchSet and by ListXssMatchSets.
  3044. XssMatchSetId *string `min:"1" type:"string" required:"true"`
  3045. }
  3046. // String returns the string representation
  3047. func (s DeleteXssMatchSetInput) String() string {
  3048. return awsutil.Prettify(s)
  3049. }
  3050. // GoString returns the string representation
  3051. func (s DeleteXssMatchSetInput) GoString() string {
  3052. return s.String()
  3053. }
  3054. // Validate inspects the fields of the type to determine if they are valid.
  3055. func (s *DeleteXssMatchSetInput) Validate() error {
  3056. invalidParams := request.ErrInvalidParams{Context: "DeleteXssMatchSetInput"}
  3057. if s.ChangeToken == nil {
  3058. invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
  3059. }
  3060. if s.XssMatchSetId == nil {
  3061. invalidParams.Add(request.NewErrParamRequired("XssMatchSetId"))
  3062. }
  3063. if s.XssMatchSetId != nil && len(*s.XssMatchSetId) < 1 {
  3064. invalidParams.Add(request.NewErrParamMinLen("XssMatchSetId", 1))
  3065. }
  3066. if invalidParams.Len() > 0 {
  3067. return invalidParams
  3068. }
  3069. return nil
  3070. }
  3071. // The response to a request to delete an XssMatchSet from AWS WAF.
  3072. type DeleteXssMatchSetOutput struct {
  3073. _ struct{} `type:"structure"`
  3074. // The ChangeToken that you used to submit the DeleteXssMatchSet request. You
  3075. // can also use this value to query the status of the request. For more information,
  3076. // see GetChangeTokenStatus.
  3077. ChangeToken *string `type:"string"`
  3078. }
  3079. // String returns the string representation
  3080. func (s DeleteXssMatchSetOutput) String() string {
  3081. return awsutil.Prettify(s)
  3082. }
  3083. // GoString returns the string representation
  3084. func (s DeleteXssMatchSetOutput) GoString() string {
  3085. return s.String()
  3086. }
  3087. // Specifies where in a web request to look for TargetString.
  3088. type FieldToMatch struct {
  3089. _ struct{} `type:"structure"`
  3090. // When the value of Type is HEADER, enter the name of the header that you want
  3091. // AWS WAF to search, for example, User-Agent or Referer. If the value of Type
  3092. // is any other value, omit Data.
  3093. //
  3094. // The name of the header is not case sensitive.
  3095. Data *string `type:"string"`
  3096. // The part of the web request that you want AWS WAF to search for a specified
  3097. // string. Parts of a request that you can search include the following:
  3098. //
  3099. // HEADER: A specified request header, for example, the value of the User-Agent
  3100. // or Referer header. If you choose HEADER for the type, specify the name of
  3101. // the header in Data. METHOD: The HTTP method, which indicated the type of
  3102. // operation that the request is asking the origin to perform. Amazon CloudFront
  3103. // supports the following methods: DELETE, GET, HEAD, OPTIONS, PATCH, POST,
  3104. // and PUT. QUERY_STRING: A query string, which is the part of a URL that appears
  3105. // after a ? character, if any. URI: The part of a web request that identifies
  3106. // a resource, for example, /images/daily-ad.jpg. BODY: The part of a request
  3107. // that contains any additional data that you want to send to your web server
  3108. // as the HTTP request body, such as data from a form. The request body immediately
  3109. // follows the request headers. Note that only the first 8192 bytes of the request
  3110. // body are forwarded to AWS WAF for inspection. To allow or block requests
  3111. // based on the length of the body, you can create a size constraint set. For
  3112. // more information, see CreateSizeConstraintSet.
  3113. Type *string `type:"string" required:"true" enum:"MatchFieldType"`
  3114. }
  3115. // String returns the string representation
  3116. func (s FieldToMatch) String() string {
  3117. return awsutil.Prettify(s)
  3118. }
  3119. // GoString returns the string representation
  3120. func (s FieldToMatch) GoString() string {
  3121. return s.String()
  3122. }
  3123. // Validate inspects the fields of the type to determine if they are valid.
  3124. func (s *FieldToMatch) Validate() error {
  3125. invalidParams := request.ErrInvalidParams{Context: "FieldToMatch"}
  3126. if s.Type == nil {
  3127. invalidParams.Add(request.NewErrParamRequired("Type"))
  3128. }
  3129. if invalidParams.Len() > 0 {
  3130. return invalidParams
  3131. }
  3132. return nil
  3133. }
  3134. type GetByteMatchSetInput struct {
  3135. _ struct{} `type:"structure"`
  3136. // The ByteMatchSetId of the ByteMatchSet that you want to get. ByteMatchSetId
  3137. // is returned by CreateByteMatchSet and by ListByteMatchSets.
  3138. ByteMatchSetId *string `min:"1" type:"string" required:"true"`
  3139. }
  3140. // String returns the string representation
  3141. func (s GetByteMatchSetInput) String() string {
  3142. return awsutil.Prettify(s)
  3143. }
  3144. // GoString returns the string representation
  3145. func (s GetByteMatchSetInput) GoString() string {
  3146. return s.String()
  3147. }
  3148. // Validate inspects the fields of the type to determine if they are valid.
  3149. func (s *GetByteMatchSetInput) Validate() error {
  3150. invalidParams := request.ErrInvalidParams{Context: "GetByteMatchSetInput"}
  3151. if s.ByteMatchSetId == nil {
  3152. invalidParams.Add(request.NewErrParamRequired("ByteMatchSetId"))
  3153. }
  3154. if s.ByteMatchSetId != nil && len(*s.ByteMatchSetId) < 1 {
  3155. invalidParams.Add(request.NewErrParamMinLen("ByteMatchSetId", 1))
  3156. }
  3157. if invalidParams.Len() > 0 {
  3158. return invalidParams
  3159. }
  3160. return nil
  3161. }
  3162. type GetByteMatchSetOutput struct {
  3163. _ struct{} `type:"structure"`
  3164. // Information about the ByteMatchSet that you specified in the GetByteMatchSet
  3165. // request. For more information, see the following topics:
  3166. //
  3167. // ByteMatchSet: Contains ByteMatchSetId, ByteMatchTuples, and Name ByteMatchTuples:
  3168. // Contains an array of ByteMatchTuple objects. Each ByteMatchTuple object contains
  3169. // FieldToMatch, PositionalConstraint, TargetString, and TextTransformation
  3170. // FieldToMatch: Contains Data and Type
  3171. ByteMatchSet *ByteMatchSet `type:"structure"`
  3172. }
  3173. // String returns the string representation
  3174. func (s GetByteMatchSetOutput) String() string {
  3175. return awsutil.Prettify(s)
  3176. }
  3177. // GoString returns the string representation
  3178. func (s GetByteMatchSetOutput) GoString() string {
  3179. return s.String()
  3180. }
  3181. type GetChangeTokenInput struct {
  3182. _ struct{} `type:"structure"`
  3183. }
  3184. // String returns the string representation
  3185. func (s GetChangeTokenInput) String() string {
  3186. return awsutil.Prettify(s)
  3187. }
  3188. // GoString returns the string representation
  3189. func (s GetChangeTokenInput) GoString() string {
  3190. return s.String()
  3191. }
  3192. type GetChangeTokenOutput struct {
  3193. _ struct{} `type:"structure"`
  3194. // The ChangeToken that you used in the request. Use this value in a GetChangeTokenStatus
  3195. // request to get the current status of the request.
  3196. ChangeToken *string `type:"string"`
  3197. }
  3198. // String returns the string representation
  3199. func (s GetChangeTokenOutput) String() string {
  3200. return awsutil.Prettify(s)
  3201. }
  3202. // GoString returns the string representation
  3203. func (s GetChangeTokenOutput) GoString() string {
  3204. return s.String()
  3205. }
  3206. type GetChangeTokenStatusInput struct {
  3207. _ struct{} `type:"structure"`
  3208. // The change token for which you want to get the status. This change token
  3209. // was previously returned in the GetChangeToken response.
  3210. ChangeToken *string `type:"string" required:"true"`
  3211. }
  3212. // String returns the string representation
  3213. func (s GetChangeTokenStatusInput) String() string {
  3214. return awsutil.Prettify(s)
  3215. }
  3216. // GoString returns the string representation
  3217. func (s GetChangeTokenStatusInput) GoString() string {
  3218. return s.String()
  3219. }
  3220. // Validate inspects the fields of the type to determine if they are valid.
  3221. func (s *GetChangeTokenStatusInput) Validate() error {
  3222. invalidParams := request.ErrInvalidParams{Context: "GetChangeTokenStatusInput"}
  3223. if s.ChangeToken == nil {
  3224. invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
  3225. }
  3226. if invalidParams.Len() > 0 {
  3227. return invalidParams
  3228. }
  3229. return nil
  3230. }
  3231. type GetChangeTokenStatusOutput struct {
  3232. _ struct{} `type:"structure"`
  3233. // The status of the change token.
  3234. ChangeTokenStatus *string `type:"string" enum:"ChangeTokenStatus"`
  3235. }
  3236. // String returns the string representation
  3237. func (s GetChangeTokenStatusOutput) String() string {
  3238. return awsutil.Prettify(s)
  3239. }
  3240. // GoString returns the string representation
  3241. func (s GetChangeTokenStatusOutput) GoString() string {
  3242. return s.String()
  3243. }
  3244. type GetIPSetInput struct {
  3245. _ struct{} `type:"structure"`
  3246. // The IPSetId of the IPSet that you want to get. IPSetId is returned by CreateIPSet
  3247. // and by ListIPSets.
  3248. IPSetId *string `min:"1" type:"string" required:"true"`
  3249. }
  3250. // String returns the string representation
  3251. func (s GetIPSetInput) String() string {
  3252. return awsutil.Prettify(s)
  3253. }
  3254. // GoString returns the string representation
  3255. func (s GetIPSetInput) GoString() string {
  3256. return s.String()
  3257. }
  3258. // Validate inspects the fields of the type to determine if they are valid.
  3259. func (s *GetIPSetInput) Validate() error {
  3260. invalidParams := request.ErrInvalidParams{Context: "GetIPSetInput"}
  3261. if s.IPSetId == nil {
  3262. invalidParams.Add(request.NewErrParamRequired("IPSetId"))
  3263. }
  3264. if s.IPSetId != nil && len(*s.IPSetId) < 1 {
  3265. invalidParams.Add(request.NewErrParamMinLen("IPSetId", 1))
  3266. }
  3267. if invalidParams.Len() > 0 {
  3268. return invalidParams
  3269. }
  3270. return nil
  3271. }
  3272. type GetIPSetOutput struct {
  3273. _ struct{} `type:"structure"`
  3274. // Information about the IPSet that you specified in the GetIPSet request. For
  3275. // more information, see the following topics:
  3276. //
  3277. // IPSet: Contains IPSetDescriptors, IPSetId, and Name IPSetDescriptors: Contains
  3278. // an array of IPSetDescriptor objects. Each IPSetDescriptor object contains
  3279. // Type and Value
  3280. IPSet *IPSet `type:"structure"`
  3281. }
  3282. // String returns the string representation
  3283. func (s GetIPSetOutput) String() string {
  3284. return awsutil.Prettify(s)
  3285. }
  3286. // GoString returns the string representation
  3287. func (s GetIPSetOutput) GoString() string {
  3288. return s.String()
  3289. }
  3290. type GetRuleInput struct {
  3291. _ struct{} `type:"structure"`
  3292. // The RuleId of the Rule that you want to get. RuleId is returned by CreateRule
  3293. // and by ListRules.
  3294. RuleId *string `min:"1" type:"string" required:"true"`
  3295. }
  3296. // String returns the string representation
  3297. func (s GetRuleInput) String() string {
  3298. return awsutil.Prettify(s)
  3299. }
  3300. // GoString returns the string representation
  3301. func (s GetRuleInput) GoString() string {
  3302. return s.String()
  3303. }
  3304. // Validate inspects the fields of the type to determine if they are valid.
  3305. func (s *GetRuleInput) Validate() error {
  3306. invalidParams := request.ErrInvalidParams{Context: "GetRuleInput"}
  3307. if s.RuleId == nil {
  3308. invalidParams.Add(request.NewErrParamRequired("RuleId"))
  3309. }
  3310. if s.RuleId != nil && len(*s.RuleId) < 1 {
  3311. invalidParams.Add(request.NewErrParamMinLen("RuleId", 1))
  3312. }
  3313. if invalidParams.Len() > 0 {
  3314. return invalidParams
  3315. }
  3316. return nil
  3317. }
  3318. type GetRuleOutput struct {
  3319. _ struct{} `type:"structure"`
  3320. // Information about the Rule that you specified in the GetRule request. For
  3321. // more information, see the following topics:
  3322. //
  3323. // Rule: Contains MetricName, Name, an array of Predicate objects, and RuleId
  3324. // Predicate: Each Predicate object contains DataId, Negated, and Type
  3325. Rule *Rule `type:"structure"`
  3326. }
  3327. // String returns the string representation
  3328. func (s GetRuleOutput) String() string {
  3329. return awsutil.Prettify(s)
  3330. }
  3331. // GoString returns the string representation
  3332. func (s GetRuleOutput) GoString() string {
  3333. return s.String()
  3334. }
  3335. type GetSampledRequestsInput struct {
  3336. _ struct{} `type:"structure"`
  3337. // The number of requests that you want AWS WAF to return from among the first
  3338. // 5,000 requests that your AWS resource received during the time range. If
  3339. // your resource received fewer requests than the value of MaxItems, GetSampledRequests
  3340. // returns information about all of them.
  3341. MaxItems *int64 `min:"1" type:"long" required:"true"`
  3342. // RuleId is one of two values:
  3343. //
  3344. // The RuleId of the Rule for which you want GetSampledRequests to return
  3345. // a sample of requests. Default_Action, which causes GetSampledRequests to
  3346. // return a sample of the requests that didn't match any of the rules in the
  3347. // specified WebACL.
  3348. RuleId *string `min:"1" type:"string" required:"true"`
  3349. // The start date and time and the end date and time of the range for which
  3350. // you want GetSampledRequests to return a sample of requests. Specify the date
  3351. // and time in Unix time format (in seconds). You can specify any time range
  3352. // in the previous three hours.
  3353. TimeWindow *TimeWindow `type:"structure" required:"true"`
  3354. // The WebACLId of the WebACL for which you want GetSampledRequests to return
  3355. // a sample of requests.
  3356. WebAclId *string `min:"1" type:"string" required:"true"`
  3357. }
  3358. // String returns the string representation
  3359. func (s GetSampledRequestsInput) String() string {
  3360. return awsutil.Prettify(s)
  3361. }
  3362. // GoString returns the string representation
  3363. func (s GetSampledRequestsInput) GoString() string {
  3364. return s.String()
  3365. }
  3366. // Validate inspects the fields of the type to determine if they are valid.
  3367. func (s *GetSampledRequestsInput) Validate() error {
  3368. invalidParams := request.ErrInvalidParams{Context: "GetSampledRequestsInput"}
  3369. if s.MaxItems == nil {
  3370. invalidParams.Add(request.NewErrParamRequired("MaxItems"))
  3371. }
  3372. if s.MaxItems != nil && *s.MaxItems < 1 {
  3373. invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1))
  3374. }
  3375. if s.RuleId == nil {
  3376. invalidParams.Add(request.NewErrParamRequired("RuleId"))
  3377. }
  3378. if s.RuleId != nil && len(*s.RuleId) < 1 {
  3379. invalidParams.Add(request.NewErrParamMinLen("RuleId", 1))
  3380. }
  3381. if s.TimeWindow == nil {
  3382. invalidParams.Add(request.NewErrParamRequired("TimeWindow"))
  3383. }
  3384. if s.WebAclId == nil {
  3385. invalidParams.Add(request.NewErrParamRequired("WebAclId"))
  3386. }
  3387. if s.WebAclId != nil && len(*s.WebAclId) < 1 {
  3388. invalidParams.Add(request.NewErrParamMinLen("WebAclId", 1))
  3389. }
  3390. if s.TimeWindow != nil {
  3391. if err := s.TimeWindow.Validate(); err != nil {
  3392. invalidParams.AddNested("TimeWindow", err.(request.ErrInvalidParams))
  3393. }
  3394. }
  3395. if invalidParams.Len() > 0 {
  3396. return invalidParams
  3397. }
  3398. return nil
  3399. }
  3400. type GetSampledRequestsOutput struct {
  3401. _ struct{} `type:"structure"`
  3402. // The total number of requests from which GetSampledRequests got a sample of
  3403. // MaxItems requests. If PopulationSize is less than MaxItems, the sample includes
  3404. // every request that your AWS resource received during the specified time range.
  3405. PopulationSize *int64 `type:"long"`
  3406. // A complex type that contains detailed information about each of the requests
  3407. // in the sample.
  3408. SampledRequests []*SampledHTTPRequest `type:"list"`
  3409. // Usually, TimeWindow is the time range that you specified in the GetSampledRequests
  3410. // request. However, if your AWS resource received more than 5,000 requests
  3411. // during the time range that you specified in the request, GetSampledRequests
  3412. // returns the time range for the first 5,000 requests.
  3413. TimeWindow *TimeWindow `type:"structure"`
  3414. }
  3415. // String returns the string representation
  3416. func (s GetSampledRequestsOutput) String() string {
  3417. return awsutil.Prettify(s)
  3418. }
  3419. // GoString returns the string representation
  3420. func (s GetSampledRequestsOutput) GoString() string {
  3421. return s.String()
  3422. }
  3423. type GetSizeConstraintSetInput struct {
  3424. _ struct{} `type:"structure"`
  3425. // The SizeConstraintSetId of the SizeConstraintSet that you want to get. SizeConstraintSetId
  3426. // is returned by CreateSizeConstraintSet and by ListSizeConstraintSets.
  3427. SizeConstraintSetId *string `min:"1" type:"string" required:"true"`
  3428. }
  3429. // String returns the string representation
  3430. func (s GetSizeConstraintSetInput) String() string {
  3431. return awsutil.Prettify(s)
  3432. }
  3433. // GoString returns the string representation
  3434. func (s GetSizeConstraintSetInput) GoString() string {
  3435. return s.String()
  3436. }
  3437. // Validate inspects the fields of the type to determine if they are valid.
  3438. func (s *GetSizeConstraintSetInput) Validate() error {
  3439. invalidParams := request.ErrInvalidParams{Context: "GetSizeConstraintSetInput"}
  3440. if s.SizeConstraintSetId == nil {
  3441. invalidParams.Add(request.NewErrParamRequired("SizeConstraintSetId"))
  3442. }
  3443. if s.SizeConstraintSetId != nil && len(*s.SizeConstraintSetId) < 1 {
  3444. invalidParams.Add(request.NewErrParamMinLen("SizeConstraintSetId", 1))
  3445. }
  3446. if invalidParams.Len() > 0 {
  3447. return invalidParams
  3448. }
  3449. return nil
  3450. }
  3451. type GetSizeConstraintSetOutput struct {
  3452. _ struct{} `type:"structure"`
  3453. // Information about the SizeConstraintSet that you specified in the GetSizeConstraintSet
  3454. // request. For more information, see the following topics:
  3455. //
  3456. // SizeConstraintSet: Contains SizeConstraintSetId, SizeConstraints, and Name
  3457. // SizeConstraints: Contains an array of SizeConstraint objects. Each SizeConstraint
  3458. // object contains FieldToMatch, TextTransformation, ComparisonOperator, and
  3459. // Size FieldToMatch: Contains Data and Type
  3460. SizeConstraintSet *SizeConstraintSet `type:"structure"`
  3461. }
  3462. // String returns the string representation
  3463. func (s GetSizeConstraintSetOutput) String() string {
  3464. return awsutil.Prettify(s)
  3465. }
  3466. // GoString returns the string representation
  3467. func (s GetSizeConstraintSetOutput) GoString() string {
  3468. return s.String()
  3469. }
  3470. // A request to get a SqlInjectionMatchSet.
  3471. type GetSqlInjectionMatchSetInput struct {
  3472. _ struct{} `type:"structure"`
  3473. // The SqlInjectionMatchSetId of the SqlInjectionMatchSet that you want to get.
  3474. // SqlInjectionMatchSetId is returned by CreateSqlInjectionMatchSet and by ListSqlInjectionMatchSets.
  3475. SqlInjectionMatchSetId *string `min:"1" type:"string" required:"true"`
  3476. }
  3477. // String returns the string representation
  3478. func (s GetSqlInjectionMatchSetInput) String() string {
  3479. return awsutil.Prettify(s)
  3480. }
  3481. // GoString returns the string representation
  3482. func (s GetSqlInjectionMatchSetInput) GoString() string {
  3483. return s.String()
  3484. }
  3485. // Validate inspects the fields of the type to determine if they are valid.
  3486. func (s *GetSqlInjectionMatchSetInput) Validate() error {
  3487. invalidParams := request.ErrInvalidParams{Context: "GetSqlInjectionMatchSetInput"}
  3488. if s.SqlInjectionMatchSetId == nil {
  3489. invalidParams.Add(request.NewErrParamRequired("SqlInjectionMatchSetId"))
  3490. }
  3491. if s.SqlInjectionMatchSetId != nil && len(*s.SqlInjectionMatchSetId) < 1 {
  3492. invalidParams.Add(request.NewErrParamMinLen("SqlInjectionMatchSetId", 1))
  3493. }
  3494. if invalidParams.Len() > 0 {
  3495. return invalidParams
  3496. }
  3497. return nil
  3498. }
  3499. // The response to a GetSqlInjectionMatchSet request.
  3500. type GetSqlInjectionMatchSetOutput struct {
  3501. _ struct{} `type:"structure"`
  3502. // Information about the SqlInjectionMatchSet that you specified in the GetSqlInjectionMatchSet
  3503. // request. For more information, see the following topics:
  3504. //
  3505. // SqlInjectionMatchSet: Contains Name, SqlInjectionMatchSetId, and an array
  3506. // of SqlInjectionMatchTuple objects SqlInjectionMatchTuple: Each SqlInjectionMatchTuple
  3507. // object contains FieldToMatch and TextTransformation FieldToMatch: Contains
  3508. // Data and Type
  3509. SqlInjectionMatchSet *SqlInjectionMatchSet `type:"structure"`
  3510. }
  3511. // String returns the string representation
  3512. func (s GetSqlInjectionMatchSetOutput) String() string {
  3513. return awsutil.Prettify(s)
  3514. }
  3515. // GoString returns the string representation
  3516. func (s GetSqlInjectionMatchSetOutput) GoString() string {
  3517. return s.String()
  3518. }
  3519. type GetWebACLInput struct {
  3520. _ struct{} `type:"structure"`
  3521. // The WebACLId of the WebACL that you want to get. WebACLId is returned by
  3522. // CreateWebACL and by ListWebACLs.
  3523. WebACLId *string `min:"1" type:"string" required:"true"`
  3524. }
  3525. // String returns the string representation
  3526. func (s GetWebACLInput) String() string {
  3527. return awsutil.Prettify(s)
  3528. }
  3529. // GoString returns the string representation
  3530. func (s GetWebACLInput) GoString() string {
  3531. return s.String()
  3532. }
  3533. // Validate inspects the fields of the type to determine if they are valid.
  3534. func (s *GetWebACLInput) Validate() error {
  3535. invalidParams := request.ErrInvalidParams{Context: "GetWebACLInput"}
  3536. if s.WebACLId == nil {
  3537. invalidParams.Add(request.NewErrParamRequired("WebACLId"))
  3538. }
  3539. if s.WebACLId != nil && len(*s.WebACLId) < 1 {
  3540. invalidParams.Add(request.NewErrParamMinLen("WebACLId", 1))
  3541. }
  3542. if invalidParams.Len() > 0 {
  3543. return invalidParams
  3544. }
  3545. return nil
  3546. }
  3547. type GetWebACLOutput struct {
  3548. _ struct{} `type:"structure"`
  3549. // Information about the WebACL that you specified in the GetWebACL request.
  3550. // For more information, see the following topics:
  3551. //
  3552. // WebACL: Contains DefaultAction, MetricName, Name, an array of Rule objects,
  3553. // and WebACLId DefaultAction (Data type is WafAction): Contains Type Rules:
  3554. // Contains an array of ActivatedRule objects, which contain Action, Priority,
  3555. // and RuleId Action: Contains Type
  3556. WebACL *WebACL `type:"structure"`
  3557. }
  3558. // String returns the string representation
  3559. func (s GetWebACLOutput) String() string {
  3560. return awsutil.Prettify(s)
  3561. }
  3562. // GoString returns the string representation
  3563. func (s GetWebACLOutput) GoString() string {
  3564. return s.String()
  3565. }
  3566. // A request to get an XssMatchSet.
  3567. type GetXssMatchSetInput struct {
  3568. _ struct{} `type:"structure"`
  3569. // The XssMatchSetId of the XssMatchSet that you want to get. XssMatchSetId
  3570. // is returned by CreateXssMatchSet and by ListXssMatchSets.
  3571. XssMatchSetId *string `min:"1" type:"string" required:"true"`
  3572. }
  3573. // String returns the string representation
  3574. func (s GetXssMatchSetInput) String() string {
  3575. return awsutil.Prettify(s)
  3576. }
  3577. // GoString returns the string representation
  3578. func (s GetXssMatchSetInput) GoString() string {
  3579. return s.String()
  3580. }
  3581. // Validate inspects the fields of the type to determine if they are valid.
  3582. func (s *GetXssMatchSetInput) Validate() error {
  3583. invalidParams := request.ErrInvalidParams{Context: "GetXssMatchSetInput"}
  3584. if s.XssMatchSetId == nil {
  3585. invalidParams.Add(request.NewErrParamRequired("XssMatchSetId"))
  3586. }
  3587. if s.XssMatchSetId != nil && len(*s.XssMatchSetId) < 1 {
  3588. invalidParams.Add(request.NewErrParamMinLen("XssMatchSetId", 1))
  3589. }
  3590. if invalidParams.Len() > 0 {
  3591. return invalidParams
  3592. }
  3593. return nil
  3594. }
  3595. // The response to a GetXssMatchSet request.
  3596. type GetXssMatchSetOutput struct {
  3597. _ struct{} `type:"structure"`
  3598. // Information about the XssMatchSet that you specified in the GetXssMatchSet
  3599. // request. For more information, see the following topics:
  3600. //
  3601. // XssMatchSet: Contains Name, XssMatchSetId, and an array of XssMatchTuple
  3602. // objects XssMatchTuple: Each XssMatchTuple object contains FieldToMatch and
  3603. // TextTransformation FieldToMatch: Contains Data and Type
  3604. XssMatchSet *XssMatchSet `type:"structure"`
  3605. }
  3606. // String returns the string representation
  3607. func (s GetXssMatchSetOutput) String() string {
  3608. return awsutil.Prettify(s)
  3609. }
  3610. // GoString returns the string representation
  3611. func (s GetXssMatchSetOutput) GoString() string {
  3612. return s.String()
  3613. }
  3614. // The response from a GetSampledRequests request includes an HTTPHeader complex
  3615. // type that appears as Headers in the response syntax. HTTPHeader contains
  3616. // the names and values of all of the headers that appear in one of the web
  3617. // requests that were returned by GetSampledRequests.
  3618. type HTTPHeader struct {
  3619. _ struct{} `type:"structure"`
  3620. // The name of one of the headers in the sampled web request.
  3621. Name *string `type:"string"`
  3622. // The value of one of the headers in the sampled web request.
  3623. Value *string `type:"string"`
  3624. }
  3625. // String returns the string representation
  3626. func (s HTTPHeader) String() string {
  3627. return awsutil.Prettify(s)
  3628. }
  3629. // GoString returns the string representation
  3630. func (s HTTPHeader) GoString() string {
  3631. return s.String()
  3632. }
  3633. // The response from a GetSampledRequests request includes an HTTPRequest complex
  3634. // type that appears as Request in the response syntax. HTTPRequest contains
  3635. // information about one of the web requests that were returned by GetSampledRequests.
  3636. type HTTPRequest struct {
  3637. _ struct{} `type:"structure"`
  3638. // The IP address that the request originated from. If the WebACL is associated
  3639. // with a CloudFront distribution, this is the value of one of the following
  3640. // fields in CloudFront access logs:
  3641. //
  3642. // c-ip, if the viewer did not use an HTTP proxy or a load balancer to send
  3643. // the request x-forwarded-for, if the viewer did use an HTTP proxy or a load
  3644. // balancer to send the request
  3645. ClientIP *string `type:"string"`
  3646. // The two-letter country code for the country that the request originated from.
  3647. // For a current list of country codes, see the Wikipedia entry ISO 3166-1 alpha-2
  3648. // (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
  3649. Country *string `type:"string"`
  3650. // The HTTP version specified in the sampled web request, for example, HTTP/1.1.
  3651. HTTPVersion *string `type:"string"`
  3652. // A complex type that contains two values for each header in the sampled web
  3653. // request: the name of the header and the value of the header.
  3654. Headers []*HTTPHeader `type:"list"`
  3655. // The HTTP method specified in the sampled web request. CloudFront supports
  3656. // the following methods: DELETE, GET, HEAD, OPTIONS, PATCH, POST, and PUT.
  3657. Method *string `type:"string"`
  3658. // The part of a web request that identifies the resource, for example, /images/daily-ad.jpg.
  3659. URI *string `type:"string"`
  3660. }
  3661. // String returns the string representation
  3662. func (s HTTPRequest) String() string {
  3663. return awsutil.Prettify(s)
  3664. }
  3665. // GoString returns the string representation
  3666. func (s HTTPRequest) GoString() string {
  3667. return s.String()
  3668. }
  3669. // Contains one or more IP addresses or blocks of IP addresses specified in
  3670. // Classless Inter-Domain Routing (CIDR) notation. To specify an individual
  3671. // IP address, you specify the four-part IP address followed by a /32, for example,
  3672. // 192.0.2.0/31. To block a range of IP addresses, you can specify a /24, a
  3673. // /16, or a /8 CIDR. For more information about CIDR notation, perform an Internet
  3674. // search on cidr notation.
  3675. type IPSet struct {
  3676. _ struct{} `type:"structure"`
  3677. // The IP address type (IPV4) and the IP address range (in CIDR notation) that
  3678. // web requests originate from. If the WebACL is associated with a CloudFront
  3679. // distribution, this is the value of one of the following fields in CloudFront
  3680. // access logs:
  3681. //
  3682. // c-ip, if the viewer did not use an HTTP proxy or a load balancer to send
  3683. // the request x-forwarded-for, if the viewer did use an HTTP proxy or a load
  3684. // balancer to send the request
  3685. IPSetDescriptors []*IPSetDescriptor `type:"list" required:"true"`
  3686. // The IPSetId for an IPSet. You use IPSetId to get information about an IPSet
  3687. // (see GetIPSet), update an IPSet (see UpdateIPSet), insert an IPSet into a
  3688. // Rule or delete one from a Rule (see UpdateRule), and delete an IPSet from
  3689. // AWS WAF (see DeleteIPSet).
  3690. //
  3691. // IPSetId is returned by CreateIPSet and by ListIPSets.
  3692. IPSetId *string `min:"1" type:"string" required:"true"`
  3693. // A friendly name or description of the IPSet. You can't change the name of
  3694. // an IPSet after you create it.
  3695. Name *string `min:"1" type:"string"`
  3696. }
  3697. // String returns the string representation
  3698. func (s IPSet) String() string {
  3699. return awsutil.Prettify(s)
  3700. }
  3701. // GoString returns the string representation
  3702. func (s IPSet) GoString() string {
  3703. return s.String()
  3704. }
  3705. // Specifies the IP address type (IPV4) and the IP address range (in CIDR format)
  3706. // that web requests originate from.
  3707. type IPSetDescriptor struct {
  3708. _ struct{} `type:"structure"`
  3709. // Specify IPV4.
  3710. Type *string `type:"string" required:"true" enum:"IPSetDescriptorType"`
  3711. // Specify an IPv4 address by using CIDR notation. For example:
  3712. //
  3713. // To configure AWS WAF to allow, block, or count requests that originated
  3714. // from the IP address 192.0.2.44, specify 192.0.2.44/32. To configure AWS WAF
  3715. // to allow, block, or count requests that originated from IP addresses from
  3716. // 192.0.2.0 to 192.0.2.255, specify 192.0.2.0/24. AWS WAF supports only /8,
  3717. // /16, /24, and /32 IP addresses.
  3718. //
  3719. // For more information about CIDR notation, see the Wikipedia entry Classless
  3720. // Inter-Domain Routing (https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing).
  3721. Value *string `type:"string" required:"true"`
  3722. }
  3723. // String returns the string representation
  3724. func (s IPSetDescriptor) String() string {
  3725. return awsutil.Prettify(s)
  3726. }
  3727. // GoString returns the string representation
  3728. func (s IPSetDescriptor) GoString() string {
  3729. return s.String()
  3730. }
  3731. // Validate inspects the fields of the type to determine if they are valid.
  3732. func (s *IPSetDescriptor) Validate() error {
  3733. invalidParams := request.ErrInvalidParams{Context: "IPSetDescriptor"}
  3734. if s.Type == nil {
  3735. invalidParams.Add(request.NewErrParamRequired("Type"))
  3736. }
  3737. if s.Value == nil {
  3738. invalidParams.Add(request.NewErrParamRequired("Value"))
  3739. }
  3740. if invalidParams.Len() > 0 {
  3741. return invalidParams
  3742. }
  3743. return nil
  3744. }
  3745. // Contains the identifier and the name of the IPSet.
  3746. type IPSetSummary struct {
  3747. _ struct{} `type:"structure"`
  3748. // The IPSetId for an IPSet. You can use IPSetId in a GetIPSet request to get
  3749. // detailed information about an IPSet.
  3750. IPSetId *string `min:"1" type:"string" required:"true"`
  3751. // A friendly name or description of the IPSet. You can't change the name of
  3752. // an IPSet after you create it.
  3753. Name *string `min:"1" type:"string" required:"true"`
  3754. }
  3755. // String returns the string representation
  3756. func (s IPSetSummary) String() string {
  3757. return awsutil.Prettify(s)
  3758. }
  3759. // GoString returns the string representation
  3760. func (s IPSetSummary) GoString() string {
  3761. return s.String()
  3762. }
  3763. // Specifies the type of update to perform to an IPSet with UpdateIPSet.
  3764. type IPSetUpdate struct {
  3765. _ struct{} `type:"structure"`
  3766. // Specifies whether to insert or delete an IP address with UpdateIPSet.
  3767. Action *string `type:"string" required:"true" enum:"ChangeAction"`
  3768. // The IP address type (IPV4) and the IP address range (in CIDR notation) that
  3769. // web requests originate from.
  3770. IPSetDescriptor *IPSetDescriptor `type:"structure" required:"true"`
  3771. }
  3772. // String returns the string representation
  3773. func (s IPSetUpdate) String() string {
  3774. return awsutil.Prettify(s)
  3775. }
  3776. // GoString returns the string representation
  3777. func (s IPSetUpdate) GoString() string {
  3778. return s.String()
  3779. }
  3780. // Validate inspects the fields of the type to determine if they are valid.
  3781. func (s *IPSetUpdate) Validate() error {
  3782. invalidParams := request.ErrInvalidParams{Context: "IPSetUpdate"}
  3783. if s.Action == nil {
  3784. invalidParams.Add(request.NewErrParamRequired("Action"))
  3785. }
  3786. if s.IPSetDescriptor == nil {
  3787. invalidParams.Add(request.NewErrParamRequired("IPSetDescriptor"))
  3788. }
  3789. if s.IPSetDescriptor != nil {
  3790. if err := s.IPSetDescriptor.Validate(); err != nil {
  3791. invalidParams.AddNested("IPSetDescriptor", err.(request.ErrInvalidParams))
  3792. }
  3793. }
  3794. if invalidParams.Len() > 0 {
  3795. return invalidParams
  3796. }
  3797. return nil
  3798. }
  3799. type ListByteMatchSetsInput struct {
  3800. _ struct{} `type:"structure"`
  3801. // Specifies the number of ByteMatchSet objects that you want AWS WAF to return
  3802. // for this request. If you have more ByteMatchSets objects than the number
  3803. // you specify for Limit, the response includes a NextMarker value that you
  3804. // can use to get another batch of ByteMatchSet objects.
  3805. Limit *int64 `min:"1" type:"integer" required:"true"`
  3806. // If you specify a value for Limit and you have more ByteMatchSets than the
  3807. // value of Limit, AWS WAF returns a NextMarker value in the response that allows
  3808. // you to list another group of ByteMatchSets. For the second and subsequent
  3809. // ListByteMatchSets requests, specify the value of NextMarker from the previous
  3810. // response to get information about another batch of ByteMatchSets.
  3811. NextMarker *string `min:"1" type:"string"`
  3812. }
  3813. // String returns the string representation
  3814. func (s ListByteMatchSetsInput) String() string {
  3815. return awsutil.Prettify(s)
  3816. }
  3817. // GoString returns the string representation
  3818. func (s ListByteMatchSetsInput) GoString() string {
  3819. return s.String()
  3820. }
  3821. // Validate inspects the fields of the type to determine if they are valid.
  3822. func (s *ListByteMatchSetsInput) Validate() error {
  3823. invalidParams := request.ErrInvalidParams{Context: "ListByteMatchSetsInput"}
  3824. if s.Limit == nil {
  3825. invalidParams.Add(request.NewErrParamRequired("Limit"))
  3826. }
  3827. if s.Limit != nil && *s.Limit < 1 {
  3828. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  3829. }
  3830. if s.NextMarker != nil && len(*s.NextMarker) < 1 {
  3831. invalidParams.Add(request.NewErrParamMinLen("NextMarker", 1))
  3832. }
  3833. if invalidParams.Len() > 0 {
  3834. return invalidParams
  3835. }
  3836. return nil
  3837. }
  3838. type ListByteMatchSetsOutput struct {
  3839. _ struct{} `type:"structure"`
  3840. // An array of ByteMatchSetSummary objects.
  3841. ByteMatchSets []*ByteMatchSetSummary `type:"list"`
  3842. // If you have more ByteMatchSet objects than the number that you specified
  3843. // for Limit in the request, the response includes a NextMarker value. To list
  3844. // more ByteMatchSet objects, submit another ListByteMatchSets request, and
  3845. // specify the NextMarker value from the response in the NextMarker value in
  3846. // the next request.
  3847. NextMarker *string `min:"1" type:"string"`
  3848. }
  3849. // String returns the string representation
  3850. func (s ListByteMatchSetsOutput) String() string {
  3851. return awsutil.Prettify(s)
  3852. }
  3853. // GoString returns the string representation
  3854. func (s ListByteMatchSetsOutput) GoString() string {
  3855. return s.String()
  3856. }
  3857. type ListIPSetsInput struct {
  3858. _ struct{} `type:"structure"`
  3859. // Specifies the number of IPSet objects that you want AWS WAF to return for
  3860. // this request. If you have more IPSet objects than the number you specify
  3861. // for Limit, the response includes a NextMarker value that you can use to get
  3862. // another batch of IPSet objects.
  3863. Limit *int64 `min:"1" type:"integer" required:"true"`
  3864. // If you specify a value for Limit and you have more IPSets than the value
  3865. // of Limit, AWS WAF returns a NextMarker value in the response that allows
  3866. // you to list another group of IPSets. For the second and subsequent ListIPSets
  3867. // requests, specify the value of NextMarker from the previous response to get
  3868. // information about another batch of ByteMatchSets.
  3869. NextMarker *string `min:"1" type:"string"`
  3870. }
  3871. // String returns the string representation
  3872. func (s ListIPSetsInput) String() string {
  3873. return awsutil.Prettify(s)
  3874. }
  3875. // GoString returns the string representation
  3876. func (s ListIPSetsInput) GoString() string {
  3877. return s.String()
  3878. }
  3879. // Validate inspects the fields of the type to determine if they are valid.
  3880. func (s *ListIPSetsInput) Validate() error {
  3881. invalidParams := request.ErrInvalidParams{Context: "ListIPSetsInput"}
  3882. if s.Limit == nil {
  3883. invalidParams.Add(request.NewErrParamRequired("Limit"))
  3884. }
  3885. if s.Limit != nil && *s.Limit < 1 {
  3886. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  3887. }
  3888. if s.NextMarker != nil && len(*s.NextMarker) < 1 {
  3889. invalidParams.Add(request.NewErrParamMinLen("NextMarker", 1))
  3890. }
  3891. if invalidParams.Len() > 0 {
  3892. return invalidParams
  3893. }
  3894. return nil
  3895. }
  3896. type ListIPSetsOutput struct {
  3897. _ struct{} `type:"structure"`
  3898. // An array of IPSetSummary objects.
  3899. IPSets []*IPSetSummary `type:"list"`
  3900. // If you have more IPSet objects than the number that you specified for Limit
  3901. // in the request, the response includes a NextMarker value. To list more IPSet
  3902. // objects, submit another ListIPSets request, and specify the NextMarker value
  3903. // from the response in the NextMarker value in the next request.
  3904. NextMarker *string `min:"1" type:"string"`
  3905. }
  3906. // String returns the string representation
  3907. func (s ListIPSetsOutput) String() string {
  3908. return awsutil.Prettify(s)
  3909. }
  3910. // GoString returns the string representation
  3911. func (s ListIPSetsOutput) GoString() string {
  3912. return s.String()
  3913. }
  3914. type ListRulesInput struct {
  3915. _ struct{} `type:"structure"`
  3916. // Specifies the number of Rules that you want AWS WAF to return for this request.
  3917. // If you have more Rules than the number that you specify for Limit, the response
  3918. // includes a NextMarker value that you can use to get another batch of Rules.
  3919. Limit *int64 `min:"1" type:"integer" required:"true"`
  3920. // If you specify a value for Limit and you have more Rules than the value of
  3921. // Limit, AWS WAF returns a NextMarker value in the response that allows you
  3922. // to list another group of Rules. For the second and subsequent ListRules requests,
  3923. // specify the value of NextMarker from the previous response to get information
  3924. // about another batch of Rules.
  3925. NextMarker *string `min:"1" type:"string"`
  3926. }
  3927. // String returns the string representation
  3928. func (s ListRulesInput) String() string {
  3929. return awsutil.Prettify(s)
  3930. }
  3931. // GoString returns the string representation
  3932. func (s ListRulesInput) GoString() string {
  3933. return s.String()
  3934. }
  3935. // Validate inspects the fields of the type to determine if they are valid.
  3936. func (s *ListRulesInput) Validate() error {
  3937. invalidParams := request.ErrInvalidParams{Context: "ListRulesInput"}
  3938. if s.Limit == nil {
  3939. invalidParams.Add(request.NewErrParamRequired("Limit"))
  3940. }
  3941. if s.Limit != nil && *s.Limit < 1 {
  3942. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  3943. }
  3944. if s.NextMarker != nil && len(*s.NextMarker) < 1 {
  3945. invalidParams.Add(request.NewErrParamMinLen("NextMarker", 1))
  3946. }
  3947. if invalidParams.Len() > 0 {
  3948. return invalidParams
  3949. }
  3950. return nil
  3951. }
  3952. type ListRulesOutput struct {
  3953. _ struct{} `type:"structure"`
  3954. // If you have more Rules than the number that you specified for Limit in the
  3955. // request, the response includes a NextMarker value. To list more Rules, submit
  3956. // another ListRules request, and specify the NextMarker value from the response
  3957. // in the NextMarker value in the next request.
  3958. NextMarker *string `min:"1" type:"string"`
  3959. // An array of RuleSummary objects.
  3960. Rules []*RuleSummary `type:"list"`
  3961. }
  3962. // String returns the string representation
  3963. func (s ListRulesOutput) String() string {
  3964. return awsutil.Prettify(s)
  3965. }
  3966. // GoString returns the string representation
  3967. func (s ListRulesOutput) GoString() string {
  3968. return s.String()
  3969. }
  3970. type ListSizeConstraintSetsInput struct {
  3971. _ struct{} `type:"structure"`
  3972. // Specifies the number of SizeConstraintSet objects that you want AWS WAF to
  3973. // return for this request. If you have more SizeConstraintSets objects than
  3974. // the number you specify for Limit, the response includes a NextMarker value
  3975. // that you can use to get another batch of SizeConstraintSet objects.
  3976. Limit *int64 `min:"1" type:"integer" required:"true"`
  3977. // If you specify a value for Limit and you have more SizeConstraintSets than
  3978. // the value of Limit, AWS WAF returns a NextMarker value in the response that
  3979. // allows you to list another group of SizeConstraintSets. For the second and
  3980. // subsequent ListSizeConstraintSets requests, specify the value of NextMarker
  3981. // from the previous response to get information about another batch of SizeConstraintSets.
  3982. NextMarker *string `min:"1" type:"string"`
  3983. }
  3984. // String returns the string representation
  3985. func (s ListSizeConstraintSetsInput) String() string {
  3986. return awsutil.Prettify(s)
  3987. }
  3988. // GoString returns the string representation
  3989. func (s ListSizeConstraintSetsInput) GoString() string {
  3990. return s.String()
  3991. }
  3992. // Validate inspects the fields of the type to determine if they are valid.
  3993. func (s *ListSizeConstraintSetsInput) Validate() error {
  3994. invalidParams := request.ErrInvalidParams{Context: "ListSizeConstraintSetsInput"}
  3995. if s.Limit == nil {
  3996. invalidParams.Add(request.NewErrParamRequired("Limit"))
  3997. }
  3998. if s.Limit != nil && *s.Limit < 1 {
  3999. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  4000. }
  4001. if s.NextMarker != nil && len(*s.NextMarker) < 1 {
  4002. invalidParams.Add(request.NewErrParamMinLen("NextMarker", 1))
  4003. }
  4004. if invalidParams.Len() > 0 {
  4005. return invalidParams
  4006. }
  4007. return nil
  4008. }
  4009. type ListSizeConstraintSetsOutput struct {
  4010. _ struct{} `type:"structure"`
  4011. // If you have more SizeConstraintSet objects than the number that you specified
  4012. // for Limit in the request, the response includes a NextMarker value. To list
  4013. // more SizeConstraintSet objects, submit another ListSizeConstraintSets request,
  4014. // and specify the NextMarker value from the response in the NextMarker value
  4015. // in the next request.
  4016. NextMarker *string `min:"1" type:"string"`
  4017. // An array of SizeConstraintSetSummary objects.
  4018. SizeConstraintSets []*SizeConstraintSetSummary `type:"list"`
  4019. }
  4020. // String returns the string representation
  4021. func (s ListSizeConstraintSetsOutput) String() string {
  4022. return awsutil.Prettify(s)
  4023. }
  4024. // GoString returns the string representation
  4025. func (s ListSizeConstraintSetsOutput) GoString() string {
  4026. return s.String()
  4027. }
  4028. // A request to list the SqlInjectionMatchSet objects created by the current
  4029. // AWS account.
  4030. type ListSqlInjectionMatchSetsInput struct {
  4031. _ struct{} `type:"structure"`
  4032. // Specifies the number of SqlInjectionMatchSet objects that you want AWS WAF
  4033. // to return for this request. If you have more SqlInjectionMatchSet objects
  4034. // than the number you specify for Limit, the response includes a NextMarker
  4035. // value that you can use to get another batch of Rules.
  4036. Limit *int64 `min:"1" type:"integer" required:"true"`
  4037. // If you specify a value for Limit and you have more SqlInjectionMatchSet objects
  4038. // than the value of Limit, AWS WAF returns a NextMarker value in the response
  4039. // that allows you to list another group of SqlInjectionMatchSets. For the second
  4040. // and subsequent ListSqlInjectionMatchSets requests, specify the value of NextMarker
  4041. // from the previous response to get information about another batch of SqlInjectionMatchSets.
  4042. NextMarker *string `min:"1" type:"string"`
  4043. }
  4044. // String returns the string representation
  4045. func (s ListSqlInjectionMatchSetsInput) String() string {
  4046. return awsutil.Prettify(s)
  4047. }
  4048. // GoString returns the string representation
  4049. func (s ListSqlInjectionMatchSetsInput) GoString() string {
  4050. return s.String()
  4051. }
  4052. // Validate inspects the fields of the type to determine if they are valid.
  4053. func (s *ListSqlInjectionMatchSetsInput) Validate() error {
  4054. invalidParams := request.ErrInvalidParams{Context: "ListSqlInjectionMatchSetsInput"}
  4055. if s.Limit == nil {
  4056. invalidParams.Add(request.NewErrParamRequired("Limit"))
  4057. }
  4058. if s.Limit != nil && *s.Limit < 1 {
  4059. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  4060. }
  4061. if s.NextMarker != nil && len(*s.NextMarker) < 1 {
  4062. invalidParams.Add(request.NewErrParamMinLen("NextMarker", 1))
  4063. }
  4064. if invalidParams.Len() > 0 {
  4065. return invalidParams
  4066. }
  4067. return nil
  4068. }
  4069. // The response to a ListSqlInjectionMatchSets request.
  4070. type ListSqlInjectionMatchSetsOutput struct {
  4071. _ struct{} `type:"structure"`
  4072. // If you have more SqlInjectionMatchSet objects than the number that you specified
  4073. // for Limit in the request, the response includes a NextMarker value. To list
  4074. // more SqlInjectionMatchSet objects, submit another ListSqlInjectionMatchSets
  4075. // request, and specify the NextMarker value from the response in the NextMarker
  4076. // value in the next request.
  4077. NextMarker *string `min:"1" type:"string"`
  4078. // An array of SqlInjectionMatchSetSummary objects.
  4079. SqlInjectionMatchSets []*SqlInjectionMatchSetSummary `type:"list"`
  4080. }
  4081. // String returns the string representation
  4082. func (s ListSqlInjectionMatchSetsOutput) String() string {
  4083. return awsutil.Prettify(s)
  4084. }
  4085. // GoString returns the string representation
  4086. func (s ListSqlInjectionMatchSetsOutput) GoString() string {
  4087. return s.String()
  4088. }
  4089. type ListWebACLsInput struct {
  4090. _ struct{} `type:"structure"`
  4091. // Specifies the number of WebACL objects that you want AWS WAF to return for
  4092. // this request. If you have more WebACL objects than the number that you specify
  4093. // for Limit, the response includes a NextMarker value that you can use to get
  4094. // another batch of WebACL objects.
  4095. Limit *int64 `min:"1" type:"integer" required:"true"`
  4096. // If you specify a value for Limit and you have more WebACL objects than the
  4097. // number that you specify for Limit, AWS WAF returns a NextMarker value in
  4098. // the response that allows you to list another group of WebACL objects. For
  4099. // the second and subsequent ListWebACLs requests, specify the value of NextMarker
  4100. // from the previous response to get information about another batch of WebACL
  4101. // objects.
  4102. NextMarker *string `min:"1" type:"string"`
  4103. }
  4104. // String returns the string representation
  4105. func (s ListWebACLsInput) String() string {
  4106. return awsutil.Prettify(s)
  4107. }
  4108. // GoString returns the string representation
  4109. func (s ListWebACLsInput) GoString() string {
  4110. return s.String()
  4111. }
  4112. // Validate inspects the fields of the type to determine if they are valid.
  4113. func (s *ListWebACLsInput) Validate() error {
  4114. invalidParams := request.ErrInvalidParams{Context: "ListWebACLsInput"}
  4115. if s.Limit == nil {
  4116. invalidParams.Add(request.NewErrParamRequired("Limit"))
  4117. }
  4118. if s.Limit != nil && *s.Limit < 1 {
  4119. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  4120. }
  4121. if s.NextMarker != nil && len(*s.NextMarker) < 1 {
  4122. invalidParams.Add(request.NewErrParamMinLen("NextMarker", 1))
  4123. }
  4124. if invalidParams.Len() > 0 {
  4125. return invalidParams
  4126. }
  4127. return nil
  4128. }
  4129. type ListWebACLsOutput struct {
  4130. _ struct{} `type:"structure"`
  4131. // If you have more WebACL objects than the number that you specified for Limit
  4132. // in the request, the response includes a NextMarker value. To list more WebACL
  4133. // objects, submit another ListWebACLs request, and specify the NextMarker value
  4134. // from the response in the NextMarker value in the next request.
  4135. NextMarker *string `min:"1" type:"string"`
  4136. // An array of WebACLSummary objects.
  4137. WebACLs []*WebACLSummary `type:"list"`
  4138. }
  4139. // String returns the string representation
  4140. func (s ListWebACLsOutput) String() string {
  4141. return awsutil.Prettify(s)
  4142. }
  4143. // GoString returns the string representation
  4144. func (s ListWebACLsOutput) GoString() string {
  4145. return s.String()
  4146. }
  4147. // A request to list the XssMatchSet objects created by the current AWS account.
  4148. type ListXssMatchSetsInput struct {
  4149. _ struct{} `type:"structure"`
  4150. // Specifies the number of XssMatchSet objects that you want AWS WAF to return
  4151. // for this request. If you have more XssMatchSet objects than the number you
  4152. // specify for Limit, the response includes a NextMarker value that you can
  4153. // use to get another batch of Rules.
  4154. Limit *int64 `min:"1" type:"integer" required:"true"`
  4155. // If you specify a value for Limit and you have more XssMatchSet objects than
  4156. // the value of Limit, AWS WAF returns a NextMarker value in the response that
  4157. // allows you to list another group of XssMatchSets. For the second and subsequent
  4158. // ListXssMatchSets requests, specify the value of NextMarker from the previous
  4159. // response to get information about another batch of XssMatchSets.
  4160. NextMarker *string `min:"1" type:"string"`
  4161. }
  4162. // String returns the string representation
  4163. func (s ListXssMatchSetsInput) String() string {
  4164. return awsutil.Prettify(s)
  4165. }
  4166. // GoString returns the string representation
  4167. func (s ListXssMatchSetsInput) GoString() string {
  4168. return s.String()
  4169. }
  4170. // Validate inspects the fields of the type to determine if they are valid.
  4171. func (s *ListXssMatchSetsInput) Validate() error {
  4172. invalidParams := request.ErrInvalidParams{Context: "ListXssMatchSetsInput"}
  4173. if s.Limit == nil {
  4174. invalidParams.Add(request.NewErrParamRequired("Limit"))
  4175. }
  4176. if s.Limit != nil && *s.Limit < 1 {
  4177. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  4178. }
  4179. if s.NextMarker != nil && len(*s.NextMarker) < 1 {
  4180. invalidParams.Add(request.NewErrParamMinLen("NextMarker", 1))
  4181. }
  4182. if invalidParams.Len() > 0 {
  4183. return invalidParams
  4184. }
  4185. return nil
  4186. }
  4187. // The response to a ListXssMatchSets request.
  4188. type ListXssMatchSetsOutput struct {
  4189. _ struct{} `type:"structure"`
  4190. // If you have more XssMatchSet objects than the number that you specified for
  4191. // Limit in the request, the response includes a NextMarker value. To list more
  4192. // XssMatchSet objects, submit another ListXssMatchSets request, and specify
  4193. // the NextMarker value from the response in the NextMarker value in the next
  4194. // request.
  4195. NextMarker *string `min:"1" type:"string"`
  4196. // An array of XssMatchSetSummary objects.
  4197. XssMatchSets []*XssMatchSetSummary `type:"list"`
  4198. }
  4199. // String returns the string representation
  4200. func (s ListXssMatchSetsOutput) String() string {
  4201. return awsutil.Prettify(s)
  4202. }
  4203. // GoString returns the string representation
  4204. func (s ListXssMatchSetsOutput) GoString() string {
  4205. return s.String()
  4206. }
  4207. // Specifies the ByteMatchSet, IPSet, SqlInjectionMatchSet, XssMatchSet, and
  4208. // SizeConstraintSet objects that you want to add to a Rule and, for each object,
  4209. // indicates whether you want to negate the settings, for example, requests
  4210. // that do NOT originate from the IP address 192.0.2.44.
  4211. type Predicate struct {
  4212. _ struct{} `type:"structure"`
  4213. // A unique identifier for a predicate in a Rule, such as ByteMatchSetId or
  4214. // IPSetId. The ID is returned by the corresponding Create or List command.
  4215. DataId *string `min:"1" type:"string" required:"true"`
  4216. // Set Negated to False if you want AWS WAF to allow, block, or count requests
  4217. // based on the settings in the specified ByteMatchSet, IPSet, SqlInjectionMatchSet,
  4218. // XssMatchSet, or SizeConstraintSet. For example, if an IPSet includes the
  4219. // IP address 192.0.2.44, AWS WAF will allow or block requests based on that
  4220. // IP address.
  4221. //
  4222. // Set Negated to True if you want AWS WAF to allow or block a request based
  4223. // on the negation of the settings in the ByteMatchSet, IPSet, SqlInjectionMatchSet,
  4224. // XssMatchSet, or SizeConstraintSet. For example, if an IPSet includes the
  4225. // IP address 192.0.2.44, AWS WAF will allow, block, or count requests based
  4226. // on all IP addresses except 192.0.2.44.
  4227. Negated *bool `type:"boolean" required:"true"`
  4228. // The type of predicate in a Rule, such as ByteMatchSet or IPSet.
  4229. Type *string `type:"string" required:"true" enum:"PredicateType"`
  4230. }
  4231. // String returns the string representation
  4232. func (s Predicate) String() string {
  4233. return awsutil.Prettify(s)
  4234. }
  4235. // GoString returns the string representation
  4236. func (s Predicate) GoString() string {
  4237. return s.String()
  4238. }
  4239. // Validate inspects the fields of the type to determine if they are valid.
  4240. func (s *Predicate) Validate() error {
  4241. invalidParams := request.ErrInvalidParams{Context: "Predicate"}
  4242. if s.DataId == nil {
  4243. invalidParams.Add(request.NewErrParamRequired("DataId"))
  4244. }
  4245. if s.DataId != nil && len(*s.DataId) < 1 {
  4246. invalidParams.Add(request.NewErrParamMinLen("DataId", 1))
  4247. }
  4248. if s.Negated == nil {
  4249. invalidParams.Add(request.NewErrParamRequired("Negated"))
  4250. }
  4251. if s.Type == nil {
  4252. invalidParams.Add(request.NewErrParamRequired("Type"))
  4253. }
  4254. if invalidParams.Len() > 0 {
  4255. return invalidParams
  4256. }
  4257. return nil
  4258. }
  4259. // A combination of ByteMatchSet, IPSet, and/or SqlInjectionMatchSet objects
  4260. // that identify the web requests that you want to allow, block, or count. For
  4261. // example, you might create a Rule that includes the following predicates:
  4262. //
  4263. // An IPSet that causes AWS WAF to search for web requests that originate
  4264. // from the IP address 192.0.2.44 A ByteMatchSet that causes AWS WAF to search
  4265. // for web requests for which the value of the User-Agent header is BadBot.
  4266. // To match the settings in this Rule, a request must originate from 192.0.2.44
  4267. // AND include a User-Agent header for which the value is BadBot.
  4268. type Rule struct {
  4269. _ struct{} `type:"structure"`
  4270. MetricName *string `type:"string"`
  4271. // The friendly name or description for the Rule. You can't change the name
  4272. // of a Rule after you create it.
  4273. Name *string `min:"1" type:"string"`
  4274. // The Predicates object contains one Predicate element for each ByteMatchSet,
  4275. // IPSet, or SqlInjectionMatchSet object that you want to include in a Rule.
  4276. Predicates []*Predicate `type:"list" required:"true"`
  4277. // A unique identifier for a Rule. You use RuleId to get more information about
  4278. // a Rule (see GetRule), update a Rule (see UpdateRule), insert a Rule into
  4279. // a WebACL or delete a one from a WebACL (see UpdateWebACL), or delete a Rule
  4280. // from AWS WAF (see DeleteRule).
  4281. //
  4282. // RuleId is returned by CreateRule and by ListRules.
  4283. RuleId *string `min:"1" type:"string" required:"true"`
  4284. }
  4285. // String returns the string representation
  4286. func (s Rule) String() string {
  4287. return awsutil.Prettify(s)
  4288. }
  4289. // GoString returns the string representation
  4290. func (s Rule) GoString() string {
  4291. return s.String()
  4292. }
  4293. // Contains the identifier and the friendly name or description of the Rule.
  4294. type RuleSummary struct {
  4295. _ struct{} `type:"structure"`
  4296. // A friendly name or description of the Rule. You can't change the name of
  4297. // a Rule after you create it.
  4298. Name *string `min:"1" type:"string" required:"true"`
  4299. // A unique identifier for a Rule. You use RuleId to get more information about
  4300. // a Rule (see GetRule), update a Rule (see UpdateRule), insert a Rule into
  4301. // a WebACL or delete one from a WebACL (see UpdateWebACL), or delete a Rule
  4302. // from AWS WAF (see DeleteRule).
  4303. //
  4304. // RuleId is returned by CreateRule and by ListRules.
  4305. RuleId *string `min:"1" type:"string" required:"true"`
  4306. }
  4307. // String returns the string representation
  4308. func (s RuleSummary) String() string {
  4309. return awsutil.Prettify(s)
  4310. }
  4311. // GoString returns the string representation
  4312. func (s RuleSummary) GoString() string {
  4313. return s.String()
  4314. }
  4315. // Specifies a Predicate (such as an IPSet) and indicates whether you want to
  4316. // add it to a Rule or delete it from a Rule.
  4317. type RuleUpdate struct {
  4318. _ struct{} `type:"structure"`
  4319. // Specify INSERT to add a Predicate to a Rule. Use DELETE to remove a Predicate
  4320. // from a Rule.
  4321. Action *string `type:"string" required:"true" enum:"ChangeAction"`
  4322. // The ID of the Predicate (such as an IPSet) that you want to add to a Rule.
  4323. Predicate *Predicate `type:"structure" required:"true"`
  4324. }
  4325. // String returns the string representation
  4326. func (s RuleUpdate) String() string {
  4327. return awsutil.Prettify(s)
  4328. }
  4329. // GoString returns the string representation
  4330. func (s RuleUpdate) GoString() string {
  4331. return s.String()
  4332. }
  4333. // Validate inspects the fields of the type to determine if they are valid.
  4334. func (s *RuleUpdate) Validate() error {
  4335. invalidParams := request.ErrInvalidParams{Context: "RuleUpdate"}
  4336. if s.Action == nil {
  4337. invalidParams.Add(request.NewErrParamRequired("Action"))
  4338. }
  4339. if s.Predicate == nil {
  4340. invalidParams.Add(request.NewErrParamRequired("Predicate"))
  4341. }
  4342. if s.Predicate != nil {
  4343. if err := s.Predicate.Validate(); err != nil {
  4344. invalidParams.AddNested("Predicate", err.(request.ErrInvalidParams))
  4345. }
  4346. }
  4347. if invalidParams.Len() > 0 {
  4348. return invalidParams
  4349. }
  4350. return nil
  4351. }
  4352. // The response from a GetSampledRequests request includes a SampledHTTPRequests
  4353. // complex type that appears as SampledRequests in the response syntax. SampledHTTPRequests
  4354. // contains one SampledHTTPRequest object for each web request that is returned
  4355. // by GetSampledRequests.
  4356. type SampledHTTPRequest struct {
  4357. _ struct{} `type:"structure"`
  4358. // The action for the Rule that the request matched: ALLOW, BLOCK, or COUNT.
  4359. Action *string `type:"string"`
  4360. // A complex type that contains detailed information about the request.
  4361. Request *HTTPRequest `type:"structure" required:"true"`
  4362. // The time at which AWS WAF received the request from your AWS resource, in
  4363. // Unix time format (in seconds).
  4364. Timestamp *time.Time `type:"timestamp" timestampFormat:"unix"`
  4365. // A value that indicates how one result in the response relates proportionally
  4366. // to other results in the response. A result that has a weight of 2 represents
  4367. // roughly twice as many CloudFront web requests as a result that has a weight
  4368. // of 1.
  4369. Weight *int64 `type:"long" required:"true"`
  4370. }
  4371. // String returns the string representation
  4372. func (s SampledHTTPRequest) String() string {
  4373. return awsutil.Prettify(s)
  4374. }
  4375. // GoString returns the string representation
  4376. func (s SampledHTTPRequest) GoString() string {
  4377. return s.String()
  4378. }
  4379. // Specifies a constraint on the size of a part of the web request. AWS WAF
  4380. // uses the Size, ComparisonOperator, and FieldToMatch to build an expression
  4381. // in the form of "Size ComparisonOperator size in bytes of FieldToMatch". If
  4382. // that expression is true, the SizeConstraint is considered to match.
  4383. type SizeConstraint struct {
  4384. _ struct{} `type:"structure"`
  4385. // The type of comparison you want AWS WAF to perform. AWS WAF uses this in
  4386. // combination with the provided Size and FieldToMatch to build an expression
  4387. // in the form of "Size ComparisonOperator size in bytes of FieldToMatch". If
  4388. // that expression is true, the SizeConstraint is considered to match.
  4389. //
  4390. // EQ: Used to test if the Size is equal to the size of the FieldToMatch
  4391. //
  4392. // NE: Used to test if the Size is not equal to the size of the FieldToMatch
  4393. //
  4394. // LE: Used to test if the Size is less than or equal to the size of the FieldToMatch
  4395. //
  4396. // LT: Used to test if the Size is strictly less than the size of the FieldToMatch
  4397. //
  4398. // GE: Used to test if the Size is greater than or equal to the size of the
  4399. // FieldToMatch
  4400. //
  4401. // GT: Used to test if the Size is strictly greater than the size of the FieldToMatch
  4402. ComparisonOperator *string `type:"string" required:"true" enum:"ComparisonOperator"`
  4403. // Specifies where in a web request to look for TargetString.
  4404. FieldToMatch *FieldToMatch `type:"structure" required:"true"`
  4405. // The size in bytes that you want AWS WAF to compare against the size of the
  4406. // specified FieldToMatch. AWS WAF uses this in combination with ComparisonOperator
  4407. // and FieldToMatch to build an expression in the form of "Size ComparisonOperator
  4408. // size in bytes of FieldToMatch". If that expression is true, the SizeConstraint
  4409. // is considered to match.
  4410. //
  4411. // Valid values for size are 0 - 21474836480 bytes (0 - 20 GB).
  4412. //
  4413. // If you specify URI for the value of Type, the / in the URI counts as one
  4414. // character. For example, the URI /logo.jpg is nine characters long.
  4415. Size *int64 `type:"long" required:"true"`
  4416. // Text transformations eliminate some of the unusual formatting that attackers
  4417. // use in web requests in an effort to bypass AWS WAF. If you specify a transformation,
  4418. // AWS WAF performs the transformation on FieldToMatch before inspecting a request
  4419. // for a match.
  4420. //
  4421. // Note that if you choose BODY for the value of Type, you must choose NONE
  4422. // for TextTransformation because CloudFront forwards only the first 8192 bytes
  4423. // for inspection.
  4424. //
  4425. // NONE
  4426. //
  4427. // Specify NONE if you don't want to perform any text transformations.
  4428. //
  4429. // CMD_LINE
  4430. //
  4431. // When you're concerned that attackers are injecting an operating system command
  4432. // line command and using unusual formatting to disguise some or all of the
  4433. // command, use this option to perform the following transformations:
  4434. //
  4435. // Delete the following characters: \ " ' ^ Delete spaces before the following
  4436. // characters: / ( Replace the following characters with a space: , ; Replace
  4437. // multiple spaces with one space Convert uppercase letters (A-Z) to lowercase
  4438. // (a-z) COMPRESS_WHITE_SPACE
  4439. //
  4440. // Use this option to replace the following characters with a space character
  4441. // (decimal 32):
  4442. //
  4443. // \f, formfeed, decimal 12 \t, tab, decimal 9 \n, newline, decimal 10 \r,
  4444. // carriage return, decimal 13 \v, vertical tab, decimal 11 non-breaking space,
  4445. // decimal 160 COMPRESS_WHITE_SPACE also replaces multiple spaces with one
  4446. // space.
  4447. //
  4448. // HTML_ENTITY_DECODE
  4449. //
  4450. // Use this option to replace HTML-encoded characters with unencoded characters.
  4451. // HTML_ENTITY_DECODE performs the following operations:
  4452. //
  4453. // Replaces (ampersand)quot; with " Replaces (ampersand)nbsp; with a non-breaking
  4454. // space, decimal 160 Replaces (ampersand)lt; with a "less than" symbol Replaces
  4455. // (ampersand)gt; with > Replaces characters that are represented in hexadecimal
  4456. // format, (ampersand)#xhhhh;, with the corresponding characters Replaces characters
  4457. // that are represented in decimal format, (ampersand)#nnnn;, with the corresponding
  4458. // characters LOWERCASE
  4459. //
  4460. // Use this option to convert uppercase letters (A-Z) to lowercase (a-z).
  4461. //
  4462. // URL_DECODE
  4463. //
  4464. // Use this option to decode a URL-encoded value.
  4465. TextTransformation *string `type:"string" required:"true" enum:"TextTransformation"`
  4466. }
  4467. // String returns the string representation
  4468. func (s SizeConstraint) String() string {
  4469. return awsutil.Prettify(s)
  4470. }
  4471. // GoString returns the string representation
  4472. func (s SizeConstraint) GoString() string {
  4473. return s.String()
  4474. }
  4475. // Validate inspects the fields of the type to determine if they are valid.
  4476. func (s *SizeConstraint) Validate() error {
  4477. invalidParams := request.ErrInvalidParams{Context: "SizeConstraint"}
  4478. if s.ComparisonOperator == nil {
  4479. invalidParams.Add(request.NewErrParamRequired("ComparisonOperator"))
  4480. }
  4481. if s.FieldToMatch == nil {
  4482. invalidParams.Add(request.NewErrParamRequired("FieldToMatch"))
  4483. }
  4484. if s.Size == nil {
  4485. invalidParams.Add(request.NewErrParamRequired("Size"))
  4486. }
  4487. if s.TextTransformation == nil {
  4488. invalidParams.Add(request.NewErrParamRequired("TextTransformation"))
  4489. }
  4490. if s.FieldToMatch != nil {
  4491. if err := s.FieldToMatch.Validate(); err != nil {
  4492. invalidParams.AddNested("FieldToMatch", err.(request.ErrInvalidParams))
  4493. }
  4494. }
  4495. if invalidParams.Len() > 0 {
  4496. return invalidParams
  4497. }
  4498. return nil
  4499. }
  4500. // A complex type that contains SizeConstraint objects, which specify the parts
  4501. // of web requests that you want AWS WAF to inspect the size of. If a SizeConstraintSet
  4502. // contains more than one SizeConstraint object, a request only needs to match
  4503. // one constraint to be considered a match.
  4504. type SizeConstraintSet struct {
  4505. _ struct{} `type:"structure"`
  4506. // The name, if any, of the SizeConstraintSet.
  4507. Name *string `min:"1" type:"string"`
  4508. // A unique identifier for a SizeConstraintSet. You use SizeConstraintSetId
  4509. // to get information about a SizeConstraintSet (see GetSizeConstraintSet),
  4510. // update a SizeConstraintSet (see UpdateSizeConstraintSet), insert a SizeConstraintSet
  4511. // into a Rule or delete one from a Rule (see UpdateRule), and delete a SizeConstraintSet
  4512. // from AWS WAF (see DeleteSizeConstraintSet).
  4513. //
  4514. // SizeConstraintSetId is returned by CreateSizeConstraintSet and by ListSizeConstraintSets.
  4515. SizeConstraintSetId *string `min:"1" type:"string" required:"true"`
  4516. // Specifies the parts of web requests that you want to inspect the size of.
  4517. SizeConstraints []*SizeConstraint `type:"list" required:"true"`
  4518. }
  4519. // String returns the string representation
  4520. func (s SizeConstraintSet) String() string {
  4521. return awsutil.Prettify(s)
  4522. }
  4523. // GoString returns the string representation
  4524. func (s SizeConstraintSet) GoString() string {
  4525. return s.String()
  4526. }
  4527. // The Id and Name of a SizeConstraintSet.
  4528. type SizeConstraintSetSummary struct {
  4529. _ struct{} `type:"structure"`
  4530. // The name of the SizeConstraintSet, if any.
  4531. Name *string `min:"1" type:"string" required:"true"`
  4532. // A unique identifier for a SizeConstraintSet. You use SizeConstraintSetId
  4533. // to get information about a SizeConstraintSet (see GetSizeConstraintSet),
  4534. // update a SizeConstraintSet (see UpdateSizeConstraintSet), insert a SizeConstraintSet
  4535. // into a Rule or delete one from a Rule (see UpdateRule), and delete a SizeConstraintSet
  4536. // from AWS WAF (see DeleteSizeConstraintSet).
  4537. //
  4538. // SizeConstraintSetId is returned by CreateSizeConstraintSet and by ListSizeConstraintSets.
  4539. SizeConstraintSetId *string `min:"1" type:"string" required:"true"`
  4540. }
  4541. // String returns the string representation
  4542. func (s SizeConstraintSetSummary) String() string {
  4543. return awsutil.Prettify(s)
  4544. }
  4545. // GoString returns the string representation
  4546. func (s SizeConstraintSetSummary) GoString() string {
  4547. return s.String()
  4548. }
  4549. // Specifies the part of a web request that you want to inspect the size of
  4550. // and indicates whether you want to add the specification to a SizeConstraintSet
  4551. // or delete it from a SizeConstraintSet.
  4552. type SizeConstraintSetUpdate struct {
  4553. _ struct{} `type:"structure"`
  4554. // Specify INSERT to add a SizeConstraintSetUpdate to a SizeConstraintSet. Use
  4555. // DELETE to remove a SizeConstraintSetUpdate from a SizeConstraintSet.
  4556. Action *string `type:"string" required:"true" enum:"ChangeAction"`
  4557. // Specifies a constraint on the size of a part of the web request. AWS WAF
  4558. // uses the Size, ComparisonOperator, and FieldToMatch to build an expression
  4559. // in the form of "Size ComparisonOperator size in bytes of FieldToMatch". If
  4560. // that expression is true, the SizeConstraint is considered to match.
  4561. SizeConstraint *SizeConstraint `type:"structure" required:"true"`
  4562. }
  4563. // String returns the string representation
  4564. func (s SizeConstraintSetUpdate) String() string {
  4565. return awsutil.Prettify(s)
  4566. }
  4567. // GoString returns the string representation
  4568. func (s SizeConstraintSetUpdate) GoString() string {
  4569. return s.String()
  4570. }
  4571. // Validate inspects the fields of the type to determine if they are valid.
  4572. func (s *SizeConstraintSetUpdate) Validate() error {
  4573. invalidParams := request.ErrInvalidParams{Context: "SizeConstraintSetUpdate"}
  4574. if s.Action == nil {
  4575. invalidParams.Add(request.NewErrParamRequired("Action"))
  4576. }
  4577. if s.SizeConstraint == nil {
  4578. invalidParams.Add(request.NewErrParamRequired("SizeConstraint"))
  4579. }
  4580. if s.SizeConstraint != nil {
  4581. if err := s.SizeConstraint.Validate(); err != nil {
  4582. invalidParams.AddNested("SizeConstraint", err.(request.ErrInvalidParams))
  4583. }
  4584. }
  4585. if invalidParams.Len() > 0 {
  4586. return invalidParams
  4587. }
  4588. return nil
  4589. }
  4590. // A complex type that contains SqlInjectionMatchTuple objects, which specify
  4591. // the parts of web requests that you want AWS WAF to inspect for snippets of
  4592. // malicious SQL code and, if you want AWS WAF to inspect a header, the name
  4593. // of the header. If a SqlInjectionMatchSet contains more than one SqlInjectionMatchTuple
  4594. // object, a request needs to include snippets of SQL code in only one of the
  4595. // specified parts of the request to be considered a match.
  4596. type SqlInjectionMatchSet struct {
  4597. _ struct{} `type:"structure"`
  4598. // The name, if any, of the SqlInjectionMatchSet.
  4599. Name *string `min:"1" type:"string"`
  4600. // A unique identifier for a SqlInjectionMatchSet. You use SqlInjectionMatchSetId
  4601. // to get information about a SqlInjectionMatchSet (see GetSqlInjectionMatchSet),
  4602. // update a SqlInjectionMatchSet (see UpdateSqlInjectionMatchSet), insert a
  4603. // SqlInjectionMatchSet into a Rule or delete one from a Rule (see UpdateRule),
  4604. // and delete a SqlInjectionMatchSet from AWS WAF (see DeleteSqlInjectionMatchSet).
  4605. //
  4606. // SqlInjectionMatchSetId is returned by CreateSqlInjectionMatchSet and by
  4607. // ListSqlInjectionMatchSets.
  4608. SqlInjectionMatchSetId *string `min:"1" type:"string" required:"true"`
  4609. // Specifies the parts of web requests that you want to inspect for snippets
  4610. // of malicious SQL code.
  4611. SqlInjectionMatchTuples []*SqlInjectionMatchTuple `type:"list" required:"true"`
  4612. }
  4613. // String returns the string representation
  4614. func (s SqlInjectionMatchSet) String() string {
  4615. return awsutil.Prettify(s)
  4616. }
  4617. // GoString returns the string representation
  4618. func (s SqlInjectionMatchSet) GoString() string {
  4619. return s.String()
  4620. }
  4621. // The Id and Name of a SqlInjectionMatchSet.
  4622. type SqlInjectionMatchSetSummary struct {
  4623. _ struct{} `type:"structure"`
  4624. // The name of the SqlInjectionMatchSet, if any, specified by Id.
  4625. Name *string `min:"1" type:"string" required:"true"`
  4626. // A unique identifier for a SqlInjectionMatchSet. You use SqlInjectionMatchSetId
  4627. // to get information about a SqlInjectionMatchSet (see GetSqlInjectionMatchSet),
  4628. // update a SqlInjectionMatchSet (see UpdateSqlInjectionMatchSet), insert a
  4629. // SqlInjectionMatchSet into a Rule or delete one from a Rule (see UpdateRule),
  4630. // and delete a SqlInjectionMatchSet from AWS WAF (see DeleteSqlInjectionMatchSet).
  4631. //
  4632. // SqlInjectionMatchSetId is returned by CreateSqlInjectionMatchSet and by
  4633. // ListSqlInjectionMatchSets.
  4634. SqlInjectionMatchSetId *string `min:"1" type:"string" required:"true"`
  4635. }
  4636. // String returns the string representation
  4637. func (s SqlInjectionMatchSetSummary) String() string {
  4638. return awsutil.Prettify(s)
  4639. }
  4640. // GoString returns the string representation
  4641. func (s SqlInjectionMatchSetSummary) GoString() string {
  4642. return s.String()
  4643. }
  4644. // Specifies the part of a web request that you want to inspect for snippets
  4645. // of malicious SQL code and indicates whether you want to add the specification
  4646. // to a SqlInjectionMatchSet or delete it from a SqlInjectionMatchSet.
  4647. type SqlInjectionMatchSetUpdate struct {
  4648. _ struct{} `type:"structure"`
  4649. // Specify INSERT to add a SqlInjectionMatchSetUpdate to a SqlInjectionMatchSet.
  4650. // Use DELETE to remove a SqlInjectionMatchSetUpdate from a SqlInjectionMatchSet.
  4651. Action *string `type:"string" required:"true" enum:"ChangeAction"`
  4652. // Specifies the part of a web request that you want AWS WAF to inspect for
  4653. // snippets of malicious SQL code and, if you want AWS WAF to inspect a header,
  4654. // the name of the header.
  4655. SqlInjectionMatchTuple *SqlInjectionMatchTuple `type:"structure" required:"true"`
  4656. }
  4657. // String returns the string representation
  4658. func (s SqlInjectionMatchSetUpdate) String() string {
  4659. return awsutil.Prettify(s)
  4660. }
  4661. // GoString returns the string representation
  4662. func (s SqlInjectionMatchSetUpdate) GoString() string {
  4663. return s.String()
  4664. }
  4665. // Validate inspects the fields of the type to determine if they are valid.
  4666. func (s *SqlInjectionMatchSetUpdate) Validate() error {
  4667. invalidParams := request.ErrInvalidParams{Context: "SqlInjectionMatchSetUpdate"}
  4668. if s.Action == nil {
  4669. invalidParams.Add(request.NewErrParamRequired("Action"))
  4670. }
  4671. if s.SqlInjectionMatchTuple == nil {
  4672. invalidParams.Add(request.NewErrParamRequired("SqlInjectionMatchTuple"))
  4673. }
  4674. if s.SqlInjectionMatchTuple != nil {
  4675. if err := s.SqlInjectionMatchTuple.Validate(); err != nil {
  4676. invalidParams.AddNested("SqlInjectionMatchTuple", err.(request.ErrInvalidParams))
  4677. }
  4678. }
  4679. if invalidParams.Len() > 0 {
  4680. return invalidParams
  4681. }
  4682. return nil
  4683. }
  4684. // Specifies the part of a web request that you want AWS WAF to inspect for
  4685. // snippets of malicious SQL code and, if you want AWS WAF to inspect a header,
  4686. // the name of the header.
  4687. type SqlInjectionMatchTuple struct {
  4688. _ struct{} `type:"structure"`
  4689. // Specifies where in a web request to look for TargetString.
  4690. FieldToMatch *FieldToMatch `type:"structure" required:"true"`
  4691. // Text transformations eliminate some of the unusual formatting that attackers
  4692. // use in web requests in an effort to bypass AWS WAF. If you specify a transformation,
  4693. // AWS WAF performs the transformation on FieldToMatch before inspecting a request
  4694. // for a match.
  4695. //
  4696. // CMD_LINE
  4697. //
  4698. // When you're concerned that attackers are injecting an operating system commandline
  4699. // command and using unusual formatting to disguise some or all of the command,
  4700. // use this option to perform the following transformations:
  4701. //
  4702. // Delete the following characters: \ " ' ^ Delete spaces before the following
  4703. // characters: / ( Replace the following characters with a space: , ; Replace
  4704. // multiple spaces with one space Convert uppercase letters (A-Z) to lowercase
  4705. // (a-z) COMPRESS_WHITE_SPACE
  4706. //
  4707. // Use this option to replace the following characters with a space character
  4708. // (decimal 32):
  4709. //
  4710. // \f, formfeed, decimal 12 \t, tab, decimal 9 \n, newline, decimal 10 \r,
  4711. // carriage return, decimal 13 \v, vertical tab, decimal 11 non-breaking space,
  4712. // decimal 160 COMPRESS_WHITE_SPACE also replaces multiple spaces with one
  4713. // space.
  4714. //
  4715. // HTML_ENTITY_DECODE
  4716. //
  4717. // Use this option to replace HTML-encoded characters with unencoded characters.
  4718. // HTML_ENTITY_DECODE performs the following operations:
  4719. //
  4720. // Replaces (ampersand)quot; with " Replaces (ampersand)nbsp; with a non-breaking
  4721. // space, decimal 160 Replaces (ampersand)lt; with a "less than" symbol Replaces
  4722. // (ampersand)gt; with > Replaces characters that are represented in hexadecimal
  4723. // format, (ampersand)#xhhhh;, with the corresponding characters Replaces characters
  4724. // that are represented in decimal format, (ampersand)#nnnn;, with the corresponding
  4725. // characters LOWERCASE
  4726. //
  4727. // Use this option to convert uppercase letters (A-Z) to lowercase (a-z).
  4728. //
  4729. // URL_DECODE
  4730. //
  4731. // Use this option to decode a URL-encoded value.
  4732. //
  4733. // NONE
  4734. //
  4735. // Specify NONE if you don't want to perform any text transformations.
  4736. TextTransformation *string `type:"string" required:"true" enum:"TextTransformation"`
  4737. }
  4738. // String returns the string representation
  4739. func (s SqlInjectionMatchTuple) String() string {
  4740. return awsutil.Prettify(s)
  4741. }
  4742. // GoString returns the string representation
  4743. func (s SqlInjectionMatchTuple) GoString() string {
  4744. return s.String()
  4745. }
  4746. // Validate inspects the fields of the type to determine if they are valid.
  4747. func (s *SqlInjectionMatchTuple) Validate() error {
  4748. invalidParams := request.ErrInvalidParams{Context: "SqlInjectionMatchTuple"}
  4749. if s.FieldToMatch == nil {
  4750. invalidParams.Add(request.NewErrParamRequired("FieldToMatch"))
  4751. }
  4752. if s.TextTransformation == nil {
  4753. invalidParams.Add(request.NewErrParamRequired("TextTransformation"))
  4754. }
  4755. if s.FieldToMatch != nil {
  4756. if err := s.FieldToMatch.Validate(); err != nil {
  4757. invalidParams.AddNested("FieldToMatch", err.(request.ErrInvalidParams))
  4758. }
  4759. }
  4760. if invalidParams.Len() > 0 {
  4761. return invalidParams
  4762. }
  4763. return nil
  4764. }
  4765. // In a GetSampledRequests request, the StartTime and EndTime objects specify
  4766. // the time range for which you want AWS WAF to return a sample of web requests.
  4767. //
  4768. // In a GetSampledRequests response, the StartTime and EndTime objects specify
  4769. // the time range for which AWS WAF actually returned a sample of web requests.
  4770. // AWS WAF gets the specified number of requests from among the first 5,000
  4771. // requests that your AWS resource receives during the specified time period.
  4772. // If your resource receives more than 5,000 requests during that period, AWS
  4773. // WAF stops sampling after the 5,000th request. In that case, EndTime is the
  4774. // time that AWS WAF received the 5,000th request.
  4775. type TimeWindow struct {
  4776. _ struct{} `type:"structure"`
  4777. // The end of the time range from which you want GetSampledRequests to return
  4778. // a sample of the requests that your AWS resource received. You can specify
  4779. // any time range in the previous three hours.
  4780. EndTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"`
  4781. // The beginning of the time range from which you want GetSampledRequests to
  4782. // return a sample of the requests that your AWS resource received. You can
  4783. // specify any time range in the previous three hours.
  4784. StartTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"`
  4785. }
  4786. // String returns the string representation
  4787. func (s TimeWindow) String() string {
  4788. return awsutil.Prettify(s)
  4789. }
  4790. // GoString returns the string representation
  4791. func (s TimeWindow) GoString() string {
  4792. return s.String()
  4793. }
  4794. // Validate inspects the fields of the type to determine if they are valid.
  4795. func (s *TimeWindow) Validate() error {
  4796. invalidParams := request.ErrInvalidParams{Context: "TimeWindow"}
  4797. if s.EndTime == nil {
  4798. invalidParams.Add(request.NewErrParamRequired("EndTime"))
  4799. }
  4800. if s.StartTime == nil {
  4801. invalidParams.Add(request.NewErrParamRequired("StartTime"))
  4802. }
  4803. if invalidParams.Len() > 0 {
  4804. return invalidParams
  4805. }
  4806. return nil
  4807. }
  4808. type UpdateByteMatchSetInput struct {
  4809. _ struct{} `type:"structure"`
  4810. // The ByteMatchSetId of the ByteMatchSet that you want to update. ByteMatchSetId
  4811. // is returned by CreateByteMatchSet and by ListByteMatchSets.
  4812. ByteMatchSetId *string `min:"1" type:"string" required:"true"`
  4813. // The value returned by the most recent call to GetChangeToken.
  4814. ChangeToken *string `type:"string" required:"true"`
  4815. // An array of ByteMatchSetUpdate objects that you want to insert into or delete
  4816. // from a ByteMatchSet. For more information, see the applicable data types:
  4817. //
  4818. // ByteMatchSetUpdate: Contains Action and ByteMatchTuple ByteMatchTuple:
  4819. // Contains FieldToMatch, PositionalConstraint, TargetString, and TextTransformation
  4820. // FieldToMatch: Contains Data and Type
  4821. Updates []*ByteMatchSetUpdate `type:"list" required:"true"`
  4822. }
  4823. // String returns the string representation
  4824. func (s UpdateByteMatchSetInput) String() string {
  4825. return awsutil.Prettify(s)
  4826. }
  4827. // GoString returns the string representation
  4828. func (s UpdateByteMatchSetInput) GoString() string {
  4829. return s.String()
  4830. }
  4831. // Validate inspects the fields of the type to determine if they are valid.
  4832. func (s *UpdateByteMatchSetInput) Validate() error {
  4833. invalidParams := request.ErrInvalidParams{Context: "UpdateByteMatchSetInput"}
  4834. if s.ByteMatchSetId == nil {
  4835. invalidParams.Add(request.NewErrParamRequired("ByteMatchSetId"))
  4836. }
  4837. if s.ByteMatchSetId != nil && len(*s.ByteMatchSetId) < 1 {
  4838. invalidParams.Add(request.NewErrParamMinLen("ByteMatchSetId", 1))
  4839. }
  4840. if s.ChangeToken == nil {
  4841. invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
  4842. }
  4843. if s.Updates == nil {
  4844. invalidParams.Add(request.NewErrParamRequired("Updates"))
  4845. }
  4846. if s.Updates != nil {
  4847. for i, v := range s.Updates {
  4848. if v == nil {
  4849. continue
  4850. }
  4851. if err := v.Validate(); err != nil {
  4852. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Updates", i), err.(request.ErrInvalidParams))
  4853. }
  4854. }
  4855. }
  4856. if invalidParams.Len() > 0 {
  4857. return invalidParams
  4858. }
  4859. return nil
  4860. }
  4861. type UpdateByteMatchSetOutput struct {
  4862. _ struct{} `type:"structure"`
  4863. // The ChangeToken that you used to submit the UpdateByteMatchSet request. You
  4864. // can also use this value to query the status of the request. For more information,
  4865. // see GetChangeTokenStatus.
  4866. ChangeToken *string `type:"string"`
  4867. }
  4868. // String returns the string representation
  4869. func (s UpdateByteMatchSetOutput) String() string {
  4870. return awsutil.Prettify(s)
  4871. }
  4872. // GoString returns the string representation
  4873. func (s UpdateByteMatchSetOutput) GoString() string {
  4874. return s.String()
  4875. }
  4876. type UpdateIPSetInput struct {
  4877. _ struct{} `type:"structure"`
  4878. // The value returned by the most recent call to GetChangeToken.
  4879. ChangeToken *string `type:"string" required:"true"`
  4880. // The IPSetId of the IPSet that you want to update. IPSetId is returned by
  4881. // CreateIPSet and by ListIPSets.
  4882. IPSetId *string `min:"1" type:"string" required:"true"`
  4883. // An array of IPSetUpdate objects that you want to insert into or delete from
  4884. // an IPSet. For more information, see the applicable data types:
  4885. //
  4886. // IPSetUpdate: Contains Action and IPSetDescriptor IPSetDescriptor: Contains
  4887. // Type and Value
  4888. Updates []*IPSetUpdate `type:"list" required:"true"`
  4889. }
  4890. // String returns the string representation
  4891. func (s UpdateIPSetInput) String() string {
  4892. return awsutil.Prettify(s)
  4893. }
  4894. // GoString returns the string representation
  4895. func (s UpdateIPSetInput) GoString() string {
  4896. return s.String()
  4897. }
  4898. // Validate inspects the fields of the type to determine if they are valid.
  4899. func (s *UpdateIPSetInput) Validate() error {
  4900. invalidParams := request.ErrInvalidParams{Context: "UpdateIPSetInput"}
  4901. if s.ChangeToken == nil {
  4902. invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
  4903. }
  4904. if s.IPSetId == nil {
  4905. invalidParams.Add(request.NewErrParamRequired("IPSetId"))
  4906. }
  4907. if s.IPSetId != nil && len(*s.IPSetId) < 1 {
  4908. invalidParams.Add(request.NewErrParamMinLen("IPSetId", 1))
  4909. }
  4910. if s.Updates == nil {
  4911. invalidParams.Add(request.NewErrParamRequired("Updates"))
  4912. }
  4913. if s.Updates != nil {
  4914. for i, v := range s.Updates {
  4915. if v == nil {
  4916. continue
  4917. }
  4918. if err := v.Validate(); err != nil {
  4919. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Updates", i), err.(request.ErrInvalidParams))
  4920. }
  4921. }
  4922. }
  4923. if invalidParams.Len() > 0 {
  4924. return invalidParams
  4925. }
  4926. return nil
  4927. }
  4928. type UpdateIPSetOutput struct {
  4929. _ struct{} `type:"structure"`
  4930. // The ChangeToken that you used to submit the UpdateIPSet request. You can
  4931. // also use this value to query the status of the request. For more information,
  4932. // see GetChangeTokenStatus.
  4933. ChangeToken *string `type:"string"`
  4934. }
  4935. // String returns the string representation
  4936. func (s UpdateIPSetOutput) String() string {
  4937. return awsutil.Prettify(s)
  4938. }
  4939. // GoString returns the string representation
  4940. func (s UpdateIPSetOutput) GoString() string {
  4941. return s.String()
  4942. }
  4943. type UpdateRuleInput struct {
  4944. _ struct{} `type:"structure"`
  4945. // The value returned by the most recent call to GetChangeToken.
  4946. ChangeToken *string `type:"string" required:"true"`
  4947. // The RuleId of the Rule that you want to update. RuleId is returned by CreateRule
  4948. // and by ListRules.
  4949. RuleId *string `min:"1" type:"string" required:"true"`
  4950. // An array of RuleUpdate objects that you want to insert into or delete from
  4951. // a Rule. For more information, see the applicable data types:
  4952. //
  4953. // RuleUpdate: Contains Action and Predicate Predicate: Contains DataId, Negated,
  4954. // and Type FieldToMatch: Contains Data and Type
  4955. Updates []*RuleUpdate `type:"list" required:"true"`
  4956. }
  4957. // String returns the string representation
  4958. func (s UpdateRuleInput) String() string {
  4959. return awsutil.Prettify(s)
  4960. }
  4961. // GoString returns the string representation
  4962. func (s UpdateRuleInput) GoString() string {
  4963. return s.String()
  4964. }
  4965. // Validate inspects the fields of the type to determine if they are valid.
  4966. func (s *UpdateRuleInput) Validate() error {
  4967. invalidParams := request.ErrInvalidParams{Context: "UpdateRuleInput"}
  4968. if s.ChangeToken == nil {
  4969. invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
  4970. }
  4971. if s.RuleId == nil {
  4972. invalidParams.Add(request.NewErrParamRequired("RuleId"))
  4973. }
  4974. if s.RuleId != nil && len(*s.RuleId) < 1 {
  4975. invalidParams.Add(request.NewErrParamMinLen("RuleId", 1))
  4976. }
  4977. if s.Updates == nil {
  4978. invalidParams.Add(request.NewErrParamRequired("Updates"))
  4979. }
  4980. if s.Updates != nil {
  4981. for i, v := range s.Updates {
  4982. if v == nil {
  4983. continue
  4984. }
  4985. if err := v.Validate(); err != nil {
  4986. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Updates", i), err.(request.ErrInvalidParams))
  4987. }
  4988. }
  4989. }
  4990. if invalidParams.Len() > 0 {
  4991. return invalidParams
  4992. }
  4993. return nil
  4994. }
  4995. type UpdateRuleOutput struct {
  4996. _ struct{} `type:"structure"`
  4997. // The ChangeToken that you used to submit the UpdateRule request. You can also
  4998. // use this value to query the status of the request. For more information,
  4999. // see GetChangeTokenStatus.
  5000. ChangeToken *string `type:"string"`
  5001. }
  5002. // String returns the string representation
  5003. func (s UpdateRuleOutput) String() string {
  5004. return awsutil.Prettify(s)
  5005. }
  5006. // GoString returns the string representation
  5007. func (s UpdateRuleOutput) GoString() string {
  5008. return s.String()
  5009. }
  5010. type UpdateSizeConstraintSetInput struct {
  5011. _ struct{} `type:"structure"`
  5012. // The value returned by the most recent call to GetChangeToken.
  5013. ChangeToken *string `type:"string" required:"true"`
  5014. // The SizeConstraintSetId of the SizeConstraintSet that you want to update.
  5015. // SizeConstraintSetId is returned by CreateSizeConstraintSet and by ListSizeConstraintSets.
  5016. SizeConstraintSetId *string `min:"1" type:"string" required:"true"`
  5017. // An array of SizeConstraintSetUpdate objects that you want to insert into
  5018. // or delete from a SizeConstraintSet. For more information, see the applicable
  5019. // data types:
  5020. //
  5021. // SizeConstraintSetUpdate: Contains Action and SizeConstraint SizeConstraint:
  5022. // Contains FieldToMatch, TextTransformation, ComparisonOperator, and Size FieldToMatch:
  5023. // Contains Data and Type
  5024. Updates []*SizeConstraintSetUpdate `type:"list" required:"true"`
  5025. }
  5026. // String returns the string representation
  5027. func (s UpdateSizeConstraintSetInput) String() string {
  5028. return awsutil.Prettify(s)
  5029. }
  5030. // GoString returns the string representation
  5031. func (s UpdateSizeConstraintSetInput) GoString() string {
  5032. return s.String()
  5033. }
  5034. // Validate inspects the fields of the type to determine if they are valid.
  5035. func (s *UpdateSizeConstraintSetInput) Validate() error {
  5036. invalidParams := request.ErrInvalidParams{Context: "UpdateSizeConstraintSetInput"}
  5037. if s.ChangeToken == nil {
  5038. invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
  5039. }
  5040. if s.SizeConstraintSetId == nil {
  5041. invalidParams.Add(request.NewErrParamRequired("SizeConstraintSetId"))
  5042. }
  5043. if s.SizeConstraintSetId != nil && len(*s.SizeConstraintSetId) < 1 {
  5044. invalidParams.Add(request.NewErrParamMinLen("SizeConstraintSetId", 1))
  5045. }
  5046. if s.Updates == nil {
  5047. invalidParams.Add(request.NewErrParamRequired("Updates"))
  5048. }
  5049. if s.Updates != nil {
  5050. for i, v := range s.Updates {
  5051. if v == nil {
  5052. continue
  5053. }
  5054. if err := v.Validate(); err != nil {
  5055. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Updates", i), err.(request.ErrInvalidParams))
  5056. }
  5057. }
  5058. }
  5059. if invalidParams.Len() > 0 {
  5060. return invalidParams
  5061. }
  5062. return nil
  5063. }
  5064. type UpdateSizeConstraintSetOutput struct {
  5065. _ struct{} `type:"structure"`
  5066. // The ChangeToken that you used to submit the UpdateSizeConstraintSet request.
  5067. // You can also use this value to query the status of the request. For more
  5068. // information, see GetChangeTokenStatus.
  5069. ChangeToken *string `type:"string"`
  5070. }
  5071. // String returns the string representation
  5072. func (s UpdateSizeConstraintSetOutput) String() string {
  5073. return awsutil.Prettify(s)
  5074. }
  5075. // GoString returns the string representation
  5076. func (s UpdateSizeConstraintSetOutput) GoString() string {
  5077. return s.String()
  5078. }
  5079. // A request to update a SqlInjectionMatchSet.
  5080. type UpdateSqlInjectionMatchSetInput struct {
  5081. _ struct{} `type:"structure"`
  5082. // The value returned by the most recent call to GetChangeToken.
  5083. ChangeToken *string `type:"string" required:"true"`
  5084. // The SqlInjectionMatchSetId of the SqlInjectionMatchSet that you want to update.
  5085. // SqlInjectionMatchSetId is returned by CreateSqlInjectionMatchSet and by ListSqlInjectionMatchSets.
  5086. SqlInjectionMatchSetId *string `min:"1" type:"string" required:"true"`
  5087. // An array of SqlInjectionMatchSetUpdate objects that you want to insert into
  5088. // or delete from a SqlInjectionMatchSet. For more information, see the applicable
  5089. // data types:
  5090. //
  5091. // SqlInjectionMatchSetUpdate: Contains Action and SqlInjectionMatchTuple
  5092. // SqlInjectionMatchTuple: Contains FieldToMatch and TextTransformation FieldToMatch:
  5093. // Contains Data and Type
  5094. Updates []*SqlInjectionMatchSetUpdate `type:"list" required:"true"`
  5095. }
  5096. // String returns the string representation
  5097. func (s UpdateSqlInjectionMatchSetInput) String() string {
  5098. return awsutil.Prettify(s)
  5099. }
  5100. // GoString returns the string representation
  5101. func (s UpdateSqlInjectionMatchSetInput) GoString() string {
  5102. return s.String()
  5103. }
  5104. // Validate inspects the fields of the type to determine if they are valid.
  5105. func (s *UpdateSqlInjectionMatchSetInput) Validate() error {
  5106. invalidParams := request.ErrInvalidParams{Context: "UpdateSqlInjectionMatchSetInput"}
  5107. if s.ChangeToken == nil {
  5108. invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
  5109. }
  5110. if s.SqlInjectionMatchSetId == nil {
  5111. invalidParams.Add(request.NewErrParamRequired("SqlInjectionMatchSetId"))
  5112. }
  5113. if s.SqlInjectionMatchSetId != nil && len(*s.SqlInjectionMatchSetId) < 1 {
  5114. invalidParams.Add(request.NewErrParamMinLen("SqlInjectionMatchSetId", 1))
  5115. }
  5116. if s.Updates == nil {
  5117. invalidParams.Add(request.NewErrParamRequired("Updates"))
  5118. }
  5119. if s.Updates != nil {
  5120. for i, v := range s.Updates {
  5121. if v == nil {
  5122. continue
  5123. }
  5124. if err := v.Validate(); err != nil {
  5125. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Updates", i), err.(request.ErrInvalidParams))
  5126. }
  5127. }
  5128. }
  5129. if invalidParams.Len() > 0 {
  5130. return invalidParams
  5131. }
  5132. return nil
  5133. }
  5134. // The response to an UpdateSqlInjectionMatchSets request.
  5135. type UpdateSqlInjectionMatchSetOutput struct {
  5136. _ struct{} `type:"structure"`
  5137. // The ChangeToken that you used to submit the UpdateSqlInjectionMatchSet request.
  5138. // You can also use this value to query the status of the request. For more
  5139. // information, see GetChangeTokenStatus.
  5140. ChangeToken *string `type:"string"`
  5141. }
  5142. // String returns the string representation
  5143. func (s UpdateSqlInjectionMatchSetOutput) String() string {
  5144. return awsutil.Prettify(s)
  5145. }
  5146. // GoString returns the string representation
  5147. func (s UpdateSqlInjectionMatchSetOutput) GoString() string {
  5148. return s.String()
  5149. }
  5150. type UpdateWebACLInput struct {
  5151. _ struct{} `type:"structure"`
  5152. // The value returned by the most recent call to GetChangeToken.
  5153. ChangeToken *string `type:"string" required:"true"`
  5154. // For the action that is associated with a rule in a WebACL, specifies the
  5155. // action that you want AWS WAF to perform when a web request matches all of
  5156. // the conditions in a rule. For the default action in a WebACL, specifies the
  5157. // action that you want AWS WAF to take when a web request doesn't match all
  5158. // of the conditions in any of the rules in a WebACL.
  5159. DefaultAction *WafAction `type:"structure"`
  5160. // An array of updates to make to the WebACL.
  5161. //
  5162. // An array of WebACLUpdate objects that you want to insert into or delete
  5163. // from a WebACL. For more information, see the applicable data types:
  5164. //
  5165. // WebACLUpdate: Contains Action and ActivatedRule ActivatedRule: Contains
  5166. // Action, Priority, and RuleId WafAction: Contains Type
  5167. Updates []*WebACLUpdate `type:"list"`
  5168. // The WebACLId of the WebACL that you want to update. WebACLId is returned
  5169. // by CreateWebACL and by ListWebACLs.
  5170. WebACLId *string `min:"1" type:"string" required:"true"`
  5171. }
  5172. // String returns the string representation
  5173. func (s UpdateWebACLInput) String() string {
  5174. return awsutil.Prettify(s)
  5175. }
  5176. // GoString returns the string representation
  5177. func (s UpdateWebACLInput) GoString() string {
  5178. return s.String()
  5179. }
  5180. // Validate inspects the fields of the type to determine if they are valid.
  5181. func (s *UpdateWebACLInput) Validate() error {
  5182. invalidParams := request.ErrInvalidParams{Context: "UpdateWebACLInput"}
  5183. if s.ChangeToken == nil {
  5184. invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
  5185. }
  5186. if s.WebACLId == nil {
  5187. invalidParams.Add(request.NewErrParamRequired("WebACLId"))
  5188. }
  5189. if s.WebACLId != nil && len(*s.WebACLId) < 1 {
  5190. invalidParams.Add(request.NewErrParamMinLen("WebACLId", 1))
  5191. }
  5192. if s.DefaultAction != nil {
  5193. if err := s.DefaultAction.Validate(); err != nil {
  5194. invalidParams.AddNested("DefaultAction", err.(request.ErrInvalidParams))
  5195. }
  5196. }
  5197. if s.Updates != nil {
  5198. for i, v := range s.Updates {
  5199. if v == nil {
  5200. continue
  5201. }
  5202. if err := v.Validate(); err != nil {
  5203. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Updates", i), err.(request.ErrInvalidParams))
  5204. }
  5205. }
  5206. }
  5207. if invalidParams.Len() > 0 {
  5208. return invalidParams
  5209. }
  5210. return nil
  5211. }
  5212. type UpdateWebACLOutput struct {
  5213. _ struct{} `type:"structure"`
  5214. // The ChangeToken that you used to submit the UpdateWebACL request. You can
  5215. // also use this value to query the status of the request. For more information,
  5216. // see GetChangeTokenStatus.
  5217. ChangeToken *string `type:"string"`
  5218. }
  5219. // String returns the string representation
  5220. func (s UpdateWebACLOutput) String() string {
  5221. return awsutil.Prettify(s)
  5222. }
  5223. // GoString returns the string representation
  5224. func (s UpdateWebACLOutput) GoString() string {
  5225. return s.String()
  5226. }
  5227. // A request to update an XssMatchSet.
  5228. type UpdateXssMatchSetInput struct {
  5229. _ struct{} `type:"structure"`
  5230. // The value returned by the most recent call to GetChangeToken.
  5231. ChangeToken *string `type:"string" required:"true"`
  5232. // An array of XssMatchSetUpdate objects that you want to insert into or delete
  5233. // from a XssMatchSet. For more information, see the applicable data types:
  5234. //
  5235. // XssMatchSetUpdate: Contains Action and XssMatchTuple XssMatchTuple: Contains
  5236. // FieldToMatch and TextTransformation FieldToMatch: Contains Data and Type
  5237. Updates []*XssMatchSetUpdate `type:"list" required:"true"`
  5238. // The XssMatchSetId of the XssMatchSet that you want to update. XssMatchSetId
  5239. // is returned by CreateXssMatchSet and by ListXssMatchSets.
  5240. XssMatchSetId *string `min:"1" type:"string" required:"true"`
  5241. }
  5242. // String returns the string representation
  5243. func (s UpdateXssMatchSetInput) String() string {
  5244. return awsutil.Prettify(s)
  5245. }
  5246. // GoString returns the string representation
  5247. func (s UpdateXssMatchSetInput) GoString() string {
  5248. return s.String()
  5249. }
  5250. // Validate inspects the fields of the type to determine if they are valid.
  5251. func (s *UpdateXssMatchSetInput) Validate() error {
  5252. invalidParams := request.ErrInvalidParams{Context: "UpdateXssMatchSetInput"}
  5253. if s.ChangeToken == nil {
  5254. invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
  5255. }
  5256. if s.Updates == nil {
  5257. invalidParams.Add(request.NewErrParamRequired("Updates"))
  5258. }
  5259. if s.XssMatchSetId == nil {
  5260. invalidParams.Add(request.NewErrParamRequired("XssMatchSetId"))
  5261. }
  5262. if s.XssMatchSetId != nil && len(*s.XssMatchSetId) < 1 {
  5263. invalidParams.Add(request.NewErrParamMinLen("XssMatchSetId", 1))
  5264. }
  5265. if s.Updates != nil {
  5266. for i, v := range s.Updates {
  5267. if v == nil {
  5268. continue
  5269. }
  5270. if err := v.Validate(); err != nil {
  5271. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Updates", i), err.(request.ErrInvalidParams))
  5272. }
  5273. }
  5274. }
  5275. if invalidParams.Len() > 0 {
  5276. return invalidParams
  5277. }
  5278. return nil
  5279. }
  5280. // The response to an UpdateXssMatchSets request.
  5281. type UpdateXssMatchSetOutput struct {
  5282. _ struct{} `type:"structure"`
  5283. // The ChangeToken that you used to submit the UpdateXssMatchSet request. You
  5284. // can also use this value to query the status of the request. For more information,
  5285. // see GetChangeTokenStatus.
  5286. ChangeToken *string `type:"string"`
  5287. }
  5288. // String returns the string representation
  5289. func (s UpdateXssMatchSetOutput) String() string {
  5290. return awsutil.Prettify(s)
  5291. }
  5292. // GoString returns the string representation
  5293. func (s UpdateXssMatchSetOutput) GoString() string {
  5294. return s.String()
  5295. }
  5296. // For the action that is associated with a rule in a WebACL, specifies the
  5297. // action that you want AWS WAF to perform when a web request matches all of
  5298. // the conditions in a rule. For the default action in a WebACL, specifies the
  5299. // action that you want AWS WAF to take when a web request doesn't match all
  5300. // of the conditions in any of the rules in a WebACL.
  5301. type WafAction struct {
  5302. _ struct{} `type:"structure"`
  5303. // Specifies how you want AWS WAF to respond to requests that match the settings
  5304. // in a Rule. Valid settings include the following:
  5305. //
  5306. // ALLOW: AWS WAF allows requests BLOCK: AWS WAF blocks requests COUNT: AWS
  5307. // WAF increments a counter of the requests that match all of the conditions
  5308. // in the rule. AWS WAF then continues to inspect the web request based on the
  5309. // remaining rules in the web ACL. You can't specify COUNT for the default action
  5310. // for a WebACL.
  5311. Type *string `type:"string" required:"true" enum:"WafActionType"`
  5312. }
  5313. // String returns the string representation
  5314. func (s WafAction) String() string {
  5315. return awsutil.Prettify(s)
  5316. }
  5317. // GoString returns the string representation
  5318. func (s WafAction) GoString() string {
  5319. return s.String()
  5320. }
  5321. // Validate inspects the fields of the type to determine if they are valid.
  5322. func (s *WafAction) Validate() error {
  5323. invalidParams := request.ErrInvalidParams{Context: "WafAction"}
  5324. if s.Type == nil {
  5325. invalidParams.Add(request.NewErrParamRequired("Type"))
  5326. }
  5327. if invalidParams.Len() > 0 {
  5328. return invalidParams
  5329. }
  5330. return nil
  5331. }
  5332. // Contains the Rules that identify the requests that you want to allow, block,
  5333. // or count. In a WebACL, you also specify a default action (ALLOW or BLOCK),
  5334. // and the action for each Rule that you add to a WebACL, for example, block
  5335. // requests from specified IP addresses or block requests from specified referrers.
  5336. // You also associate the WebACL with a CloudFront distribution to identify
  5337. // the requests that you want AWS WAF to filter. If you add more than one Rule
  5338. // to a WebACL, a request needs to match only one of the specifications to be
  5339. // allowed, blocked, or counted. For more information, see UpdateWebACL.
  5340. type WebACL struct {
  5341. _ struct{} `type:"structure"`
  5342. // The action to perform if none of the Rules contained in the WebACL match.
  5343. // The action is specified by the WafAction object.
  5344. DefaultAction *WafAction `type:"structure" required:"true"`
  5345. MetricName *string `type:"string"`
  5346. // A friendly name or description of the WebACL. You can't change the name of
  5347. // a WebACL after you create it.
  5348. Name *string `min:"1" type:"string"`
  5349. // An array that contains the action for each Rule in a WebACL, the priority
  5350. // of the Rule, and the ID of the Rule.
  5351. Rules []*ActivatedRule `type:"list" required:"true"`
  5352. // A unique identifier for a WebACL. You use WebACLId to get information about
  5353. // a WebACL (see GetWebACL), update a WebACL (see UpdateWebACL), and delete
  5354. // a WebACL from AWS WAF (see DeleteWebACL).
  5355. //
  5356. // WebACLId is returned by CreateWebACL and by ListWebACLs.
  5357. WebACLId *string `min:"1" type:"string" required:"true"`
  5358. }
  5359. // String returns the string representation
  5360. func (s WebACL) String() string {
  5361. return awsutil.Prettify(s)
  5362. }
  5363. // GoString returns the string representation
  5364. func (s WebACL) GoString() string {
  5365. return s.String()
  5366. }
  5367. // Contains the identifier and the name or description of the WebACL.
  5368. type WebACLSummary struct {
  5369. _ struct{} `type:"structure"`
  5370. // A friendly name or description of the WebACL. You can't change the name of
  5371. // a WebACL after you create it.
  5372. Name *string `min:"1" type:"string" required:"true"`
  5373. // A unique identifier for a WebACL. You use WebACLId to get information about
  5374. // a WebACL (see GetWebACL), update a WebACL (see UpdateWebACL), and delete
  5375. // a WebACL from AWS WAF (see DeleteWebACL).
  5376. //
  5377. // WebACLId is returned by CreateWebACL and by ListWebACLs.
  5378. WebACLId *string `min:"1" type:"string" required:"true"`
  5379. }
  5380. // String returns the string representation
  5381. func (s WebACLSummary) String() string {
  5382. return awsutil.Prettify(s)
  5383. }
  5384. // GoString returns the string representation
  5385. func (s WebACLSummary) GoString() string {
  5386. return s.String()
  5387. }
  5388. // Specifies whether to insert a Rule into or delete a Rule from a WebACL.
  5389. type WebACLUpdate struct {
  5390. _ struct{} `type:"structure"`
  5391. // Specifies whether to insert a Rule into or delete a Rule from a WebACL.
  5392. Action *string `type:"string" required:"true" enum:"ChangeAction"`
  5393. // The ActivatedRule object in an UpdateWebACL request specifies a Rule that
  5394. // you want to insert or delete, the priority of the Rule in the WebACL, and
  5395. // the action that you want AWS WAF to take when a web request matches the Rule
  5396. // (ALLOW, BLOCK, or COUNT).
  5397. //
  5398. // To specify whether to insert or delete a Rule, use the Action parameter
  5399. // in the WebACLUpdate data type.
  5400. ActivatedRule *ActivatedRule `type:"structure" required:"true"`
  5401. }
  5402. // String returns the string representation
  5403. func (s WebACLUpdate) String() string {
  5404. return awsutil.Prettify(s)
  5405. }
  5406. // GoString returns the string representation
  5407. func (s WebACLUpdate) GoString() string {
  5408. return s.String()
  5409. }
  5410. // Validate inspects the fields of the type to determine if they are valid.
  5411. func (s *WebACLUpdate) Validate() error {
  5412. invalidParams := request.ErrInvalidParams{Context: "WebACLUpdate"}
  5413. if s.Action == nil {
  5414. invalidParams.Add(request.NewErrParamRequired("Action"))
  5415. }
  5416. if s.ActivatedRule == nil {
  5417. invalidParams.Add(request.NewErrParamRequired("ActivatedRule"))
  5418. }
  5419. if s.ActivatedRule != nil {
  5420. if err := s.ActivatedRule.Validate(); err != nil {
  5421. invalidParams.AddNested("ActivatedRule", err.(request.ErrInvalidParams))
  5422. }
  5423. }
  5424. if invalidParams.Len() > 0 {
  5425. return invalidParams
  5426. }
  5427. return nil
  5428. }
  5429. // A complex type that contains XssMatchTuple objects, which specify the parts
  5430. // of web requests that you want AWS WAF to inspect for cross-site scripting
  5431. // attacks and, if you want AWS WAF to inspect a header, the name of the header.
  5432. // If a XssMatchSet contains more than one XssMatchTuple object, a request needs
  5433. // to include cross-site scripting attacks in only one of the specified parts
  5434. // of the request to be considered a match.
  5435. type XssMatchSet struct {
  5436. _ struct{} `type:"structure"`
  5437. // The name, if any, of the XssMatchSet.
  5438. Name *string `min:"1" type:"string"`
  5439. // A unique identifier for an XssMatchSet. You use XssMatchSetId to get information
  5440. // about an XssMatchSet (see GetXssMatchSet), update an XssMatchSet (see UpdateXssMatchSet),
  5441. // insert an XssMatchSet into a Rule or delete one from a Rule (see UpdateRule),
  5442. // and delete an XssMatchSet from AWS WAF (see DeleteXssMatchSet).
  5443. //
  5444. // XssMatchSetId is returned by CreateXssMatchSet and by ListXssMatchSets.
  5445. XssMatchSetId *string `min:"1" type:"string" required:"true"`
  5446. // Specifies the parts of web requests that you want to inspect for cross-site
  5447. // scripting attacks.
  5448. XssMatchTuples []*XssMatchTuple `type:"list" required:"true"`
  5449. }
  5450. // String returns the string representation
  5451. func (s XssMatchSet) String() string {
  5452. return awsutil.Prettify(s)
  5453. }
  5454. // GoString returns the string representation
  5455. func (s XssMatchSet) GoString() string {
  5456. return s.String()
  5457. }
  5458. // The Id and Name of an XssMatchSet.
  5459. type XssMatchSetSummary struct {
  5460. _ struct{} `type:"structure"`
  5461. // The name of the XssMatchSet, if any, specified by Id.
  5462. Name *string `min:"1" type:"string" required:"true"`
  5463. // A unique identifier for an XssMatchSet. You use XssMatchSetId to get information
  5464. // about a XssMatchSet (see GetXssMatchSet), update an XssMatchSet (see UpdateXssMatchSet),
  5465. // insert an XssMatchSet into a Rule or delete one from a Rule (see UpdateRule),
  5466. // and delete an XssMatchSet from AWS WAF (see DeleteXssMatchSet).
  5467. //
  5468. // XssMatchSetId is returned by CreateXssMatchSet and by ListXssMatchSets.
  5469. XssMatchSetId *string `min:"1" type:"string" required:"true"`
  5470. }
  5471. // String returns the string representation
  5472. func (s XssMatchSetSummary) String() string {
  5473. return awsutil.Prettify(s)
  5474. }
  5475. // GoString returns the string representation
  5476. func (s XssMatchSetSummary) GoString() string {
  5477. return s.String()
  5478. }
  5479. // Specifies the part of a web request that you want to inspect for cross-site
  5480. // scripting attacks and indicates whether you want to add the specification
  5481. // to an XssMatchSet or delete it from an XssMatchSet.
  5482. type XssMatchSetUpdate struct {
  5483. _ struct{} `type:"structure"`
  5484. // Specify INSERT to add a XssMatchSetUpdate to an XssMatchSet. Use DELETE to
  5485. // remove a XssMatchSetUpdate from an XssMatchSet.
  5486. Action *string `type:"string" required:"true" enum:"ChangeAction"`
  5487. // Specifies the part of a web request that you want AWS WAF to inspect for
  5488. // cross-site scripting attacks and, if you want AWS WAF to inspect a header,
  5489. // the name of the header.
  5490. XssMatchTuple *XssMatchTuple `type:"structure" required:"true"`
  5491. }
  5492. // String returns the string representation
  5493. func (s XssMatchSetUpdate) String() string {
  5494. return awsutil.Prettify(s)
  5495. }
  5496. // GoString returns the string representation
  5497. func (s XssMatchSetUpdate) GoString() string {
  5498. return s.String()
  5499. }
  5500. // Validate inspects the fields of the type to determine if they are valid.
  5501. func (s *XssMatchSetUpdate) Validate() error {
  5502. invalidParams := request.ErrInvalidParams{Context: "XssMatchSetUpdate"}
  5503. if s.Action == nil {
  5504. invalidParams.Add(request.NewErrParamRequired("Action"))
  5505. }
  5506. if s.XssMatchTuple == nil {
  5507. invalidParams.Add(request.NewErrParamRequired("XssMatchTuple"))
  5508. }
  5509. if s.XssMatchTuple != nil {
  5510. if err := s.XssMatchTuple.Validate(); err != nil {
  5511. invalidParams.AddNested("XssMatchTuple", err.(request.ErrInvalidParams))
  5512. }
  5513. }
  5514. if invalidParams.Len() > 0 {
  5515. return invalidParams
  5516. }
  5517. return nil
  5518. }
  5519. // Specifies the part of a web request that you want AWS WAF to inspect for
  5520. // cross-site scripting attacks and, if you want AWS WAF to inspect a header,
  5521. // the name of the header.
  5522. type XssMatchTuple struct {
  5523. _ struct{} `type:"structure"`
  5524. // Specifies where in a web request to look for TargetString.
  5525. FieldToMatch *FieldToMatch `type:"structure" required:"true"`
  5526. // Text transformations eliminate some of the unusual formatting that attackers
  5527. // use in web requests in an effort to bypass AWS WAF. If you specify a transformation,
  5528. // AWS WAF performs the transformation on FieldToMatch before inspecting a request
  5529. // for a match.
  5530. //
  5531. // CMD_LINE
  5532. //
  5533. // When you're concerned that attackers are injecting an operating system commandline
  5534. // command and using unusual formatting to disguise some or all of the command,
  5535. // use this option to perform the following transformations:
  5536. //
  5537. // Delete the following characters: \ " ' ^ Delete spaces before the following
  5538. // characters: / ( Replace the following characters with a space: , ; Replace
  5539. // multiple spaces with one space Convert uppercase letters (A-Z) to lowercase
  5540. // (a-z) COMPRESS_WHITE_SPACE
  5541. //
  5542. // Use this option to replace the following characters with a space character
  5543. // (decimal 32):
  5544. //
  5545. // \f, formfeed, decimal 12 \t, tab, decimal 9 \n, newline, decimal 10 \r,
  5546. // carriage return, decimal 13 \v, vertical tab, decimal 11 non-breaking space,
  5547. // decimal 160 COMPRESS_WHITE_SPACE also replaces multiple spaces with one
  5548. // space.
  5549. //
  5550. // HTML_ENTITY_DECODE
  5551. //
  5552. // Use this option to replace HTML-encoded characters with unencoded characters.
  5553. // HTML_ENTITY_DECODE performs the following operations:
  5554. //
  5555. // Replaces (ampersand)quot; with " Replaces (ampersand)nbsp; with a non-breaking
  5556. // space, decimal 160 Replaces (ampersand)lt; with a "less than" symbol Replaces
  5557. // (ampersand)gt; with > Replaces characters that are represented in hexadecimal
  5558. // format, (ampersand)#xhhhh;, with the corresponding characters Replaces characters
  5559. // that are represented in decimal format, (ampersand)#nnnn;, with the corresponding
  5560. // characters LOWERCASE
  5561. //
  5562. // Use this option to convert uppercase letters (A-Z) to lowercase (a-z).
  5563. //
  5564. // URL_DECODE
  5565. //
  5566. // Use this option to decode a URL-encoded value.
  5567. //
  5568. // NONE
  5569. //
  5570. // Specify NONE if you don't want to perform any text transformations.
  5571. TextTransformation *string `type:"string" required:"true" enum:"TextTransformation"`
  5572. }
  5573. // String returns the string representation
  5574. func (s XssMatchTuple) String() string {
  5575. return awsutil.Prettify(s)
  5576. }
  5577. // GoString returns the string representation
  5578. func (s XssMatchTuple) GoString() string {
  5579. return s.String()
  5580. }
  5581. // Validate inspects the fields of the type to determine if they are valid.
  5582. func (s *XssMatchTuple) Validate() error {
  5583. invalidParams := request.ErrInvalidParams{Context: "XssMatchTuple"}
  5584. if s.FieldToMatch == nil {
  5585. invalidParams.Add(request.NewErrParamRequired("FieldToMatch"))
  5586. }
  5587. if s.TextTransformation == nil {
  5588. invalidParams.Add(request.NewErrParamRequired("TextTransformation"))
  5589. }
  5590. if s.FieldToMatch != nil {
  5591. if err := s.FieldToMatch.Validate(); err != nil {
  5592. invalidParams.AddNested("FieldToMatch", err.(request.ErrInvalidParams))
  5593. }
  5594. }
  5595. if invalidParams.Len() > 0 {
  5596. return invalidParams
  5597. }
  5598. return nil
  5599. }
  5600. const (
  5601. // @enum ChangeAction
  5602. ChangeActionInsert = "INSERT"
  5603. // @enum ChangeAction
  5604. ChangeActionDelete = "DELETE"
  5605. )
  5606. const (
  5607. // @enum ChangeTokenStatus
  5608. ChangeTokenStatusProvisioned = "PROVISIONED"
  5609. // @enum ChangeTokenStatus
  5610. ChangeTokenStatusPending = "PENDING"
  5611. // @enum ChangeTokenStatus
  5612. ChangeTokenStatusInsync = "INSYNC"
  5613. )
  5614. const (
  5615. // @enum ComparisonOperator
  5616. ComparisonOperatorEq = "EQ"
  5617. // @enum ComparisonOperator
  5618. ComparisonOperatorNe = "NE"
  5619. // @enum ComparisonOperator
  5620. ComparisonOperatorLe = "LE"
  5621. // @enum ComparisonOperator
  5622. ComparisonOperatorLt = "LT"
  5623. // @enum ComparisonOperator
  5624. ComparisonOperatorGe = "GE"
  5625. // @enum ComparisonOperator
  5626. ComparisonOperatorGt = "GT"
  5627. )
  5628. const (
  5629. // @enum IPSetDescriptorType
  5630. IPSetDescriptorTypeIpv4 = "IPV4"
  5631. )
  5632. const (
  5633. // @enum MatchFieldType
  5634. MatchFieldTypeUri = "URI"
  5635. // @enum MatchFieldType
  5636. MatchFieldTypeQueryString = "QUERY_STRING"
  5637. // @enum MatchFieldType
  5638. MatchFieldTypeHeader = "HEADER"
  5639. // @enum MatchFieldType
  5640. MatchFieldTypeMethod = "METHOD"
  5641. // @enum MatchFieldType
  5642. MatchFieldTypeBody = "BODY"
  5643. )
  5644. const (
  5645. // @enum ParameterExceptionField
  5646. ParameterExceptionFieldChangeAction = "CHANGE_ACTION"
  5647. // @enum ParameterExceptionField
  5648. ParameterExceptionFieldWafAction = "WAF_ACTION"
  5649. // @enum ParameterExceptionField
  5650. ParameterExceptionFieldPredicateType = "PREDICATE_TYPE"
  5651. // @enum ParameterExceptionField
  5652. ParameterExceptionFieldIpsetType = "IPSET_TYPE"
  5653. // @enum ParameterExceptionField
  5654. ParameterExceptionFieldByteMatchFieldType = "BYTE_MATCH_FIELD_TYPE"
  5655. // @enum ParameterExceptionField
  5656. ParameterExceptionFieldSqlInjectionMatchFieldType = "SQL_INJECTION_MATCH_FIELD_TYPE"
  5657. // @enum ParameterExceptionField
  5658. ParameterExceptionFieldByteMatchTextTransformation = "BYTE_MATCH_TEXT_TRANSFORMATION"
  5659. // @enum ParameterExceptionField
  5660. ParameterExceptionFieldByteMatchPositionalConstraint = "BYTE_MATCH_POSITIONAL_CONSTRAINT"
  5661. // @enum ParameterExceptionField
  5662. ParameterExceptionFieldSizeConstraintComparisonOperator = "SIZE_CONSTRAINT_COMPARISON_OPERATOR"
  5663. )
  5664. const (
  5665. // @enum ParameterExceptionReason
  5666. ParameterExceptionReasonInvalidOption = "INVALID_OPTION"
  5667. // @enum ParameterExceptionReason
  5668. ParameterExceptionReasonIllegalCombination = "ILLEGAL_COMBINATION"
  5669. )
  5670. const (
  5671. // @enum PositionalConstraint
  5672. PositionalConstraintExactly = "EXACTLY"
  5673. // @enum PositionalConstraint
  5674. PositionalConstraintStartsWith = "STARTS_WITH"
  5675. // @enum PositionalConstraint
  5676. PositionalConstraintEndsWith = "ENDS_WITH"
  5677. // @enum PositionalConstraint
  5678. PositionalConstraintContains = "CONTAINS"
  5679. // @enum PositionalConstraint
  5680. PositionalConstraintContainsWord = "CONTAINS_WORD"
  5681. )
  5682. const (
  5683. // @enum PredicateType
  5684. PredicateTypeIpmatch = "IPMatch"
  5685. // @enum PredicateType
  5686. PredicateTypeByteMatch = "ByteMatch"
  5687. // @enum PredicateType
  5688. PredicateTypeSqlInjectionMatch = "SqlInjectionMatch"
  5689. // @enum PredicateType
  5690. PredicateTypeSizeConstraint = "SizeConstraint"
  5691. // @enum PredicateType
  5692. PredicateTypeXssMatch = "XssMatch"
  5693. )
  5694. const (
  5695. // @enum TextTransformation
  5696. TextTransformationNone = "NONE"
  5697. // @enum TextTransformation
  5698. TextTransformationCompressWhiteSpace = "COMPRESS_WHITE_SPACE"
  5699. // @enum TextTransformation
  5700. TextTransformationHtmlEntityDecode = "HTML_ENTITY_DECODE"
  5701. // @enum TextTransformation
  5702. TextTransformationLowercase = "LOWERCASE"
  5703. // @enum TextTransformation
  5704. TextTransformationCmdLine = "CMD_LINE"
  5705. // @enum TextTransformation
  5706. TextTransformationUrlDecode = "URL_DECODE"
  5707. )
  5708. const (
  5709. // @enum WafActionType
  5710. WafActionTypeBlock = "BLOCK"
  5711. // @enum WafActionType
  5712. WafActionTypeAllow = "ALLOW"
  5713. // @enum WafActionType
  5714. WafActionTypeCount = "COUNT"
  5715. )