12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035 |
- // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
- // Package waf provides a client for AWS WAF.
- package waf
- import (
- "fmt"
- "time"
- "github.com/aws/aws-sdk-go/aws/awsutil"
- "github.com/aws/aws-sdk-go/aws/request"
- )
- const opCreateByteMatchSet = "CreateByteMatchSet"
- // CreateByteMatchSetRequest generates a "aws/request.Request" representing the
- // client's request for the CreateByteMatchSet operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See CreateByteMatchSet for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the CreateByteMatchSet method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the CreateByteMatchSetRequest method.
- // req, resp := client.CreateByteMatchSetRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *WAF) CreateByteMatchSetRequest(input *CreateByteMatchSetInput) (req *request.Request, output *CreateByteMatchSetOutput) {
- op := &request.Operation{
- Name: opCreateByteMatchSet,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &CreateByteMatchSetInput{}
- }
- req = c.newRequest(op, input, output)
- output = &CreateByteMatchSetOutput{}
- req.Data = output
- return
- }
- // CreateByteMatchSet API operation for AWS WAF.
- //
- // Creates a ByteMatchSet. You then use UpdateByteMatchSet to identify the part
- // of a web request that you want AWS WAF to inspect, such as the values of
- // the User-Agent header or the query string. For example, you can create a
- // ByteMatchSet that matches any requests with User-Agent headers that contain
- // the string BadBot. You can then configure AWS WAF to reject those requests.
- //
- // To create and configure a ByteMatchSet, perform the following steps:
- //
- // Use GetChangeToken to get the change token that you provide in the ChangeToken
- // parameter of a CreateByteMatchSet request.
- //
- // Submit a CreateByteMatchSet request.
- //
- // Use GetChangeToken to get the change token that you provide in the ChangeToken
- // parameter of an UpdateByteMatchSet request.
- //
- // Submit an UpdateByteMatchSet request to specify the part of the request that
- // you want AWS WAF to inspect (for example, the header or the URI) and the
- // value that you want AWS WAF to watch for.
- //
- // For more information about how to use the AWS WAF API to allow or block HTTP
- // requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/).
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS WAF's
- // API operation CreateByteMatchSet for usage and error information.
- //
- // Returned Error Codes:
- // * DisallowedNameException
- // The name specified is invalid.
- //
- // * InternalErrorException
- // The operation failed because of a system problem, even though the request
- // was valid. Retry your request.
- //
- // * InvalidAccountException
- // The operation failed because you tried to create, update, or delete an object
- // by using an invalid account identifier.
- //
- // * InvalidParameterException
- // The operation failed because AWS WAF didn't recognize a parameter in the
- // request. For example:
- //
- // * You specified an invalid parameter name.
- //
- // * You specified an invalid value.
- //
- // * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL)
- // using an action other than INSERT or DELETE.
- //
- // * You tried to create a WebACL with a DefaultActionType other than ALLOW,
- // BLOCK, or COUNT.
- //
- // * You tried to update a WebACL with a WafActionType other than ALLOW,
- // BLOCK, or COUNT.
- //
- // * You tried to update a ByteMatchSet with a FieldToMatchType other than
- // HEADER, QUERY_STRING, or URI.
- //
- // * You tried to update a ByteMatchSet with a Field of HEADER but no value
- // for Data.
- //
- // * StaleDataException
- // The operation failed because you tried to create, update, or delete an object
- // by using a change token that has already been used.
- //
- // * LimitsExceededException
- // The operation exceeds a resource limit, for example, the maximum number of
- // WebACL objects that you can create for an AWS account. For more information,
- // see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
- // in the AWS WAF Developer Guide.
- //
- func (c *WAF) CreateByteMatchSet(input *CreateByteMatchSetInput) (*CreateByteMatchSetOutput, error) {
- req, out := c.CreateByteMatchSetRequest(input)
- err := req.Send()
- return out, err
- }
- const opCreateIPSet = "CreateIPSet"
- // CreateIPSetRequest generates a "aws/request.Request" representing the
- // client's request for the CreateIPSet operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See CreateIPSet for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the CreateIPSet method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the CreateIPSetRequest method.
- // req, resp := client.CreateIPSetRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *WAF) CreateIPSetRequest(input *CreateIPSetInput) (req *request.Request, output *CreateIPSetOutput) {
- op := &request.Operation{
- Name: opCreateIPSet,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &CreateIPSetInput{}
- }
- req = c.newRequest(op, input, output)
- output = &CreateIPSetOutput{}
- req.Data = output
- return
- }
- // CreateIPSet API operation for AWS WAF.
- //
- // Creates an IPSet, which you use to specify which web requests you want to
- // allow or block based on the IP addresses that the requests originate from.
- // For example, if you're receiving a lot of requests from one or more individual
- // IP addresses or one or more ranges of IP addresses and you want to block
- // the requests, you can create an IPSet that contains those IP addresses and
- // then configure AWS WAF to block the requests.
- //
- // To create and configure an IPSet, perform the following steps:
- //
- // Use GetChangeToken to get the change token that you provide in the ChangeToken
- // parameter of a CreateIPSet request.
- //
- // Submit a CreateIPSet request.
- //
- // Use GetChangeToken to get the change token that you provide in the ChangeToken
- // parameter of an UpdateIPSet request.
- //
- // Submit an UpdateIPSet request to specify the IP addresses that you want AWS
- // WAF to watch for.
- //
- // For more information about how to use the AWS WAF API to allow or block HTTP
- // requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/).
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS WAF's
- // API operation CreateIPSet for usage and error information.
- //
- // Returned Error Codes:
- // * StaleDataException
- // The operation failed because you tried to create, update, or delete an object
- // by using a change token that has already been used.
- //
- // * InternalErrorException
- // The operation failed because of a system problem, even though the request
- // was valid. Retry your request.
- //
- // * InvalidAccountException
- // The operation failed because you tried to create, update, or delete an object
- // by using an invalid account identifier.
- //
- // * DisallowedNameException
- // The name specified is invalid.
- //
- // * InvalidParameterException
- // The operation failed because AWS WAF didn't recognize a parameter in the
- // request. For example:
- //
- // * You specified an invalid parameter name.
- //
- // * You specified an invalid value.
- //
- // * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL)
- // using an action other than INSERT or DELETE.
- //
- // * You tried to create a WebACL with a DefaultActionType other than ALLOW,
- // BLOCK, or COUNT.
- //
- // * You tried to update a WebACL with a WafActionType other than ALLOW,
- // BLOCK, or COUNT.
- //
- // * You tried to update a ByteMatchSet with a FieldToMatchType other than
- // HEADER, QUERY_STRING, or URI.
- //
- // * You tried to update a ByteMatchSet with a Field of HEADER but no value
- // for Data.
- //
- // * LimitsExceededException
- // The operation exceeds a resource limit, for example, the maximum number of
- // WebACL objects that you can create for an AWS account. For more information,
- // see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
- // in the AWS WAF Developer Guide.
- //
- func (c *WAF) CreateIPSet(input *CreateIPSetInput) (*CreateIPSetOutput, error) {
- req, out := c.CreateIPSetRequest(input)
- err := req.Send()
- return out, err
- }
- const opCreateRule = "CreateRule"
- // CreateRuleRequest generates a "aws/request.Request" representing the
- // client's request for the CreateRule operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See CreateRule for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the CreateRule method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the CreateRuleRequest method.
- // req, resp := client.CreateRuleRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *WAF) CreateRuleRequest(input *CreateRuleInput) (req *request.Request, output *CreateRuleOutput) {
- op := &request.Operation{
- Name: opCreateRule,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &CreateRuleInput{}
- }
- req = c.newRequest(op, input, output)
- output = &CreateRuleOutput{}
- req.Data = output
- return
- }
- // CreateRule API operation for AWS WAF.
- //
- // Creates a Rule, which contains the IPSet objects, ByteMatchSet objects, and
- // other predicates that identify the requests that you want to block. If you
- // add more than one predicate to a Rule, a request must match all of the specifications
- // to be allowed or blocked. For example, suppose you add the following to a
- // Rule:
- //
- // * An IPSet that matches the IP address 192.0.2.44/32
- //
- // * A ByteMatchSet that matches BadBot in the User-Agent header
- //
- // You then add the Rule to a WebACL and specify that you want to blocks requests
- // that satisfy the Rule. For a request to be blocked, it must come from the
- // IP address 192.0.2.44 and the User-Agent header in the request must contain
- // the value BadBot.
- //
- // To create and configure a Rule, perform the following steps:
- //
- // Create and update the predicates that you want to include in the Rule. For
- // more information, see CreateByteMatchSet, CreateIPSet, and CreateSqlInjectionMatchSet.
- //
- // Use GetChangeToken to get the change token that you provide in the ChangeToken
- // parameter of a CreateRule request.
- //
- // Submit a CreateRule request.
- //
- // Use GetChangeToken to get the change token that you provide in the ChangeToken
- // parameter of an UpdateRule request.
- //
- // Submit an UpdateRule request to specify the predicates that you want to include
- // in the Rule.
- //
- // Create and update a WebACL that contains the Rule. For more information,
- // see CreateWebACL.
- //
- // For more information about how to use the AWS WAF API to allow or block HTTP
- // requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/).
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS WAF's
- // API operation CreateRule for usage and error information.
- //
- // Returned Error Codes:
- // * StaleDataException
- // The operation failed because you tried to create, update, or delete an object
- // by using a change token that has already been used.
- //
- // * InternalErrorException
- // The operation failed because of a system problem, even though the request
- // was valid. Retry your request.
- //
- // * DisallowedNameException
- // The name specified is invalid.
- //
- // * InvalidParameterException
- // The operation failed because AWS WAF didn't recognize a parameter in the
- // request. For example:
- //
- // * You specified an invalid parameter name.
- //
- // * You specified an invalid value.
- //
- // * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL)
- // using an action other than INSERT or DELETE.
- //
- // * You tried to create a WebACL with a DefaultActionType other than ALLOW,
- // BLOCK, or COUNT.
- //
- // * You tried to update a WebACL with a WafActionType other than ALLOW,
- // BLOCK, or COUNT.
- //
- // * You tried to update a ByteMatchSet with a FieldToMatchType other than
- // HEADER, QUERY_STRING, or URI.
- //
- // * You tried to update a ByteMatchSet with a Field of HEADER but no value
- // for Data.
- //
- // * LimitsExceededException
- // The operation exceeds a resource limit, for example, the maximum number of
- // WebACL objects that you can create for an AWS account. For more information,
- // see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
- // in the AWS WAF Developer Guide.
- //
- func (c *WAF) CreateRule(input *CreateRuleInput) (*CreateRuleOutput, error) {
- req, out := c.CreateRuleRequest(input)
- err := req.Send()
- return out, err
- }
- const opCreateSizeConstraintSet = "CreateSizeConstraintSet"
- // CreateSizeConstraintSetRequest generates a "aws/request.Request" representing the
- // client's request for the CreateSizeConstraintSet operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See CreateSizeConstraintSet for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the CreateSizeConstraintSet method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the CreateSizeConstraintSetRequest method.
- // req, resp := client.CreateSizeConstraintSetRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *WAF) CreateSizeConstraintSetRequest(input *CreateSizeConstraintSetInput) (req *request.Request, output *CreateSizeConstraintSetOutput) {
- op := &request.Operation{
- Name: opCreateSizeConstraintSet,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &CreateSizeConstraintSetInput{}
- }
- req = c.newRequest(op, input, output)
- output = &CreateSizeConstraintSetOutput{}
- req.Data = output
- return
- }
- // CreateSizeConstraintSet API operation for AWS WAF.
- //
- // Creates a SizeConstraintSet. You then use UpdateSizeConstraintSet to identify
- // the part of a web request that you want AWS WAF to check for length, such
- // as the length of the User-Agent header or the length of the query string.
- // For example, you can create a SizeConstraintSet that matches any requests
- // that have a query string that is longer than 100 bytes. You can then configure
- // AWS WAF to reject those requests.
- //
- // To create and configure a SizeConstraintSet, perform the following steps:
- //
- // Use GetChangeToken to get the change token that you provide in the ChangeToken
- // parameter of a CreateSizeConstraintSet request.
- //
- // Submit a CreateSizeConstraintSet request.
- //
- // Use GetChangeToken to get the change token that you provide in the ChangeToken
- // parameter of an UpdateSizeConstraintSet request.
- //
- // Submit an UpdateSizeConstraintSet request to specify the part of the request
- // that you want AWS WAF to inspect (for example, the header or the URI) and
- // the value that you want AWS WAF to watch for.
- //
- // For more information about how to use the AWS WAF API to allow or block HTTP
- // requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/).
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS WAF's
- // API operation CreateSizeConstraintSet for usage and error information.
- //
- // Returned Error Codes:
- // * StaleDataException
- // The operation failed because you tried to create, update, or delete an object
- // by using a change token that has already been used.
- //
- // * InternalErrorException
- // The operation failed because of a system problem, even though the request
- // was valid. Retry your request.
- //
- // * InvalidAccountException
- // The operation failed because you tried to create, update, or delete an object
- // by using an invalid account identifier.
- //
- // * DisallowedNameException
- // The name specified is invalid.
- //
- // * InvalidParameterException
- // The operation failed because AWS WAF didn't recognize a parameter in the
- // request. For example:
- //
- // * You specified an invalid parameter name.
- //
- // * You specified an invalid value.
- //
- // * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL)
- // using an action other than INSERT or DELETE.
- //
- // * You tried to create a WebACL with a DefaultActionType other than ALLOW,
- // BLOCK, or COUNT.
- //
- // * You tried to update a WebACL with a WafActionType other than ALLOW,
- // BLOCK, or COUNT.
- //
- // * You tried to update a ByteMatchSet with a FieldToMatchType other than
- // HEADER, QUERY_STRING, or URI.
- //
- // * You tried to update a ByteMatchSet with a Field of HEADER but no value
- // for Data.
- //
- // * LimitsExceededException
- // The operation exceeds a resource limit, for example, the maximum number of
- // WebACL objects that you can create for an AWS account. For more information,
- // see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
- // in the AWS WAF Developer Guide.
- //
- func (c *WAF) CreateSizeConstraintSet(input *CreateSizeConstraintSetInput) (*CreateSizeConstraintSetOutput, error) {
- req, out := c.CreateSizeConstraintSetRequest(input)
- err := req.Send()
- return out, err
- }
- const opCreateSqlInjectionMatchSet = "CreateSqlInjectionMatchSet"
- // CreateSqlInjectionMatchSetRequest generates a "aws/request.Request" representing the
- // client's request for the CreateSqlInjectionMatchSet operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See CreateSqlInjectionMatchSet for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the CreateSqlInjectionMatchSet method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the CreateSqlInjectionMatchSetRequest method.
- // req, resp := client.CreateSqlInjectionMatchSetRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *WAF) CreateSqlInjectionMatchSetRequest(input *CreateSqlInjectionMatchSetInput) (req *request.Request, output *CreateSqlInjectionMatchSetOutput) {
- op := &request.Operation{
- Name: opCreateSqlInjectionMatchSet,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &CreateSqlInjectionMatchSetInput{}
- }
- req = c.newRequest(op, input, output)
- output = &CreateSqlInjectionMatchSetOutput{}
- req.Data = output
- return
- }
- // CreateSqlInjectionMatchSet API operation for AWS WAF.
- //
- // Creates a SqlInjectionMatchSet, which you use to allow, block, or count requests
- // that contain snippets of SQL code in a specified part of web requests. AWS
- // WAF searches for character sequences that are likely to be malicious strings.
- //
- // To create and configure a SqlInjectionMatchSet, perform the following steps:
- //
- // Use GetChangeToken to get the change token that you provide in the ChangeToken
- // parameter of a CreateSqlInjectionMatchSet request.
- //
- // Submit a CreateSqlInjectionMatchSet request.
- //
- // Use GetChangeToken to get the change token that you provide in the ChangeToken
- // parameter of an UpdateSqlInjectionMatchSet request.
- //
- // Submit an UpdateSqlInjectionMatchSet request to specify the parts of web
- // requests in which you want to allow, block, or count malicious SQL code.
- //
- // For more information about how to use the AWS WAF API to allow or block HTTP
- // requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/).
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS WAF's
- // API operation CreateSqlInjectionMatchSet for usage and error information.
- //
- // Returned Error Codes:
- // * DisallowedNameException
- // The name specified is invalid.
- //
- // * InternalErrorException
- // The operation failed because of a system problem, even though the request
- // was valid. Retry your request.
- //
- // * InvalidAccountException
- // The operation failed because you tried to create, update, or delete an object
- // by using an invalid account identifier.
- //
- // * InvalidParameterException
- // The operation failed because AWS WAF didn't recognize a parameter in the
- // request. For example:
- //
- // * You specified an invalid parameter name.
- //
- // * You specified an invalid value.
- //
- // * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL)
- // using an action other than INSERT or DELETE.
- //
- // * You tried to create a WebACL with a DefaultActionType other than ALLOW,
- // BLOCK, or COUNT.
- //
- // * You tried to update a WebACL with a WafActionType other than ALLOW,
- // BLOCK, or COUNT.
- //
- // * You tried to update a ByteMatchSet with a FieldToMatchType other than
- // HEADER, QUERY_STRING, or URI.
- //
- // * You tried to update a ByteMatchSet with a Field of HEADER but no value
- // for Data.
- //
- // * StaleDataException
- // The operation failed because you tried to create, update, or delete an object
- // by using a change token that has already been used.
- //
- // * LimitsExceededException
- // The operation exceeds a resource limit, for example, the maximum number of
- // WebACL objects that you can create for an AWS account. For more information,
- // see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
- // in the AWS WAF Developer Guide.
- //
- func (c *WAF) CreateSqlInjectionMatchSet(input *CreateSqlInjectionMatchSetInput) (*CreateSqlInjectionMatchSetOutput, error) {
- req, out := c.CreateSqlInjectionMatchSetRequest(input)
- err := req.Send()
- return out, err
- }
- const opCreateWebACL = "CreateWebACL"
- // CreateWebACLRequest generates a "aws/request.Request" representing the
- // client's request for the CreateWebACL operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See CreateWebACL for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the CreateWebACL method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the CreateWebACLRequest method.
- // req, resp := client.CreateWebACLRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *WAF) CreateWebACLRequest(input *CreateWebACLInput) (req *request.Request, output *CreateWebACLOutput) {
- op := &request.Operation{
- Name: opCreateWebACL,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &CreateWebACLInput{}
- }
- req = c.newRequest(op, input, output)
- output = &CreateWebACLOutput{}
- req.Data = output
- return
- }
- // CreateWebACL API operation for AWS WAF.
- //
- // Creates a WebACL, which contains the Rules that identify the CloudFront web
- // requests that you want to allow, block, or count. AWS WAF evaluates Rules
- // in order based on the value of Priority for each Rule.
- //
- // You also specify a default action, either ALLOW or BLOCK. If a web request
- // doesn't match any of the Rules in a WebACL, AWS WAF responds to the request
- // with the default action.
- //
- // To create and configure a WebACL, perform the following steps:
- //
- // Create and update the ByteMatchSet objects and other predicates that you
- // want to include in Rules. For more information, see CreateByteMatchSet, UpdateByteMatchSet,
- // CreateIPSet, UpdateIPSet, CreateSqlInjectionMatchSet, and UpdateSqlInjectionMatchSet.
- //
- // Create and update the Rules that you want to include in the WebACL. For more
- // information, see CreateRule and UpdateRule.
- //
- // Use GetChangeToken to get the change token that you provide in the ChangeToken
- // parameter of a CreateWebACL request.
- //
- // Submit a CreateWebACL request.
- //
- // Use GetChangeToken to get the change token that you provide in the ChangeToken
- // parameter of an UpdateWebACL request.
- //
- // Submit an UpdateWebACL request to specify the Rules that you want to include
- // in the WebACL, to specify the default action, and to associate the WebACL
- // with a CloudFront distribution.
- //
- // For more information about how to use the AWS WAF API, see the AWS WAF Developer
- // Guide (http://docs.aws.amazon.com/waf/latest/developerguide/).
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS WAF's
- // API operation CreateWebACL for usage and error information.
- //
- // Returned Error Codes:
- // * StaleDataException
- // The operation failed because you tried to create, update, or delete an object
- // by using a change token that has already been used.
- //
- // * InternalErrorException
- // The operation failed because of a system problem, even though the request
- // was valid. Retry your request.
- //
- // * InvalidAccountException
- // The operation failed because you tried to create, update, or delete an object
- // by using an invalid account identifier.
- //
- // * DisallowedNameException
- // The name specified is invalid.
- //
- // * InvalidParameterException
- // The operation failed because AWS WAF didn't recognize a parameter in the
- // request. For example:
- //
- // * You specified an invalid parameter name.
- //
- // * You specified an invalid value.
- //
- // * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL)
- // using an action other than INSERT or DELETE.
- //
- // * You tried to create a WebACL with a DefaultActionType other than ALLOW,
- // BLOCK, or COUNT.
- //
- // * You tried to update a WebACL with a WafActionType other than ALLOW,
- // BLOCK, or COUNT.
- //
- // * You tried to update a ByteMatchSet with a FieldToMatchType other than
- // HEADER, QUERY_STRING, or URI.
- //
- // * You tried to update a ByteMatchSet with a Field of HEADER but no value
- // for Data.
- //
- // * LimitsExceededException
- // The operation exceeds a resource limit, for example, the maximum number of
- // WebACL objects that you can create for an AWS account. For more information,
- // see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
- // in the AWS WAF Developer Guide.
- //
- func (c *WAF) CreateWebACL(input *CreateWebACLInput) (*CreateWebACLOutput, error) {
- req, out := c.CreateWebACLRequest(input)
- err := req.Send()
- return out, err
- }
- const opCreateXssMatchSet = "CreateXssMatchSet"
- // CreateXssMatchSetRequest generates a "aws/request.Request" representing the
- // client's request for the CreateXssMatchSet operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See CreateXssMatchSet for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the CreateXssMatchSet method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the CreateXssMatchSetRequest method.
- // req, resp := client.CreateXssMatchSetRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *WAF) CreateXssMatchSetRequest(input *CreateXssMatchSetInput) (req *request.Request, output *CreateXssMatchSetOutput) {
- op := &request.Operation{
- Name: opCreateXssMatchSet,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &CreateXssMatchSetInput{}
- }
- req = c.newRequest(op, input, output)
- output = &CreateXssMatchSetOutput{}
- req.Data = output
- return
- }
- // CreateXssMatchSet API operation for AWS WAF.
- //
- // Creates an XssMatchSet, which you use to allow, block, or count requests
- // that contain cross-site scripting attacks in the specified part of web requests.
- // AWS WAF searches for character sequences that are likely to be malicious
- // strings.
- //
- // To create and configure an XssMatchSet, perform the following steps:
- //
- // Use GetChangeToken to get the change token that you provide in the ChangeToken
- // parameter of a CreateXssMatchSet request.
- //
- // Submit a CreateXssMatchSet request.
- //
- // Use GetChangeToken to get the change token that you provide in the ChangeToken
- // parameter of an UpdateXssMatchSet request.
- //
- // Submit an UpdateXssMatchSet request to specify the parts of web requests
- // in which you want to allow, block, or count cross-site scripting attacks.
- //
- // For more information about how to use the AWS WAF API to allow or block HTTP
- // requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/).
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS WAF's
- // API operation CreateXssMatchSet for usage and error information.
- //
- // Returned Error Codes:
- // * DisallowedNameException
- // The name specified is invalid.
- //
- // * InternalErrorException
- // The operation failed because of a system problem, even though the request
- // was valid. Retry your request.
- //
- // * InvalidAccountException
- // The operation failed because you tried to create, update, or delete an object
- // by using an invalid account identifier.
- //
- // * InvalidParameterException
- // The operation failed because AWS WAF didn't recognize a parameter in the
- // request. For example:
- //
- // * You specified an invalid parameter name.
- //
- // * You specified an invalid value.
- //
- // * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL)
- // using an action other than INSERT or DELETE.
- //
- // * You tried to create a WebACL with a DefaultActionType other than ALLOW,
- // BLOCK, or COUNT.
- //
- // * You tried to update a WebACL with a WafActionType other than ALLOW,
- // BLOCK, or COUNT.
- //
- // * You tried to update a ByteMatchSet with a FieldToMatchType other than
- // HEADER, QUERY_STRING, or URI.
- //
- // * You tried to update a ByteMatchSet with a Field of HEADER but no value
- // for Data.
- //
- // * StaleDataException
- // The operation failed because you tried to create, update, or delete an object
- // by using a change token that has already been used.
- //
- // * LimitsExceededException
- // The operation exceeds a resource limit, for example, the maximum number of
- // WebACL objects that you can create for an AWS account. For more information,
- // see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
- // in the AWS WAF Developer Guide.
- //
- func (c *WAF) CreateXssMatchSet(input *CreateXssMatchSetInput) (*CreateXssMatchSetOutput, error) {
- req, out := c.CreateXssMatchSetRequest(input)
- err := req.Send()
- return out, err
- }
- const opDeleteByteMatchSet = "DeleteByteMatchSet"
- // DeleteByteMatchSetRequest generates a "aws/request.Request" representing the
- // client's request for the DeleteByteMatchSet operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See DeleteByteMatchSet for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the DeleteByteMatchSet method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the DeleteByteMatchSetRequest method.
- // req, resp := client.DeleteByteMatchSetRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *WAF) DeleteByteMatchSetRequest(input *DeleteByteMatchSetInput) (req *request.Request, output *DeleteByteMatchSetOutput) {
- op := &request.Operation{
- Name: opDeleteByteMatchSet,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &DeleteByteMatchSetInput{}
- }
- req = c.newRequest(op, input, output)
- output = &DeleteByteMatchSetOutput{}
- req.Data = output
- return
- }
- // DeleteByteMatchSet API operation for AWS WAF.
- //
- // Permanently deletes a ByteMatchSet. You can't delete a ByteMatchSet if it's
- // still used in any Rules or if it still includes any ByteMatchTuple objects
- // (any filters).
- //
- // If you just want to remove a ByteMatchSet from a Rule, use UpdateRule.
- //
- // To permanently delete a ByteMatchSet, perform the following steps:
- //
- // Update the ByteMatchSet to remove filters, if any. For more information,
- // see UpdateByteMatchSet.
- //
- // Use GetChangeToken to get the change token that you provide in the ChangeToken
- // parameter of a DeleteByteMatchSet request.
- //
- // Submit a DeleteByteMatchSet request.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS WAF's
- // API operation DeleteByteMatchSet for usage and error information.
- //
- // Returned Error Codes:
- // * InternalErrorException
- // The operation failed because of a system problem, even though the request
- // was valid. Retry your request.
- //
- // * InvalidAccountException
- // The operation failed because you tried to create, update, or delete an object
- // by using an invalid account identifier.
- //
- // * NonexistentItemException
- // The operation failed because the referenced object doesn't exist.
- //
- // * ReferencedItemException
- // The operation failed because you tried to delete an object that is still
- // in use. For example:
- //
- // * You tried to delete a ByteMatchSet that is still referenced by a Rule.
- //
- // * You tried to delete a Rule that is still referenced by a WebACL.
- //
- // * StaleDataException
- // The operation failed because you tried to create, update, or delete an object
- // by using a change token that has already been used.
- //
- // * NonEmptyEntityException
- // The operation failed because you tried to delete an object that isn't empty.
- // For example:
- //
- // * You tried to delete a WebACL that still contains one or more Rule objects.
- //
- // * You tried to delete a Rule that still contains one or more ByteMatchSet
- // objects or other predicates.
- //
- // * You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple
- // objects.
- //
- // * You tried to delete an IPSet that references one or more IP addresses.
- //
- func (c *WAF) DeleteByteMatchSet(input *DeleteByteMatchSetInput) (*DeleteByteMatchSetOutput, error) {
- req, out := c.DeleteByteMatchSetRequest(input)
- err := req.Send()
- return out, err
- }
- const opDeleteIPSet = "DeleteIPSet"
- // DeleteIPSetRequest generates a "aws/request.Request" representing the
- // client's request for the DeleteIPSet operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See DeleteIPSet for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the DeleteIPSet method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the DeleteIPSetRequest method.
- // req, resp := client.DeleteIPSetRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *WAF) DeleteIPSetRequest(input *DeleteIPSetInput) (req *request.Request, output *DeleteIPSetOutput) {
- op := &request.Operation{
- Name: opDeleteIPSet,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &DeleteIPSetInput{}
- }
- req = c.newRequest(op, input, output)
- output = &DeleteIPSetOutput{}
- req.Data = output
- return
- }
- // DeleteIPSet API operation for AWS WAF.
- //
- // Permanently deletes an IPSet. You can't delete an IPSet if it's still used
- // in any Rules or if it still includes any IP addresses.
- //
- // If you just want to remove an IPSet from a Rule, use UpdateRule.
- //
- // To permanently delete an IPSet from AWS WAF, perform the following steps:
- //
- // Update the IPSet to remove IP address ranges, if any. For more information,
- // see UpdateIPSet.
- //
- // Use GetChangeToken to get the change token that you provide in the ChangeToken
- // parameter of a DeleteIPSet request.
- //
- // Submit a DeleteIPSet request.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS WAF's
- // API operation DeleteIPSet for usage and error information.
- //
- // Returned Error Codes:
- // * StaleDataException
- // The operation failed because you tried to create, update, or delete an object
- // by using a change token that has already been used.
- //
- // * InternalErrorException
- // The operation failed because of a system problem, even though the request
- // was valid. Retry your request.
- //
- // * InvalidAccountException
- // The operation failed because you tried to create, update, or delete an object
- // by using an invalid account identifier.
- //
- // * NonexistentItemException
- // The operation failed because the referenced object doesn't exist.
- //
- // * ReferencedItemException
- // The operation failed because you tried to delete an object that is still
- // in use. For example:
- //
- // * You tried to delete a ByteMatchSet that is still referenced by a Rule.
- //
- // * You tried to delete a Rule that is still referenced by a WebACL.
- //
- // * NonEmptyEntityException
- // The operation failed because you tried to delete an object that isn't empty.
- // For example:
- //
- // * You tried to delete a WebACL that still contains one or more Rule objects.
- //
- // * You tried to delete a Rule that still contains one or more ByteMatchSet
- // objects or other predicates.
- //
- // * You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple
- // objects.
- //
- // * You tried to delete an IPSet that references one or more IP addresses.
- //
- func (c *WAF) DeleteIPSet(input *DeleteIPSetInput) (*DeleteIPSetOutput, error) {
- req, out := c.DeleteIPSetRequest(input)
- err := req.Send()
- return out, err
- }
- const opDeleteRule = "DeleteRule"
- // DeleteRuleRequest generates a "aws/request.Request" representing the
- // client's request for the DeleteRule operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See DeleteRule for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the DeleteRule method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the DeleteRuleRequest method.
- // req, resp := client.DeleteRuleRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *WAF) DeleteRuleRequest(input *DeleteRuleInput) (req *request.Request, output *DeleteRuleOutput) {
- op := &request.Operation{
- Name: opDeleteRule,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &DeleteRuleInput{}
- }
- req = c.newRequest(op, input, output)
- output = &DeleteRuleOutput{}
- req.Data = output
- return
- }
- // DeleteRule API operation for AWS WAF.
- //
- // Permanently deletes a Rule. You can't delete a Rule if it's still used in
- // any WebACL objects or if it still includes any predicates, such as ByteMatchSet
- // objects.
- //
- // If you just want to remove a Rule from a WebACL, use UpdateWebACL.
- //
- // To permanently delete a Rule from AWS WAF, perform the following steps:
- //
- // Update the Rule to remove predicates, if any. For more information, see UpdateRule.
- //
- // Use GetChangeToken to get the change token that you provide in the ChangeToken
- // parameter of a DeleteRule request.
- //
- // Submit a DeleteRule request.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS WAF's
- // API operation DeleteRule for usage and error information.
- //
- // Returned Error Codes:
- // * StaleDataException
- // The operation failed because you tried to create, update, or delete an object
- // by using a change token that has already been used.
- //
- // * InternalErrorException
- // The operation failed because of a system problem, even though the request
- // was valid. Retry your request.
- //
- // * InvalidAccountException
- // The operation failed because you tried to create, update, or delete an object
- // by using an invalid account identifier.
- //
- // * NonexistentItemException
- // The operation failed because the referenced object doesn't exist.
- //
- // * ReferencedItemException
- // The operation failed because you tried to delete an object that is still
- // in use. For example:
- //
- // * You tried to delete a ByteMatchSet that is still referenced by a Rule.
- //
- // * You tried to delete a Rule that is still referenced by a WebACL.
- //
- // * NonEmptyEntityException
- // The operation failed because you tried to delete an object that isn't empty.
- // For example:
- //
- // * You tried to delete a WebACL that still contains one or more Rule objects.
- //
- // * You tried to delete a Rule that still contains one or more ByteMatchSet
- // objects or other predicates.
- //
- // * You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple
- // objects.
- //
- // * You tried to delete an IPSet that references one or more IP addresses.
- //
- func (c *WAF) DeleteRule(input *DeleteRuleInput) (*DeleteRuleOutput, error) {
- req, out := c.DeleteRuleRequest(input)
- err := req.Send()
- return out, err
- }
- const opDeleteSizeConstraintSet = "DeleteSizeConstraintSet"
- // DeleteSizeConstraintSetRequest generates a "aws/request.Request" representing the
- // client's request for the DeleteSizeConstraintSet operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See DeleteSizeConstraintSet for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the DeleteSizeConstraintSet method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the DeleteSizeConstraintSetRequest method.
- // req, resp := client.DeleteSizeConstraintSetRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *WAF) DeleteSizeConstraintSetRequest(input *DeleteSizeConstraintSetInput) (req *request.Request, output *DeleteSizeConstraintSetOutput) {
- op := &request.Operation{
- Name: opDeleteSizeConstraintSet,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &DeleteSizeConstraintSetInput{}
- }
- req = c.newRequest(op, input, output)
- output = &DeleteSizeConstraintSetOutput{}
- req.Data = output
- return
- }
- // DeleteSizeConstraintSet API operation for AWS WAF.
- //
- // Permanently deletes a SizeConstraintSet. You can't delete a SizeConstraintSet
- // if it's still used in any Rules or if it still includes any SizeConstraint
- // objects (any filters).
- //
- // If you just want to remove a SizeConstraintSet from a Rule, use UpdateRule.
- //
- // To permanently delete a SizeConstraintSet, perform the following steps:
- //
- // Update the SizeConstraintSet to remove filters, if any. For more information,
- // see UpdateSizeConstraintSet.
- //
- // Use GetChangeToken to get the change token that you provide in the ChangeToken
- // parameter of a DeleteSizeConstraintSet request.
- //
- // Submit a DeleteSizeConstraintSet request.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS WAF's
- // API operation DeleteSizeConstraintSet for usage and error information.
- //
- // Returned Error Codes:
- // * StaleDataException
- // The operation failed because you tried to create, update, or delete an object
- // by using a change token that has already been used.
- //
- // * InternalErrorException
- // The operation failed because of a system problem, even though the request
- // was valid. Retry your request.
- //
- // * InvalidAccountException
- // The operation failed because you tried to create, update, or delete an object
- // by using an invalid account identifier.
- //
- // * NonexistentItemException
- // The operation failed because the referenced object doesn't exist.
- //
- // * ReferencedItemException
- // The operation failed because you tried to delete an object that is still
- // in use. For example:
- //
- // * You tried to delete a ByteMatchSet that is still referenced by a Rule.
- //
- // * You tried to delete a Rule that is still referenced by a WebACL.
- //
- // * NonEmptyEntityException
- // The operation failed because you tried to delete an object that isn't empty.
- // For example:
- //
- // * You tried to delete a WebACL that still contains one or more Rule objects.
- //
- // * You tried to delete a Rule that still contains one or more ByteMatchSet
- // objects or other predicates.
- //
- // * You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple
- // objects.
- //
- // * You tried to delete an IPSet that references one or more IP addresses.
- //
- func (c *WAF) DeleteSizeConstraintSet(input *DeleteSizeConstraintSetInput) (*DeleteSizeConstraintSetOutput, error) {
- req, out := c.DeleteSizeConstraintSetRequest(input)
- err := req.Send()
- return out, err
- }
- const opDeleteSqlInjectionMatchSet = "DeleteSqlInjectionMatchSet"
- // DeleteSqlInjectionMatchSetRequest generates a "aws/request.Request" representing the
- // client's request for the DeleteSqlInjectionMatchSet operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See DeleteSqlInjectionMatchSet for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the DeleteSqlInjectionMatchSet method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the DeleteSqlInjectionMatchSetRequest method.
- // req, resp := client.DeleteSqlInjectionMatchSetRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *WAF) DeleteSqlInjectionMatchSetRequest(input *DeleteSqlInjectionMatchSetInput) (req *request.Request, output *DeleteSqlInjectionMatchSetOutput) {
- op := &request.Operation{
- Name: opDeleteSqlInjectionMatchSet,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &DeleteSqlInjectionMatchSetInput{}
- }
- req = c.newRequest(op, input, output)
- output = &DeleteSqlInjectionMatchSetOutput{}
- req.Data = output
- return
- }
- // DeleteSqlInjectionMatchSet API operation for AWS WAF.
- //
- // Permanently deletes a SqlInjectionMatchSet. You can't delete a SqlInjectionMatchSet
- // if it's still used in any Rules or if it still contains any SqlInjectionMatchTuple
- // objects.
- //
- // If you just want to remove a SqlInjectionMatchSet from a Rule, use UpdateRule.
- //
- // To permanently delete a SqlInjectionMatchSet from AWS WAF, perform the following
- // steps:
- //
- // Update the SqlInjectionMatchSet to remove filters, if any. For more information,
- // see UpdateSqlInjectionMatchSet.
- //
- // Use GetChangeToken to get the change token that you provide in the ChangeToken
- // parameter of a DeleteSqlInjectionMatchSet request.
- //
- // Submit a DeleteSqlInjectionMatchSet request.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS WAF's
- // API operation DeleteSqlInjectionMatchSet for usage and error information.
- //
- // Returned Error Codes:
- // * InternalErrorException
- // The operation failed because of a system problem, even though the request
- // was valid. Retry your request.
- //
- // * InvalidAccountException
- // The operation failed because you tried to create, update, or delete an object
- // by using an invalid account identifier.
- //
- // * NonexistentItemException
- // The operation failed because the referenced object doesn't exist.
- //
- // * ReferencedItemException
- // The operation failed because you tried to delete an object that is still
- // in use. For example:
- //
- // * You tried to delete a ByteMatchSet that is still referenced by a Rule.
- //
- // * You tried to delete a Rule that is still referenced by a WebACL.
- //
- // * StaleDataException
- // The operation failed because you tried to create, update, or delete an object
- // by using a change token that has already been used.
- //
- // * NonEmptyEntityException
- // The operation failed because you tried to delete an object that isn't empty.
- // For example:
- //
- // * You tried to delete a WebACL that still contains one or more Rule objects.
- //
- // * You tried to delete a Rule that still contains one or more ByteMatchSet
- // objects or other predicates.
- //
- // * You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple
- // objects.
- //
- // * You tried to delete an IPSet that references one or more IP addresses.
- //
- func (c *WAF) DeleteSqlInjectionMatchSet(input *DeleteSqlInjectionMatchSetInput) (*DeleteSqlInjectionMatchSetOutput, error) {
- req, out := c.DeleteSqlInjectionMatchSetRequest(input)
- err := req.Send()
- return out, err
- }
- const opDeleteWebACL = "DeleteWebACL"
- // DeleteWebACLRequest generates a "aws/request.Request" representing the
- // client's request for the DeleteWebACL operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See DeleteWebACL for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the DeleteWebACL method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the DeleteWebACLRequest method.
- // req, resp := client.DeleteWebACLRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *WAF) DeleteWebACLRequest(input *DeleteWebACLInput) (req *request.Request, output *DeleteWebACLOutput) {
- op := &request.Operation{
- Name: opDeleteWebACL,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &DeleteWebACLInput{}
- }
- req = c.newRequest(op, input, output)
- output = &DeleteWebACLOutput{}
- req.Data = output
- return
- }
- // DeleteWebACL API operation for AWS WAF.
- //
- // Permanently deletes a WebACL. You can't delete a WebACL if it still contains
- // any Rules.
- //
- // To delete a WebACL, perform the following steps:
- //
- // Update the WebACL to remove Rules, if any. For more information, see UpdateWebACL.
- //
- // Use GetChangeToken to get the change token that you provide in the ChangeToken
- // parameter of a DeleteWebACL request.
- //
- // Submit a DeleteWebACL request.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS WAF's
- // API operation DeleteWebACL for usage and error information.
- //
- // Returned Error Codes:
- // * StaleDataException
- // The operation failed because you tried to create, update, or delete an object
- // by using a change token that has already been used.
- //
- // * InternalErrorException
- // The operation failed because of a system problem, even though the request
- // was valid. Retry your request.
- //
- // * InvalidAccountException
- // The operation failed because you tried to create, update, or delete an object
- // by using an invalid account identifier.
- //
- // * NonexistentItemException
- // The operation failed because the referenced object doesn't exist.
- //
- // * ReferencedItemException
- // The operation failed because you tried to delete an object that is still
- // in use. For example:
- //
- // * You tried to delete a ByteMatchSet that is still referenced by a Rule.
- //
- // * You tried to delete a Rule that is still referenced by a WebACL.
- //
- // * NonEmptyEntityException
- // The operation failed because you tried to delete an object that isn't empty.
- // For example:
- //
- // * You tried to delete a WebACL that still contains one or more Rule objects.
- //
- // * You tried to delete a Rule that still contains one or more ByteMatchSet
- // objects or other predicates.
- //
- // * You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple
- // objects.
- //
- // * You tried to delete an IPSet that references one or more IP addresses.
- //
- func (c *WAF) DeleteWebACL(input *DeleteWebACLInput) (*DeleteWebACLOutput, error) {
- req, out := c.DeleteWebACLRequest(input)
- err := req.Send()
- return out, err
- }
- const opDeleteXssMatchSet = "DeleteXssMatchSet"
- // DeleteXssMatchSetRequest generates a "aws/request.Request" representing the
- // client's request for the DeleteXssMatchSet operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See DeleteXssMatchSet for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the DeleteXssMatchSet method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the DeleteXssMatchSetRequest method.
- // req, resp := client.DeleteXssMatchSetRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *WAF) DeleteXssMatchSetRequest(input *DeleteXssMatchSetInput) (req *request.Request, output *DeleteXssMatchSetOutput) {
- op := &request.Operation{
- Name: opDeleteXssMatchSet,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &DeleteXssMatchSetInput{}
- }
- req = c.newRequest(op, input, output)
- output = &DeleteXssMatchSetOutput{}
- req.Data = output
- return
- }
- // DeleteXssMatchSet API operation for AWS WAF.
- //
- // Permanently deletes an XssMatchSet. You can't delete an XssMatchSet if it's
- // still used in any Rules or if it still contains any XssMatchTuple objects.
- //
- // If you just want to remove an XssMatchSet from a Rule, use UpdateRule.
- //
- // To permanently delete an XssMatchSet from AWS WAF, perform the following
- // steps:
- //
- // Update the XssMatchSet to remove filters, if any. For more information, see
- // UpdateXssMatchSet.
- //
- // Use GetChangeToken to get the change token that you provide in the ChangeToken
- // parameter of a DeleteXssMatchSet request.
- //
- // Submit a DeleteXssMatchSet request.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS WAF's
- // API operation DeleteXssMatchSet for usage and error information.
- //
- // Returned Error Codes:
- // * InternalErrorException
- // The operation failed because of a system problem, even though the request
- // was valid. Retry your request.
- //
- // * InvalidAccountException
- // The operation failed because you tried to create, update, or delete an object
- // by using an invalid account identifier.
- //
- // * NonexistentItemException
- // The operation failed because the referenced object doesn't exist.
- //
- // * ReferencedItemException
- // The operation failed because you tried to delete an object that is still
- // in use. For example:
- //
- // * You tried to delete a ByteMatchSet that is still referenced by a Rule.
- //
- // * You tried to delete a Rule that is still referenced by a WebACL.
- //
- // * StaleDataException
- // The operation failed because you tried to create, update, or delete an object
- // by using a change token that has already been used.
- //
- // * NonEmptyEntityException
- // The operation failed because you tried to delete an object that isn't empty.
- // For example:
- //
- // * You tried to delete a WebACL that still contains one or more Rule objects.
- //
- // * You tried to delete a Rule that still contains one or more ByteMatchSet
- // objects or other predicates.
- //
- // * You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple
- // objects.
- //
- // * You tried to delete an IPSet that references one or more IP addresses.
- //
- func (c *WAF) DeleteXssMatchSet(input *DeleteXssMatchSetInput) (*DeleteXssMatchSetOutput, error) {
- req, out := c.DeleteXssMatchSetRequest(input)
- err := req.Send()
- return out, err
- }
- const opGetByteMatchSet = "GetByteMatchSet"
- // GetByteMatchSetRequest generates a "aws/request.Request" representing the
- // client's request for the GetByteMatchSet operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See GetByteMatchSet for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the GetByteMatchSet method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the GetByteMatchSetRequest method.
- // req, resp := client.GetByteMatchSetRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *WAF) GetByteMatchSetRequest(input *GetByteMatchSetInput) (req *request.Request, output *GetByteMatchSetOutput) {
- op := &request.Operation{
- Name: opGetByteMatchSet,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &GetByteMatchSetInput{}
- }
- req = c.newRequest(op, input, output)
- output = &GetByteMatchSetOutput{}
- req.Data = output
- return
- }
- // GetByteMatchSet API operation for AWS WAF.
- //
- // Returns the ByteMatchSet specified by ByteMatchSetId.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS WAF's
- // API operation GetByteMatchSet for usage and error information.
- //
- // Returned Error Codes:
- // * InternalErrorException
- // The operation failed because of a system problem, even though the request
- // was valid. Retry your request.
- //
- // * InvalidAccountException
- // The operation failed because you tried to create, update, or delete an object
- // by using an invalid account identifier.
- //
- // * NonexistentItemException
- // The operation failed because the referenced object doesn't exist.
- //
- func (c *WAF) GetByteMatchSet(input *GetByteMatchSetInput) (*GetByteMatchSetOutput, error) {
- req, out := c.GetByteMatchSetRequest(input)
- err := req.Send()
- return out, err
- }
- const opGetChangeToken = "GetChangeToken"
- // GetChangeTokenRequest generates a "aws/request.Request" representing the
- // client's request for the GetChangeToken operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See GetChangeToken for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the GetChangeToken method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the GetChangeTokenRequest method.
- // req, resp := client.GetChangeTokenRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *WAF) GetChangeTokenRequest(input *GetChangeTokenInput) (req *request.Request, output *GetChangeTokenOutput) {
- op := &request.Operation{
- Name: opGetChangeToken,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &GetChangeTokenInput{}
- }
- req = c.newRequest(op, input, output)
- output = &GetChangeTokenOutput{}
- req.Data = output
- return
- }
- // GetChangeToken API operation for AWS WAF.
- //
- // When you want to create, update, or delete AWS WAF objects, get a change
- // token and include the change token in the create, update, or delete request.
- // Change tokens ensure that your application doesn't submit conflicting requests
- // to AWS WAF.
- //
- // Each create, update, or delete request must use a unique change token. If
- // your application submits a GetChangeToken request and then submits a second
- // GetChangeToken request before submitting a create, update, or delete request,
- // the second GetChangeToken request returns the same value as the first GetChangeToken
- // request.
- //
- // When you use a change token in a create, update, or delete request, the status
- // of the change token changes to PENDING, which indicates that AWS WAF is propagating
- // the change to all AWS WAF servers. Use GetChangeTokenStatus to determine
- // the status of your change token.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS WAF's
- // API operation GetChangeToken for usage and error information.
- //
- // Returned Error Codes:
- // * InternalErrorException
- // The operation failed because of a system problem, even though the request
- // was valid. Retry your request.
- //
- func (c *WAF) GetChangeToken(input *GetChangeTokenInput) (*GetChangeTokenOutput, error) {
- req, out := c.GetChangeTokenRequest(input)
- err := req.Send()
- return out, err
- }
- const opGetChangeTokenStatus = "GetChangeTokenStatus"
- // GetChangeTokenStatusRequest generates a "aws/request.Request" representing the
- // client's request for the GetChangeTokenStatus operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See GetChangeTokenStatus for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the GetChangeTokenStatus method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the GetChangeTokenStatusRequest method.
- // req, resp := client.GetChangeTokenStatusRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *WAF) GetChangeTokenStatusRequest(input *GetChangeTokenStatusInput) (req *request.Request, output *GetChangeTokenStatusOutput) {
- op := &request.Operation{
- Name: opGetChangeTokenStatus,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &GetChangeTokenStatusInput{}
- }
- req = c.newRequest(op, input, output)
- output = &GetChangeTokenStatusOutput{}
- req.Data = output
- return
- }
- // GetChangeTokenStatus API operation for AWS WAF.
- //
- // Returns the status of a ChangeToken that you got by calling GetChangeToken.
- // ChangeTokenStatus is one of the following values:
- //
- // * PROVISIONED: You requested the change token by calling GetChangeToken,
- // but you haven't used it yet in a call to create, update, or delete an
- // AWS WAF object.
- //
- // * PENDING: AWS WAF is propagating the create, update, or delete request
- // to all AWS WAF servers.
- //
- // * IN_SYNC: Propagation is complete.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS WAF's
- // API operation GetChangeTokenStatus for usage and error information.
- //
- // Returned Error Codes:
- // * NonexistentItemException
- // The operation failed because the referenced object doesn't exist.
- //
- // * InternalErrorException
- // The operation failed because of a system problem, even though the request
- // was valid. Retry your request.
- //
- func (c *WAF) GetChangeTokenStatus(input *GetChangeTokenStatusInput) (*GetChangeTokenStatusOutput, error) {
- req, out := c.GetChangeTokenStatusRequest(input)
- err := req.Send()
- return out, err
- }
- const opGetIPSet = "GetIPSet"
- // GetIPSetRequest generates a "aws/request.Request" representing the
- // client's request for the GetIPSet operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See GetIPSet for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the GetIPSet method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the GetIPSetRequest method.
- // req, resp := client.GetIPSetRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *WAF) GetIPSetRequest(input *GetIPSetInput) (req *request.Request, output *GetIPSetOutput) {
- op := &request.Operation{
- Name: opGetIPSet,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &GetIPSetInput{}
- }
- req = c.newRequest(op, input, output)
- output = &GetIPSetOutput{}
- req.Data = output
- return
- }
- // GetIPSet API operation for AWS WAF.
- //
- // Returns the IPSet that is specified by IPSetId.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS WAF's
- // API operation GetIPSet for usage and error information.
- //
- // Returned Error Codes:
- // * InternalErrorException
- // The operation failed because of a system problem, even though the request
- // was valid. Retry your request.
- //
- // * InvalidAccountException
- // The operation failed because you tried to create, update, or delete an object
- // by using an invalid account identifier.
- //
- // * NonexistentItemException
- // The operation failed because the referenced object doesn't exist.
- //
- func (c *WAF) GetIPSet(input *GetIPSetInput) (*GetIPSetOutput, error) {
- req, out := c.GetIPSetRequest(input)
- err := req.Send()
- return out, err
- }
- const opGetRule = "GetRule"
- // GetRuleRequest generates a "aws/request.Request" representing the
- // client's request for the GetRule operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See GetRule for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the GetRule method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the GetRuleRequest method.
- // req, resp := client.GetRuleRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *WAF) GetRuleRequest(input *GetRuleInput) (req *request.Request, output *GetRuleOutput) {
- op := &request.Operation{
- Name: opGetRule,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &GetRuleInput{}
- }
- req = c.newRequest(op, input, output)
- output = &GetRuleOutput{}
- req.Data = output
- return
- }
- // GetRule API operation for AWS WAF.
- //
- // Returns the Rule that is specified by the RuleId that you included in the
- // GetRule request.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS WAF's
- // API operation GetRule for usage and error information.
- //
- // Returned Error Codes:
- // * InternalErrorException
- // The operation failed because of a system problem, even though the request
- // was valid. Retry your request.
- //
- // * InvalidAccountException
- // The operation failed because you tried to create, update, or delete an object
- // by using an invalid account identifier.
- //
- // * NonexistentItemException
- // The operation failed because the referenced object doesn't exist.
- //
- func (c *WAF) GetRule(input *GetRuleInput) (*GetRuleOutput, error) {
- req, out := c.GetRuleRequest(input)
- err := req.Send()
- return out, err
- }
- const opGetSampledRequests = "GetSampledRequests"
- // GetSampledRequestsRequest generates a "aws/request.Request" representing the
- // client's request for the GetSampledRequests operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See GetSampledRequests for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the GetSampledRequests method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the GetSampledRequestsRequest method.
- // req, resp := client.GetSampledRequestsRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *WAF) GetSampledRequestsRequest(input *GetSampledRequestsInput) (req *request.Request, output *GetSampledRequestsOutput) {
- op := &request.Operation{
- Name: opGetSampledRequests,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &GetSampledRequestsInput{}
- }
- req = c.newRequest(op, input, output)
- output = &GetSampledRequestsOutput{}
- req.Data = output
- return
- }
- // GetSampledRequests API operation for AWS WAF.
- //
- // Gets detailed information about a specified number of requests--a sample--that
- // AWS WAF randomly selects from among the first 5,000 requests that your AWS
- // resource received during a time range that you choose. You can specify a
- // sample size of up to 100 requests, and you can specify any time range in
- // the previous three hours.
- //
- // GetSampledRequests returns a time range, which is usually the time range
- // that you specified. However, if your resource (such as a CloudFront distribution)
- // received 5,000 requests before the specified time range elapsed, GetSampledRequests
- // returns an updated time range. This new time range indicates the actual period
- // during which AWS WAF selected the requests in the sample.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS WAF's
- // API operation GetSampledRequests for usage and error information.
- //
- // Returned Error Codes:
- // * NonexistentItemException
- // The operation failed because the referenced object doesn't exist.
- //
- // * InternalErrorException
- // The operation failed because of a system problem, even though the request
- // was valid. Retry your request.
- //
- func (c *WAF) GetSampledRequests(input *GetSampledRequestsInput) (*GetSampledRequestsOutput, error) {
- req, out := c.GetSampledRequestsRequest(input)
- err := req.Send()
- return out, err
- }
- const opGetSizeConstraintSet = "GetSizeConstraintSet"
- // GetSizeConstraintSetRequest generates a "aws/request.Request" representing the
- // client's request for the GetSizeConstraintSet operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See GetSizeConstraintSet for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the GetSizeConstraintSet method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the GetSizeConstraintSetRequest method.
- // req, resp := client.GetSizeConstraintSetRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *WAF) GetSizeConstraintSetRequest(input *GetSizeConstraintSetInput) (req *request.Request, output *GetSizeConstraintSetOutput) {
- op := &request.Operation{
- Name: opGetSizeConstraintSet,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &GetSizeConstraintSetInput{}
- }
- req = c.newRequest(op, input, output)
- output = &GetSizeConstraintSetOutput{}
- req.Data = output
- return
- }
- // GetSizeConstraintSet API operation for AWS WAF.
- //
- // Returns the SizeConstraintSet specified by SizeConstraintSetId.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS WAF's
- // API operation GetSizeConstraintSet for usage and error information.
- //
- // Returned Error Codes:
- // * InternalErrorException
- // The operation failed because of a system problem, even though the request
- // was valid. Retry your request.
- //
- // * InvalidAccountException
- // The operation failed because you tried to create, update, or delete an object
- // by using an invalid account identifier.
- //
- // * NonexistentItemException
- // The operation failed because the referenced object doesn't exist.
- //
- func (c *WAF) GetSizeConstraintSet(input *GetSizeConstraintSetInput) (*GetSizeConstraintSetOutput, error) {
- req, out := c.GetSizeConstraintSetRequest(input)
- err := req.Send()
- return out, err
- }
- const opGetSqlInjectionMatchSet = "GetSqlInjectionMatchSet"
- // GetSqlInjectionMatchSetRequest generates a "aws/request.Request" representing the
- // client's request for the GetSqlInjectionMatchSet operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See GetSqlInjectionMatchSet for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the GetSqlInjectionMatchSet method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the GetSqlInjectionMatchSetRequest method.
- // req, resp := client.GetSqlInjectionMatchSetRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *WAF) GetSqlInjectionMatchSetRequest(input *GetSqlInjectionMatchSetInput) (req *request.Request, output *GetSqlInjectionMatchSetOutput) {
- op := &request.Operation{
- Name: opGetSqlInjectionMatchSet,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &GetSqlInjectionMatchSetInput{}
- }
- req = c.newRequest(op, input, output)
- output = &GetSqlInjectionMatchSetOutput{}
- req.Data = output
- return
- }
- // GetSqlInjectionMatchSet API operation for AWS WAF.
- //
- // Returns the SqlInjectionMatchSet that is specified by SqlInjectionMatchSetId.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS WAF's
- // API operation GetSqlInjectionMatchSet for usage and error information.
- //
- // Returned Error Codes:
- // * InternalErrorException
- // The operation failed because of a system problem, even though the request
- // was valid. Retry your request.
- //
- // * InvalidAccountException
- // The operation failed because you tried to create, update, or delete an object
- // by using an invalid account identifier.
- //
- // * NonexistentItemException
- // The operation failed because the referenced object doesn't exist.
- //
- func (c *WAF) GetSqlInjectionMatchSet(input *GetSqlInjectionMatchSetInput) (*GetSqlInjectionMatchSetOutput, error) {
- req, out := c.GetSqlInjectionMatchSetRequest(input)
- err := req.Send()
- return out, err
- }
- const opGetWebACL = "GetWebACL"
- // GetWebACLRequest generates a "aws/request.Request" representing the
- // client's request for the GetWebACL operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See GetWebACL for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the GetWebACL method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the GetWebACLRequest method.
- // req, resp := client.GetWebACLRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *WAF) GetWebACLRequest(input *GetWebACLInput) (req *request.Request, output *GetWebACLOutput) {
- op := &request.Operation{
- Name: opGetWebACL,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &GetWebACLInput{}
- }
- req = c.newRequest(op, input, output)
- output = &GetWebACLOutput{}
- req.Data = output
- return
- }
- // GetWebACL API operation for AWS WAF.
- //
- // Returns the WebACL that is specified by WebACLId.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS WAF's
- // API operation GetWebACL for usage and error information.
- //
- // Returned Error Codes:
- // * InternalErrorException
- // The operation failed because of a system problem, even though the request
- // was valid. Retry your request.
- //
- // * InvalidAccountException
- // The operation failed because you tried to create, update, or delete an object
- // by using an invalid account identifier.
- //
- // * NonexistentItemException
- // The operation failed because the referenced object doesn't exist.
- //
- func (c *WAF) GetWebACL(input *GetWebACLInput) (*GetWebACLOutput, error) {
- req, out := c.GetWebACLRequest(input)
- err := req.Send()
- return out, err
- }
- const opGetXssMatchSet = "GetXssMatchSet"
- // GetXssMatchSetRequest generates a "aws/request.Request" representing the
- // client's request for the GetXssMatchSet operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See GetXssMatchSet for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the GetXssMatchSet method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the GetXssMatchSetRequest method.
- // req, resp := client.GetXssMatchSetRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *WAF) GetXssMatchSetRequest(input *GetXssMatchSetInput) (req *request.Request, output *GetXssMatchSetOutput) {
- op := &request.Operation{
- Name: opGetXssMatchSet,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &GetXssMatchSetInput{}
- }
- req = c.newRequest(op, input, output)
- output = &GetXssMatchSetOutput{}
- req.Data = output
- return
- }
- // GetXssMatchSet API operation for AWS WAF.
- //
- // Returns the XssMatchSet that is specified by XssMatchSetId.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS WAF's
- // API operation GetXssMatchSet for usage and error information.
- //
- // Returned Error Codes:
- // * InternalErrorException
- // The operation failed because of a system problem, even though the request
- // was valid. Retry your request.
- //
- // * InvalidAccountException
- // The operation failed because you tried to create, update, or delete an object
- // by using an invalid account identifier.
- //
- // * NonexistentItemException
- // The operation failed because the referenced object doesn't exist.
- //
- func (c *WAF) GetXssMatchSet(input *GetXssMatchSetInput) (*GetXssMatchSetOutput, error) {
- req, out := c.GetXssMatchSetRequest(input)
- err := req.Send()
- return out, err
- }
- const opListByteMatchSets = "ListByteMatchSets"
- // ListByteMatchSetsRequest generates a "aws/request.Request" representing the
- // client's request for the ListByteMatchSets operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See ListByteMatchSets for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the ListByteMatchSets method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the ListByteMatchSetsRequest method.
- // req, resp := client.ListByteMatchSetsRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *WAF) ListByteMatchSetsRequest(input *ListByteMatchSetsInput) (req *request.Request, output *ListByteMatchSetsOutput) {
- op := &request.Operation{
- Name: opListByteMatchSets,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &ListByteMatchSetsInput{}
- }
- req = c.newRequest(op, input, output)
- output = &ListByteMatchSetsOutput{}
- req.Data = output
- return
- }
- // ListByteMatchSets API operation for AWS WAF.
- //
- // Returns an array of ByteMatchSetSummary objects.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS WAF's
- // API operation ListByteMatchSets for usage and error information.
- //
- // Returned Error Codes:
- // * InternalErrorException
- // The operation failed because of a system problem, even though the request
- // was valid. Retry your request.
- //
- // * InvalidAccountException
- // The operation failed because you tried to create, update, or delete an object
- // by using an invalid account identifier.
- //
- func (c *WAF) ListByteMatchSets(input *ListByteMatchSetsInput) (*ListByteMatchSetsOutput, error) {
- req, out := c.ListByteMatchSetsRequest(input)
- err := req.Send()
- return out, err
- }
- const opListIPSets = "ListIPSets"
- // ListIPSetsRequest generates a "aws/request.Request" representing the
- // client's request for the ListIPSets operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See ListIPSets for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the ListIPSets method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the ListIPSetsRequest method.
- // req, resp := client.ListIPSetsRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *WAF) ListIPSetsRequest(input *ListIPSetsInput) (req *request.Request, output *ListIPSetsOutput) {
- op := &request.Operation{
- Name: opListIPSets,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &ListIPSetsInput{}
- }
- req = c.newRequest(op, input, output)
- output = &ListIPSetsOutput{}
- req.Data = output
- return
- }
- // ListIPSets API operation for AWS WAF.
- //
- // Returns an array of IPSetSummary objects in the response.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS WAF's
- // API operation ListIPSets for usage and error information.
- //
- // Returned Error Codes:
- // * InternalErrorException
- // The operation failed because of a system problem, even though the request
- // was valid. Retry your request.
- //
- // * InvalidAccountException
- // The operation failed because you tried to create, update, or delete an object
- // by using an invalid account identifier.
- //
- func (c *WAF) ListIPSets(input *ListIPSetsInput) (*ListIPSetsOutput, error) {
- req, out := c.ListIPSetsRequest(input)
- err := req.Send()
- return out, err
- }
- const opListRules = "ListRules"
- // ListRulesRequest generates a "aws/request.Request" representing the
- // client's request for the ListRules operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See ListRules for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the ListRules method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the ListRulesRequest method.
- // req, resp := client.ListRulesRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *WAF) ListRulesRequest(input *ListRulesInput) (req *request.Request, output *ListRulesOutput) {
- op := &request.Operation{
- Name: opListRules,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &ListRulesInput{}
- }
- req = c.newRequest(op, input, output)
- output = &ListRulesOutput{}
- req.Data = output
- return
- }
- // ListRules API operation for AWS WAF.
- //
- // Returns an array of RuleSummary objects.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS WAF's
- // API operation ListRules for usage and error information.
- //
- // Returned Error Codes:
- // * InternalErrorException
- // The operation failed because of a system problem, even though the request
- // was valid. Retry your request.
- //
- // * InvalidAccountException
- // The operation failed because you tried to create, update, or delete an object
- // by using an invalid account identifier.
- //
- func (c *WAF) ListRules(input *ListRulesInput) (*ListRulesOutput, error) {
- req, out := c.ListRulesRequest(input)
- err := req.Send()
- return out, err
- }
- const opListSizeConstraintSets = "ListSizeConstraintSets"
- // ListSizeConstraintSetsRequest generates a "aws/request.Request" representing the
- // client's request for the ListSizeConstraintSets operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See ListSizeConstraintSets for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the ListSizeConstraintSets method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the ListSizeConstraintSetsRequest method.
- // req, resp := client.ListSizeConstraintSetsRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *WAF) ListSizeConstraintSetsRequest(input *ListSizeConstraintSetsInput) (req *request.Request, output *ListSizeConstraintSetsOutput) {
- op := &request.Operation{
- Name: opListSizeConstraintSets,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &ListSizeConstraintSetsInput{}
- }
- req = c.newRequest(op, input, output)
- output = &ListSizeConstraintSetsOutput{}
- req.Data = output
- return
- }
- // ListSizeConstraintSets API operation for AWS WAF.
- //
- // Returns an array of SizeConstraintSetSummary objects.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS WAF's
- // API operation ListSizeConstraintSets for usage and error information.
- //
- // Returned Error Codes:
- // * InternalErrorException
- // The operation failed because of a system problem, even though the request
- // was valid. Retry your request.
- //
- // * InvalidAccountException
- // The operation failed because you tried to create, update, or delete an object
- // by using an invalid account identifier.
- //
- func (c *WAF) ListSizeConstraintSets(input *ListSizeConstraintSetsInput) (*ListSizeConstraintSetsOutput, error) {
- req, out := c.ListSizeConstraintSetsRequest(input)
- err := req.Send()
- return out, err
- }
- const opListSqlInjectionMatchSets = "ListSqlInjectionMatchSets"
- // ListSqlInjectionMatchSetsRequest generates a "aws/request.Request" representing the
- // client's request for the ListSqlInjectionMatchSets operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See ListSqlInjectionMatchSets for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the ListSqlInjectionMatchSets method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the ListSqlInjectionMatchSetsRequest method.
- // req, resp := client.ListSqlInjectionMatchSetsRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *WAF) ListSqlInjectionMatchSetsRequest(input *ListSqlInjectionMatchSetsInput) (req *request.Request, output *ListSqlInjectionMatchSetsOutput) {
- op := &request.Operation{
- Name: opListSqlInjectionMatchSets,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &ListSqlInjectionMatchSetsInput{}
- }
- req = c.newRequest(op, input, output)
- output = &ListSqlInjectionMatchSetsOutput{}
- req.Data = output
- return
- }
- // ListSqlInjectionMatchSets API operation for AWS WAF.
- //
- // Returns an array of SqlInjectionMatchSet objects.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS WAF's
- // API operation ListSqlInjectionMatchSets for usage and error information.
- //
- // Returned Error Codes:
- // * InternalErrorException
- // The operation failed because of a system problem, even though the request
- // was valid. Retry your request.
- //
- // * InvalidAccountException
- // The operation failed because you tried to create, update, or delete an object
- // by using an invalid account identifier.
- //
- func (c *WAF) ListSqlInjectionMatchSets(input *ListSqlInjectionMatchSetsInput) (*ListSqlInjectionMatchSetsOutput, error) {
- req, out := c.ListSqlInjectionMatchSetsRequest(input)
- err := req.Send()
- return out, err
- }
- const opListWebACLs = "ListWebACLs"
- // ListWebACLsRequest generates a "aws/request.Request" representing the
- // client's request for the ListWebACLs operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See ListWebACLs for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the ListWebACLs method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the ListWebACLsRequest method.
- // req, resp := client.ListWebACLsRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *WAF) ListWebACLsRequest(input *ListWebACLsInput) (req *request.Request, output *ListWebACLsOutput) {
- op := &request.Operation{
- Name: opListWebACLs,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &ListWebACLsInput{}
- }
- req = c.newRequest(op, input, output)
- output = &ListWebACLsOutput{}
- req.Data = output
- return
- }
- // ListWebACLs API operation for AWS WAF.
- //
- // Returns an array of WebACLSummary objects in the response.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS WAF's
- // API operation ListWebACLs for usage and error information.
- //
- // Returned Error Codes:
- // * InternalErrorException
- // The operation failed because of a system problem, even though the request
- // was valid. Retry your request.
- //
- // * InvalidAccountException
- // The operation failed because you tried to create, update, or delete an object
- // by using an invalid account identifier.
- //
- func (c *WAF) ListWebACLs(input *ListWebACLsInput) (*ListWebACLsOutput, error) {
- req, out := c.ListWebACLsRequest(input)
- err := req.Send()
- return out, err
- }
- const opListXssMatchSets = "ListXssMatchSets"
- // ListXssMatchSetsRequest generates a "aws/request.Request" representing the
- // client's request for the ListXssMatchSets operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See ListXssMatchSets for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the ListXssMatchSets method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the ListXssMatchSetsRequest method.
- // req, resp := client.ListXssMatchSetsRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *WAF) ListXssMatchSetsRequest(input *ListXssMatchSetsInput) (req *request.Request, output *ListXssMatchSetsOutput) {
- op := &request.Operation{
- Name: opListXssMatchSets,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &ListXssMatchSetsInput{}
- }
- req = c.newRequest(op, input, output)
- output = &ListXssMatchSetsOutput{}
- req.Data = output
- return
- }
- // ListXssMatchSets API operation for AWS WAF.
- //
- // Returns an array of XssMatchSet objects.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS WAF's
- // API operation ListXssMatchSets for usage and error information.
- //
- // Returned Error Codes:
- // * InternalErrorException
- // The operation failed because of a system problem, even though the request
- // was valid. Retry your request.
- //
- // * InvalidAccountException
- // The operation failed because you tried to create, update, or delete an object
- // by using an invalid account identifier.
- //
- func (c *WAF) ListXssMatchSets(input *ListXssMatchSetsInput) (*ListXssMatchSetsOutput, error) {
- req, out := c.ListXssMatchSetsRequest(input)
- err := req.Send()
- return out, err
- }
- const opUpdateByteMatchSet = "UpdateByteMatchSet"
- // UpdateByteMatchSetRequest generates a "aws/request.Request" representing the
- // client's request for the UpdateByteMatchSet operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See UpdateByteMatchSet for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the UpdateByteMatchSet method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the UpdateByteMatchSetRequest method.
- // req, resp := client.UpdateByteMatchSetRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *WAF) UpdateByteMatchSetRequest(input *UpdateByteMatchSetInput) (req *request.Request, output *UpdateByteMatchSetOutput) {
- op := &request.Operation{
- Name: opUpdateByteMatchSet,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &UpdateByteMatchSetInput{}
- }
- req = c.newRequest(op, input, output)
- output = &UpdateByteMatchSetOutput{}
- req.Data = output
- return
- }
- // UpdateByteMatchSet API operation for AWS WAF.
- //
- // Inserts or deletes ByteMatchTuple objects (filters) in a ByteMatchSet. For
- // each ByteMatchTuple object, you specify the following values:
- //
- // * Whether to insert or delete the object from the array. If you want to
- // change a ByteMatchSetUpdate object, you delete the existing object and
- // add a new one.
- //
- // * The part of a web request that you want AWS WAF to inspect, such as
- // a query string or the value of the User-Agent header.
- //
- // * The bytes (typically a string that corresponds with ASCII characters)
- // that you want AWS WAF to look for. For more information, including how
- // you specify the values for the AWS WAF API and the AWS CLI or SDKs, see
- // TargetString in the ByteMatchTuple data type.
- //
- // * Where to look, such as at the beginning or the end of a query string.
- //
- // * Whether to perform any conversions on the request, such as converting
- // it to lowercase, before inspecting it for the specified string.
- //
- // For example, you can add a ByteMatchSetUpdate object that matches web requests
- // in which User-Agent headers contain the string BadBot. You can then configure
- // AWS WAF to block those requests.
- //
- // To create and configure a ByteMatchSet, perform the following steps:
- //
- // Create a ByteMatchSet. For more information, see CreateByteMatchSet.
- //
- // Use GetChangeToken to get the change token that you provide in the ChangeToken
- // parameter of an UpdateByteMatchSet request.
- //
- // Submit an UpdateByteMatchSet request to specify the part of the request that
- // you want AWS WAF to inspect (for example, the header or the URI) and the
- // value that you want AWS WAF to watch for.
- //
- // For more information about how to use the AWS WAF API to allow or block HTTP
- // requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/).
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS WAF's
- // API operation UpdateByteMatchSet for usage and error information.
- //
- // Returned Error Codes:
- // * InternalErrorException
- // The operation failed because of a system problem, even though the request
- // was valid. Retry your request.
- //
- // * InvalidAccountException
- // The operation failed because you tried to create, update, or delete an object
- // by using an invalid account identifier.
- //
- // * InvalidOperationException
- // The operation failed because there was nothing to do. For example:
- //
- // * You tried to remove a Rule from a WebACL, but the Rule isn't in the
- // specified WebACL.
- //
- // * You tried to remove an IP address from an IPSet, but the IP address
- // isn't in the specified IPSet.
- //
- // * You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple
- // isn't in the specified WebACL.
- //
- // * You tried to add a Rule to a WebACL, but the Rule already exists in
- // the specified WebACL.
- //
- // * You tried to add an IP address to an IPSet, but the IP address already
- // exists in the specified IPSet.
- //
- // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple
- // already exists in the specified WebACL.
- //
- // * InvalidParameterException
- // The operation failed because AWS WAF didn't recognize a parameter in the
- // request. For example:
- //
- // * You specified an invalid parameter name.
- //
- // * You specified an invalid value.
- //
- // * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL)
- // using an action other than INSERT or DELETE.
- //
- // * You tried to create a WebACL with a DefaultActionType other than ALLOW,
- // BLOCK, or COUNT.
- //
- // * You tried to update a WebACL with a WafActionType other than ALLOW,
- // BLOCK, or COUNT.
- //
- // * You tried to update a ByteMatchSet with a FieldToMatchType other than
- // HEADER, QUERY_STRING, or URI.
- //
- // * You tried to update a ByteMatchSet with a Field of HEADER but no value
- // for Data.
- //
- // * NonexistentContainerException
- // The operation failed because you tried to add an object to or delete an object
- // from another object that doesn't exist. For example:
- //
- // * You tried to add a Rule to or delete a Rule from a WebACL that doesn't
- // exist.
- //
- // * You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule
- // that doesn't exist.
- //
- // * You tried to add an IP address to or delete an IP address from an IPSet
- // that doesn't exist.
- //
- // * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from
- // a ByteMatchSet that doesn't exist.
- //
- // * NonexistentItemException
- // The operation failed because the referenced object doesn't exist.
- //
- // * StaleDataException
- // The operation failed because you tried to create, update, or delete an object
- // by using a change token that has already been used.
- //
- // * LimitsExceededException
- // The operation exceeds a resource limit, for example, the maximum number of
- // WebACL objects that you can create for an AWS account. For more information,
- // see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
- // in the AWS WAF Developer Guide.
- //
- func (c *WAF) UpdateByteMatchSet(input *UpdateByteMatchSetInput) (*UpdateByteMatchSetOutput, error) {
- req, out := c.UpdateByteMatchSetRequest(input)
- err := req.Send()
- return out, err
- }
- const opUpdateIPSet = "UpdateIPSet"
- // UpdateIPSetRequest generates a "aws/request.Request" representing the
- // client's request for the UpdateIPSet operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See UpdateIPSet for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the UpdateIPSet method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the UpdateIPSetRequest method.
- // req, resp := client.UpdateIPSetRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *WAF) UpdateIPSetRequest(input *UpdateIPSetInput) (req *request.Request, output *UpdateIPSetOutput) {
- op := &request.Operation{
- Name: opUpdateIPSet,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &UpdateIPSetInput{}
- }
- req = c.newRequest(op, input, output)
- output = &UpdateIPSetOutput{}
- req.Data = output
- return
- }
- // UpdateIPSet API operation for AWS WAF.
- //
- // Inserts or deletes IPSetDescriptor objects in an IPSet. For each IPSetDescriptor
- // object, you specify the following values:
- //
- // * Whether to insert or delete the object from the array. If you want to
- // change an IPSetDescriptor object, you delete the existing object and add
- // a new one.
- //
- // * The IP address version, IPv4.
- //
- // * The IP address in CIDR notation, for example, 192.0.2.0/24 (for the
- // range of IP addresses from 192.0.2.0 to 192.0.2.255) or 192.0.2.44/32
- // (for the individual IP address 192.0.2.44).
- //
- // AWS WAF supports /8, /16, /24, and /32 IP address ranges. For more information
- // about CIDR notation, see the Wikipedia entry Classless Inter-Domain Routing
- // (https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing).
- //
- // You use an IPSet to specify which web requests you want to allow or block
- // based on the IP addresses that the requests originated from. For example,
- // if you're receiving a lot of requests from one or a small number of IP addresses
- // and you want to block the requests, you can create an IPSet that specifies
- // those IP addresses, and then configure AWS WAF to block the requests.
- //
- // To create and configure an IPSet, perform the following steps:
- //
- // Submit a CreateIPSet request.
- //
- // Use GetChangeToken to get the change token that you provide in the ChangeToken
- // parameter of an UpdateIPSet request.
- //
- // Submit an UpdateIPSet request to specify the IP addresses that you want AWS
- // WAF to watch for.
- //
- // When you update an IPSet, you specify the IP addresses that you want to add
- // and/or the IP addresses that you want to delete. If you want to change an
- // IP address, you delete the existing IP address and add the new one.
- //
- // For more information about how to use the AWS WAF API to allow or block HTTP
- // requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/).
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS WAF's
- // API operation UpdateIPSet for usage and error information.
- //
- // Returned Error Codes:
- // * StaleDataException
- // The operation failed because you tried to create, update, or delete an object
- // by using a change token that has already been used.
- //
- // * InternalErrorException
- // The operation failed because of a system problem, even though the request
- // was valid. Retry your request.
- //
- // * InvalidAccountException
- // The operation failed because you tried to create, update, or delete an object
- // by using an invalid account identifier.
- //
- // * InvalidOperationException
- // The operation failed because there was nothing to do. For example:
- //
- // * You tried to remove a Rule from a WebACL, but the Rule isn't in the
- // specified WebACL.
- //
- // * You tried to remove an IP address from an IPSet, but the IP address
- // isn't in the specified IPSet.
- //
- // * You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple
- // isn't in the specified WebACL.
- //
- // * You tried to add a Rule to a WebACL, but the Rule already exists in
- // the specified WebACL.
- //
- // * You tried to add an IP address to an IPSet, but the IP address already
- // exists in the specified IPSet.
- //
- // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple
- // already exists in the specified WebACL.
- //
- // * InvalidParameterException
- // The operation failed because AWS WAF didn't recognize a parameter in the
- // request. For example:
- //
- // * You specified an invalid parameter name.
- //
- // * You specified an invalid value.
- //
- // * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL)
- // using an action other than INSERT or DELETE.
- //
- // * You tried to create a WebACL with a DefaultActionType other than ALLOW,
- // BLOCK, or COUNT.
- //
- // * You tried to update a WebACL with a WafActionType other than ALLOW,
- // BLOCK, or COUNT.
- //
- // * You tried to update a ByteMatchSet with a FieldToMatchType other than
- // HEADER, QUERY_STRING, or URI.
- //
- // * You tried to update a ByteMatchSet with a Field of HEADER but no value
- // for Data.
- //
- // * NonexistentContainerException
- // The operation failed because you tried to add an object to or delete an object
- // from another object that doesn't exist. For example:
- //
- // * You tried to add a Rule to or delete a Rule from a WebACL that doesn't
- // exist.
- //
- // * You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule
- // that doesn't exist.
- //
- // * You tried to add an IP address to or delete an IP address from an IPSet
- // that doesn't exist.
- //
- // * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from
- // a ByteMatchSet that doesn't exist.
- //
- // * NonexistentItemException
- // The operation failed because the referenced object doesn't exist.
- //
- // * ReferencedItemException
- // The operation failed because you tried to delete an object that is still
- // in use. For example:
- //
- // * You tried to delete a ByteMatchSet that is still referenced by a Rule.
- //
- // * You tried to delete a Rule that is still referenced by a WebACL.
- //
- // * LimitsExceededException
- // The operation exceeds a resource limit, for example, the maximum number of
- // WebACL objects that you can create for an AWS account. For more information,
- // see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
- // in the AWS WAF Developer Guide.
- //
- func (c *WAF) UpdateIPSet(input *UpdateIPSetInput) (*UpdateIPSetOutput, error) {
- req, out := c.UpdateIPSetRequest(input)
- err := req.Send()
- return out, err
- }
- const opUpdateRule = "UpdateRule"
- // UpdateRuleRequest generates a "aws/request.Request" representing the
- // client's request for the UpdateRule operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See UpdateRule for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the UpdateRule method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the UpdateRuleRequest method.
- // req, resp := client.UpdateRuleRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *WAF) UpdateRuleRequest(input *UpdateRuleInput) (req *request.Request, output *UpdateRuleOutput) {
- op := &request.Operation{
- Name: opUpdateRule,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &UpdateRuleInput{}
- }
- req = c.newRequest(op, input, output)
- output = &UpdateRuleOutput{}
- req.Data = output
- return
- }
- // UpdateRule API operation for AWS WAF.
- //
- // Inserts or deletes Predicate objects in a Rule. Each Predicate object identifies
- // a predicate, such as a ByteMatchSet or an IPSet, that specifies the web requests
- // that you want to allow, block, or count. If you add more than one predicate
- // to a Rule, a request must match all of the specifications to be allowed,
- // blocked, or counted. For example, suppose you add the following to a Rule:
- //
- // * A ByteMatchSet that matches the value BadBot in the User-Agent header
- //
- // * An IPSet that matches the IP address 192.0.2.44
- //
- // You then add the Rule to a WebACL and specify that you want to block requests
- // that satisfy the Rule. For a request to be blocked, the User-Agent header
- // in the request must contain the value BadBotand the request must originate
- // from the IP address 192.0.2.44.
- //
- // To create and configure a Rule, perform the following steps:
- //
- // Create and update the predicates that you want to include in the Rule.
- //
- // Create the Rule. See CreateRule.
- //
- // Use GetChangeToken to get the change token that you provide in the ChangeToken
- // parameter of an UpdateRule request.
- //
- // Submit an UpdateRule request to add predicates to the Rule.
- //
- // Create and update a WebACL that contains the Rule. See CreateWebACL.
- //
- // If you want to replace one ByteMatchSet or IPSet with another, you delete
- // the existing one and add the new one.
- //
- // For more information about how to use the AWS WAF API to allow or block HTTP
- // requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/).
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS WAF's
- // API operation UpdateRule for usage and error information.
- //
- // Returned Error Codes:
- // * StaleDataException
- // The operation failed because you tried to create, update, or delete an object
- // by using a change token that has already been used.
- //
- // * InternalErrorException
- // The operation failed because of a system problem, even though the request
- // was valid. Retry your request.
- //
- // * InvalidAccountException
- // The operation failed because you tried to create, update, or delete an object
- // by using an invalid account identifier.
- //
- // * InvalidOperationException
- // The operation failed because there was nothing to do. For example:
- //
- // * You tried to remove a Rule from a WebACL, but the Rule isn't in the
- // specified WebACL.
- //
- // * You tried to remove an IP address from an IPSet, but the IP address
- // isn't in the specified IPSet.
- //
- // * You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple
- // isn't in the specified WebACL.
- //
- // * You tried to add a Rule to a WebACL, but the Rule already exists in
- // the specified WebACL.
- //
- // * You tried to add an IP address to an IPSet, but the IP address already
- // exists in the specified IPSet.
- //
- // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple
- // already exists in the specified WebACL.
- //
- // * InvalidParameterException
- // The operation failed because AWS WAF didn't recognize a parameter in the
- // request. For example:
- //
- // * You specified an invalid parameter name.
- //
- // * You specified an invalid value.
- //
- // * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL)
- // using an action other than INSERT or DELETE.
- //
- // * You tried to create a WebACL with a DefaultActionType other than ALLOW,
- // BLOCK, or COUNT.
- //
- // * You tried to update a WebACL with a WafActionType other than ALLOW,
- // BLOCK, or COUNT.
- //
- // * You tried to update a ByteMatchSet with a FieldToMatchType other than
- // HEADER, QUERY_STRING, or URI.
- //
- // * You tried to update a ByteMatchSet with a Field of HEADER but no value
- // for Data.
- //
- // * NonexistentContainerException
- // The operation failed because you tried to add an object to or delete an object
- // from another object that doesn't exist. For example:
- //
- // * You tried to add a Rule to or delete a Rule from a WebACL that doesn't
- // exist.
- //
- // * You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule
- // that doesn't exist.
- //
- // * You tried to add an IP address to or delete an IP address from an IPSet
- // that doesn't exist.
- //
- // * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from
- // a ByteMatchSet that doesn't exist.
- //
- // * NonexistentItemException
- // The operation failed because the referenced object doesn't exist.
- //
- // * ReferencedItemException
- // The operation failed because you tried to delete an object that is still
- // in use. For example:
- //
- // * You tried to delete a ByteMatchSet that is still referenced by a Rule.
- //
- // * You tried to delete a Rule that is still referenced by a WebACL.
- //
- // * LimitsExceededException
- // The operation exceeds a resource limit, for example, the maximum number of
- // WebACL objects that you can create for an AWS account. For more information,
- // see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
- // in the AWS WAF Developer Guide.
- //
- func (c *WAF) UpdateRule(input *UpdateRuleInput) (*UpdateRuleOutput, error) {
- req, out := c.UpdateRuleRequest(input)
- err := req.Send()
- return out, err
- }
- const opUpdateSizeConstraintSet = "UpdateSizeConstraintSet"
- // UpdateSizeConstraintSetRequest generates a "aws/request.Request" representing the
- // client's request for the UpdateSizeConstraintSet operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See UpdateSizeConstraintSet for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the UpdateSizeConstraintSet method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the UpdateSizeConstraintSetRequest method.
- // req, resp := client.UpdateSizeConstraintSetRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *WAF) UpdateSizeConstraintSetRequest(input *UpdateSizeConstraintSetInput) (req *request.Request, output *UpdateSizeConstraintSetOutput) {
- op := &request.Operation{
- Name: opUpdateSizeConstraintSet,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &UpdateSizeConstraintSetInput{}
- }
- req = c.newRequest(op, input, output)
- output = &UpdateSizeConstraintSetOutput{}
- req.Data = output
- return
- }
- // UpdateSizeConstraintSet API operation for AWS WAF.
- //
- // Inserts or deletes SizeConstraint objects (filters) in a SizeConstraintSet.
- // For each SizeConstraint object, you specify the following values:
- //
- // * Whether to insert or delete the object from the array. If you want to
- // change a SizeConstraintSetUpdate object, you delete the existing object
- // and add a new one.
- //
- // * The part of a web request that you want AWS WAF to evaluate, such as
- // the length of a query string or the length of the User-Agent header.
- //
- // * Whether to perform any transformations on the request, such as converting
- // it to lowercase, before checking its length. Note that transformations
- // of the request body are not supported because the AWS resource forwards
- // only the first 8192 bytes of your request to AWS WAF.
- //
- // * A ComparisonOperator used for evaluating the selected part of the request
- // against the specified Size, such as equals, greater than, less than, and
- // so on.
- //
- // * The length, in bytes, that you want AWS WAF to watch for in selected
- // part of the request. The length is computed after applying the transformation.
- //
- // For example, you can add a SizeConstraintSetUpdate object that matches web
- // requests in which the length of the User-Agent header is greater than 100
- // bytes. You can then configure AWS WAF to block those requests.
- //
- // To create and configure a SizeConstraintSet, perform the following steps:
- //
- // Create a SizeConstraintSet. For more information, see CreateSizeConstraintSet.
- //
- // Use GetChangeToken to get the change token that you provide in the ChangeToken
- // parameter of an UpdateSizeConstraintSet request.
- //
- // Submit an UpdateSizeConstraintSet request to specify the part of the request
- // that you want AWS WAF to inspect (for example, the header or the URI) and
- // the value that you want AWS WAF to watch for.
- //
- // For more information about how to use the AWS WAF API to allow or block HTTP
- // requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/).
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS WAF's
- // API operation UpdateSizeConstraintSet for usage and error information.
- //
- // Returned Error Codes:
- // * StaleDataException
- // The operation failed because you tried to create, update, or delete an object
- // by using a change token that has already been used.
- //
- // * InternalErrorException
- // The operation failed because of a system problem, even though the request
- // was valid. Retry your request.
- //
- // * InvalidAccountException
- // The operation failed because you tried to create, update, or delete an object
- // by using an invalid account identifier.
- //
- // * InvalidOperationException
- // The operation failed because there was nothing to do. For example:
- //
- // * You tried to remove a Rule from a WebACL, but the Rule isn't in the
- // specified WebACL.
- //
- // * You tried to remove an IP address from an IPSet, but the IP address
- // isn't in the specified IPSet.
- //
- // * You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple
- // isn't in the specified WebACL.
- //
- // * You tried to add a Rule to a WebACL, but the Rule already exists in
- // the specified WebACL.
- //
- // * You tried to add an IP address to an IPSet, but the IP address already
- // exists in the specified IPSet.
- //
- // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple
- // already exists in the specified WebACL.
- //
- // * InvalidParameterException
- // The operation failed because AWS WAF didn't recognize a parameter in the
- // request. For example:
- //
- // * You specified an invalid parameter name.
- //
- // * You specified an invalid value.
- //
- // * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL)
- // using an action other than INSERT or DELETE.
- //
- // * You tried to create a WebACL with a DefaultActionType other than ALLOW,
- // BLOCK, or COUNT.
- //
- // * You tried to update a WebACL with a WafActionType other than ALLOW,
- // BLOCK, or COUNT.
- //
- // * You tried to update a ByteMatchSet with a FieldToMatchType other than
- // HEADER, QUERY_STRING, or URI.
- //
- // * You tried to update a ByteMatchSet with a Field of HEADER but no value
- // for Data.
- //
- // * NonexistentContainerException
- // The operation failed because you tried to add an object to or delete an object
- // from another object that doesn't exist. For example:
- //
- // * You tried to add a Rule to or delete a Rule from a WebACL that doesn't
- // exist.
- //
- // * You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule
- // that doesn't exist.
- //
- // * You tried to add an IP address to or delete an IP address from an IPSet
- // that doesn't exist.
- //
- // * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from
- // a ByteMatchSet that doesn't exist.
- //
- // * NonexistentItemException
- // The operation failed because the referenced object doesn't exist.
- //
- // * ReferencedItemException
- // The operation failed because you tried to delete an object that is still
- // in use. For example:
- //
- // * You tried to delete a ByteMatchSet that is still referenced by a Rule.
- //
- // * You tried to delete a Rule that is still referenced by a WebACL.
- //
- // * LimitsExceededException
- // The operation exceeds a resource limit, for example, the maximum number of
- // WebACL objects that you can create for an AWS account. For more information,
- // see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
- // in the AWS WAF Developer Guide.
- //
- func (c *WAF) UpdateSizeConstraintSet(input *UpdateSizeConstraintSetInput) (*UpdateSizeConstraintSetOutput, error) {
- req, out := c.UpdateSizeConstraintSetRequest(input)
- err := req.Send()
- return out, err
- }
- const opUpdateSqlInjectionMatchSet = "UpdateSqlInjectionMatchSet"
- // UpdateSqlInjectionMatchSetRequest generates a "aws/request.Request" representing the
- // client's request for the UpdateSqlInjectionMatchSet operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See UpdateSqlInjectionMatchSet for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the UpdateSqlInjectionMatchSet method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the UpdateSqlInjectionMatchSetRequest method.
- // req, resp := client.UpdateSqlInjectionMatchSetRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *WAF) UpdateSqlInjectionMatchSetRequest(input *UpdateSqlInjectionMatchSetInput) (req *request.Request, output *UpdateSqlInjectionMatchSetOutput) {
- op := &request.Operation{
- Name: opUpdateSqlInjectionMatchSet,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &UpdateSqlInjectionMatchSetInput{}
- }
- req = c.newRequest(op, input, output)
- output = &UpdateSqlInjectionMatchSetOutput{}
- req.Data = output
- return
- }
- // UpdateSqlInjectionMatchSet API operation for AWS WAF.
- //
- // Inserts or deletes SqlInjectionMatchTuple objects (filters) in a SqlInjectionMatchSet.
- // For each SqlInjectionMatchTuple object, you specify the following values:
- //
- // * Action: Whether to insert the object into or delete the object from
- // the array. To change a SqlInjectionMatchTuple, you delete the existing
- // object and add a new one.
- //
- // * FieldToMatch: The part of web requests that you want AWS WAF to inspect
- // and, if you want AWS WAF to inspect a header, the name of the header.
- //
- // * TextTransformation: Which text transformation, if any, to perform on
- // the web request before inspecting the request for snippets of malicious
- // SQL code.
- //
- // You use SqlInjectionMatchSet objects to specify which CloudFront requests
- // you want to allow, block, or count. For example, if you're receiving requests
- // that contain snippets of SQL code in the query string and you want to block
- // the requests, you can create a SqlInjectionMatchSet with the applicable settings,
- // and then configure AWS WAF to block the requests.
- //
- // To create and configure a SqlInjectionMatchSet, perform the following steps:
- //
- // Submit a CreateSqlInjectionMatchSet request.
- //
- // Use GetChangeToken to get the change token that you provide in the ChangeToken
- // parameter of an UpdateIPSet request.
- //
- // Submit an UpdateSqlInjectionMatchSet request to specify the parts of web
- // requests that you want AWS WAF to inspect for snippets of SQL code.
- //
- // For more information about how to use the AWS WAF API to allow or block HTTP
- // requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/).
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS WAF's
- // API operation UpdateSqlInjectionMatchSet for usage and error information.
- //
- // Returned Error Codes:
- // * InternalErrorException
- // The operation failed because of a system problem, even though the request
- // was valid. Retry your request.
- //
- // * InvalidAccountException
- // The operation failed because you tried to create, update, or delete an object
- // by using an invalid account identifier.
- //
- // * InvalidOperationException
- // The operation failed because there was nothing to do. For example:
- //
- // * You tried to remove a Rule from a WebACL, but the Rule isn't in the
- // specified WebACL.
- //
- // * You tried to remove an IP address from an IPSet, but the IP address
- // isn't in the specified IPSet.
- //
- // * You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple
- // isn't in the specified WebACL.
- //
- // * You tried to add a Rule to a WebACL, but the Rule already exists in
- // the specified WebACL.
- //
- // * You tried to add an IP address to an IPSet, but the IP address already
- // exists in the specified IPSet.
- //
- // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple
- // already exists in the specified WebACL.
- //
- // * InvalidParameterException
- // The operation failed because AWS WAF didn't recognize a parameter in the
- // request. For example:
- //
- // * You specified an invalid parameter name.
- //
- // * You specified an invalid value.
- //
- // * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL)
- // using an action other than INSERT or DELETE.
- //
- // * You tried to create a WebACL with a DefaultActionType other than ALLOW,
- // BLOCK, or COUNT.
- //
- // * You tried to update a WebACL with a WafActionType other than ALLOW,
- // BLOCK, or COUNT.
- //
- // * You tried to update a ByteMatchSet with a FieldToMatchType other than
- // HEADER, QUERY_STRING, or URI.
- //
- // * You tried to update a ByteMatchSet with a Field of HEADER but no value
- // for Data.
- //
- // * NonexistentContainerException
- // The operation failed because you tried to add an object to or delete an object
- // from another object that doesn't exist. For example:
- //
- // * You tried to add a Rule to or delete a Rule from a WebACL that doesn't
- // exist.
- //
- // * You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule
- // that doesn't exist.
- //
- // * You tried to add an IP address to or delete an IP address from an IPSet
- // that doesn't exist.
- //
- // * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from
- // a ByteMatchSet that doesn't exist.
- //
- // * NonexistentItemException
- // The operation failed because the referenced object doesn't exist.
- //
- // * StaleDataException
- // The operation failed because you tried to create, update, or delete an object
- // by using a change token that has already been used.
- //
- // * LimitsExceededException
- // The operation exceeds a resource limit, for example, the maximum number of
- // WebACL objects that you can create for an AWS account. For more information,
- // see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
- // in the AWS WAF Developer Guide.
- //
- func (c *WAF) UpdateSqlInjectionMatchSet(input *UpdateSqlInjectionMatchSetInput) (*UpdateSqlInjectionMatchSetOutput, error) {
- req, out := c.UpdateSqlInjectionMatchSetRequest(input)
- err := req.Send()
- return out, err
- }
- const opUpdateWebACL = "UpdateWebACL"
- // UpdateWebACLRequest generates a "aws/request.Request" representing the
- // client's request for the UpdateWebACL operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See UpdateWebACL for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the UpdateWebACL method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the UpdateWebACLRequest method.
- // req, resp := client.UpdateWebACLRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *WAF) UpdateWebACLRequest(input *UpdateWebACLInput) (req *request.Request, output *UpdateWebACLOutput) {
- op := &request.Operation{
- Name: opUpdateWebACL,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &UpdateWebACLInput{}
- }
- req = c.newRequest(op, input, output)
- output = &UpdateWebACLOutput{}
- req.Data = output
- return
- }
- // UpdateWebACL API operation for AWS WAF.
- //
- // Inserts or deletes ActivatedRule objects in a WebACL. Each Rule identifies
- // web requests that you want to allow, block, or count. When you update a WebACL,
- // you specify the following values:
- //
- // * A default action for the WebACL, either ALLOW or BLOCK. AWS WAF performs
- // the default action if a request doesn't match the criteria in any of the
- // Rules in a WebACL.
- //
- // * The Rules that you want to add and/or delete. If you want to replace
- // one Rule with another, you delete the existing Rule and add the new one.
- //
- // * For each Rule, whether you want AWS WAF to allow requests, block requests,
- // or count requests that match the conditions in the Rule.
- //
- // * The order in which you want AWS WAF to evaluate the Rules in a WebACL.
- // If you add more than one Rule to a WebACL, AWS WAF evaluates each request
- // against the Rules in order based on the value of Priority. (The Rule that
- // has the lowest value for Priority is evaluated first.) When a web request
- // matches all of the predicates (such as ByteMatchSets and IPSets) in a
- // Rule, AWS WAF immediately takes the corresponding action, allow or block,
- // and doesn't evaluate the request against the remaining Rules in the WebACL,
- // if any.
- //
- // * The CloudFront distribution that you want to associate with the WebACL.
- //
- // To create and configure a WebACL, perform the following steps:
- //
- // Create and update the predicates that you want to include in Rules. For more
- // information, see CreateByteMatchSet, UpdateByteMatchSet, CreateIPSet, UpdateIPSet,
- // CreateSqlInjectionMatchSet, and UpdateSqlInjectionMatchSet.
- //
- // Create and update the Rules that you want to include in the WebACL. For more
- // information, see CreateRule and UpdateRule.
- //
- // Create a WebACL. See CreateWebACL.
- //
- // Use GetChangeToken to get the change token that you provide in the ChangeToken
- // parameter of an UpdateWebACL request.
- //
- // Submit an UpdateWebACL request to specify the Rules that you want to include
- // in the WebACL, to specify the default action, and to associate the WebACL
- // with a CloudFront distribution.
- //
- // For more information about how to use the AWS WAF API to allow or block HTTP
- // requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/).
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS WAF's
- // API operation UpdateWebACL for usage and error information.
- //
- // Returned Error Codes:
- // * StaleDataException
- // The operation failed because you tried to create, update, or delete an object
- // by using a change token that has already been used.
- //
- // * InternalErrorException
- // The operation failed because of a system problem, even though the request
- // was valid. Retry your request.
- //
- // * InvalidAccountException
- // The operation failed because you tried to create, update, or delete an object
- // by using an invalid account identifier.
- //
- // * InvalidOperationException
- // The operation failed because there was nothing to do. For example:
- //
- // * You tried to remove a Rule from a WebACL, but the Rule isn't in the
- // specified WebACL.
- //
- // * You tried to remove an IP address from an IPSet, but the IP address
- // isn't in the specified IPSet.
- //
- // * You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple
- // isn't in the specified WebACL.
- //
- // * You tried to add a Rule to a WebACL, but the Rule already exists in
- // the specified WebACL.
- //
- // * You tried to add an IP address to an IPSet, but the IP address already
- // exists in the specified IPSet.
- //
- // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple
- // already exists in the specified WebACL.
- //
- // * InvalidParameterException
- // The operation failed because AWS WAF didn't recognize a parameter in the
- // request. For example:
- //
- // * You specified an invalid parameter name.
- //
- // * You specified an invalid value.
- //
- // * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL)
- // using an action other than INSERT or DELETE.
- //
- // * You tried to create a WebACL with a DefaultActionType other than ALLOW,
- // BLOCK, or COUNT.
- //
- // * You tried to update a WebACL with a WafActionType other than ALLOW,
- // BLOCK, or COUNT.
- //
- // * You tried to update a ByteMatchSet with a FieldToMatchType other than
- // HEADER, QUERY_STRING, or URI.
- //
- // * You tried to update a ByteMatchSet with a Field of HEADER but no value
- // for Data.
- //
- // * NonexistentContainerException
- // The operation failed because you tried to add an object to or delete an object
- // from another object that doesn't exist. For example:
- //
- // * You tried to add a Rule to or delete a Rule from a WebACL that doesn't
- // exist.
- //
- // * You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule
- // that doesn't exist.
- //
- // * You tried to add an IP address to or delete an IP address from an IPSet
- // that doesn't exist.
- //
- // * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from
- // a ByteMatchSet that doesn't exist.
- //
- // * NonexistentItemException
- // The operation failed because the referenced object doesn't exist.
- //
- // * ReferencedItemException
- // The operation failed because you tried to delete an object that is still
- // in use. For example:
- //
- // * You tried to delete a ByteMatchSet that is still referenced by a Rule.
- //
- // * You tried to delete a Rule that is still referenced by a WebACL.
- //
- // * LimitsExceededException
- // The operation exceeds a resource limit, for example, the maximum number of
- // WebACL objects that you can create for an AWS account. For more information,
- // see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
- // in the AWS WAF Developer Guide.
- //
- func (c *WAF) UpdateWebACL(input *UpdateWebACLInput) (*UpdateWebACLOutput, error) {
- req, out := c.UpdateWebACLRequest(input)
- err := req.Send()
- return out, err
- }
- const opUpdateXssMatchSet = "UpdateXssMatchSet"
- // UpdateXssMatchSetRequest generates a "aws/request.Request" representing the
- // client's request for the UpdateXssMatchSet operation. The "output" return
- // value can be used to capture response data after the request's "Send" method
- // is called.
- //
- // See UpdateXssMatchSet for usage and error information.
- //
- // Creating a request object using this method should be used when you want to inject
- // custom logic into the request's lifecycle using a custom handler, or if you want to
- // access properties on the request object before or after sending the request. If
- // you just want the service response, call the UpdateXssMatchSet method directly
- // instead.
- //
- // Note: You must call the "Send" method on the returned request object in order
- // to execute the request.
- //
- // // Example sending a request using the UpdateXssMatchSetRequest method.
- // req, resp := client.UpdateXssMatchSetRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- func (c *WAF) UpdateXssMatchSetRequest(input *UpdateXssMatchSetInput) (req *request.Request, output *UpdateXssMatchSetOutput) {
- op := &request.Operation{
- Name: opUpdateXssMatchSet,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &UpdateXssMatchSetInput{}
- }
- req = c.newRequest(op, input, output)
- output = &UpdateXssMatchSetOutput{}
- req.Data = output
- return
- }
- // UpdateXssMatchSet API operation for AWS WAF.
- //
- // Inserts or deletes XssMatchTuple objects (filters) in an XssMatchSet. For
- // each XssMatchTuple object, you specify the following values:
- //
- // * Action: Whether to insert the object into or delete the object from
- // the array. To change a XssMatchTuple, you delete the existing object and
- // add a new one.
- //
- // * FieldToMatch: The part of web requests that you want AWS WAF to inspect
- // and, if you want AWS WAF to inspect a header, the name of the header.
- //
- // * TextTransformation: Which text transformation, if any, to perform on
- // the web request before inspecting the request for cross-site scripting
- // attacks.
- //
- // You use XssMatchSet objects to specify which CloudFront requests you want
- // to allow, block, or count. For example, if you're receiving requests that
- // contain cross-site scripting attacks in the request body and you want to
- // block the requests, you can create an XssMatchSet with the applicable settings,
- // and then configure AWS WAF to block the requests.
- //
- // To create and configure an XssMatchSet, perform the following steps:
- //
- // Submit a CreateXssMatchSet request.
- //
- // Use GetChangeToken to get the change token that you provide in the ChangeToken
- // parameter of an UpdateIPSet request.
- //
- // Submit an UpdateXssMatchSet request to specify the parts of web requests
- // that you want AWS WAF to inspect for cross-site scripting attacks.
- //
- // For more information about how to use the AWS WAF API to allow or block HTTP
- // requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/).
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS WAF's
- // API operation UpdateXssMatchSet for usage and error information.
- //
- // Returned Error Codes:
- // * InternalErrorException
- // The operation failed because of a system problem, even though the request
- // was valid. Retry your request.
- //
- // * InvalidAccountException
- // The operation failed because you tried to create, update, or delete an object
- // by using an invalid account identifier.
- //
- // * InvalidOperationException
- // The operation failed because there was nothing to do. For example:
- //
- // * You tried to remove a Rule from a WebACL, but the Rule isn't in the
- // specified WebACL.
- //
- // * You tried to remove an IP address from an IPSet, but the IP address
- // isn't in the specified IPSet.
- //
- // * You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple
- // isn't in the specified WebACL.
- //
- // * You tried to add a Rule to a WebACL, but the Rule already exists in
- // the specified WebACL.
- //
- // * You tried to add an IP address to an IPSet, but the IP address already
- // exists in the specified IPSet.
- //
- // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple
- // already exists in the specified WebACL.
- //
- // * InvalidParameterException
- // The operation failed because AWS WAF didn't recognize a parameter in the
- // request. For example:
- //
- // * You specified an invalid parameter name.
- //
- // * You specified an invalid value.
- //
- // * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL)
- // using an action other than INSERT or DELETE.
- //
- // * You tried to create a WebACL with a DefaultActionType other than ALLOW,
- // BLOCK, or COUNT.
- //
- // * You tried to update a WebACL with a WafActionType other than ALLOW,
- // BLOCK, or COUNT.
- //
- // * You tried to update a ByteMatchSet with a FieldToMatchType other than
- // HEADER, QUERY_STRING, or URI.
- //
- // * You tried to update a ByteMatchSet with a Field of HEADER but no value
- // for Data.
- //
- // * NonexistentContainerException
- // The operation failed because you tried to add an object to or delete an object
- // from another object that doesn't exist. For example:
- //
- // * You tried to add a Rule to or delete a Rule from a WebACL that doesn't
- // exist.
- //
- // * You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule
- // that doesn't exist.
- //
- // * You tried to add an IP address to or delete an IP address from an IPSet
- // that doesn't exist.
- //
- // * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from
- // a ByteMatchSet that doesn't exist.
- //
- // * NonexistentItemException
- // The operation failed because the referenced object doesn't exist.
- //
- // * StaleDataException
- // The operation failed because you tried to create, update, or delete an object
- // by using a change token that has already been used.
- //
- // * LimitsExceededException
- // The operation exceeds a resource limit, for example, the maximum number of
- // WebACL objects that you can create for an AWS account. For more information,
- // see Limits (http://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
- // in the AWS WAF Developer Guide.
- //
- func (c *WAF) UpdateXssMatchSet(input *UpdateXssMatchSetInput) (*UpdateXssMatchSetOutput, error) {
- req, out := c.UpdateXssMatchSetRequest(input)
- err := req.Send()
- return out, err
- }
- // The ActivatedRule object in an UpdateWebACL request specifies a Rule that
- // you want to insert or delete, the priority of the Rule in the WebACL, and
- // the action that you want AWS WAF to take when a web request matches the Rule
- // (ALLOW, BLOCK, or COUNT).
- //
- // To specify whether to insert or delete a Rule, use the Action parameter in
- // the WebACLUpdate data type.
- type ActivatedRule struct {
- _ struct{} `type:"structure"`
- // Specifies the action that CloudFront or AWS WAF takes when a web request
- // matches the conditions in the Rule. Valid values for Action include the following:
- //
- // * ALLOW: CloudFront responds with the requested object.
- //
- // * BLOCK: CloudFront responds with an HTTP 403 (Forbidden) status code.
- //
- // * COUNT: AWS WAF increments a counter of requests that match the conditions
- // in the rule and then continues to inspect the web request based on the
- // remaining rules in the web ACL.
- //
- // Action is a required field
- Action *WafAction `type:"structure" required:"true"`
- // Specifies the order in which the Rules in a WebACL are evaluated. Rules with
- // a lower value for Priority are evaluated before Rules with a higher value.
- // The value must be a unique integer. If you add multiple Rules to a WebACL,
- // the values don't need to be consecutive.
- //
- // Priority is a required field
- Priority *int64 `type:"integer" required:"true"`
- // The RuleId for a Rule. You use RuleId to get more information about a Rule
- // (see GetRule), update a Rule (see UpdateRule), insert a Rule into a WebACL
- // or delete a one from a WebACL (see UpdateWebACL), or delete a Rule from AWS
- // WAF (see DeleteRule).
- //
- // RuleId is returned by CreateRule and by ListRules.
- //
- // RuleId is a required field
- RuleId *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s ActivatedRule) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ActivatedRule) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *ActivatedRule) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ActivatedRule"}
- if s.Action == nil {
- invalidParams.Add(request.NewErrParamRequired("Action"))
- }
- if s.Priority == nil {
- invalidParams.Add(request.NewErrParamRequired("Priority"))
- }
- if s.RuleId == nil {
- invalidParams.Add(request.NewErrParamRequired("RuleId"))
- }
- if s.RuleId != nil && len(*s.RuleId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("RuleId", 1))
- }
- if s.Action != nil {
- if err := s.Action.Validate(); err != nil {
- invalidParams.AddNested("Action", err.(request.ErrInvalidParams))
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // In a GetByteMatchSet request, ByteMatchSet is a complex type that contains
- // the ByteMatchSetId and Name of a ByteMatchSet, and the values that you specified
- // when you updated the ByteMatchSet.
- //
- // A complex type that contains ByteMatchTuple objects, which specify the parts
- // of web requests that you want AWS WAF to inspect and the values that you
- // want AWS WAF to search for. If a ByteMatchSet contains more than one ByteMatchTuple
- // object, a request needs to match the settings in only one ByteMatchTuple
- // to be considered a match.
- type ByteMatchSet struct {
- _ struct{} `type:"structure"`
- // The ByteMatchSetId for a ByteMatchSet. You use ByteMatchSetId to get information
- // about a ByteMatchSet (see GetByteMatchSet), update a ByteMatchSet (see UpdateByteMatchSet),
- // insert a ByteMatchSet into a Rule or delete one from a Rule (see UpdateRule),
- // and delete a ByteMatchSet from AWS WAF (see DeleteByteMatchSet).
- //
- // ByteMatchSetId is returned by CreateByteMatchSet and by ListByteMatchSets.
- //
- // ByteMatchSetId is a required field
- ByteMatchSetId *string `min:"1" type:"string" required:"true"`
- // Specifies the bytes (typically a string that corresponds with ASCII characters)
- // that you want AWS WAF to search for in web requests, the location in requests
- // that you want AWS WAF to search, and other settings.
- //
- // ByteMatchTuples is a required field
- ByteMatchTuples []*ByteMatchTuple `type:"list" required:"true"`
- // A friendly name or description of the ByteMatchSet. You can't change Name
- // after you create a ByteMatchSet.
- Name *string `min:"1" type:"string"`
- }
- // String returns the string representation
- func (s ByteMatchSet) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ByteMatchSet) GoString() string {
- return s.String()
- }
- // Returned by ListByteMatchSets. Each ByteMatchSetSummary object includes the
- // Name and ByteMatchSetId for one ByteMatchSet.
- type ByteMatchSetSummary struct {
- _ struct{} `type:"structure"`
- // The ByteMatchSetId for a ByteMatchSet. You use ByteMatchSetId to get information
- // about a ByteMatchSet, update a ByteMatchSet, remove a ByteMatchSet from a
- // Rule, and delete a ByteMatchSet from AWS WAF.
- //
- // ByteMatchSetId is returned by CreateByteMatchSet and by ListByteMatchSets.
- //
- // ByteMatchSetId is a required field
- ByteMatchSetId *string `min:"1" type:"string" required:"true"`
- // A friendly name or description of the ByteMatchSet. You can't change Name
- // after you create a ByteMatchSet.
- //
- // Name is a required field
- Name *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s ByteMatchSetSummary) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ByteMatchSetSummary) GoString() string {
- return s.String()
- }
- // In an UpdateByteMatchSet request, ByteMatchSetUpdate specifies whether to
- // insert or delete a ByteMatchTuple and includes the settings for the ByteMatchTuple.
- type ByteMatchSetUpdate struct {
- _ struct{} `type:"structure"`
- // Specifies whether to insert or delete a ByteMatchTuple.
- //
- // Action is a required field
- Action *string `type:"string" required:"true" enum:"ChangeAction"`
- // Information about the part of a web request that you want AWS WAF to inspect
- // and the value that you want AWS WAF to search for. If you specify DELETE
- // for the value of Action, the ByteMatchTuple values must exactly match the
- // values in the ByteMatchTuple that you want to delete from the ByteMatchSet.
- //
- // ByteMatchTuple is a required field
- ByteMatchTuple *ByteMatchTuple `type:"structure" required:"true"`
- }
- // String returns the string representation
- func (s ByteMatchSetUpdate) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ByteMatchSetUpdate) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *ByteMatchSetUpdate) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ByteMatchSetUpdate"}
- if s.Action == nil {
- invalidParams.Add(request.NewErrParamRequired("Action"))
- }
- if s.ByteMatchTuple == nil {
- invalidParams.Add(request.NewErrParamRequired("ByteMatchTuple"))
- }
- if s.ByteMatchTuple != nil {
- if err := s.ByteMatchTuple.Validate(); err != nil {
- invalidParams.AddNested("ByteMatchTuple", err.(request.ErrInvalidParams))
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // The bytes (typically a string that corresponds with ASCII characters) that
- // you want AWS WAF to search for in web requests, the location in requests
- // that you want AWS WAF to search, and other settings.
- type ByteMatchTuple struct {
- _ struct{} `type:"structure"`
- // The part of a web request that you want AWS WAF to search, such as a specified
- // header or a query string. For more information, see FieldToMatch.
- //
- // FieldToMatch is a required field
- FieldToMatch *FieldToMatch `type:"structure" required:"true"`
- // Within the portion of a web request that you want to search (for example,
- // in the query string, if any), specify where you want AWS WAF to search. Valid
- // values include the following:
- //
- // CONTAINS
- //
- // The specified part of the web request must include the value of TargetString,
- // but the location doesn't matter.
- //
- // CONTAINS_WORD
- //
- // The specified part of the web request must include the value of TargetString,
- // and TargetString must contain only alphanumeric characters or underscore
- // (A-Z, a-z, 0-9, or _). In addition, TargetString must be a word, which means
- // one of the following:
- //
- // * TargetString exactly matches the value of the specified part of the
- // web request, such as the value of a header.
- //
- // * TargetString is at the beginning of the specified part of the web request
- // and is followed by a character other than an alphanumeric character or
- // underscore (_), for example, BadBot;.
- //
- // * TargetString is at the end of the specified part of the web request
- // and is preceded by a character other than an alphanumeric character or
- // underscore (_), for example, ;BadBot.
- //
- // * TargetString is in the middle of the specified part of the web request
- // and is preceded and followed by characters other than alphanumeric characters
- // or underscore (_), for example, -BadBot;.
- //
- // EXACTLY
- //
- // The value of the specified part of the web request must exactly match the
- // value of TargetString.
- //
- // STARTS_WITH
- //
- // The value of TargetString must appear at the beginning of the specified part
- // of the web request.
- //
- // ENDS_WITH
- //
- // The value of TargetString must appear at the end of the specified part of
- // the web request.
- //
- // PositionalConstraint is a required field
- PositionalConstraint *string `type:"string" required:"true" enum:"PositionalConstraint"`
- // The value that you want AWS WAF to search for. AWS WAF searches for the specified
- // string in the part of web requests that you specified in FieldToMatch. The
- // maximum length of the value is 50 bytes.
- //
- // Valid values depend on the values that you specified for FieldToMatch:
- //
- // * HEADER: The value that you want AWS WAF to search for in the request
- // header that you specified in FieldToMatch, for example, the value of the
- // User-Agent or Referer header.
- //
- // * METHOD: The HTTP method, which indicates the type of operation specified
- // in the request. CloudFront supports the following methods: DELETE, GET,
- // HEAD, OPTIONS, PATCH, POST, and PUT.
- //
- // * QUERY_STRING: The value that you want AWS WAF to search for in the query
- // string, which is the part of a URL that appears after a ? character.
- //
- // * URI: The value that you want AWS WAF to search for in the part of a
- // URL that identifies a resource, for example, /images/daily-ad.jpg.
- //
- // * BODY: The part of a request that contains any additional data that you
- // want to send to your web server as the HTTP request body, such as data
- // from a form. The request body immediately follows the request headers.
- // Note that only the first 8192 bytes of the request body are forwarded
- // to AWS WAF for inspection. To allow or block requests based on the length
- // of the body, you can create a size constraint set. For more information,
- // see CreateSizeConstraintSet.
- //
- // If TargetString includes alphabetic characters A-Z and a-z, note that the
- // value is case sensitive.
- //
- // If you're using the AWS WAF API
- //
- // Specify a base64-encoded version of the value. The maximum length of the
- // value before you base64-encode it is 50 bytes.
- //
- // For example, suppose the value of Type is HEADER and the value of Data is
- // User-Agent. If you want to search the User-Agent header for the value BadBot,
- // you base64-encode BadBot using MIME base64 encoding and include the resulting
- // value, QmFkQm90, in the value of TargetString.
- //
- // If you're using the AWS CLI or one of the AWS SDKs
- //
- // The value that you want AWS WAF to search for. The SDK automatically base64
- // encodes the value.
- //
- // TargetString is automatically base64 encoded/decoded by the SDK.
- //
- // TargetString is a required field
- TargetString []byte `type:"blob" required:"true"`
- // Text transformations eliminate some of the unusual formatting that attackers
- // use in web requests in an effort to bypass AWS WAF. If you specify a transformation,
- // AWS WAF performs the transformation on TargetString before inspecting a request
- // for a match.
- //
- // CMD_LINE
- //
- // When you're concerned that attackers are injecting an operating system commandline
- // command and using unusual formatting to disguise some or all of the command,
- // use this option to perform the following transformations:
- //
- // * Delete the following characters: \ " ' ^
- //
- // * Delete spaces before the following characters: / (
- //
- // * Replace the following characters with a space: , ;
- //
- // * Replace multiple spaces with one space
- //
- // * Convert uppercase letters (A-Z) to lowercase (a-z)
- //
- // COMPRESS_WHITE_SPACE
- //
- // Use this option to replace the following characters with a space character
- // (decimal 32):
- //
- // * \f, formfeed, decimal 12
- //
- // * \t, tab, decimal 9
- //
- // * \n, newline, decimal 10
- //
- // * \r, carriage return, decimal 13
- //
- // * \v, vertical tab, decimal 11
- //
- // * non-breaking space, decimal 160
- //
- // COMPRESS_WHITE_SPACE also replaces multiple spaces with one space.
- //
- // HTML_ENTITY_DECODE
- //
- // Use this option to replace HTML-encoded characters with unencoded characters.
- // HTML_ENTITY_DECODE performs the following operations:
- //
- // * Replaces (ampersand)quot; with "
- //
- // * Replaces (ampersand)nbsp; with a non-breaking space, decimal 160
- //
- // * Replaces (ampersand)lt; with a "less than" symbol
- //
- // * Replaces (ampersand)gt; with >
- //
- // * Replaces characters that are represented in hexadecimal format, (ampersand)#xhhhh;,
- // with the corresponding characters
- //
- // * Replaces characters that are represented in decimal format, (ampersand)#nnnn;,
- // with the corresponding characters
- //
- // LOWERCASE
- //
- // Use this option to convert uppercase letters (A-Z) to lowercase (a-z).
- //
- // URL_DECODE
- //
- // Use this option to decode a URL-encoded value.
- //
- // NONE
- //
- // Specify NONE if you don't want to perform any text transformations.
- //
- // TextTransformation is a required field
- TextTransformation *string `type:"string" required:"true" enum:"TextTransformation"`
- }
- // String returns the string representation
- func (s ByteMatchTuple) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ByteMatchTuple) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *ByteMatchTuple) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ByteMatchTuple"}
- if s.FieldToMatch == nil {
- invalidParams.Add(request.NewErrParamRequired("FieldToMatch"))
- }
- if s.PositionalConstraint == nil {
- invalidParams.Add(request.NewErrParamRequired("PositionalConstraint"))
- }
- if s.TargetString == nil {
- invalidParams.Add(request.NewErrParamRequired("TargetString"))
- }
- if s.TextTransformation == nil {
- invalidParams.Add(request.NewErrParamRequired("TextTransformation"))
- }
- if s.FieldToMatch != nil {
- if err := s.FieldToMatch.Validate(); err != nil {
- invalidParams.AddNested("FieldToMatch", err.(request.ErrInvalidParams))
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- type CreateByteMatchSetInput struct {
- _ struct{} `type:"structure"`
- // The value returned by the most recent call to GetChangeToken.
- //
- // ChangeToken is a required field
- ChangeToken *string `min:"1" type:"string" required:"true"`
- // A friendly name or description of the ByteMatchSet. You can't change Name
- // after you create a ByteMatchSet.
- //
- // Name is a required field
- Name *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s CreateByteMatchSetInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s CreateByteMatchSetInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *CreateByteMatchSetInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CreateByteMatchSetInput"}
- if s.ChangeToken == nil {
- invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
- }
- if s.ChangeToken != nil && len(*s.ChangeToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1))
- }
- if s.Name == nil {
- invalidParams.Add(request.NewErrParamRequired("Name"))
- }
- if s.Name != nil && len(*s.Name) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Name", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- type CreateByteMatchSetOutput struct {
- _ struct{} `type:"structure"`
- // A ByteMatchSet that contains no ByteMatchTuple objects.
- ByteMatchSet *ByteMatchSet `type:"structure"`
- // The ChangeToken that you used to submit the CreateByteMatchSet request. You
- // can also use this value to query the status of the request. For more information,
- // see GetChangeTokenStatus.
- ChangeToken *string `min:"1" type:"string"`
- }
- // String returns the string representation
- func (s CreateByteMatchSetOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s CreateByteMatchSetOutput) GoString() string {
- return s.String()
- }
- type CreateIPSetInput struct {
- _ struct{} `type:"structure"`
- // The value returned by the most recent call to GetChangeToken.
- //
- // ChangeToken is a required field
- ChangeToken *string `min:"1" type:"string" required:"true"`
- // A friendly name or description of the IPSet. You can't change Name after
- // you create the IPSet.
- //
- // Name is a required field
- Name *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s CreateIPSetInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s CreateIPSetInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *CreateIPSetInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CreateIPSetInput"}
- if s.ChangeToken == nil {
- invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
- }
- if s.ChangeToken != nil && len(*s.ChangeToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1))
- }
- if s.Name == nil {
- invalidParams.Add(request.NewErrParamRequired("Name"))
- }
- if s.Name != nil && len(*s.Name) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Name", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- type CreateIPSetOutput struct {
- _ struct{} `type:"structure"`
- // The ChangeToken that you used to submit the CreateIPSet request. You can
- // also use this value to query the status of the request. For more information,
- // see GetChangeTokenStatus.
- ChangeToken *string `min:"1" type:"string"`
- // The IPSet returned in the CreateIPSet response.
- IPSet *IPSet `type:"structure"`
- }
- // String returns the string representation
- func (s CreateIPSetOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s CreateIPSetOutput) GoString() string {
- return s.String()
- }
- type CreateRuleInput struct {
- _ struct{} `type:"structure"`
- // The value returned by the most recent call to GetChangeToken.
- //
- // ChangeToken is a required field
- ChangeToken *string `min:"1" type:"string" required:"true"`
- // A friendly name or description for the metrics for this Rule. The name can
- // contain only alphanumeric characters (A-Z, a-z, 0-9); the name can't contain
- // whitespace. You can't change the name of the metric after you create the
- // Rule.
- //
- // MetricName is a required field
- MetricName *string `type:"string" required:"true"`
- // A friendly name or description of the Rule. You can't change the name of
- // a Rule after you create it.
- //
- // Name is a required field
- Name *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s CreateRuleInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s CreateRuleInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *CreateRuleInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CreateRuleInput"}
- if s.ChangeToken == nil {
- invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
- }
- if s.ChangeToken != nil && len(*s.ChangeToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1))
- }
- if s.MetricName == nil {
- invalidParams.Add(request.NewErrParamRequired("MetricName"))
- }
- if s.Name == nil {
- invalidParams.Add(request.NewErrParamRequired("Name"))
- }
- if s.Name != nil && len(*s.Name) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Name", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- type CreateRuleOutput struct {
- _ struct{} `type:"structure"`
- // The ChangeToken that you used to submit the CreateRule request. You can also
- // use this value to query the status of the request. For more information,
- // see GetChangeTokenStatus.
- ChangeToken *string `min:"1" type:"string"`
- // The Rule returned in the CreateRule response.
- Rule *Rule `type:"structure"`
- }
- // String returns the string representation
- func (s CreateRuleOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s CreateRuleOutput) GoString() string {
- return s.String()
- }
- type CreateSizeConstraintSetInput struct {
- _ struct{} `type:"structure"`
- // The value returned by the most recent call to GetChangeToken.
- //
- // ChangeToken is a required field
- ChangeToken *string `min:"1" type:"string" required:"true"`
- // A friendly name or description of the SizeConstraintSet. You can't change
- // Name after you create a SizeConstraintSet.
- //
- // Name is a required field
- Name *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s CreateSizeConstraintSetInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s CreateSizeConstraintSetInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *CreateSizeConstraintSetInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CreateSizeConstraintSetInput"}
- if s.ChangeToken == nil {
- invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
- }
- if s.ChangeToken != nil && len(*s.ChangeToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1))
- }
- if s.Name == nil {
- invalidParams.Add(request.NewErrParamRequired("Name"))
- }
- if s.Name != nil && len(*s.Name) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Name", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- type CreateSizeConstraintSetOutput struct {
- _ struct{} `type:"structure"`
- // The ChangeToken that you used to submit the CreateSizeConstraintSet request.
- // You can also use this value to query the status of the request. For more
- // information, see GetChangeTokenStatus.
- ChangeToken *string `min:"1" type:"string"`
- // A SizeConstraintSet that contains no SizeConstraint objects.
- SizeConstraintSet *SizeConstraintSet `type:"structure"`
- }
- // String returns the string representation
- func (s CreateSizeConstraintSetOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s CreateSizeConstraintSetOutput) GoString() string {
- return s.String()
- }
- // A request to create a SqlInjectionMatchSet.
- type CreateSqlInjectionMatchSetInput struct {
- _ struct{} `type:"structure"`
- // The value returned by the most recent call to GetChangeToken.
- //
- // ChangeToken is a required field
- ChangeToken *string `min:"1" type:"string" required:"true"`
- // A friendly name or description for the SqlInjectionMatchSet that you're creating.
- // You can't change Name after you create the SqlInjectionMatchSet.
- //
- // Name is a required field
- Name *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s CreateSqlInjectionMatchSetInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s CreateSqlInjectionMatchSetInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *CreateSqlInjectionMatchSetInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CreateSqlInjectionMatchSetInput"}
- if s.ChangeToken == nil {
- invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
- }
- if s.ChangeToken != nil && len(*s.ChangeToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1))
- }
- if s.Name == nil {
- invalidParams.Add(request.NewErrParamRequired("Name"))
- }
- if s.Name != nil && len(*s.Name) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Name", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // The response to a CreateSqlInjectionMatchSet request.
- type CreateSqlInjectionMatchSetOutput struct {
- _ struct{} `type:"structure"`
- // The ChangeToken that you used to submit the CreateSqlInjectionMatchSet request.
- // You can also use this value to query the status of the request. For more
- // information, see GetChangeTokenStatus.
- ChangeToken *string `min:"1" type:"string"`
- // A SqlInjectionMatchSet.
- SqlInjectionMatchSet *SqlInjectionMatchSet `type:"structure"`
- }
- // String returns the string representation
- func (s CreateSqlInjectionMatchSetOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s CreateSqlInjectionMatchSetOutput) GoString() string {
- return s.String()
- }
- type CreateWebACLInput struct {
- _ struct{} `type:"structure"`
- // The value returned by the most recent call to GetChangeToken.
- //
- // ChangeToken is a required field
- ChangeToken *string `min:"1" type:"string" required:"true"`
- // The action that you want AWS WAF to take when a request doesn't match the
- // criteria specified in any of the Rule objects that are associated with the
- // WebACL.
- //
- // DefaultAction is a required field
- DefaultAction *WafAction `type:"structure" required:"true"`
- // A friendly name or description for the metrics for this WebACL. The name
- // can contain only alphanumeric characters (A-Z, a-z, 0-9); the name can't
- // contain whitespace. You can't change MetricName after you create the WebACL.
- //
- // MetricName is a required field
- MetricName *string `type:"string" required:"true"`
- // A friendly name or description of the WebACL. You can't change Name after
- // you create the WebACL.
- //
- // Name is a required field
- Name *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s CreateWebACLInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s CreateWebACLInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *CreateWebACLInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CreateWebACLInput"}
- if s.ChangeToken == nil {
- invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
- }
- if s.ChangeToken != nil && len(*s.ChangeToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1))
- }
- if s.DefaultAction == nil {
- invalidParams.Add(request.NewErrParamRequired("DefaultAction"))
- }
- if s.MetricName == nil {
- invalidParams.Add(request.NewErrParamRequired("MetricName"))
- }
- if s.Name == nil {
- invalidParams.Add(request.NewErrParamRequired("Name"))
- }
- if s.Name != nil && len(*s.Name) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Name", 1))
- }
- if s.DefaultAction != nil {
- if err := s.DefaultAction.Validate(); err != nil {
- invalidParams.AddNested("DefaultAction", err.(request.ErrInvalidParams))
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- type CreateWebACLOutput struct {
- _ struct{} `type:"structure"`
- // The ChangeToken that you used to submit the CreateWebACL request. You can
- // also use this value to query the status of the request. For more information,
- // see GetChangeTokenStatus.
- ChangeToken *string `min:"1" type:"string"`
- // The WebACL returned in the CreateWebACL response.
- WebACL *WebACL `type:"structure"`
- }
- // String returns the string representation
- func (s CreateWebACLOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s CreateWebACLOutput) GoString() string {
- return s.String()
- }
- // A request to create an XssMatchSet.
- type CreateXssMatchSetInput struct {
- _ struct{} `type:"structure"`
- // The value returned by the most recent call to GetChangeToken.
- //
- // ChangeToken is a required field
- ChangeToken *string `min:"1" type:"string" required:"true"`
- // A friendly name or description for the XssMatchSet that you're creating.
- // You can't change Name after you create the XssMatchSet.
- //
- // Name is a required field
- Name *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s CreateXssMatchSetInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s CreateXssMatchSetInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *CreateXssMatchSetInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CreateXssMatchSetInput"}
- if s.ChangeToken == nil {
- invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
- }
- if s.ChangeToken != nil && len(*s.ChangeToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1))
- }
- if s.Name == nil {
- invalidParams.Add(request.NewErrParamRequired("Name"))
- }
- if s.Name != nil && len(*s.Name) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Name", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // The response to a CreateXssMatchSet request.
- type CreateXssMatchSetOutput struct {
- _ struct{} `type:"structure"`
- // The ChangeToken that you used to submit the CreateXssMatchSet request. You
- // can also use this value to query the status of the request. For more information,
- // see GetChangeTokenStatus.
- ChangeToken *string `min:"1" type:"string"`
- // An XssMatchSet.
- XssMatchSet *XssMatchSet `type:"structure"`
- }
- // String returns the string representation
- func (s CreateXssMatchSetOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s CreateXssMatchSetOutput) GoString() string {
- return s.String()
- }
- type DeleteByteMatchSetInput struct {
- _ struct{} `type:"structure"`
- // The ByteMatchSetId of the ByteMatchSet that you want to delete. ByteMatchSetId
- // is returned by CreateByteMatchSet and by ListByteMatchSets.
- //
- // ByteMatchSetId is a required field
- ByteMatchSetId *string `min:"1" type:"string" required:"true"`
- // The value returned by the most recent call to GetChangeToken.
- //
- // ChangeToken is a required field
- ChangeToken *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s DeleteByteMatchSetInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteByteMatchSetInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DeleteByteMatchSetInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteByteMatchSetInput"}
- if s.ByteMatchSetId == nil {
- invalidParams.Add(request.NewErrParamRequired("ByteMatchSetId"))
- }
- if s.ByteMatchSetId != nil && len(*s.ByteMatchSetId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ByteMatchSetId", 1))
- }
- if s.ChangeToken == nil {
- invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
- }
- if s.ChangeToken != nil && len(*s.ChangeToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- type DeleteByteMatchSetOutput struct {
- _ struct{} `type:"structure"`
- // The ChangeToken that you used to submit the DeleteByteMatchSet request. You
- // can also use this value to query the status of the request. For more information,
- // see GetChangeTokenStatus.
- ChangeToken *string `min:"1" type:"string"`
- }
- // String returns the string representation
- func (s DeleteByteMatchSetOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteByteMatchSetOutput) GoString() string {
- return s.String()
- }
- type DeleteIPSetInput struct {
- _ struct{} `type:"structure"`
- // The value returned by the most recent call to GetChangeToken.
- //
- // ChangeToken is a required field
- ChangeToken *string `min:"1" type:"string" required:"true"`
- // The IPSetId of the IPSet that you want to delete. IPSetId is returned by
- // CreateIPSet and by ListIPSets.
- //
- // IPSetId is a required field
- IPSetId *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s DeleteIPSetInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteIPSetInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DeleteIPSetInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteIPSetInput"}
- if s.ChangeToken == nil {
- invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
- }
- if s.ChangeToken != nil && len(*s.ChangeToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1))
- }
- if s.IPSetId == nil {
- invalidParams.Add(request.NewErrParamRequired("IPSetId"))
- }
- if s.IPSetId != nil && len(*s.IPSetId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("IPSetId", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- type DeleteIPSetOutput struct {
- _ struct{} `type:"structure"`
- // The ChangeToken that you used to submit the DeleteIPSet request. You can
- // also use this value to query the status of the request. For more information,
- // see GetChangeTokenStatus.
- ChangeToken *string `min:"1" type:"string"`
- }
- // String returns the string representation
- func (s DeleteIPSetOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteIPSetOutput) GoString() string {
- return s.String()
- }
- type DeleteRuleInput struct {
- _ struct{} `type:"structure"`
- // The value returned by the most recent call to GetChangeToken.
- //
- // ChangeToken is a required field
- ChangeToken *string `min:"1" type:"string" required:"true"`
- // The RuleId of the Rule that you want to delete. RuleId is returned by CreateRule
- // and by ListRules.
- //
- // RuleId is a required field
- RuleId *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s DeleteRuleInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteRuleInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DeleteRuleInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteRuleInput"}
- if s.ChangeToken == nil {
- invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
- }
- if s.ChangeToken != nil && len(*s.ChangeToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1))
- }
- if s.RuleId == nil {
- invalidParams.Add(request.NewErrParamRequired("RuleId"))
- }
- if s.RuleId != nil && len(*s.RuleId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("RuleId", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- type DeleteRuleOutput struct {
- _ struct{} `type:"structure"`
- // The ChangeToken that you used to submit the DeleteRule request. You can also
- // use this value to query the status of the request. For more information,
- // see GetChangeTokenStatus.
- ChangeToken *string `min:"1" type:"string"`
- }
- // String returns the string representation
- func (s DeleteRuleOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteRuleOutput) GoString() string {
- return s.String()
- }
- type DeleteSizeConstraintSetInput struct {
- _ struct{} `type:"structure"`
- // The value returned by the most recent call to GetChangeToken.
- //
- // ChangeToken is a required field
- ChangeToken *string `min:"1" type:"string" required:"true"`
- // The SizeConstraintSetId of the SizeConstraintSet that you want to delete.
- // SizeConstraintSetId is returned by CreateSizeConstraintSet and by ListSizeConstraintSets.
- //
- // SizeConstraintSetId is a required field
- SizeConstraintSetId *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s DeleteSizeConstraintSetInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteSizeConstraintSetInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DeleteSizeConstraintSetInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteSizeConstraintSetInput"}
- if s.ChangeToken == nil {
- invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
- }
- if s.ChangeToken != nil && len(*s.ChangeToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1))
- }
- if s.SizeConstraintSetId == nil {
- invalidParams.Add(request.NewErrParamRequired("SizeConstraintSetId"))
- }
- if s.SizeConstraintSetId != nil && len(*s.SizeConstraintSetId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("SizeConstraintSetId", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- type DeleteSizeConstraintSetOutput struct {
- _ struct{} `type:"structure"`
- // The ChangeToken that you used to submit the DeleteSizeConstraintSet request.
- // You can also use this value to query the status of the request. For more
- // information, see GetChangeTokenStatus.
- ChangeToken *string `min:"1" type:"string"`
- }
- // String returns the string representation
- func (s DeleteSizeConstraintSetOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteSizeConstraintSetOutput) GoString() string {
- return s.String()
- }
- // A request to delete a SqlInjectionMatchSet from AWS WAF.
- type DeleteSqlInjectionMatchSetInput struct {
- _ struct{} `type:"structure"`
- // The value returned by the most recent call to GetChangeToken.
- //
- // ChangeToken is a required field
- ChangeToken *string `min:"1" type:"string" required:"true"`
- // The SqlInjectionMatchSetId of the SqlInjectionMatchSet that you want to delete.
- // SqlInjectionMatchSetId is returned by CreateSqlInjectionMatchSet and by ListSqlInjectionMatchSets.
- //
- // SqlInjectionMatchSetId is a required field
- SqlInjectionMatchSetId *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s DeleteSqlInjectionMatchSetInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteSqlInjectionMatchSetInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DeleteSqlInjectionMatchSetInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteSqlInjectionMatchSetInput"}
- if s.ChangeToken == nil {
- invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
- }
- if s.ChangeToken != nil && len(*s.ChangeToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1))
- }
- if s.SqlInjectionMatchSetId == nil {
- invalidParams.Add(request.NewErrParamRequired("SqlInjectionMatchSetId"))
- }
- if s.SqlInjectionMatchSetId != nil && len(*s.SqlInjectionMatchSetId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("SqlInjectionMatchSetId", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // The response to a request to delete a SqlInjectionMatchSet from AWS WAF.
- type DeleteSqlInjectionMatchSetOutput struct {
- _ struct{} `type:"structure"`
- // The ChangeToken that you used to submit the DeleteSqlInjectionMatchSet request.
- // You can also use this value to query the status of the request. For more
- // information, see GetChangeTokenStatus.
- ChangeToken *string `min:"1" type:"string"`
- }
- // String returns the string representation
- func (s DeleteSqlInjectionMatchSetOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteSqlInjectionMatchSetOutput) GoString() string {
- return s.String()
- }
- type DeleteWebACLInput struct {
- _ struct{} `type:"structure"`
- // The value returned by the most recent call to GetChangeToken.
- //
- // ChangeToken is a required field
- ChangeToken *string `min:"1" type:"string" required:"true"`
- // The WebACLId of the WebACL that you want to delete. WebACLId is returned
- // by CreateWebACL and by ListWebACLs.
- //
- // WebACLId is a required field
- WebACLId *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s DeleteWebACLInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteWebACLInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DeleteWebACLInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteWebACLInput"}
- if s.ChangeToken == nil {
- invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
- }
- if s.ChangeToken != nil && len(*s.ChangeToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1))
- }
- if s.WebACLId == nil {
- invalidParams.Add(request.NewErrParamRequired("WebACLId"))
- }
- if s.WebACLId != nil && len(*s.WebACLId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("WebACLId", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- type DeleteWebACLOutput struct {
- _ struct{} `type:"structure"`
- // The ChangeToken that you used to submit the DeleteWebACL request. You can
- // also use this value to query the status of the request. For more information,
- // see GetChangeTokenStatus.
- ChangeToken *string `min:"1" type:"string"`
- }
- // String returns the string representation
- func (s DeleteWebACLOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteWebACLOutput) GoString() string {
- return s.String()
- }
- // A request to delete an XssMatchSet from AWS WAF.
- type DeleteXssMatchSetInput struct {
- _ struct{} `type:"structure"`
- // The value returned by the most recent call to GetChangeToken.
- //
- // ChangeToken is a required field
- ChangeToken *string `min:"1" type:"string" required:"true"`
- // The XssMatchSetId of the XssMatchSet that you want to delete. XssMatchSetId
- // is returned by CreateXssMatchSet and by ListXssMatchSets.
- //
- // XssMatchSetId is a required field
- XssMatchSetId *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s DeleteXssMatchSetInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteXssMatchSetInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DeleteXssMatchSetInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteXssMatchSetInput"}
- if s.ChangeToken == nil {
- invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
- }
- if s.ChangeToken != nil && len(*s.ChangeToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1))
- }
- if s.XssMatchSetId == nil {
- invalidParams.Add(request.NewErrParamRequired("XssMatchSetId"))
- }
- if s.XssMatchSetId != nil && len(*s.XssMatchSetId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("XssMatchSetId", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // The response to a request to delete an XssMatchSet from AWS WAF.
- type DeleteXssMatchSetOutput struct {
- _ struct{} `type:"structure"`
- // The ChangeToken that you used to submit the DeleteXssMatchSet request. You
- // can also use this value to query the status of the request. For more information,
- // see GetChangeTokenStatus.
- ChangeToken *string `min:"1" type:"string"`
- }
- // String returns the string representation
- func (s DeleteXssMatchSetOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteXssMatchSetOutput) GoString() string {
- return s.String()
- }
- // Specifies where in a web request to look for TargetString.
- type FieldToMatch struct {
- _ struct{} `type:"structure"`
- // When the value of Type is HEADER, enter the name of the header that you want
- // AWS WAF to search, for example, User-Agent or Referer. If the value of Type
- // is any other value, omit Data.
- //
- // The name of the header is not case sensitive.
- Data *string `type:"string"`
- // The part of the web request that you want AWS WAF to search for a specified
- // string. Parts of a request that you can search include the following:
- //
- // * HEADER: A specified request header, for example, the value of the User-Agent
- // or Referer header. If you choose HEADER for the type, specify the name
- // of the header in Data.
- //
- // * METHOD: The HTTP method, which indicated the type of operation that
- // the request is asking the origin to perform. Amazon CloudFront supports
- // the following methods: DELETE, GET, HEAD, OPTIONS, PATCH, POST, and PUT.
- //
- // * QUERY_STRING: A query string, which is the part of a URL that appears
- // after a ? character, if any.
- //
- // * URI: The part of a web request that identifies a resource, for example,
- // /images/daily-ad.jpg.
- //
- // * BODY: The part of a request that contains any additional data that you
- // want to send to your web server as the HTTP request body, such as data
- // from a form. The request body immediately follows the request headers.
- // Note that only the first 8192 bytes of the request body are forwarded
- // to AWS WAF for inspection. To allow or block requests based on the length
- // of the body, you can create a size constraint set. For more information,
- // see CreateSizeConstraintSet.
- //
- // Type is a required field
- Type *string `type:"string" required:"true" enum:"MatchFieldType"`
- }
- // String returns the string representation
- func (s FieldToMatch) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s FieldToMatch) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *FieldToMatch) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "FieldToMatch"}
- if s.Type == nil {
- invalidParams.Add(request.NewErrParamRequired("Type"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- type GetByteMatchSetInput struct {
- _ struct{} `type:"structure"`
- // The ByteMatchSetId of the ByteMatchSet that you want to get. ByteMatchSetId
- // is returned by CreateByteMatchSet and by ListByteMatchSets.
- //
- // ByteMatchSetId is a required field
- ByteMatchSetId *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s GetByteMatchSetInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetByteMatchSetInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *GetByteMatchSetInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetByteMatchSetInput"}
- if s.ByteMatchSetId == nil {
- invalidParams.Add(request.NewErrParamRequired("ByteMatchSetId"))
- }
- if s.ByteMatchSetId != nil && len(*s.ByteMatchSetId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ByteMatchSetId", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- type GetByteMatchSetOutput struct {
- _ struct{} `type:"structure"`
- // Information about the ByteMatchSet that you specified in the GetByteMatchSet
- // request. For more information, see the following topics:
- //
- // * ByteMatchSet: Contains ByteMatchSetId, ByteMatchTuples, and Name
- //
- // * ByteMatchTuples: Contains an array of ByteMatchTuple objects. Each ByteMatchTuple
- // object contains FieldToMatch, PositionalConstraint, TargetString, and
- // TextTransformation
- //
- // * FieldToMatch: Contains Data and Type
- ByteMatchSet *ByteMatchSet `type:"structure"`
- }
- // String returns the string representation
- func (s GetByteMatchSetOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetByteMatchSetOutput) GoString() string {
- return s.String()
- }
- type GetChangeTokenInput struct {
- _ struct{} `type:"structure"`
- }
- // String returns the string representation
- func (s GetChangeTokenInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetChangeTokenInput) GoString() string {
- return s.String()
- }
- type GetChangeTokenOutput struct {
- _ struct{} `type:"structure"`
- // The ChangeToken that you used in the request. Use this value in a GetChangeTokenStatus
- // request to get the current status of the request.
- ChangeToken *string `min:"1" type:"string"`
- }
- // String returns the string representation
- func (s GetChangeTokenOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetChangeTokenOutput) GoString() string {
- return s.String()
- }
- type GetChangeTokenStatusInput struct {
- _ struct{} `type:"structure"`
- // The change token for which you want to get the status. This change token
- // was previously returned in the GetChangeToken response.
- //
- // ChangeToken is a required field
- ChangeToken *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s GetChangeTokenStatusInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetChangeTokenStatusInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *GetChangeTokenStatusInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetChangeTokenStatusInput"}
- if s.ChangeToken == nil {
- invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
- }
- if s.ChangeToken != nil && len(*s.ChangeToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- type GetChangeTokenStatusOutput struct {
- _ struct{} `type:"structure"`
- // The status of the change token.
- ChangeTokenStatus *string `type:"string" enum:"ChangeTokenStatus"`
- }
- // String returns the string representation
- func (s GetChangeTokenStatusOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetChangeTokenStatusOutput) GoString() string {
- return s.String()
- }
- type GetIPSetInput struct {
- _ struct{} `type:"structure"`
- // The IPSetId of the IPSet that you want to get. IPSetId is returned by CreateIPSet
- // and by ListIPSets.
- //
- // IPSetId is a required field
- IPSetId *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s GetIPSetInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetIPSetInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *GetIPSetInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetIPSetInput"}
- if s.IPSetId == nil {
- invalidParams.Add(request.NewErrParamRequired("IPSetId"))
- }
- if s.IPSetId != nil && len(*s.IPSetId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("IPSetId", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- type GetIPSetOutput struct {
- _ struct{} `type:"structure"`
- // Information about the IPSet that you specified in the GetIPSet request. For
- // more information, see the following topics:
- //
- // * IPSet: Contains IPSetDescriptors, IPSetId, and Name
- //
- // * IPSetDescriptors: Contains an array of IPSetDescriptor objects. Each
- // IPSetDescriptor object contains Type and Value
- IPSet *IPSet `type:"structure"`
- }
- // String returns the string representation
- func (s GetIPSetOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetIPSetOutput) GoString() string {
- return s.String()
- }
- type GetRuleInput struct {
- _ struct{} `type:"structure"`
- // The RuleId of the Rule that you want to get. RuleId is returned by CreateRule
- // and by ListRules.
- //
- // RuleId is a required field
- RuleId *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s GetRuleInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetRuleInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *GetRuleInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetRuleInput"}
- if s.RuleId == nil {
- invalidParams.Add(request.NewErrParamRequired("RuleId"))
- }
- if s.RuleId != nil && len(*s.RuleId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("RuleId", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- type GetRuleOutput struct {
- _ struct{} `type:"structure"`
- // Information about the Rule that you specified in the GetRule request. For
- // more information, see the following topics:
- //
- // * Rule: Contains MetricName, Name, an array of Predicate objects, and
- // RuleId
- //
- // * Predicate: Each Predicate object contains DataId, Negated, and Type
- Rule *Rule `type:"structure"`
- }
- // String returns the string representation
- func (s GetRuleOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetRuleOutput) GoString() string {
- return s.String()
- }
- type GetSampledRequestsInput struct {
- _ struct{} `type:"structure"`
- // The number of requests that you want AWS WAF to return from among the first
- // 5,000 requests that your AWS resource received during the time range. If
- // your resource received fewer requests than the value of MaxItems, GetSampledRequests
- // returns information about all of them.
- //
- // MaxItems is a required field
- MaxItems *int64 `min:"1" type:"long" required:"true"`
- // RuleId is one of two values:
- //
- // * The RuleId of the Rule for which you want GetSampledRequests to return
- // a sample of requests.
- //
- // * Default_Action, which causes GetSampledRequests to return a sample of
- // the requests that didn't match any of the rules in the specified WebACL.
- //
- // RuleId is a required field
- RuleId *string `min:"1" type:"string" required:"true"`
- // The start date and time and the end date and time of the range for which
- // you want GetSampledRequests to return a sample of requests. Specify the date
- // and time in Unix time format (in seconds). You can specify any time range
- // in the previous three hours.
- //
- // TimeWindow is a required field
- TimeWindow *TimeWindow `type:"structure" required:"true"`
- // The WebACLId of the WebACL for which you want GetSampledRequests to return
- // a sample of requests.
- //
- // WebAclId is a required field
- WebAclId *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s GetSampledRequestsInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetSampledRequestsInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *GetSampledRequestsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetSampledRequestsInput"}
- if s.MaxItems == nil {
- invalidParams.Add(request.NewErrParamRequired("MaxItems"))
- }
- if s.MaxItems != nil && *s.MaxItems < 1 {
- invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1))
- }
- if s.RuleId == nil {
- invalidParams.Add(request.NewErrParamRequired("RuleId"))
- }
- if s.RuleId != nil && len(*s.RuleId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("RuleId", 1))
- }
- if s.TimeWindow == nil {
- invalidParams.Add(request.NewErrParamRequired("TimeWindow"))
- }
- if s.WebAclId == nil {
- invalidParams.Add(request.NewErrParamRequired("WebAclId"))
- }
- if s.WebAclId != nil && len(*s.WebAclId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("WebAclId", 1))
- }
- if s.TimeWindow != nil {
- if err := s.TimeWindow.Validate(); err != nil {
- invalidParams.AddNested("TimeWindow", err.(request.ErrInvalidParams))
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- type GetSampledRequestsOutput struct {
- _ struct{} `type:"structure"`
- // The total number of requests from which GetSampledRequests got a sample of
- // MaxItems requests. If PopulationSize is less than MaxItems, the sample includes
- // every request that your AWS resource received during the specified time range.
- PopulationSize *int64 `type:"long"`
- // A complex type that contains detailed information about each of the requests
- // in the sample.
- SampledRequests []*SampledHTTPRequest `type:"list"`
- // Usually, TimeWindow is the time range that you specified in the GetSampledRequests
- // request. However, if your AWS resource received more than 5,000 requests
- // during the time range that you specified in the request, GetSampledRequests
- // returns the time range for the first 5,000 requests.
- TimeWindow *TimeWindow `type:"structure"`
- }
- // String returns the string representation
- func (s GetSampledRequestsOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetSampledRequestsOutput) GoString() string {
- return s.String()
- }
- type GetSizeConstraintSetInput struct {
- _ struct{} `type:"structure"`
- // The SizeConstraintSetId of the SizeConstraintSet that you want to get. SizeConstraintSetId
- // is returned by CreateSizeConstraintSet and by ListSizeConstraintSets.
- //
- // SizeConstraintSetId is a required field
- SizeConstraintSetId *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s GetSizeConstraintSetInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetSizeConstraintSetInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *GetSizeConstraintSetInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetSizeConstraintSetInput"}
- if s.SizeConstraintSetId == nil {
- invalidParams.Add(request.NewErrParamRequired("SizeConstraintSetId"))
- }
- if s.SizeConstraintSetId != nil && len(*s.SizeConstraintSetId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("SizeConstraintSetId", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- type GetSizeConstraintSetOutput struct {
- _ struct{} `type:"structure"`
- // Information about the SizeConstraintSet that you specified in the GetSizeConstraintSet
- // request. For more information, see the following topics:
- //
- // * SizeConstraintSet: Contains SizeConstraintSetId, SizeConstraints, and
- // Name
- //
- // * SizeConstraints: Contains an array of SizeConstraint objects. Each SizeConstraint
- // object contains FieldToMatch, TextTransformation, ComparisonOperator,
- // and Size
- //
- // * FieldToMatch: Contains Data and Type
- SizeConstraintSet *SizeConstraintSet `type:"structure"`
- }
- // String returns the string representation
- func (s GetSizeConstraintSetOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetSizeConstraintSetOutput) GoString() string {
- return s.String()
- }
- // A request to get a SqlInjectionMatchSet.
- type GetSqlInjectionMatchSetInput struct {
- _ struct{} `type:"structure"`
- // The SqlInjectionMatchSetId of the SqlInjectionMatchSet that you want to get.
- // SqlInjectionMatchSetId is returned by CreateSqlInjectionMatchSet and by ListSqlInjectionMatchSets.
- //
- // SqlInjectionMatchSetId is a required field
- SqlInjectionMatchSetId *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s GetSqlInjectionMatchSetInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetSqlInjectionMatchSetInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *GetSqlInjectionMatchSetInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetSqlInjectionMatchSetInput"}
- if s.SqlInjectionMatchSetId == nil {
- invalidParams.Add(request.NewErrParamRequired("SqlInjectionMatchSetId"))
- }
- if s.SqlInjectionMatchSetId != nil && len(*s.SqlInjectionMatchSetId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("SqlInjectionMatchSetId", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // The response to a GetSqlInjectionMatchSet request.
- type GetSqlInjectionMatchSetOutput struct {
- _ struct{} `type:"structure"`
- // Information about the SqlInjectionMatchSet that you specified in the GetSqlInjectionMatchSet
- // request. For more information, see the following topics:
- //
- // * SqlInjectionMatchSet: Contains Name, SqlInjectionMatchSetId, and an
- // array of SqlInjectionMatchTuple objects
- //
- // * SqlInjectionMatchTuple: Each SqlInjectionMatchTuple object contains
- // FieldToMatch and TextTransformation
- //
- // * FieldToMatch: Contains Data and Type
- SqlInjectionMatchSet *SqlInjectionMatchSet `type:"structure"`
- }
- // String returns the string representation
- func (s GetSqlInjectionMatchSetOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetSqlInjectionMatchSetOutput) GoString() string {
- return s.String()
- }
- type GetWebACLInput struct {
- _ struct{} `type:"structure"`
- // The WebACLId of the WebACL that you want to get. WebACLId is returned by
- // CreateWebACL and by ListWebACLs.
- //
- // WebACLId is a required field
- WebACLId *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s GetWebACLInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetWebACLInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *GetWebACLInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetWebACLInput"}
- if s.WebACLId == nil {
- invalidParams.Add(request.NewErrParamRequired("WebACLId"))
- }
- if s.WebACLId != nil && len(*s.WebACLId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("WebACLId", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- type GetWebACLOutput struct {
- _ struct{} `type:"structure"`
- // Information about the WebACL that you specified in the GetWebACL request.
- // For more information, see the following topics:
- //
- // * WebACL: Contains DefaultAction, MetricName, Name, an array of Rule objects,
- // and WebACLId
- //
- // * DefaultAction (Data type is WafAction): Contains Type
- //
- // * Rules: Contains an array of ActivatedRule objects, which contain Action,
- // Priority, and RuleId
- //
- // * Action: Contains Type
- WebACL *WebACL `type:"structure"`
- }
- // String returns the string representation
- func (s GetWebACLOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetWebACLOutput) GoString() string {
- return s.String()
- }
- // A request to get an XssMatchSet.
- type GetXssMatchSetInput struct {
- _ struct{} `type:"structure"`
- // The XssMatchSetId of the XssMatchSet that you want to get. XssMatchSetId
- // is returned by CreateXssMatchSet and by ListXssMatchSets.
- //
- // XssMatchSetId is a required field
- XssMatchSetId *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s GetXssMatchSetInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetXssMatchSetInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *GetXssMatchSetInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetXssMatchSetInput"}
- if s.XssMatchSetId == nil {
- invalidParams.Add(request.NewErrParamRequired("XssMatchSetId"))
- }
- if s.XssMatchSetId != nil && len(*s.XssMatchSetId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("XssMatchSetId", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // The response to a GetXssMatchSet request.
- type GetXssMatchSetOutput struct {
- _ struct{} `type:"structure"`
- // Information about the XssMatchSet that you specified in the GetXssMatchSet
- // request. For more information, see the following topics:
- //
- // * XssMatchSet: Contains Name, XssMatchSetId, and an array of XssMatchTuple
- // objects
- //
- // * XssMatchTuple: Each XssMatchTuple object contains FieldToMatch and TextTransformation
- //
- // * FieldToMatch: Contains Data and Type
- XssMatchSet *XssMatchSet `type:"structure"`
- }
- // String returns the string representation
- func (s GetXssMatchSetOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetXssMatchSetOutput) GoString() string {
- return s.String()
- }
- // The response from a GetSampledRequests request includes an HTTPHeader complex
- // type that appears as Headers in the response syntax. HTTPHeader contains
- // the names and values of all of the headers that appear in one of the web
- // requests that were returned by GetSampledRequests.
- type HTTPHeader struct {
- _ struct{} `type:"structure"`
- // The name of one of the headers in the sampled web request.
- Name *string `type:"string"`
- // The value of one of the headers in the sampled web request.
- Value *string `type:"string"`
- }
- // String returns the string representation
- func (s HTTPHeader) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s HTTPHeader) GoString() string {
- return s.String()
- }
- // The response from a GetSampledRequests request includes an HTTPRequest complex
- // type that appears as Request in the response syntax. HTTPRequest contains
- // information about one of the web requests that were returned by GetSampledRequests.
- type HTTPRequest struct {
- _ struct{} `type:"structure"`
- // The IP address that the request originated from. If the WebACL is associated
- // with a CloudFront distribution, this is the value of one of the following
- // fields in CloudFront access logs:
- //
- // * c-ip, if the viewer did not use an HTTP proxy or a load balancer to
- // send the request
- //
- // * x-forwarded-for, if the viewer did use an HTTP proxy or a load balancer
- // to send the request
- ClientIP *string `type:"string"`
- // The two-letter country code for the country that the request originated from.
- // For a current list of country codes, see the Wikipedia entry ISO 3166-1 alpha-2
- // (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
- Country *string `type:"string"`
- // The HTTP version specified in the sampled web request, for example, HTTP/1.1.
- HTTPVersion *string `type:"string"`
- // A complex type that contains two values for each header in the sampled web
- // request: the name of the header and the value of the header.
- Headers []*HTTPHeader `type:"list"`
- // The HTTP method specified in the sampled web request. CloudFront supports
- // the following methods: DELETE, GET, HEAD, OPTIONS, PATCH, POST, and PUT.
- Method *string `type:"string"`
- // The part of a web request that identifies the resource, for example, /images/daily-ad.jpg.
- URI *string `type:"string"`
- }
- // String returns the string representation
- func (s HTTPRequest) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s HTTPRequest) GoString() string {
- return s.String()
- }
- // Contains one or more IP addresses or blocks of IP addresses specified in
- // Classless Inter-Domain Routing (CIDR) notation. To specify an individual
- // IP address, you specify the four-part IP address followed by a /32, for example,
- // 192.0.2.0/31. To block a range of IP addresses, you can specify a /24, a
- // /16, or a /8 CIDR. For more information about CIDR notation, perform an Internet
- // search on cidr notation.
- type IPSet struct {
- _ struct{} `type:"structure"`
- // The IP address type (IPV4) and the IP address range (in CIDR notation) that
- // web requests originate from. If the WebACL is associated with a CloudFront
- // distribution, this is the value of one of the following fields in CloudFront
- // access logs:
- //
- // * c-ip, if the viewer did not use an HTTP proxy or a load balancer to
- // send the request
- //
- // * x-forwarded-for, if the viewer did use an HTTP proxy or a load balancer
- // to send the request
- //
- // IPSetDescriptors is a required field
- IPSetDescriptors []*IPSetDescriptor `type:"list" required:"true"`
- // The IPSetId for an IPSet. You use IPSetId to get information about an IPSet
- // (see GetIPSet), update an IPSet (see UpdateIPSet), insert an IPSet into a
- // Rule or delete one from a Rule (see UpdateRule), and delete an IPSet from
- // AWS WAF (see DeleteIPSet).
- //
- // IPSetId is returned by CreateIPSet and by ListIPSets.
- //
- // IPSetId is a required field
- IPSetId *string `min:"1" type:"string" required:"true"`
- // A friendly name or description of the IPSet. You can't change the name of
- // an IPSet after you create it.
- Name *string `min:"1" type:"string"`
- }
- // String returns the string representation
- func (s IPSet) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s IPSet) GoString() string {
- return s.String()
- }
- // Specifies the IP address type (IPV4) and the IP address range (in CIDR format)
- // that web requests originate from.
- type IPSetDescriptor struct {
- _ struct{} `type:"structure"`
- // Specify IPV4.
- //
- // Type is a required field
- Type *string `type:"string" required:"true" enum:"IPSetDescriptorType"`
- // Specify an IPv4 address by using CIDR notation. For example:
- //
- // * To configure AWS WAF to allow, block, or count requests that originated
- // from the IP address 192.0.2.44, specify 192.0.2.44/32.
- //
- // * To configure AWS WAF to allow, block, or count requests that originated
- // from IP addresses from 192.0.2.0 to 192.0.2.255, specify 192.0.2.0/24.
- //
- // AWS WAF supports only /8, /16, /24, and /32 IP addresses.
- //
- // For more information about CIDR notation, see the Wikipedia entry Classless
- // Inter-Domain Routing (https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing).
- //
- // Value is a required field
- Value *string `type:"string" required:"true"`
- }
- // String returns the string representation
- func (s IPSetDescriptor) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s IPSetDescriptor) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *IPSetDescriptor) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "IPSetDescriptor"}
- if s.Type == nil {
- invalidParams.Add(request.NewErrParamRequired("Type"))
- }
- if s.Value == nil {
- invalidParams.Add(request.NewErrParamRequired("Value"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // Contains the identifier and the name of the IPSet.
- type IPSetSummary struct {
- _ struct{} `type:"structure"`
- // The IPSetId for an IPSet. You can use IPSetId in a GetIPSet request to get
- // detailed information about an IPSet.
- //
- // IPSetId is a required field
- IPSetId *string `min:"1" type:"string" required:"true"`
- // A friendly name or description of the IPSet. You can't change the name of
- // an IPSet after you create it.
- //
- // Name is a required field
- Name *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s IPSetSummary) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s IPSetSummary) GoString() string {
- return s.String()
- }
- // Specifies the type of update to perform to an IPSet with UpdateIPSet.
- type IPSetUpdate struct {
- _ struct{} `type:"structure"`
- // Specifies whether to insert or delete an IP address with UpdateIPSet.
- //
- // Action is a required field
- Action *string `type:"string" required:"true" enum:"ChangeAction"`
- // The IP address type (IPV4) and the IP address range (in CIDR notation) that
- // web requests originate from.
- //
- // IPSetDescriptor is a required field
- IPSetDescriptor *IPSetDescriptor `type:"structure" required:"true"`
- }
- // String returns the string representation
- func (s IPSetUpdate) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s IPSetUpdate) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *IPSetUpdate) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "IPSetUpdate"}
- if s.Action == nil {
- invalidParams.Add(request.NewErrParamRequired("Action"))
- }
- if s.IPSetDescriptor == nil {
- invalidParams.Add(request.NewErrParamRequired("IPSetDescriptor"))
- }
- if s.IPSetDescriptor != nil {
- if err := s.IPSetDescriptor.Validate(); err != nil {
- invalidParams.AddNested("IPSetDescriptor", err.(request.ErrInvalidParams))
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- type ListByteMatchSetsInput struct {
- _ struct{} `type:"structure"`
- // Specifies the number of ByteMatchSet objects that you want AWS WAF to return
- // for this request. If you have more ByteMatchSets objects than the number
- // you specify for Limit, the response includes a NextMarker value that you
- // can use to get another batch of ByteMatchSet objects.
- Limit *int64 `type:"integer"`
- // If you specify a value for Limit and you have more ByteMatchSets than the
- // value of Limit, AWS WAF returns a NextMarker value in the response that allows
- // you to list another group of ByteMatchSets. For the second and subsequent
- // ListByteMatchSets requests, specify the value of NextMarker from the previous
- // response to get information about another batch of ByteMatchSets.
- NextMarker *string `min:"1" type:"string"`
- }
- // String returns the string representation
- func (s ListByteMatchSetsInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListByteMatchSetsInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *ListByteMatchSetsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListByteMatchSetsInput"}
- if s.NextMarker != nil && len(*s.NextMarker) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("NextMarker", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- type ListByteMatchSetsOutput struct {
- _ struct{} `type:"structure"`
- // An array of ByteMatchSetSummary objects.
- ByteMatchSets []*ByteMatchSetSummary `type:"list"`
- // If you have more ByteMatchSet objects than the number that you specified
- // for Limit in the request, the response includes a NextMarker value. To list
- // more ByteMatchSet objects, submit another ListByteMatchSets request, and
- // specify the NextMarker value from the response in the NextMarker value in
- // the next request.
- NextMarker *string `min:"1" type:"string"`
- }
- // String returns the string representation
- func (s ListByteMatchSetsOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListByteMatchSetsOutput) GoString() string {
- return s.String()
- }
- type ListIPSetsInput struct {
- _ struct{} `type:"structure"`
- // Specifies the number of IPSet objects that you want AWS WAF to return for
- // this request. If you have more IPSet objects than the number you specify
- // for Limit, the response includes a NextMarker value that you can use to get
- // another batch of IPSet objects.
- Limit *int64 `type:"integer"`
- // If you specify a value for Limit and you have more IPSets than the value
- // of Limit, AWS WAF returns a NextMarker value in the response that allows
- // you to list another group of IPSets. For the second and subsequent ListIPSets
- // requests, specify the value of NextMarker from the previous response to get
- // information about another batch of ByteMatchSets.
- NextMarker *string `min:"1" type:"string"`
- }
- // String returns the string representation
- func (s ListIPSetsInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListIPSetsInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *ListIPSetsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListIPSetsInput"}
- if s.NextMarker != nil && len(*s.NextMarker) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("NextMarker", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- type ListIPSetsOutput struct {
- _ struct{} `type:"structure"`
- // An array of IPSetSummary objects.
- IPSets []*IPSetSummary `type:"list"`
- // If you have more IPSet objects than the number that you specified for Limit
- // in the request, the response includes a NextMarker value. To list more IPSet
- // objects, submit another ListIPSets request, and specify the NextMarker value
- // from the response in the NextMarker value in the next request.
- NextMarker *string `min:"1" type:"string"`
- }
- // String returns the string representation
- func (s ListIPSetsOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListIPSetsOutput) GoString() string {
- return s.String()
- }
- type ListRulesInput struct {
- _ struct{} `type:"structure"`
- // Specifies the number of Rules that you want AWS WAF to return for this request.
- // If you have more Rules than the number that you specify for Limit, the response
- // includes a NextMarker value that you can use to get another batch of Rules.
- Limit *int64 `type:"integer"`
- // If you specify a value for Limit and you have more Rules than the value of
- // Limit, AWS WAF returns a NextMarker value in the response that allows you
- // to list another group of Rules. For the second and subsequent ListRules requests,
- // specify the value of NextMarker from the previous response to get information
- // about another batch of Rules.
- NextMarker *string `min:"1" type:"string"`
- }
- // String returns the string representation
- func (s ListRulesInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListRulesInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *ListRulesInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListRulesInput"}
- if s.NextMarker != nil && len(*s.NextMarker) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("NextMarker", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- type ListRulesOutput struct {
- _ struct{} `type:"structure"`
- // If you have more Rules than the number that you specified for Limit in the
- // request, the response includes a NextMarker value. To list more Rules, submit
- // another ListRules request, and specify the NextMarker value from the response
- // in the NextMarker value in the next request.
- NextMarker *string `min:"1" type:"string"`
- // An array of RuleSummary objects.
- Rules []*RuleSummary `type:"list"`
- }
- // String returns the string representation
- func (s ListRulesOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListRulesOutput) GoString() string {
- return s.String()
- }
- type ListSizeConstraintSetsInput struct {
- _ struct{} `type:"structure"`
- // Specifies the number of SizeConstraintSet objects that you want AWS WAF to
- // return for this request. If you have more SizeConstraintSets objects than
- // the number you specify for Limit, the response includes a NextMarker value
- // that you can use to get another batch of SizeConstraintSet objects.
- Limit *int64 `type:"integer"`
- // If you specify a value for Limit and you have more SizeConstraintSets than
- // the value of Limit, AWS WAF returns a NextMarker value in the response that
- // allows you to list another group of SizeConstraintSets. For the second and
- // subsequent ListSizeConstraintSets requests, specify the value of NextMarker
- // from the previous response to get information about another batch of SizeConstraintSets.
- NextMarker *string `min:"1" type:"string"`
- }
- // String returns the string representation
- func (s ListSizeConstraintSetsInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListSizeConstraintSetsInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *ListSizeConstraintSetsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListSizeConstraintSetsInput"}
- if s.NextMarker != nil && len(*s.NextMarker) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("NextMarker", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- type ListSizeConstraintSetsOutput struct {
- _ struct{} `type:"structure"`
- // If you have more SizeConstraintSet objects than the number that you specified
- // for Limit in the request, the response includes a NextMarker value. To list
- // more SizeConstraintSet objects, submit another ListSizeConstraintSets request,
- // and specify the NextMarker value from the response in the NextMarker value
- // in the next request.
- NextMarker *string `min:"1" type:"string"`
- // An array of SizeConstraintSetSummary objects.
- SizeConstraintSets []*SizeConstraintSetSummary `type:"list"`
- }
- // String returns the string representation
- func (s ListSizeConstraintSetsOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListSizeConstraintSetsOutput) GoString() string {
- return s.String()
- }
- // A request to list the SqlInjectionMatchSet objects created by the current
- // AWS account.
- type ListSqlInjectionMatchSetsInput struct {
- _ struct{} `type:"structure"`
- // Specifies the number of SqlInjectionMatchSet objects that you want AWS WAF
- // to return for this request. If you have more SqlInjectionMatchSet objects
- // than the number you specify for Limit, the response includes a NextMarker
- // value that you can use to get another batch of Rules.
- Limit *int64 `type:"integer"`
- // If you specify a value for Limit and you have more SqlInjectionMatchSet objects
- // than the value of Limit, AWS WAF returns a NextMarker value in the response
- // that allows you to list another group of SqlInjectionMatchSets. For the second
- // and subsequent ListSqlInjectionMatchSets requests, specify the value of NextMarker
- // from the previous response to get information about another batch of SqlInjectionMatchSets.
- NextMarker *string `min:"1" type:"string"`
- }
- // String returns the string representation
- func (s ListSqlInjectionMatchSetsInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListSqlInjectionMatchSetsInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *ListSqlInjectionMatchSetsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListSqlInjectionMatchSetsInput"}
- if s.NextMarker != nil && len(*s.NextMarker) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("NextMarker", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // The response to a ListSqlInjectionMatchSets request.
- type ListSqlInjectionMatchSetsOutput struct {
- _ struct{} `type:"structure"`
- // If you have more SqlInjectionMatchSet objects than the number that you specified
- // for Limit in the request, the response includes a NextMarker value. To list
- // more SqlInjectionMatchSet objects, submit another ListSqlInjectionMatchSets
- // request, and specify the NextMarker value from the response in the NextMarker
- // value in the next request.
- NextMarker *string `min:"1" type:"string"`
- // An array of SqlInjectionMatchSetSummary objects.
- SqlInjectionMatchSets []*SqlInjectionMatchSetSummary `type:"list"`
- }
- // String returns the string representation
- func (s ListSqlInjectionMatchSetsOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListSqlInjectionMatchSetsOutput) GoString() string {
- return s.String()
- }
- type ListWebACLsInput struct {
- _ struct{} `type:"structure"`
- // Specifies the number of WebACL objects that you want AWS WAF to return for
- // this request. If you have more WebACL objects than the number that you specify
- // for Limit, the response includes a NextMarker value that you can use to get
- // another batch of WebACL objects.
- Limit *int64 `type:"integer"`
- // If you specify a value for Limit and you have more WebACL objects than the
- // number that you specify for Limit, AWS WAF returns a NextMarker value in
- // the response that allows you to list another group of WebACL objects. For
- // the second and subsequent ListWebACLs requests, specify the value of NextMarker
- // from the previous response to get information about another batch of WebACL
- // objects.
- NextMarker *string `min:"1" type:"string"`
- }
- // String returns the string representation
- func (s ListWebACLsInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListWebACLsInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *ListWebACLsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListWebACLsInput"}
- if s.NextMarker != nil && len(*s.NextMarker) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("NextMarker", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- type ListWebACLsOutput struct {
- _ struct{} `type:"structure"`
- // If you have more WebACL objects than the number that you specified for Limit
- // in the request, the response includes a NextMarker value. To list more WebACL
- // objects, submit another ListWebACLs request, and specify the NextMarker value
- // from the response in the NextMarker value in the next request.
- NextMarker *string `min:"1" type:"string"`
- // An array of WebACLSummary objects.
- WebACLs []*WebACLSummary `type:"list"`
- }
- // String returns the string representation
- func (s ListWebACLsOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListWebACLsOutput) GoString() string {
- return s.String()
- }
- // A request to list the XssMatchSet objects created by the current AWS account.
- type ListXssMatchSetsInput struct {
- _ struct{} `type:"structure"`
- // Specifies the number of XssMatchSet objects that you want AWS WAF to return
- // for this request. If you have more XssMatchSet objects than the number you
- // specify for Limit, the response includes a NextMarker value that you can
- // use to get another batch of Rules.
- Limit *int64 `type:"integer"`
- // If you specify a value for Limit and you have more XssMatchSet objects than
- // the value of Limit, AWS WAF returns a NextMarker value in the response that
- // allows you to list another group of XssMatchSets. For the second and subsequent
- // ListXssMatchSets requests, specify the value of NextMarker from the previous
- // response to get information about another batch of XssMatchSets.
- NextMarker *string `min:"1" type:"string"`
- }
- // String returns the string representation
- func (s ListXssMatchSetsInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListXssMatchSetsInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *ListXssMatchSetsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListXssMatchSetsInput"}
- if s.NextMarker != nil && len(*s.NextMarker) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("NextMarker", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // The response to a ListXssMatchSets request.
- type ListXssMatchSetsOutput struct {
- _ struct{} `type:"structure"`
- // If you have more XssMatchSet objects than the number that you specified for
- // Limit in the request, the response includes a NextMarker value. To list more
- // XssMatchSet objects, submit another ListXssMatchSets request, and specify
- // the NextMarker value from the response in the NextMarker value in the next
- // request.
- NextMarker *string `min:"1" type:"string"`
- // An array of XssMatchSetSummary objects.
- XssMatchSets []*XssMatchSetSummary `type:"list"`
- }
- // String returns the string representation
- func (s ListXssMatchSetsOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListXssMatchSetsOutput) GoString() string {
- return s.String()
- }
- // Specifies the ByteMatchSet, IPSet, SqlInjectionMatchSet, XssMatchSet, and
- // SizeConstraintSet objects that you want to add to a Rule and, for each object,
- // indicates whether you want to negate the settings, for example, requests
- // that do NOT originate from the IP address 192.0.2.44.
- type Predicate struct {
- _ struct{} `type:"structure"`
- // A unique identifier for a predicate in a Rule, such as ByteMatchSetId or
- // IPSetId. The ID is returned by the corresponding Create or List command.
- //
- // DataId is a required field
- DataId *string `min:"1" type:"string" required:"true"`
- // Set Negated to False if you want AWS WAF to allow, block, or count requests
- // based on the settings in the specified ByteMatchSet, IPSet, SqlInjectionMatchSet,
- // XssMatchSet, or SizeConstraintSet. For example, if an IPSet includes the
- // IP address 192.0.2.44, AWS WAF will allow or block requests based on that
- // IP address.
- //
- // Set Negated to True if you want AWS WAF to allow or block a request based
- // on the negation of the settings in the ByteMatchSet, IPSet, SqlInjectionMatchSet,
- // XssMatchSet, or SizeConstraintSet. For example, if an IPSet includes the
- // IP address 192.0.2.44, AWS WAF will allow, block, or count requests based
- // on all IP addresses except192.0.2.44.
- //
- // Negated is a required field
- Negated *bool `type:"boolean" required:"true"`
- // The type of predicate in a Rule, such as ByteMatchSet or IPSet.
- //
- // Type is a required field
- Type *string `type:"string" required:"true" enum:"PredicateType"`
- }
- // String returns the string representation
- func (s Predicate) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s Predicate) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *Predicate) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "Predicate"}
- if s.DataId == nil {
- invalidParams.Add(request.NewErrParamRequired("DataId"))
- }
- if s.DataId != nil && len(*s.DataId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("DataId", 1))
- }
- if s.Negated == nil {
- invalidParams.Add(request.NewErrParamRequired("Negated"))
- }
- if s.Type == nil {
- invalidParams.Add(request.NewErrParamRequired("Type"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // A combination of ByteMatchSet, IPSet, and/or SqlInjectionMatchSet objects
- // that identify the web requests that you want to allow, block, or count. For
- // example, you might create a Rule that includes the following predicates:
- //
- // * An IPSet that causes AWS WAF to search for web requests that originate
- // from the IP address 192.0.2.44
- //
- // * A ByteMatchSet that causes AWS WAF to search for web requests for which
- // the value of the User-Agent header is BadBot.
- //
- // To match the settings in this Rule, a request must originate from 192.0.2.44
- // AND include a User-Agent header for which the value is BadBot.
- type Rule struct {
- _ struct{} `type:"structure"`
- MetricName *string `type:"string"`
- // The friendly name or description for the Rule. You can't change the name
- // of a Rule after you create it.
- Name *string `min:"1" type:"string"`
- // The Predicates object contains one Predicate element for each ByteMatchSet,
- // IPSet, or SqlInjectionMatchSet object that you want to include in a Rule.
- //
- // Predicates is a required field
- Predicates []*Predicate `type:"list" required:"true"`
- // A unique identifier for a Rule. You use RuleId to get more information about
- // a Rule (see GetRule), update a Rule (see UpdateRule), insert a Rule into
- // a WebACL or delete a one from a WebACL (see UpdateWebACL), or delete a Rule
- // from AWS WAF (see DeleteRule).
- //
- // RuleId is returned by CreateRule and by ListRules.
- //
- // RuleId is a required field
- RuleId *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s Rule) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s Rule) GoString() string {
- return s.String()
- }
- // Contains the identifier and the friendly name or description of the Rule.
- type RuleSummary struct {
- _ struct{} `type:"structure"`
- // A friendly name or description of the Rule. You can't change the name of
- // a Rule after you create it.
- //
- // Name is a required field
- Name *string `min:"1" type:"string" required:"true"`
- // A unique identifier for a Rule. You use RuleId to get more information about
- // a Rule (see GetRule), update a Rule (see UpdateRule), insert a Rule into
- // a WebACL or delete one from a WebACL (see UpdateWebACL), or delete a Rule
- // from AWS WAF (see DeleteRule).
- //
- // RuleId is returned by CreateRule and by ListRules.
- //
- // RuleId is a required field
- RuleId *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s RuleSummary) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s RuleSummary) GoString() string {
- return s.String()
- }
- // Specifies a Predicate (such as an IPSet) and indicates whether you want to
- // add it to a Rule or delete it from a Rule.
- type RuleUpdate struct {
- _ struct{} `type:"structure"`
- // Specify INSERT to add a Predicate to a Rule. Use DELETE to remove a Predicate
- // from a Rule.
- //
- // Action is a required field
- Action *string `type:"string" required:"true" enum:"ChangeAction"`
- // The ID of the Predicate (such as an IPSet) that you want to add to a Rule.
- //
- // Predicate is a required field
- Predicate *Predicate `type:"structure" required:"true"`
- }
- // String returns the string representation
- func (s RuleUpdate) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s RuleUpdate) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *RuleUpdate) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "RuleUpdate"}
- if s.Action == nil {
- invalidParams.Add(request.NewErrParamRequired("Action"))
- }
- if s.Predicate == nil {
- invalidParams.Add(request.NewErrParamRequired("Predicate"))
- }
- if s.Predicate != nil {
- if err := s.Predicate.Validate(); err != nil {
- invalidParams.AddNested("Predicate", err.(request.ErrInvalidParams))
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // The response from a GetSampledRequests request includes a SampledHTTPRequests
- // complex type that appears as SampledRequests in the response syntax. SampledHTTPRequests
- // contains one SampledHTTPRequest object for each web request that is returned
- // by GetSampledRequests.
- type SampledHTTPRequest struct {
- _ struct{} `type:"structure"`
- // The action for the Rule that the request matched: ALLOW, BLOCK, or COUNT.
- Action *string `type:"string"`
- // A complex type that contains detailed information about the request.
- //
- // Request is a required field
- Request *HTTPRequest `type:"structure" required:"true"`
- // The time at which AWS WAF received the request from your AWS resource, in
- // Unix time format (in seconds).
- Timestamp *time.Time `type:"timestamp" timestampFormat:"unix"`
- // A value that indicates how one result in the response relates proportionally
- // to other results in the response. A result that has a weight of 2 represents
- // roughly twice as many CloudFront web requests as a result that has a weight
- // of 1.
- //
- // Weight is a required field
- Weight *int64 `type:"long" required:"true"`
- }
- // String returns the string representation
- func (s SampledHTTPRequest) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s SampledHTTPRequest) GoString() string {
- return s.String()
- }
- // Specifies a constraint on the size of a part of the web request. AWS WAF
- // uses the Size, ComparisonOperator, and FieldToMatch to build an expression
- // in the form of "SizeComparisonOperator size in bytes of FieldToMatch". If
- // that expression is true, the SizeConstraint is considered to match.
- type SizeConstraint struct {
- _ struct{} `type:"structure"`
- // The type of comparison you want AWS WAF to perform. AWS WAF uses this in
- // combination with the provided Size and FieldToMatch to build an expression
- // in the form of "SizeComparisonOperator size in bytes of FieldToMatch". If
- // that expression is true, the SizeConstraint is considered to match.
- //
- // EQ: Used to test if the Size is equal to the size of the FieldToMatch
- //
- // NE: Used to test if the Size is not equal to the size of the FieldToMatch
- //
- // LE: Used to test if the Size is less than or equal to the size of the FieldToMatch
- //
- // LT: Used to test if the Size is strictly less than the size of the FieldToMatch
- //
- // GE: Used to test if the Size is greater than or equal to the size of the
- // FieldToMatch
- //
- // GT: Used to test if the Size is strictly greater than the size of the FieldToMatch
- //
- // ComparisonOperator is a required field
- ComparisonOperator *string `type:"string" required:"true" enum:"ComparisonOperator"`
- // Specifies where in a web request to look for TargetString.
- //
- // FieldToMatch is a required field
- FieldToMatch *FieldToMatch `type:"structure" required:"true"`
- // The size in bytes that you want AWS WAF to compare against the size of the
- // specified FieldToMatch. AWS WAF uses this in combination with ComparisonOperator
- // and FieldToMatch to build an expression in the form of "SizeComparisonOperator
- // size in bytes of FieldToMatch". If that expression is true, the SizeConstraint
- // is considered to match.
- //
- // Valid values for size are 0 - 21474836480 bytes (0 - 20 GB).
- //
- // If you specify URI for the value of Type, the / in the URI counts as one
- // character. For example, the URI /logo.jpg is nine characters long.
- //
- // Size is a required field
- Size *int64 `type:"long" required:"true"`
- // Text transformations eliminate some of the unusual formatting that attackers
- // use in web requests in an effort to bypass AWS WAF. If you specify a transformation,
- // AWS WAF performs the transformation on FieldToMatch before inspecting a request
- // for a match.
- //
- // Note that if you choose BODY for the value of Type, you must choose NONE
- // for TextTransformation because CloudFront forwards only the first 8192 bytes
- // for inspection.
- //
- // NONE
- //
- // Specify NONE if you don't want to perform any text transformations.
- //
- // CMD_LINE
- //
- // When you're concerned that attackers are injecting an operating system command
- // line command and using unusual formatting to disguise some or all of the
- // command, use this option to perform the following transformations:
- //
- // * Delete the following characters: \ " ' ^
- //
- // * Delete spaces before the following characters: / (
- //
- // * Replace the following characters with a space: , ;
- //
- // * Replace multiple spaces with one space
- //
- // * Convert uppercase letters (A-Z) to lowercase (a-z)
- //
- // COMPRESS_WHITE_SPACE
- //
- // Use this option to replace the following characters with a space character
- // (decimal 32):
- //
- // * \f, formfeed, decimal 12
- //
- // * \t, tab, decimal 9
- //
- // * \n, newline, decimal 10
- //
- // * \r, carriage return, decimal 13
- //
- // * \v, vertical tab, decimal 11
- //
- // * non-breaking space, decimal 160
- //
- // COMPRESS_WHITE_SPACE also replaces multiple spaces with one space.
- //
- // HTML_ENTITY_DECODE
- //
- // Use this option to replace HTML-encoded characters with unencoded characters.
- // HTML_ENTITY_DECODE performs the following operations:
- //
- // * Replaces (ampersand)quot; with "
- //
- // * Replaces (ampersand)nbsp; with a non-breaking space, decimal 160
- //
- // * Replaces (ampersand)lt; with a "less than" symbol
- //
- // * Replaces (ampersand)gt; with >
- //
- // * Replaces characters that are represented in hexadecimal format, (ampersand)#xhhhh;,
- // with the corresponding characters
- //
- // * Replaces characters that are represented in decimal format, (ampersand)#nnnn;,
- // with the corresponding characters
- //
- // LOWERCASE
- //
- // Use this option to convert uppercase letters (A-Z) to lowercase (a-z).
- //
- // URL_DECODE
- //
- // Use this option to decode a URL-encoded value.
- //
- // TextTransformation is a required field
- TextTransformation *string `type:"string" required:"true" enum:"TextTransformation"`
- }
- // String returns the string representation
- func (s SizeConstraint) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s SizeConstraint) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *SizeConstraint) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "SizeConstraint"}
- if s.ComparisonOperator == nil {
- invalidParams.Add(request.NewErrParamRequired("ComparisonOperator"))
- }
- if s.FieldToMatch == nil {
- invalidParams.Add(request.NewErrParamRequired("FieldToMatch"))
- }
- if s.Size == nil {
- invalidParams.Add(request.NewErrParamRequired("Size"))
- }
- if s.TextTransformation == nil {
- invalidParams.Add(request.NewErrParamRequired("TextTransformation"))
- }
- if s.FieldToMatch != nil {
- if err := s.FieldToMatch.Validate(); err != nil {
- invalidParams.AddNested("FieldToMatch", err.(request.ErrInvalidParams))
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // A complex type that contains SizeConstraint objects, which specify the parts
- // of web requests that you want AWS WAF to inspect the size of. If a SizeConstraintSet
- // contains more than one SizeConstraint object, a request only needs to match
- // one constraint to be considered a match.
- type SizeConstraintSet struct {
- _ struct{} `type:"structure"`
- // The name, if any, of the SizeConstraintSet.
- Name *string `min:"1" type:"string"`
- // A unique identifier for a SizeConstraintSet. You use SizeConstraintSetId
- // to get information about a SizeConstraintSet (see GetSizeConstraintSet),
- // update a SizeConstraintSet (see UpdateSizeConstraintSet), insert a SizeConstraintSet
- // into a Rule or delete one from a Rule (see UpdateRule), and delete a SizeConstraintSet
- // from AWS WAF (see DeleteSizeConstraintSet).
- //
- // SizeConstraintSetId is returned by CreateSizeConstraintSet and by ListSizeConstraintSets.
- //
- // SizeConstraintSetId is a required field
- SizeConstraintSetId *string `min:"1" type:"string" required:"true"`
- // Specifies the parts of web requests that you want to inspect the size of.
- //
- // SizeConstraints is a required field
- SizeConstraints []*SizeConstraint `type:"list" required:"true"`
- }
- // String returns the string representation
- func (s SizeConstraintSet) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s SizeConstraintSet) GoString() string {
- return s.String()
- }
- // The Id and Name of a SizeConstraintSet.
- type SizeConstraintSetSummary struct {
- _ struct{} `type:"structure"`
- // The name of the SizeConstraintSet, if any.
- //
- // Name is a required field
- Name *string `min:"1" type:"string" required:"true"`
- // A unique identifier for a SizeConstraintSet. You use SizeConstraintSetId
- // to get information about a SizeConstraintSet (see GetSizeConstraintSet),
- // update a SizeConstraintSet (see UpdateSizeConstraintSet), insert a SizeConstraintSet
- // into a Rule or delete one from a Rule (see UpdateRule), and delete a SizeConstraintSet
- // from AWS WAF (see DeleteSizeConstraintSet).
- //
- // SizeConstraintSetId is returned by CreateSizeConstraintSet and by ListSizeConstraintSets.
- //
- // SizeConstraintSetId is a required field
- SizeConstraintSetId *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s SizeConstraintSetSummary) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s SizeConstraintSetSummary) GoString() string {
- return s.String()
- }
- // Specifies the part of a web request that you want to inspect the size of
- // and indicates whether you want to add the specification to a SizeConstraintSet
- // or delete it from a SizeConstraintSet.
- type SizeConstraintSetUpdate struct {
- _ struct{} `type:"structure"`
- // Specify INSERT to add a SizeConstraintSetUpdate to a SizeConstraintSet. Use
- // DELETE to remove a SizeConstraintSetUpdate from a SizeConstraintSet.
- //
- // Action is a required field
- Action *string `type:"string" required:"true" enum:"ChangeAction"`
- // Specifies a constraint on the size of a part of the web request. AWS WAF
- // uses the Size, ComparisonOperator, and FieldToMatch to build an expression
- // in the form of "SizeComparisonOperator size in bytes of FieldToMatch". If
- // that expression is true, the SizeConstraint is considered to match.
- //
- // SizeConstraint is a required field
- SizeConstraint *SizeConstraint `type:"structure" required:"true"`
- }
- // String returns the string representation
- func (s SizeConstraintSetUpdate) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s SizeConstraintSetUpdate) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *SizeConstraintSetUpdate) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "SizeConstraintSetUpdate"}
- if s.Action == nil {
- invalidParams.Add(request.NewErrParamRequired("Action"))
- }
- if s.SizeConstraint == nil {
- invalidParams.Add(request.NewErrParamRequired("SizeConstraint"))
- }
- if s.SizeConstraint != nil {
- if err := s.SizeConstraint.Validate(); err != nil {
- invalidParams.AddNested("SizeConstraint", err.(request.ErrInvalidParams))
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // A complex type that contains SqlInjectionMatchTuple objects, which specify
- // the parts of web requests that you want AWS WAF to inspect for snippets of
- // malicious SQL code and, if you want AWS WAF to inspect a header, the name
- // of the header. If a SqlInjectionMatchSet contains more than one SqlInjectionMatchTuple
- // object, a request needs to include snippets of SQL code in only one of the
- // specified parts of the request to be considered a match.
- type SqlInjectionMatchSet struct {
- _ struct{} `type:"structure"`
- // The name, if any, of the SqlInjectionMatchSet.
- Name *string `min:"1" type:"string"`
- // A unique identifier for a SqlInjectionMatchSet. You use SqlInjectionMatchSetId
- // to get information about a SqlInjectionMatchSet (see GetSqlInjectionMatchSet),
- // update a SqlInjectionMatchSet (see UpdateSqlInjectionMatchSet), insert a
- // SqlInjectionMatchSet into a Rule or delete one from a Rule (see UpdateRule),
- // and delete a SqlInjectionMatchSet from AWS WAF (see DeleteSqlInjectionMatchSet).
- //
- // SqlInjectionMatchSetId is returned by CreateSqlInjectionMatchSet and by ListSqlInjectionMatchSets.
- //
- // SqlInjectionMatchSetId is a required field
- SqlInjectionMatchSetId *string `min:"1" type:"string" required:"true"`
- // Specifies the parts of web requests that you want to inspect for snippets
- // of malicious SQL code.
- //
- // SqlInjectionMatchTuples is a required field
- SqlInjectionMatchTuples []*SqlInjectionMatchTuple `type:"list" required:"true"`
- }
- // String returns the string representation
- func (s SqlInjectionMatchSet) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s SqlInjectionMatchSet) GoString() string {
- return s.String()
- }
- // The Id and Name of a SqlInjectionMatchSet.
- type SqlInjectionMatchSetSummary struct {
- _ struct{} `type:"structure"`
- // The name of the SqlInjectionMatchSet, if any, specified by Id.
- //
- // Name is a required field
- Name *string `min:"1" type:"string" required:"true"`
- // A unique identifier for a SqlInjectionMatchSet. You use SqlInjectionMatchSetId
- // to get information about a SqlInjectionMatchSet (see GetSqlInjectionMatchSet),
- // update a SqlInjectionMatchSet (see UpdateSqlInjectionMatchSet), insert a
- // SqlInjectionMatchSet into a Rule or delete one from a Rule (see UpdateRule),
- // and delete a SqlInjectionMatchSet from AWS WAF (see DeleteSqlInjectionMatchSet).
- //
- // SqlInjectionMatchSetId is returned by CreateSqlInjectionMatchSet and by ListSqlInjectionMatchSets.
- //
- // SqlInjectionMatchSetId is a required field
- SqlInjectionMatchSetId *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s SqlInjectionMatchSetSummary) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s SqlInjectionMatchSetSummary) GoString() string {
- return s.String()
- }
- // Specifies the part of a web request that you want to inspect for snippets
- // of malicious SQL code and indicates whether you want to add the specification
- // to a SqlInjectionMatchSet or delete it from a SqlInjectionMatchSet.
- type SqlInjectionMatchSetUpdate struct {
- _ struct{} `type:"structure"`
- // Specify INSERT to add a SqlInjectionMatchSetUpdate to a SqlInjectionMatchSet.
- // Use DELETE to remove a SqlInjectionMatchSetUpdate from a SqlInjectionMatchSet.
- //
- // Action is a required field
- Action *string `type:"string" required:"true" enum:"ChangeAction"`
- // Specifies the part of a web request that you want AWS WAF to inspect for
- // snippets of malicious SQL code and, if you want AWS WAF to inspect a header,
- // the name of the header.
- //
- // SqlInjectionMatchTuple is a required field
- SqlInjectionMatchTuple *SqlInjectionMatchTuple `type:"structure" required:"true"`
- }
- // String returns the string representation
- func (s SqlInjectionMatchSetUpdate) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s SqlInjectionMatchSetUpdate) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *SqlInjectionMatchSetUpdate) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "SqlInjectionMatchSetUpdate"}
- if s.Action == nil {
- invalidParams.Add(request.NewErrParamRequired("Action"))
- }
- if s.SqlInjectionMatchTuple == nil {
- invalidParams.Add(request.NewErrParamRequired("SqlInjectionMatchTuple"))
- }
- if s.SqlInjectionMatchTuple != nil {
- if err := s.SqlInjectionMatchTuple.Validate(); err != nil {
- invalidParams.AddNested("SqlInjectionMatchTuple", err.(request.ErrInvalidParams))
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // Specifies the part of a web request that you want AWS WAF to inspect for
- // snippets of malicious SQL code and, if you want AWS WAF to inspect a header,
- // the name of the header.
- type SqlInjectionMatchTuple struct {
- _ struct{} `type:"structure"`
- // Specifies where in a web request to look for TargetString.
- //
- // FieldToMatch is a required field
- FieldToMatch *FieldToMatch `type:"structure" required:"true"`
- // Text transformations eliminate some of the unusual formatting that attackers
- // use in web requests in an effort to bypass AWS WAF. If you specify a transformation,
- // AWS WAF performs the transformation on FieldToMatch before inspecting a request
- // for a match.
- //
- // CMD_LINE
- //
- // When you're concerned that attackers are injecting an operating system commandline
- // command and using unusual formatting to disguise some or all of the command,
- // use this option to perform the following transformations:
- //
- // * Delete the following characters: \ " ' ^
- //
- // * Delete spaces before the following characters: / (
- //
- // * Replace the following characters with a space: , ;
- //
- // * Replace multiple spaces with one space
- //
- // * Convert uppercase letters (A-Z) to lowercase (a-z)
- //
- // COMPRESS_WHITE_SPACE
- //
- // Use this option to replace the following characters with a space character
- // (decimal 32):
- //
- // * \f, formfeed, decimal 12
- //
- // * \t, tab, decimal 9
- //
- // * \n, newline, decimal 10
- //
- // * \r, carriage return, decimal 13
- //
- // * \v, vertical tab, decimal 11
- //
- // * non-breaking space, decimal 160
- //
- // COMPRESS_WHITE_SPACE also replaces multiple spaces with one space.
- //
- // HTML_ENTITY_DECODE
- //
- // Use this option to replace HTML-encoded characters with unencoded characters.
- // HTML_ENTITY_DECODE performs the following operations:
- //
- // * Replaces (ampersand)quot; with "
- //
- // * Replaces (ampersand)nbsp; with a non-breaking space, decimal 160
- //
- // * Replaces (ampersand)lt; with a "less than" symbol
- //
- // * Replaces (ampersand)gt; with >
- //
- // * Replaces characters that are represented in hexadecimal format, (ampersand)#xhhhh;,
- // with the corresponding characters
- //
- // * Replaces characters that are represented in decimal format, (ampersand)#nnnn;,
- // with the corresponding characters
- //
- // LOWERCASE
- //
- // Use this option to convert uppercase letters (A-Z) to lowercase (a-z).
- //
- // URL_DECODE
- //
- // Use this option to decode a URL-encoded value.
- //
- // NONE
- //
- // Specify NONE if you don't want to perform any text transformations.
- //
- // TextTransformation is a required field
- TextTransformation *string `type:"string" required:"true" enum:"TextTransformation"`
- }
- // String returns the string representation
- func (s SqlInjectionMatchTuple) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s SqlInjectionMatchTuple) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *SqlInjectionMatchTuple) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "SqlInjectionMatchTuple"}
- if s.FieldToMatch == nil {
- invalidParams.Add(request.NewErrParamRequired("FieldToMatch"))
- }
- if s.TextTransformation == nil {
- invalidParams.Add(request.NewErrParamRequired("TextTransformation"))
- }
- if s.FieldToMatch != nil {
- if err := s.FieldToMatch.Validate(); err != nil {
- invalidParams.AddNested("FieldToMatch", err.(request.ErrInvalidParams))
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // In a GetSampledRequests request, the StartTime and EndTime objects specify
- // the time range for which you want AWS WAF to return a sample of web requests.
- //
- // In a GetSampledRequests response, the StartTime and EndTime objects specify
- // the time range for which AWS WAF actually returned a sample of web requests.
- // AWS WAF gets the specified number of requests from among the first 5,000
- // requests that your AWS resource receives during the specified time period.
- // If your resource receives more than 5,000 requests during that period, AWS
- // WAF stops sampling after the 5,000th request. In that case, EndTime is the
- // time that AWS WAF received the 5,000th request.
- type TimeWindow struct {
- _ struct{} `type:"structure"`
- // The end of the time range from which you want GetSampledRequests to return
- // a sample of the requests that your AWS resource received. You can specify
- // any time range in the previous three hours.
- //
- // EndTime is a required field
- EndTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"`
- // The beginning of the time range from which you want GetSampledRequests to
- // return a sample of the requests that your AWS resource received. You can
- // specify any time range in the previous three hours.
- //
- // StartTime is a required field
- StartTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"`
- }
- // String returns the string representation
- func (s TimeWindow) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s TimeWindow) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *TimeWindow) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "TimeWindow"}
- if s.EndTime == nil {
- invalidParams.Add(request.NewErrParamRequired("EndTime"))
- }
- if s.StartTime == nil {
- invalidParams.Add(request.NewErrParamRequired("StartTime"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- type UpdateByteMatchSetInput struct {
- _ struct{} `type:"structure"`
- // The ByteMatchSetId of the ByteMatchSet that you want to update. ByteMatchSetId
- // is returned by CreateByteMatchSet and by ListByteMatchSets.
- //
- // ByteMatchSetId is a required field
- ByteMatchSetId *string `min:"1" type:"string" required:"true"`
- // The value returned by the most recent call to GetChangeToken.
- //
- // ChangeToken is a required field
- ChangeToken *string `min:"1" type:"string" required:"true"`
- // An array of ByteMatchSetUpdate objects that you want to insert into or delete
- // from a ByteMatchSet. For more information, see the applicable data types:
- //
- // * ByteMatchSetUpdate: Contains Action and ByteMatchTuple
- //
- // * ByteMatchTuple: Contains FieldToMatch, PositionalConstraint, TargetString,
- // and TextTransformation
- //
- // * FieldToMatch: Contains Data and Type
- //
- // Updates is a required field
- Updates []*ByteMatchSetUpdate `type:"list" required:"true"`
- }
- // String returns the string representation
- func (s UpdateByteMatchSetInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s UpdateByteMatchSetInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *UpdateByteMatchSetInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "UpdateByteMatchSetInput"}
- if s.ByteMatchSetId == nil {
- invalidParams.Add(request.NewErrParamRequired("ByteMatchSetId"))
- }
- if s.ByteMatchSetId != nil && len(*s.ByteMatchSetId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ByteMatchSetId", 1))
- }
- if s.ChangeToken == nil {
- invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
- }
- if s.ChangeToken != nil && len(*s.ChangeToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1))
- }
- if s.Updates == nil {
- invalidParams.Add(request.NewErrParamRequired("Updates"))
- }
- if s.Updates != nil {
- for i, v := range s.Updates {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Updates", i), err.(request.ErrInvalidParams))
- }
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- type UpdateByteMatchSetOutput struct {
- _ struct{} `type:"structure"`
- // The ChangeToken that you used to submit the UpdateByteMatchSet request. You
- // can also use this value to query the status of the request. For more information,
- // see GetChangeTokenStatus.
- ChangeToken *string `min:"1" type:"string"`
- }
- // String returns the string representation
- func (s UpdateByteMatchSetOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s UpdateByteMatchSetOutput) GoString() string {
- return s.String()
- }
- type UpdateIPSetInput struct {
- _ struct{} `type:"structure"`
- // The value returned by the most recent call to GetChangeToken.
- //
- // ChangeToken is a required field
- ChangeToken *string `min:"1" type:"string" required:"true"`
- // The IPSetId of the IPSet that you want to update. IPSetId is returned by
- // CreateIPSet and by ListIPSets.
- //
- // IPSetId is a required field
- IPSetId *string `min:"1" type:"string" required:"true"`
- // An array of IPSetUpdate objects that you want to insert into or delete from
- // an IPSet. For more information, see the applicable data types:
- //
- // * IPSetUpdate: Contains Action and IPSetDescriptor
- //
- // * IPSetDescriptor: Contains Type and Value
- //
- // Updates is a required field
- Updates []*IPSetUpdate `type:"list" required:"true"`
- }
- // String returns the string representation
- func (s UpdateIPSetInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s UpdateIPSetInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *UpdateIPSetInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "UpdateIPSetInput"}
- if s.ChangeToken == nil {
- invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
- }
- if s.ChangeToken != nil && len(*s.ChangeToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1))
- }
- if s.IPSetId == nil {
- invalidParams.Add(request.NewErrParamRequired("IPSetId"))
- }
- if s.IPSetId != nil && len(*s.IPSetId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("IPSetId", 1))
- }
- if s.Updates == nil {
- invalidParams.Add(request.NewErrParamRequired("Updates"))
- }
- if s.Updates != nil {
- for i, v := range s.Updates {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Updates", i), err.(request.ErrInvalidParams))
- }
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- type UpdateIPSetOutput struct {
- _ struct{} `type:"structure"`
- // The ChangeToken that you used to submit the UpdateIPSet request. You can
- // also use this value to query the status of the request. For more information,
- // see GetChangeTokenStatus.
- ChangeToken *string `min:"1" type:"string"`
- }
- // String returns the string representation
- func (s UpdateIPSetOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s UpdateIPSetOutput) GoString() string {
- return s.String()
- }
- type UpdateRuleInput struct {
- _ struct{} `type:"structure"`
- // The value returned by the most recent call to GetChangeToken.
- //
- // ChangeToken is a required field
- ChangeToken *string `min:"1" type:"string" required:"true"`
- // The RuleId of the Rule that you want to update. RuleId is returned by CreateRule
- // and by ListRules.
- //
- // RuleId is a required field
- RuleId *string `min:"1" type:"string" required:"true"`
- // An array of RuleUpdate objects that you want to insert into or delete from
- // a Rule. For more information, see the applicable data types:
- //
- // * RuleUpdate: Contains Action and Predicate
- //
- // * Predicate: Contains DataId, Negated, and Type
- //
- // * FieldToMatch: Contains Data and Type
- //
- // Updates is a required field
- Updates []*RuleUpdate `type:"list" required:"true"`
- }
- // String returns the string representation
- func (s UpdateRuleInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s UpdateRuleInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *UpdateRuleInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "UpdateRuleInput"}
- if s.ChangeToken == nil {
- invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
- }
- if s.ChangeToken != nil && len(*s.ChangeToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1))
- }
- if s.RuleId == nil {
- invalidParams.Add(request.NewErrParamRequired("RuleId"))
- }
- if s.RuleId != nil && len(*s.RuleId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("RuleId", 1))
- }
- if s.Updates == nil {
- invalidParams.Add(request.NewErrParamRequired("Updates"))
- }
- if s.Updates != nil {
- for i, v := range s.Updates {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Updates", i), err.(request.ErrInvalidParams))
- }
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- type UpdateRuleOutput struct {
- _ struct{} `type:"structure"`
- // The ChangeToken that you used to submit the UpdateRule request. You can also
- // use this value to query the status of the request. For more information,
- // see GetChangeTokenStatus.
- ChangeToken *string `min:"1" type:"string"`
- }
- // String returns the string representation
- func (s UpdateRuleOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s UpdateRuleOutput) GoString() string {
- return s.String()
- }
- type UpdateSizeConstraintSetInput struct {
- _ struct{} `type:"structure"`
- // The value returned by the most recent call to GetChangeToken.
- //
- // ChangeToken is a required field
- ChangeToken *string `min:"1" type:"string" required:"true"`
- // The SizeConstraintSetId of the SizeConstraintSet that you want to update.
- // SizeConstraintSetId is returned by CreateSizeConstraintSet and by ListSizeConstraintSets.
- //
- // SizeConstraintSetId is a required field
- SizeConstraintSetId *string `min:"1" type:"string" required:"true"`
- // An array of SizeConstraintSetUpdate objects that you want to insert into
- // or delete from a SizeConstraintSet. For more information, see the applicable
- // data types:
- //
- // * SizeConstraintSetUpdate: Contains Action and SizeConstraint
- //
- // * SizeConstraint: Contains FieldToMatch, TextTransformation, ComparisonOperator,
- // and Size
- //
- // * FieldToMatch: Contains Data and Type
- //
- // Updates is a required field
- Updates []*SizeConstraintSetUpdate `type:"list" required:"true"`
- }
- // String returns the string representation
- func (s UpdateSizeConstraintSetInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s UpdateSizeConstraintSetInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *UpdateSizeConstraintSetInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "UpdateSizeConstraintSetInput"}
- if s.ChangeToken == nil {
- invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
- }
- if s.ChangeToken != nil && len(*s.ChangeToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1))
- }
- if s.SizeConstraintSetId == nil {
- invalidParams.Add(request.NewErrParamRequired("SizeConstraintSetId"))
- }
- if s.SizeConstraintSetId != nil && len(*s.SizeConstraintSetId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("SizeConstraintSetId", 1))
- }
- if s.Updates == nil {
- invalidParams.Add(request.NewErrParamRequired("Updates"))
- }
- if s.Updates != nil {
- for i, v := range s.Updates {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Updates", i), err.(request.ErrInvalidParams))
- }
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- type UpdateSizeConstraintSetOutput struct {
- _ struct{} `type:"structure"`
- // The ChangeToken that you used to submit the UpdateSizeConstraintSet request.
- // You can also use this value to query the status of the request. For more
- // information, see GetChangeTokenStatus.
- ChangeToken *string `min:"1" type:"string"`
- }
- // String returns the string representation
- func (s UpdateSizeConstraintSetOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s UpdateSizeConstraintSetOutput) GoString() string {
- return s.String()
- }
- // A request to update a SqlInjectionMatchSet.
- type UpdateSqlInjectionMatchSetInput struct {
- _ struct{} `type:"structure"`
- // The value returned by the most recent call to GetChangeToken.
- //
- // ChangeToken is a required field
- ChangeToken *string `min:"1" type:"string" required:"true"`
- // The SqlInjectionMatchSetId of the SqlInjectionMatchSet that you want to update.
- // SqlInjectionMatchSetId is returned by CreateSqlInjectionMatchSet and by ListSqlInjectionMatchSets.
- //
- // SqlInjectionMatchSetId is a required field
- SqlInjectionMatchSetId *string `min:"1" type:"string" required:"true"`
- // An array of SqlInjectionMatchSetUpdate objects that you want to insert into
- // or delete from a SqlInjectionMatchSet. For more information, see the applicable
- // data types:
- //
- // * SqlInjectionMatchSetUpdate: Contains Action and SqlInjectionMatchTuple
- //
- // * SqlInjectionMatchTuple: Contains FieldToMatch and TextTransformation
- //
- // * FieldToMatch: Contains Data and Type
- //
- // Updates is a required field
- Updates []*SqlInjectionMatchSetUpdate `type:"list" required:"true"`
- }
- // String returns the string representation
- func (s UpdateSqlInjectionMatchSetInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s UpdateSqlInjectionMatchSetInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *UpdateSqlInjectionMatchSetInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "UpdateSqlInjectionMatchSetInput"}
- if s.ChangeToken == nil {
- invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
- }
- if s.ChangeToken != nil && len(*s.ChangeToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1))
- }
- if s.SqlInjectionMatchSetId == nil {
- invalidParams.Add(request.NewErrParamRequired("SqlInjectionMatchSetId"))
- }
- if s.SqlInjectionMatchSetId != nil && len(*s.SqlInjectionMatchSetId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("SqlInjectionMatchSetId", 1))
- }
- if s.Updates == nil {
- invalidParams.Add(request.NewErrParamRequired("Updates"))
- }
- if s.Updates != nil {
- for i, v := range s.Updates {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Updates", i), err.(request.ErrInvalidParams))
- }
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // The response to an UpdateSqlInjectionMatchSets request.
- type UpdateSqlInjectionMatchSetOutput struct {
- _ struct{} `type:"structure"`
- // The ChangeToken that you used to submit the UpdateSqlInjectionMatchSet request.
- // You can also use this value to query the status of the request. For more
- // information, see GetChangeTokenStatus.
- ChangeToken *string `min:"1" type:"string"`
- }
- // String returns the string representation
- func (s UpdateSqlInjectionMatchSetOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s UpdateSqlInjectionMatchSetOutput) GoString() string {
- return s.String()
- }
- type UpdateWebACLInput struct {
- _ struct{} `type:"structure"`
- // The value returned by the most recent call to GetChangeToken.
- //
- // ChangeToken is a required field
- ChangeToken *string `min:"1" type:"string" required:"true"`
- // For the action that is associated with a rule in a WebACL, specifies the
- // action that you want AWS WAF to perform when a web request matches all of
- // the conditions in a rule. For the default action in a WebACL, specifies the
- // action that you want AWS WAF to take when a web request doesn't match all
- // of the conditions in any of the rules in a WebACL.
- DefaultAction *WafAction `type:"structure"`
- // An array of updates to make to the WebACL.
- //
- // An array of WebACLUpdate objects that you want to insert into or delete from
- // a WebACL. For more information, see the applicable data types:
- //
- // * WebACLUpdate: Contains Action and ActivatedRule
- //
- // * ActivatedRule: Contains Action, Priority, and RuleId
- //
- // * WafAction: Contains Type
- Updates []*WebACLUpdate `type:"list"`
- // The WebACLId of the WebACL that you want to update. WebACLId is returned
- // by CreateWebACL and by ListWebACLs.
- //
- // WebACLId is a required field
- WebACLId *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s UpdateWebACLInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s UpdateWebACLInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *UpdateWebACLInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "UpdateWebACLInput"}
- if s.ChangeToken == nil {
- invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
- }
- if s.ChangeToken != nil && len(*s.ChangeToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1))
- }
- if s.WebACLId == nil {
- invalidParams.Add(request.NewErrParamRequired("WebACLId"))
- }
- if s.WebACLId != nil && len(*s.WebACLId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("WebACLId", 1))
- }
- if s.DefaultAction != nil {
- if err := s.DefaultAction.Validate(); err != nil {
- invalidParams.AddNested("DefaultAction", err.(request.ErrInvalidParams))
- }
- }
- if s.Updates != nil {
- for i, v := range s.Updates {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Updates", i), err.(request.ErrInvalidParams))
- }
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- type UpdateWebACLOutput struct {
- _ struct{} `type:"structure"`
- // The ChangeToken that you used to submit the UpdateWebACL request. You can
- // also use this value to query the status of the request. For more information,
- // see GetChangeTokenStatus.
- ChangeToken *string `min:"1" type:"string"`
- }
- // String returns the string representation
- func (s UpdateWebACLOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s UpdateWebACLOutput) GoString() string {
- return s.String()
- }
- // A request to update an XssMatchSet.
- type UpdateXssMatchSetInput struct {
- _ struct{} `type:"structure"`
- // The value returned by the most recent call to GetChangeToken.
- //
- // ChangeToken is a required field
- ChangeToken *string `min:"1" type:"string" required:"true"`
- // An array of XssMatchSetUpdate objects that you want to insert into or delete
- // from a XssMatchSet. For more information, see the applicable data types:
- //
- // * XssMatchSetUpdate: Contains Action and XssMatchTuple
- //
- // * XssMatchTuple: Contains FieldToMatch and TextTransformation
- //
- // * FieldToMatch: Contains Data and Type
- //
- // Updates is a required field
- Updates []*XssMatchSetUpdate `type:"list" required:"true"`
- // The XssMatchSetId of the XssMatchSet that you want to update. XssMatchSetId
- // is returned by CreateXssMatchSet and by ListXssMatchSets.
- //
- // XssMatchSetId is a required field
- XssMatchSetId *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s UpdateXssMatchSetInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s UpdateXssMatchSetInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *UpdateXssMatchSetInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "UpdateXssMatchSetInput"}
- if s.ChangeToken == nil {
- invalidParams.Add(request.NewErrParamRequired("ChangeToken"))
- }
- if s.ChangeToken != nil && len(*s.ChangeToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ChangeToken", 1))
- }
- if s.Updates == nil {
- invalidParams.Add(request.NewErrParamRequired("Updates"))
- }
- if s.XssMatchSetId == nil {
- invalidParams.Add(request.NewErrParamRequired("XssMatchSetId"))
- }
- if s.XssMatchSetId != nil && len(*s.XssMatchSetId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("XssMatchSetId", 1))
- }
- if s.Updates != nil {
- for i, v := range s.Updates {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Updates", i), err.(request.ErrInvalidParams))
- }
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // The response to an UpdateXssMatchSets request.
- type UpdateXssMatchSetOutput struct {
- _ struct{} `type:"structure"`
- // The ChangeToken that you used to submit the UpdateXssMatchSet request. You
- // can also use this value to query the status of the request. For more information,
- // see GetChangeTokenStatus.
- ChangeToken *string `min:"1" type:"string"`
- }
- // String returns the string representation
- func (s UpdateXssMatchSetOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s UpdateXssMatchSetOutput) GoString() string {
- return s.String()
- }
- // For the action that is associated with a rule in a WebACL, specifies the
- // action that you want AWS WAF to perform when a web request matches all of
- // the conditions in a rule. For the default action in a WebACL, specifies the
- // action that you want AWS WAF to take when a web request doesn't match all
- // of the conditions in any of the rules in a WebACL.
- type WafAction struct {
- _ struct{} `type:"structure"`
- // Specifies how you want AWS WAF to respond to requests that match the settings
- // in a Rule. Valid settings include the following:
- //
- // * ALLOW: AWS WAF allows requests
- //
- // * BLOCK: AWS WAF blocks requests
- //
- // * COUNT: AWS WAF increments a counter of the requests that match all of
- // the conditions in the rule. AWS WAF then continues to inspect the web
- // request based on the remaining rules in the web ACL. You can't specify
- // COUNT for the default action for a WebACL.
- //
- // Type is a required field
- Type *string `type:"string" required:"true" enum:"WafActionType"`
- }
- // String returns the string representation
- func (s WafAction) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s WafAction) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *WafAction) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "WafAction"}
- if s.Type == nil {
- invalidParams.Add(request.NewErrParamRequired("Type"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // Contains the Rules that identify the requests that you want to allow, block,
- // or count. In a WebACL, you also specify a default action (ALLOW or BLOCK),
- // and the action for each Rule that you add to a WebACL, for example, block
- // requests from specified IP addresses or block requests from specified referrers.
- // You also associate the WebACL with a CloudFront distribution to identify
- // the requests that you want AWS WAF to filter. If you add more than one Rule
- // to a WebACL, a request needs to match only one of the specifications to be
- // allowed, blocked, or counted. For more information, see UpdateWebACL.
- type WebACL struct {
- _ struct{} `type:"structure"`
- // The action to perform if none of the Rules contained in the WebACL match.
- // The action is specified by the WafAction object.
- //
- // DefaultAction is a required field
- DefaultAction *WafAction `type:"structure" required:"true"`
- MetricName *string `type:"string"`
- // A friendly name or description of the WebACL. You can't change the name of
- // a WebACL after you create it.
- Name *string `min:"1" type:"string"`
- // An array that contains the action for each Rule in a WebACL, the priority
- // of the Rule, and the ID of the Rule.
- //
- // Rules is a required field
- Rules []*ActivatedRule `type:"list" required:"true"`
- // A unique identifier for a WebACL. You use WebACLId to get information about
- // a WebACL (see GetWebACL), update a WebACL (see UpdateWebACL), and delete
- // a WebACL from AWS WAF (see DeleteWebACL).
- //
- // WebACLId is returned by CreateWebACL and by ListWebACLs.
- //
- // WebACLId is a required field
- WebACLId *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s WebACL) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s WebACL) GoString() string {
- return s.String()
- }
- // Contains the identifier and the name or description of the WebACL.
- type WebACLSummary struct {
- _ struct{} `type:"structure"`
- // A friendly name or description of the WebACL. You can't change the name of
- // a WebACL after you create it.
- //
- // Name is a required field
- Name *string `min:"1" type:"string" required:"true"`
- // A unique identifier for a WebACL. You use WebACLId to get information about
- // a WebACL (see GetWebACL), update a WebACL (see UpdateWebACL), and delete
- // a WebACL from AWS WAF (see DeleteWebACL).
- //
- // WebACLId is returned by CreateWebACL and by ListWebACLs.
- //
- // WebACLId is a required field
- WebACLId *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s WebACLSummary) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s WebACLSummary) GoString() string {
- return s.String()
- }
- // Specifies whether to insert a Rule into or delete a Rule from a WebACL.
- type WebACLUpdate struct {
- _ struct{} `type:"structure"`
- // Specifies whether to insert a Rule into or delete a Rule from a WebACL.
- //
- // Action is a required field
- Action *string `type:"string" required:"true" enum:"ChangeAction"`
- // The ActivatedRule object in an UpdateWebACL request specifies a Rule that
- // you want to insert or delete, the priority of the Rule in the WebACL, and
- // the action that you want AWS WAF to take when a web request matches the Rule
- // (ALLOW, BLOCK, or COUNT).
- //
- // To specify whether to insert or delete a Rule, use the Action parameter in
- // the WebACLUpdate data type.
- //
- // ActivatedRule is a required field
- ActivatedRule *ActivatedRule `type:"structure" required:"true"`
- }
- // String returns the string representation
- func (s WebACLUpdate) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s WebACLUpdate) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *WebACLUpdate) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "WebACLUpdate"}
- if s.Action == nil {
- invalidParams.Add(request.NewErrParamRequired("Action"))
- }
- if s.ActivatedRule == nil {
- invalidParams.Add(request.NewErrParamRequired("ActivatedRule"))
- }
- if s.ActivatedRule != nil {
- if err := s.ActivatedRule.Validate(); err != nil {
- invalidParams.AddNested("ActivatedRule", err.(request.ErrInvalidParams))
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // A complex type that contains XssMatchTuple objects, which specify the parts
- // of web requests that you want AWS WAF to inspect for cross-site scripting
- // attacks and, if you want AWS WAF to inspect a header, the name of the header.
- // If a XssMatchSet contains more than one XssMatchTuple object, a request needs
- // to include cross-site scripting attacks in only one of the specified parts
- // of the request to be considered a match.
- type XssMatchSet struct {
- _ struct{} `type:"structure"`
- // The name, if any, of the XssMatchSet.
- Name *string `min:"1" type:"string"`
- // A unique identifier for an XssMatchSet. You use XssMatchSetId to get information
- // about an XssMatchSet (see GetXssMatchSet), update an XssMatchSet (see UpdateXssMatchSet),
- // insert an XssMatchSet into a Rule or delete one from a Rule (see UpdateRule),
- // and delete an XssMatchSet from AWS WAF (see DeleteXssMatchSet).
- //
- // XssMatchSetId is returned by CreateXssMatchSet and by ListXssMatchSets.
- //
- // XssMatchSetId is a required field
- XssMatchSetId *string `min:"1" type:"string" required:"true"`
- // Specifies the parts of web requests that you want to inspect for cross-site
- // scripting attacks.
- //
- // XssMatchTuples is a required field
- XssMatchTuples []*XssMatchTuple `type:"list" required:"true"`
- }
- // String returns the string representation
- func (s XssMatchSet) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s XssMatchSet) GoString() string {
- return s.String()
- }
- // The Id and Name of an XssMatchSet.
- type XssMatchSetSummary struct {
- _ struct{} `type:"structure"`
- // The name of the XssMatchSet, if any, specified by Id.
- //
- // Name is a required field
- Name *string `min:"1" type:"string" required:"true"`
- // A unique identifier for an XssMatchSet. You use XssMatchSetId to get information
- // about a XssMatchSet (see GetXssMatchSet), update an XssMatchSet (see UpdateXssMatchSet),
- // insert an XssMatchSet into a Rule or delete one from a Rule (see UpdateRule),
- // and delete an XssMatchSet from AWS WAF (see DeleteXssMatchSet).
- //
- // XssMatchSetId is returned by CreateXssMatchSet and by ListXssMatchSets.
- //
- // XssMatchSetId is a required field
- XssMatchSetId *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s XssMatchSetSummary) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s XssMatchSetSummary) GoString() string {
- return s.String()
- }
- // Specifies the part of a web request that you want to inspect for cross-site
- // scripting attacks and indicates whether you want to add the specification
- // to an XssMatchSet or delete it from an XssMatchSet.
- type XssMatchSetUpdate struct {
- _ struct{} `type:"structure"`
- // Specify INSERT to add a XssMatchSetUpdate to an XssMatchSet. Use DELETE to
- // remove a XssMatchSetUpdate from an XssMatchSet.
- //
- // Action is a required field
- Action *string `type:"string" required:"true" enum:"ChangeAction"`
- // Specifies the part of a web request that you want AWS WAF to inspect for
- // cross-site scripting attacks and, if you want AWS WAF to inspect a header,
- // the name of the header.
- //
- // XssMatchTuple is a required field
- XssMatchTuple *XssMatchTuple `type:"structure" required:"true"`
- }
- // String returns the string representation
- func (s XssMatchSetUpdate) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s XssMatchSetUpdate) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *XssMatchSetUpdate) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "XssMatchSetUpdate"}
- if s.Action == nil {
- invalidParams.Add(request.NewErrParamRequired("Action"))
- }
- if s.XssMatchTuple == nil {
- invalidParams.Add(request.NewErrParamRequired("XssMatchTuple"))
- }
- if s.XssMatchTuple != nil {
- if err := s.XssMatchTuple.Validate(); err != nil {
- invalidParams.AddNested("XssMatchTuple", err.(request.ErrInvalidParams))
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // Specifies the part of a web request that you want AWS WAF to inspect for
- // cross-site scripting attacks and, if you want AWS WAF to inspect a header,
- // the name of the header.
- type XssMatchTuple struct {
- _ struct{} `type:"structure"`
- // Specifies where in a web request to look for TargetString.
- //
- // FieldToMatch is a required field
- FieldToMatch *FieldToMatch `type:"structure" required:"true"`
- // Text transformations eliminate some of the unusual formatting that attackers
- // use in web requests in an effort to bypass AWS WAF. If you specify a transformation,
- // AWS WAF performs the transformation on FieldToMatch before inspecting a request
- // for a match.
- //
- // CMD_LINE
- //
- // When you're concerned that attackers are injecting an operating system commandline
- // command and using unusual formatting to disguise some or all of the command,
- // use this option to perform the following transformations:
- //
- // * Delete the following characters: \ " ' ^
- //
- // * Delete spaces before the following characters: / (
- //
- // * Replace the following characters with a space: , ;
- //
- // * Replace multiple spaces with one space
- //
- // * Convert uppercase letters (A-Z) to lowercase (a-z)
- //
- // COMPRESS_WHITE_SPACE
- //
- // Use this option to replace the following characters with a space character
- // (decimal 32):
- //
- // * \f, formfeed, decimal 12
- //
- // * \t, tab, decimal 9
- //
- // * \n, newline, decimal 10
- //
- // * \r, carriage return, decimal 13
- //
- // * \v, vertical tab, decimal 11
- //
- // * non-breaking space, decimal 160
- //
- // COMPRESS_WHITE_SPACE also replaces multiple spaces with one space.
- //
- // HTML_ENTITY_DECODE
- //
- // Use this option to replace HTML-encoded characters with unencoded characters.
- // HTML_ENTITY_DECODE performs the following operations:
- //
- // * Replaces (ampersand)quot; with "
- //
- // * Replaces (ampersand)nbsp; with a non-breaking space, decimal 160
- //
- // * Replaces (ampersand)lt; with a "less than" symbol
- //
- // * Replaces (ampersand)gt; with >
- //
- // * Replaces characters that are represented in hexadecimal format, (ampersand)#xhhhh;,
- // with the corresponding characters
- //
- // * Replaces characters that are represented in decimal format, (ampersand)#nnnn;,
- // with the corresponding characters
- //
- // LOWERCASE
- //
- // Use this option to convert uppercase letters (A-Z) to lowercase (a-z).
- //
- // URL_DECODE
- //
- // Use this option to decode a URL-encoded value.
- //
- // NONE
- //
- // Specify NONE if you don't want to perform any text transformations.
- //
- // TextTransformation is a required field
- TextTransformation *string `type:"string" required:"true" enum:"TextTransformation"`
- }
- // String returns the string representation
- func (s XssMatchTuple) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s XssMatchTuple) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *XssMatchTuple) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "XssMatchTuple"}
- if s.FieldToMatch == nil {
- invalidParams.Add(request.NewErrParamRequired("FieldToMatch"))
- }
- if s.TextTransformation == nil {
- invalidParams.Add(request.NewErrParamRequired("TextTransformation"))
- }
- if s.FieldToMatch != nil {
- if err := s.FieldToMatch.Validate(); err != nil {
- invalidParams.AddNested("FieldToMatch", err.(request.ErrInvalidParams))
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- const (
- // ChangeActionInsert is a ChangeAction enum value
- ChangeActionInsert = "INSERT"
- // ChangeActionDelete is a ChangeAction enum value
- ChangeActionDelete = "DELETE"
- )
- const (
- // ChangeTokenStatusProvisioned is a ChangeTokenStatus enum value
- ChangeTokenStatusProvisioned = "PROVISIONED"
- // ChangeTokenStatusPending is a ChangeTokenStatus enum value
- ChangeTokenStatusPending = "PENDING"
- // ChangeTokenStatusInsync is a ChangeTokenStatus enum value
- ChangeTokenStatusInsync = "INSYNC"
- )
- const (
- // ComparisonOperatorEq is a ComparisonOperator enum value
- ComparisonOperatorEq = "EQ"
- // ComparisonOperatorNe is a ComparisonOperator enum value
- ComparisonOperatorNe = "NE"
- // ComparisonOperatorLe is a ComparisonOperator enum value
- ComparisonOperatorLe = "LE"
- // ComparisonOperatorLt is a ComparisonOperator enum value
- ComparisonOperatorLt = "LT"
- // ComparisonOperatorGe is a ComparisonOperator enum value
- ComparisonOperatorGe = "GE"
- // ComparisonOperatorGt is a ComparisonOperator enum value
- ComparisonOperatorGt = "GT"
- )
- const (
- // IPSetDescriptorTypeIpv4 is a IPSetDescriptorType enum value
- IPSetDescriptorTypeIpv4 = "IPV4"
- // IPSetDescriptorTypeIpv6 is a IPSetDescriptorType enum value
- IPSetDescriptorTypeIpv6 = "IPV6"
- )
- const (
- // MatchFieldTypeUri is a MatchFieldType enum value
- MatchFieldTypeUri = "URI"
- // MatchFieldTypeQueryString is a MatchFieldType enum value
- MatchFieldTypeQueryString = "QUERY_STRING"
- // MatchFieldTypeHeader is a MatchFieldType enum value
- MatchFieldTypeHeader = "HEADER"
- // MatchFieldTypeMethod is a MatchFieldType enum value
- MatchFieldTypeMethod = "METHOD"
- // MatchFieldTypeBody is a MatchFieldType enum value
- MatchFieldTypeBody = "BODY"
- )
- const (
- // ParameterExceptionFieldChangeAction is a ParameterExceptionField enum value
- ParameterExceptionFieldChangeAction = "CHANGE_ACTION"
- // ParameterExceptionFieldWafAction is a ParameterExceptionField enum value
- ParameterExceptionFieldWafAction = "WAF_ACTION"
- // ParameterExceptionFieldPredicateType is a ParameterExceptionField enum value
- ParameterExceptionFieldPredicateType = "PREDICATE_TYPE"
- // ParameterExceptionFieldIpsetType is a ParameterExceptionField enum value
- ParameterExceptionFieldIpsetType = "IPSET_TYPE"
- // ParameterExceptionFieldByteMatchFieldType is a ParameterExceptionField enum value
- ParameterExceptionFieldByteMatchFieldType = "BYTE_MATCH_FIELD_TYPE"
- // ParameterExceptionFieldSqlInjectionMatchFieldType is a ParameterExceptionField enum value
- ParameterExceptionFieldSqlInjectionMatchFieldType = "SQL_INJECTION_MATCH_FIELD_TYPE"
- // ParameterExceptionFieldByteMatchTextTransformation is a ParameterExceptionField enum value
- ParameterExceptionFieldByteMatchTextTransformation = "BYTE_MATCH_TEXT_TRANSFORMATION"
- // ParameterExceptionFieldByteMatchPositionalConstraint is a ParameterExceptionField enum value
- ParameterExceptionFieldByteMatchPositionalConstraint = "BYTE_MATCH_POSITIONAL_CONSTRAINT"
- // ParameterExceptionFieldSizeConstraintComparisonOperator is a ParameterExceptionField enum value
- ParameterExceptionFieldSizeConstraintComparisonOperator = "SIZE_CONSTRAINT_COMPARISON_OPERATOR"
- )
- const (
- // ParameterExceptionReasonInvalidOption is a ParameterExceptionReason enum value
- ParameterExceptionReasonInvalidOption = "INVALID_OPTION"
- // ParameterExceptionReasonIllegalCombination is a ParameterExceptionReason enum value
- ParameterExceptionReasonIllegalCombination = "ILLEGAL_COMBINATION"
- )
- const (
- // PositionalConstraintExactly is a PositionalConstraint enum value
- PositionalConstraintExactly = "EXACTLY"
- // PositionalConstraintStartsWith is a PositionalConstraint enum value
- PositionalConstraintStartsWith = "STARTS_WITH"
- // PositionalConstraintEndsWith is a PositionalConstraint enum value
- PositionalConstraintEndsWith = "ENDS_WITH"
- // PositionalConstraintContains is a PositionalConstraint enum value
- PositionalConstraintContains = "CONTAINS"
- // PositionalConstraintContainsWord is a PositionalConstraint enum value
- PositionalConstraintContainsWord = "CONTAINS_WORD"
- )
- const (
- // PredicateTypeIpmatch is a PredicateType enum value
- PredicateTypeIpmatch = "IPMatch"
- // PredicateTypeByteMatch is a PredicateType enum value
- PredicateTypeByteMatch = "ByteMatch"
- // PredicateTypeSqlInjectionMatch is a PredicateType enum value
- PredicateTypeSqlInjectionMatch = "SqlInjectionMatch"
- // PredicateTypeSizeConstraint is a PredicateType enum value
- PredicateTypeSizeConstraint = "SizeConstraint"
- // PredicateTypeXssMatch is a PredicateType enum value
- PredicateTypeXssMatch = "XssMatch"
- )
- const (
- // TextTransformationNone is a TextTransformation enum value
- TextTransformationNone = "NONE"
- // TextTransformationCompressWhiteSpace is a TextTransformation enum value
- TextTransformationCompressWhiteSpace = "COMPRESS_WHITE_SPACE"
- // TextTransformationHtmlEntityDecode is a TextTransformation enum value
- TextTransformationHtmlEntityDecode = "HTML_ENTITY_DECODE"
- // TextTransformationLowercase is a TextTransformation enum value
- TextTransformationLowercase = "LOWERCASE"
- // TextTransformationCmdLine is a TextTransformation enum value
- TextTransformationCmdLine = "CMD_LINE"
- // TextTransformationUrlDecode is a TextTransformation enum value
- TextTransformationUrlDecode = "URL_DECODE"
- )
- const (
- // WafActionTypeBlock is a WafActionType enum value
- WafActionTypeBlock = "BLOCK"
- // WafActionTypeAllow is a WafActionType enum value
- WafActionTypeAllow = "ALLOW"
- // WafActionTypeCount is a WafActionType enum value
- WafActionTypeCount = "COUNT"
- )
|